Skip to content

Commit

Permalink
!2291 [PY] Fix r0.10
Browse files Browse the repository at this point in the history
Merge pull request !2291 from donghufeng/dev/fix_hiqasm
  • Loading branch information
donghufeng authored and gitee-org committed Feb 23, 2024
2 parents 0c81776 + 8c03bd8 commit 85075a6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mindquantum/io/qasm/hiqasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,12 @@ def _trans_v01(self, cmds, n_qubits): # pylint: disable=too-many-branches
self.circuit.ry(*_extr_parameter(cmd), qubit[-1], qubit[:2])
elif cmd.startswith('CCRZ '):
self.circuit.rz(*_extr_parameter(cmd), qubit[-1], qubit[:2])
elif cmd.startswith("XX"):
self.circuit.rxx(*_extr_parameter(cmd), qubit[-2:], qubit[:-2])
elif cmd.startswith("YY"):
self.circuit.ryy(*_extr_parameter(cmd), qubit[-2:], qubit[:-2])
elif cmd.startswith("ZZ"):
self.circuit.rzz(*_extr_parameter(cmd), qubit[-2:], qubit[:-2])
elif cmd.startswith('MEASURE '):
qubit = _find_qubit_id(cmd)
if qubit:
Expand Down

0 comments on commit 85075a6

Please sign in to comment.