Skip to content

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 28, 2025

Summary

The current slowest unit test in the suite is:

test_transpile_does_not_affect_backend_coupling_4_3

which is just sanity checking that a transpile() call doesn't mutate the CouplingMap by mistake. This is is a regression test for an old bug where that happened. However, in the move to use GenericBackendV2 it was creating a 130 qubit target with explicit all-to-all connectivity, which is the default behavior if you don't specify a coupling map argument. This ends up bogging the transpiler down in VF2PostLayout in optimization level 3 because there are a huge number of possible layouts, basically any permutation of 130 qubits. This isn't functionally part of the test because it's just trying to test if the coupling map is mutated by the transpiler. This commit updates the test to use a 130 qubit linear connectivity graph which still tests the circuit but takes a fraction of the time to execute because the target is much more constrained.

Details and comments
This is an automatic backport of pull request #14483 done by Mergify.

The current slowest unit test in the suite is:

test_transpile_does_not_affect_backend_coupling_4_3

which is just sanity checking that a transpile() call doesn't mutate the
CouplingMap by mistake. This is is a regression test for an old bug where
that happened. However, in the move to use GenericBackendV2 it was
creating a 130 qubit target with explicit all-to-all connectivity, which
is the default behavior if you don't specify a coupling map argument.
This ends up bogging the transpiler down in VF2PostLayout in
optimization level 3 because there are a huge number of possible
layouts, basically any permutation of 130 qubits. This isn't
functionally part of the test because it's just trying to test if the
coupling map is mutated by the transpiler. This commit updates the test
to use a 130 qubit linear connectivity graph which still tests the
circuit but takes a fraction of the time to execute because the target
is much more constrained.

(cherry picked from commit 88ce515)
@mergify mergify bot requested a review from a team as a code owner May 28, 2025 12:51
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

@github-actions github-actions bot added type: qa Issues and PRs that relate to testing and code quality Changelog: None Do not include in changelog labels May 28, 2025
@jakelishman jakelishman enabled auto-merge May 28, 2025 12:55
@coveralls
Copy link

Pull Request Test Coverage Report for Build 15300613616

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.02%) to 88.133%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 94.23%
crates/qasm2/src/lex.rs 3 91.98%
Totals Coverage Status
Change from base Build 15284714329: 0.02%
Covered Lines: 72941
Relevant Lines: 82762

💛 - Coveralls

@jakelishman jakelishman added this pull request to the merge queue May 28, 2025
Merged via the queue into stable/2.0 with commit 261e4e2 May 28, 2025
27 checks passed
@jakelishman jakelishman deleted the mergify/bp/stable/2.0/pr-14483 branch June 9, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog type: qa Issues and PRs that relate to testing and code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants