Skip to content

Commit

Permalink
!2258 [PY] Fix openqasm for identity gate.
Browse files Browse the repository at this point in the history
Merge pull request !2258 from donghufeng/dev/fix_qasm
  • Loading branch information
donghufeng authored and gitee-org committed Jan 12, 2024
2 parents 35bc679 + c86eff8 commit eb306d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mindquantum/io/qasm/openqasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def h_related(gate):

def i_related(gate):
"""Convert mindquantum gate to qasm."""
return f"id {gate.obj_qubits[0]};"
return f"id q[{gate.obj_qubits[0]}];"


def phase_related(gate):
Expand Down

0 comments on commit eb306d5

Please sign in to comment.