Skip to content

Commit

Permalink
Update GR gate QASM name (#1150)
Browse files Browse the repository at this point in the history
Signed-off-by: Bharath <[email protected]>
  • Loading branch information
bharat-thotakura authored Jan 22, 2025
1 parent 4bea226 commit 4ca5ddd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cirq-superstaq/cirq_superstaq/ops/qubit_gates.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ def _circuit_diagram_info_(self, args: cirq.CircuitDiagramInfoArgs) -> cirq.Circ
return cirq.CircuitDiagramInfo(wire_symbols=wire_symbols)

def _qasm_(self, args: cirq.QasmArgs, qubits: tuple[cirq.Qid, ...]) -> str:
gate_str = "gate_GR({0:half_turns},{1:half_turns})"
gate_str = "GR_gate({0:half_turns},{1:half_turns})"
qubits_str = ",".join([f"{{{idx + 2}}}" for idx in range(len(qubits))])
return args.format(
f"{gate_str} {qubits_str};\n", self.exponent, self.phase_exponent, *qubits
Expand Down
4 changes: 2 additions & 2 deletions cirq-superstaq/cirq_superstaq/ops/qubit_gates_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ def test_parallel_rgate() -> None:
qreg q[2];
gate_GR(pi*1.23,pi*0.56) q[0],q[1];
GR_gate(pi*1.23,pi*0.56) q[0],q[1];
"""
)
assert circuit.to_qasm(header="") == expected_qasm
Expand All @@ -1016,7 +1016,7 @@ def test_parallel_rgate() -> None:
qreg q[2];
gate_GR(pi*1.0,pi*0.5) q[0],q[1];
GR_gate(pi*1.0,pi*0.5) q[0],q[1];
"""
)

Expand Down

0 comments on commit 4ca5ddd

Please sign in to comment.