-
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
Logical error in transpiler.py #9885
Labels
bug
Something isn't working
Comments
wshanks
added a commit
to wshanks/qiskit-terra
that referenced
this issue
Mar 30, 2023
mtreinish
pushed a commit
that referenced
this issue
Apr 4, 2023
* Fixed handling of a list of coupling_maps passed to transpile() Closes #9885 * Update qiskit/compiler/transpiler.py * Add test * Release note * Fix test
giacomoRanieri
pushed a commit
to giacomoRanieri/qiskit-terra
that referenced
this issue
Apr 16, 2023
…it#9886) * Fixed handling of a list of coupling_maps passed to transpile() Closes Qiskit#9885 * Update qiskit/compiler/transpiler.py * Add test * Release note * Fix test
king-p3nguin
pushed a commit
to king-p3nguin/qiskit-terra
that referenced
this issue
May 22, 2023
…it#9886) * Fixed handling of a list of coupling_maps passed to transpile() Closes Qiskit#9885 * Update qiskit/compiler/transpiler.py * Add test * Release note * Fix test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
What is happening?
While debugging other issues with the coupling_map, I noticed a puzzling section in the code:
https://github.com/Qiskit/qiskit-terra/blob/1282a04d528dd56d8e401dccc388a32178e9c6cc/qiskit/compiler/transpiler.py#L358-L361
At this point,
coupling_map
is either aCouplingMap
, a list of lists of integers, orNone
andunique_transpile_args
is a list of dicts with these keys:https://github.com/Qiskit/qiskit-terra/blob/1282a04d528dd56d8e401dccc388a32178e9c6cc/qiskit/compiler/transpiler.py#L757-L763
So I don't see how this condition could ever be true.
How can we reproduce the issue?
Here is some code that can raise an exception because of the problem with the code:
What should happen?
No error for the above code.
Any suggestions?
I think code needs to check if
"coupling_map"
is in the shared dict, pull the coupling maps out of the unique dicts if not.The text was updated successfully, but these errors were encountered: