-
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
Transpiler fails after 1000 iterations on simple circuit at optimization_level=3 #5627
Comments
I'm not currently able to replicate this on master. (A similar issue was recently fixed in #5583 .) Can you define a callback like:
re-run |
I should point out it is also stochastic in it failure. More often than not though |
If it is fixed in Master than feel free to close. Can re-open if need be. |
Thanks, this should fixed by #5583 and will be included in the next patch release. Feel free to re-open if this persists. |
Hi! After updating qiskit-terra from 0.16.1 to 0.16.2 I started getting
when transpiling my own circuit in optimization level 3. Level 2 passes through just fine. Also, hitting the max iteration seems to be device-dependent. E.g., transpiling onto |
@ishapoval can you open a new issue with a recreate scenario. 0.16.2 included a backport of the fix for this original issue (#5583 and it's backport #5585) so I suspect something else might be causing the failure for you, but I'll need to dig into it to be sure. |
@mtreinish Thanks for the prompt reply! Unfortunately, I can't post my circuit at this point and I didn't manage to reproduce the problem with a simpler scenario. My circuit is parametrized, and while in 0.16.1 it could be transpiled for all my parameters, in 0.16.2 it doesn't transpile for some of them. I narrowed down the problem to the difference in RZZGate angle. Another observation is that if I dump that offending circuit to the QASM string and construct a new circuit back from that string then it can be successfully transpiled. I will open a new issue if I have enough details to reliably reproduce the case in a simple scenario. |
Information
What is the current behavior?
The following circuit + backend + transpiler (optim level =3) combo:
fails with the error:
Traceback (most recent call last):
File "", line 10, in
qc_trans = transpile(qc, backend2, initial_layout=[2,3,4], optimization_level=3)
File "/opt/miniconda3/envs/qiskit/lib/python3.7/site-packages/qiskit/compiler/transpile.py", line 243, in transpile
circuits = parallel_map(_transpile_circuit, list(zip(circuits, transpile_args)))
File "/opt/miniconda3/envs/qiskit/lib/python3.7/site-packages/qiskit/tools/parallel.py", line 106, in parallel_map
return [task(values[0], *task_args, **task_kwargs)]
File "/opt/miniconda3/envs/qiskit/lib/python3.7/site-packages/qiskit/compiler/transpile.py", line 327, in _transpile_circuit
output_name=transpile_config['output_name'])
File "/opt/miniconda3/envs/qiskit/lib/python3.7/site-packages/qiskit/transpiler/passmanager.py", line 225, in run
return self._run_single_circuit(circuits, output_name, callback)
File "/opt/miniconda3/envs/qiskit/lib/python3.7/site-packages/qiskit/transpiler/passmanager.py", line 288, in run_single_circuit
result = running_passmanager.run(circuit, output_name=output_name, callback=callback)
File "/opt/miniconda3/envs/qiskit/lib/python3.7/site-packages/qiskit/transpiler/runningpassmanager.py", line 112, in run
for pass in passset:
File "/opt/miniconda3/envs/qiskit/lib/python3.7/site-packages/qiskit/transpiler/runningpassmanager.py", line 311, in iter
raise TranspilerError("Maximum iteration reached. max_iteration=%i" % self.max_iteration)
TranspilerError: 'Maximum iteration reached. max_iteration=1000'
It only fails for level 3.
Steps to reproduce the problem
What is the expected behavior?
Suggested solutions
The text was updated successfully, but these errors were encountered: