Closed patdenim closed 1 year ago
Please can you give us a complete reproducer, including the setup of your variables, and the full traceback of the error you saw?
Hi @jakelishman,
Sorry, Here is how to reproduce using the circuit.qpy
file i uploaded as .txt here below.
I just noticed today that if using a MAC Os environment, then the transpilation works well. That seems to fail only when using Windows OS to execute the notebook.
The circuit used is coming from a client who's trying to test the Quantum Volume, and i suspect that this circuit is coming from Ignis (qiskit.ignis.verification.qv_circuits). That might have its importance.
circuit.qpy.txt
from time import time
from qiskit.transpiler import CouplingMap
from qiskit.providers.models import BackendProperties
from qiskit.circuit import qpy_serialization
with open('circuit.qpy', 'rb') as fd:
new_qc = qpy_serialization.load(fd)[0]
coupling_map=backend.configuration().coupling_map
backend_properties=backend.properties()
basis_gates=backend.configuration().basis_gates
transpile(new_qc,
backend_properties=backend_properties,
coupling_map=CouplingMap(coupling_map),
optimization_level=3,
basis_gates=basis_gates,
seed_transpiler=0
)
Thanks for the file! Which backend
is in use here?
I used 'ibm_hanoi' Got same error using 'Hanoi', 'Mumbai' .... and some other 27 qubits systems The client reported the original error on Ehningen What surprised me today is that seems related to the OS from where you execute the transpilation as i don't get the error when using a MAC OS to run the notebook...
Jake, i got another scenario using runtime Sampler where the transpilation fails with `"Maximum iteration reached. max_iteration=1000"
The scenario is based on creating a QuantumVolume(7,7,0) circuit of 7x7, unroll it using a basic set of gates ["id","rz","cx","sx","x"],and seed_transpiler=0, then execute that circuit using the Sampler with optimization_level=3and transpiler_seed=0. I've attached the full notebook reproducing the problem using the backend Wellington ` Test-transpile-level0+Runtime-level3-seed0.zip
Sorry for the slow reply! @mtreinish is looking into this for a handful of reasons, so I'll pass this over to him (and also, I'm about to go on holiday for about a month...)
I think this is the same error mentioned in https://github.com/Qiskit/qiskit-terra/issues/6996, https://github.com/Qiskit/qiskit-terra/issues/5832, https://github.com/Qiskit/qiskit-terra/issues/5627. My work around is to try multiple seeds until the transpilation succeeds without throwing an error.
I am still encountering this error ('Maximum iteration reached. max_iteration=1000'
) for Quantum Volume circuits. Qiskit version qiskit==0.42.0
and qiskit-terra==0.23.2
.
Environment
'qiskit-terra': '0.22.2'
Python 3.10.6
Windows 10
What is happening?
This error happens when specifying
seed_transpiler=0
during tranpilation of this Quantum Volume Circuit in Optimization level 3 Does not occur with optim level 2 or if adding aninitial_layout
Occurs on 27 qubit backendEhningen
,mumbai
,cairo
,hanoi
, ...etc ... Does not occur for 7 qubit systems (perth
,mairobi
...lagos
..etc...)How can we reproduce the issue?
Circuit qasm string :
What should happen?
Should transpile !
Any suggestions?
No response