-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
generate_preset_pass_manager generates transpiler error on efficientSU2 at 12 qubits #11784
Comments
Did this work with a previous version of Qiskit with I thought we had an open issue about unifying the behaviour of |
This isn't an interface bug about the people running with backends/targets and basis_gates. I expect this is a reused state bug, looking at this locally it runs the loop ~10 times and then fails when Either way if my guess is correct, then the correct thing to do is clear out the property set when run() is called. |
I also can confirm that this exact script didn't fail in Qiskit 0.44.3. But it does fail with 1.0.0rc1 |
Yeah, I wasn't thinking it was the same as Ah yeah, that does make sense, and it could easily explain it if the bug appeared in 0.45 - that's when the pass manager handling changed, and the way the task iterator is generated changed between those versions. The problem is that |
Yeah, I was using whatever was available before summit. I think the RC of 0.45 |
This issue actually pops up an interesting question to me: Perhaps we ought to consider an expansion of the interface that allows returning both the final programs and the workflow states at some point? That would be a separate issue to this, of course. |
Also, presumably the reason that things fail at 12 qubits in this particular set up is because Kyiv is heavy-hex, the input circuit is a ring graph, and That's unrelated to the actual bug reported here, though it might be interesting to see why the embedding is failing if |
My suspicion (although I haven't had time to confirm it yet) is that it's actually an interaction of |
As long as it's all about the |
As a short term workaround for anyone hitting something like this until #11787 is merged and released you can modify the example code to do something like: import time
from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager
from qiskit.circuit.library import EfficientSU2
from qiskit_ibm_runtime import QiskitRuntimeService
from qiskit.passmanager import PropertySet
service = QiskitRuntimeService()
backend = service.get_backend('ibm_kyiv')
target = backend.target
pm = generate_preset_pass_manager(target=target, optimization_level=3)
qubits = list(range(2, 128))
qiskit_times = []
qiskit_depth = []
qiskit_2q = []
for N in qubits:
print('Starting', N, 'qubits')
qc = EfficientSU2(N, entanglement='circular')
print('circuit building done')
st = time.perf_counter()
trans_qc = pm.run(qc)
fin = time.perf_counter()
pm.property_set = PropertySet()
qiskit_times.append(fin-st)
qiskit_depth.append(trans_qc.depth())
qiskit_2q.append(trans_qc.count_ops().get('cx', 0))
print('Qiskit', fin-st, qiskit_2q[-1])
print() Running |
Environment
What is happening?
Running benchmarks that were presented at Summit now error when using
generate_preset_pass_manager
.It fails at 12 qubits with the error:
TranspilerError: 'Fewer qubits in the circuit (12) than the coupling map (127). Have you run a layout pass and then expanded your DAG with ancillas? See
FullAncillaAllocation
,EnlargeWithAncilla
andApplyLayout
.'Oddly enough it works for smaller numbers .
How can we reproduce the issue?
What should happen?
It should work like it did in previous versions
Any suggestions?
No response
The text was updated successfully, but these errors were encountered: