-
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
Compiler remaps when no remapping is needed #1655
Comments
Im not sure this is a bug but clearly the passes need to be better. Some options to worry about it.
|
Thanks Jay. To me it feels like a bug because it used to work but now it doesn't, and not because of any intentional deprecation (I assume). I should also have mentioned: my workaround does not work for batch jobs that include circuits of different sizes (due to decisions made it #704, it seems). So that's why it remained an issue for me. Your solution (here's an explicit snippet for posterity)
does work in this case. So I'm happy to accept this is the way to do things now, and will close. |
Hi James this is fixed via #1499, but this pass is currently not part of the default PassManager. It will be in the next release. |
Informations
What is the current behavior?
See this notebook. A circuit is made containing cnots that can be directly implemented on a device. The compiler then remaps this to different qubits for which the cnots are not directly possible, and adds in extra cnots to compensate.
Steps to reproduce the problem
See the notebook above.
What is the expected behavior?
The compiler should realize that using qubit n of the device for qubit n of the circuit will prevent the need for any swap gates.
Suggested solutions
Suppling a trivial
initial_layout
removes the problem, but I don't think it should be needed.The text was updated successfully, but these errors were encountered: