I'd want to parse the qasm file for analyze the quantum gate consisting its qasm file.
However, Qiskit provides the attribute of the quantum circuit, quantum_circuit.data.operation
which summarize the quantum gates information.
Even if it returns the gates information, but the order of the each gate is changed.
For example, the original qasm file consists like this.
h q[0];
x q[1];
It is extracted in different order into below when use the data.operation
attributes.
x q[1];
h q[0];
Actually, the final result of the quantum circuit is same. But I want to parse the qasm file as the same order of original one.
Is there any qiskit API or any method?
Thanks.