Closed TheGupta2012 closed 1 year ago
The new OQ2 parser (qiskit.qasm2.load{,s}
) released in 0.24 should have fixed this problem, and QuantumCircuit.from_qasm_str
will switch to that implementation from Terra 0.25 in July/August.
Fwiw, u0(0.5)
is logically invalid and the new parser will complain about it - u0
is a very old and now non-existent gate on IQX that represented an integer number of single-qubit-gate delay cycles, so its parameter could only be an integer.
Alright, thanks a lot for the clarification!
Environment
What is happening?
While trying to parse a qasm2 string consisting of
u0
gate call from theqelib1.inc
gates, an error is encountered. The traceback for the error is :How can we reproduce the issue?
The following code snippet would reproduce the issue :
What should happen?
The qasm2 string should parse correctly into a
QuantumCircuit
object.Any suggestions?
I think
u0
case should be handled correctly in the fileast_to_dag.py
while calling theAstInterpreter._process_node(self, node)
function