-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Avoid all-to-all connectivity in slowest test #14483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
One or more of the following people are relevant to this code:
|
jakelishman
approved these changes
May 28, 2025
Pull Request Test Coverage Report for Build 15299147700Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
mergify bot
pushed a commit
that referenced
this pull request
May 28, 2025
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)
github-merge-queue bot
pushed a commit
that referenced
this pull request
May 28, 2025
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) Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
rahaman-quantum
pushed a commit
to rahaman-quantum/qiskit
that referenced
this pull request
Jun 20, 2025
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.
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
stable backport potential
The bug might be minimal and/or import enough to be port to stable
type: qa
Issues and PRs that relate to testing and code quality
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The current slowest unit test in the suite is:
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