Skip to content

Commit

Permalink
Update qasm.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kottmanj authored Mar 20, 2024
1 parent 2dbe118 commit da7854c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/tequila/circuit/qasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,11 @@ def parse_command(command: str, custom_gates_map: Dict[str, QCircuit], qregister

if name in ("x", "y", "z", "h", "cx", "cy", "cz", "ch"):
G = getattr(gates, name.upper())
control = get_qregister(args[0], qregisters), get_qregister(args[1], qregisters)
target = get_qregister(args[1 if name[0] == 'C' else 0], qregisters)
target = get_qregister(args[0], qregisters)
control = None
if name[0] == c:
control = get_qregister(args[0], qregisters)
target = get_qregister(args[1], qregisters)
return G(control=control, target=target)

if name in ("ccx", "ccy", "ccz"):
Expand Down

0 comments on commit da7854c

Please sign in to comment.