A translation about initialize
from qiskit in OpenQASM cannot translate back into qiskit
#8048
Labels
initialize
from qiskit in OpenQASM cannot translate back into qiskit
#8048
Environment
What is happening?
After got the OpenQASM code about
initialize
operator, it will fail to usefrom_qasm_file/from_qasm_str
to translate it back into qiskit code.Part of error message is shown below:
How can we reproduce the issue?
from qiskit import QuantumCircuit
circuit = QuantumCircuit(1)
circuit.initialize('0', circuit.qubits)
qasm_str = circuit.qasm()
print(qasm_str)
same_circuit = QuantumCircuit(1)
same_circuit = same_circuit.from_qasm_str(qasm_str)
print(same_circuit)
What should happen?
Run successfully.
Any suggestions?
No response
The text was updated successfully, but these errors were encountered: