-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
CSP ignores 3-or-more-qubit gates #7155
Comments
@1ucian0 I tried to add 3-or-more-qubit gates as constraints, and the pass generates this layout:
I guess maybe it is reasonable? It does not involve swaps. It simply suggests that mapping |
In the original example, CCX does not have a possible layout in the coupling map |
Can I work on this? |
Sure thing @Silrem. Assigning. let me know if I can help! |
un-assigning so that this issue is open for others to have a go. If anyone would like to pick this work up make sure to take a look at #7625 and go from there 😄 |
I want to work on the issue if it still exists. |
sorry for the slow reply @lmpawan10, I'll assign to you 😄 As this is an old issue the first step would be to check that the bug still exists |
Hello @lmpawan10 ! Are you still working on this one? |
Sorry that I got busier with other tasks. I am planning to work on this issue this month. |
Hi @lmpawan10 ! how is that going? |
clearing assignee |
@ChilliPenguin submitted #12912, can you leave a comment in this issue so I can assign it to you? |
Sorry that I bring this point so late in the process (after there is a PR implementing the requested change), but I don't understand why to layout a multi-qubit gate we should assume that all of its qubits should be mapped to pairwise connected physical qubits. In the normal transpilation flow, we always decompose multi-qubit gates into single-qubit and two-qubit gates, so the issue presented here (a layout algorithm needs to handle a 3-qubit gate) would simply not arise. On the other hand, if, hypothetically, in some future we would be able to apply a CCX gate natively on a device, then we would also need a generalization of the coupling map that holds the information which 3-qubit gates can or cannot be natively applied (so this would still not be the right approach). Hmm, I can also see a scenario where someone would want to use @1ucian0, @ChilliPenguin, would love to hear your thoughts on this. |
Information
What is the current behavior?
Take the following circuit:
CSPLayout
should not be able to find a solution with a layout0- > 1 -> 2
. However:Suggested solutions
There are two options. If
CSPLayout
encounters a 3-or-more-qubit gate, either assumes that this needs complete connection among the involved qubits, or just fails with reason3-or-more-qubit gate found
.The text was updated successfully, but these errors were encountered: