Skip to content

Commit 051c9e6

Browse files
committed
remove measure/reset because comparing unitaries + correct param for phase gate
1 parent 43f0748 commit 051c9e6

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/qrisp/interface/converter/cirq_converter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from cirq import Circuit, LineQubit
22
from qrisp.circuit import ControlledOperation
3+
import numpy as np
34

45
from cirq import (
56
CNOT,
@@ -144,7 +145,7 @@ def convert_to_cirq(qrisp_circuit):
144145
# the ZPowGate has a global phase in addition to the
145146
# phase exponent. The default is to assume global_shift = 0 in cirq
146147
exp_param = params[0]
147-
cirq_circuit.append(ZPowGate(exponent=exp_param)(*cirq_op_qubits))
148+
cirq_circuit.append(ZPowGate(exponent=exp_param/np.pi)(*cirq_op_qubits))
148149

149150
# elif op_i == 'gphase':
150151
# global phase gate in Cirq cannot be applied to specific qubits

tests/interface_tests/test_cirq_converter.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ def test_n_qubit_gate_circuit():
2828
qc_single_qubit_gates.t(1)
2929
qc_single_qubit_gates.t_dg(3)
3030
qc_single_qubit_gates.s_dg(2)
31-
qc_single_qubit_gates.measure(0)
32-
qc_single_qubit_gates.reset(0)
3331

3432
expected_cirq_qc_single_qubit_gates_ops = [
3533
H(LineQubit(0)),

0 commit comments

Comments
 (0)