-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
ElidePermutation undoes routing #13144
Comments
mtreinish
added a commit
to mtreinish/qiskit-core
that referenced
this issue
Sep 18, 2024
We have a routing plugin named "none" which is used to assert that no routing should be performed (it errors if there is routing required). We were previously running the ElidePermutations pass in this case which is not the expected or correct behavior because it causes the same kind of permutation as routing and would eliminate and swap gates in the circuit. As the typical use case for routing_method='none' is when you've already routed a circuit (or constructed it by hand to match the connectivity constraints) we shouldn't be doing this. This commit fixes this behavior so if the routing_method is set to "none" we no longer run the ElidePermutations pass. Fixes Qiskit#13144
github-merge-queue bot
pushed a commit
that referenced
this issue
Sep 19, 2024
* Don't run ElidePermutation if routing is disabled We have a routing plugin named "none" which is used to assert that no routing should be performed (it errors if there is routing required). We were previously running the ElidePermutations pass in this case which is not the expected or correct behavior because it causes the same kind of permutation as routing and would eliminate and swap gates in the circuit. As the typical use case for routing_method='none' is when you've already routed a circuit (or constructed it by hand to match the connectivity constraints) we shouldn't be doing this. This commit fixes this behavior so if the routing_method is set to "none" we no longer run the ElidePermutations pass. Fixes #13144 * Move release note to the correct location
mergify bot
pushed a commit
that referenced
this issue
Sep 19, 2024
* Don't run ElidePermutation if routing is disabled We have a routing plugin named "none" which is used to assert that no routing should be performed (it errors if there is routing required). We were previously running the ElidePermutations pass in this case which is not the expected or correct behavior because it causes the same kind of permutation as routing and would eliminate and swap gates in the circuit. As the typical use case for routing_method='none' is when you've already routed a circuit (or constructed it by hand to match the connectivity constraints) we shouldn't be doing this. This commit fixes this behavior so if the routing_method is set to "none" we no longer run the ElidePermutations pass. Fixes #13144 * Move release note to the correct location (cherry picked from commit 9a896d3)
github-merge-queue bot
pushed a commit
that referenced
this issue
Sep 20, 2024
* Don't run ElidePermutation if routing is disabled We have a routing plugin named "none" which is used to assert that no routing should be performed (it errors if there is routing required). We were previously running the ElidePermutations pass in this case which is not the expected or correct behavior because it causes the same kind of permutation as routing and would eliminate and swap gates in the circuit. As the typical use case for routing_method='none' is when you've already routed a circuit (or constructed it by hand to match the connectivity constraints) we shouldn't be doing this. This commit fixes this behavior so if the routing_method is set to "none" we no longer run the ElidePermutations pass. Fixes #13144 * Move release note to the correct location (cherry picked from commit 9a896d3) Co-authored-by: Matthew Treinish <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
What is happening?
Circuits that are mapped and routed can become unmapped unintentionally due to ElidePermutation treating inserted SWAPs as unwanted.
How can we reproduce the issue?
Suppose i ran some routing passes and got the following circuit on a line of 4 qubits. Then i just want to bring it down to some basis gates. Optimization level 2 and 3 (due to ElidePermutation) will undo the mapping.
gives
What should happen?
routing_method='none' should disable ElidePermutation (or anything that wants to remove swaps)
Any suggestions?
No response
The text was updated successfully, but these errors were encountered: