-
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
Calling stochasticswap pass directly fails #7724
Comments
This appears to have been fixed on |
Yes. This now works on main. Although still curious why it worked via |
My guess is that it worked with |
So the backend in question has bi-direction coupling for qubits 0->4. But then this circuit fails: ghz = QuantumCircuit(5)
ghz.h(0)
ghz.cx(0,range(1,5)) If I pass a restricted coupling map: coupling = [[0,1], [1,0], [1,2], [2,1], [2,3], [3,2], [3,4], [4,3]] which is contained inside of the original then it works. So it appears that the swap mapper requires the circuit to be of the same width as the device given by the coupling map. Indeed the exact same circuit but over 20q works. We should probably throw a better error if passing a circuit to a swap mapper where that is not the case. |
I am not sure how rust changes things here. |
Functionally there is no difference between the rust and cython implementations. The rust just runs the trials in parallel instead of serially and is using a different rng (each thread has a thread local PCG64MCG rng and the seeding is different) |
Yeah but the above fails no matter which seed you use, which is why I am confused. |
Looks like |
Environment
{'qiskit-terra': '0.19.2', 'qiskit-aer': '0.10.3', 'qiskit-ignis': '0.7.0', 'qiskit-ibmq-provider': '0.18.3', 'qiskit-aqua': None, 'qiskit': '0.34.2', 'qiskit-nature': None, 'qiskit-finance': None, 'qiskit-optimization': None, 'qiskit-machine-learning': None}
What is happening?
A simple modification to a doc example from https://qiskit.org/documentation/tutorials/circuits_advanced/04_transpiler_passes_and_passmanager.html#Different-Variants-of-the-Same-Pass
yields
How can we reproduce the issue?
Run above
What should happen?
It should work. It works if calling from
transpile
withrouting_method='stochastic'
Any suggestions?
No response
The text was updated successfully, but these errors were encountered: