-
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
Duplicate Declaration #8402
Comments
In the function CPhase(angle, exponent) a quantumcircuit is defined with only one qubit. If you add a line with for qc with 4 qubits it will give you the qasm file.
OPENQASM 2.0; |
Hi @Yelissal, thanks for the report. This happens unfortunately because our QASM 2 exporter really can't handle parametrised gates very well (see #7335), and We're working on overhauling how all parameters and QASM conversions happen, but it's a bit of a slow process, because it's concurrent with a lot of new features. I can't promise when we'll have a direct fix. A more limited fix for your particular use-case might involve us reworking |
Environment
What is happening?
The qasm generated has multiple gates named the same thing. The parser can't handle because it doesn't know which one is valid.
How can we reproduce the issue?
"Running this will give you the error"
QuantumCircuit.from_qasm_file("qpe.qasm")
What should happen?
The phase should be able to be applied through the for-loop without running into a duplicate error.
Any suggestions?
No response
The text was updated successfully, but these errors were encountered: