@@ -142,8 +142,8 @@ def test_serialize_sqrt_y_pow_gate():
142
142
@pytest .mark .parametrize (
143
143
('gate' , 'axis_half_turns' , 'half_turns' ),
144
144
[
145
- (cirq .X ** 0.25 , 0.0 , 0.25 ),
146
- (cirq .Y ** 0.25 , 0.5 , 0.25 ),
145
+ (cirq .X ** 0.25 , 0.0 , 0.25 ),
146
+ (cirq .Y ** 0.25 , 0.5 , 0.25 ),
147
147
(cirq .XPowGate (exponent = 0.125 ), 0.0 , 0.125 ),
148
148
(cirq .YPowGate (exponent = 0.125 ), 0.5 , 0.125 ),
149
149
(cirq .PhasedXPowGate (exponent = 0.125 , phase_exponent = 0.25 ), 0.25 , 0.125 ),
@@ -255,9 +255,9 @@ def test_serialize_deserialize_meas(qubits, qubit_ids, key, invert_mask):
255
255
('gate' , 'axis_half_turns' , 'half_turns' ),
256
256
[
257
257
(cirq .X , 0.0 , 1.0 ),
258
- (cirq .X ** 0.25 , 0.0 , 0.25 ),
258
+ (cirq .X ** 0.25 , 0.0 , 0.25 ),
259
259
(cirq .Y , 0.5 , 1.0 ),
260
- (cirq .Y ** 0.25 , 0.5 , 0.25 ),
260
+ (cirq .Y ** 0.25 , 0.5 , 0.25 ),
261
261
(cirq .PhasedXPowGate (exponent = 0.125 , phase_exponent = 0.25 ), 0.25 , 0.125 ),
262
262
(cirq .rx (0.125 * np .pi ), 0.0 , 0.125 ),
263
263
(cirq .ry (0.25 * np .pi ), 0.5 , 0.25 ),
@@ -324,7 +324,7 @@ def test_serialize_xy_parameterized_axis_half_turns():
324
324
('gate' , 'half_turns' ),
325
325
[
326
326
(cirq .Z , 1.0 ),
327
- (cirq .Z ** 0.125 , 0.125 ),
327
+ (cirq .Z ** 0.125 , 0.125 ),
328
328
(cirq .rz (0.125 * np .pi ), 0.125 ),
329
329
],
330
330
)
@@ -443,8 +443,8 @@ def assert_phys_z_tag(phys_z, op):
443
443
('gate' , 'exponent' ),
444
444
[
445
445
(cirq .CZ , 1.0 ),
446
- (cirq .CZ ** 3.0 , 3.0 ),
447
- (cirq .CZ ** - 1.0 , - 1.0 ),
446
+ (cirq .CZ ** 3.0 , 3.0 ),
447
+ (cirq .CZ ** - 1.0 , - 1.0 ),
448
448
],
449
449
)
450
450
@pytest .mark .parametrize ('phys_z' , [False , True ])
@@ -548,13 +548,13 @@ def test_wait_gate_multi_qubit():
548
548
@pytest .mark .parametrize (
549
549
('gate' , 'theta' , 'phi' ),
550
550
[
551
- (cirq .ISWAP ** 0.5 , - np .pi / 4 , 0 ),
552
- (cirq .ISWAP ** - 0.5 , np .pi / 4 , 0 ),
553
- (cirq .ISWAP ** 1.0 , - np .pi / 2 , 0 ),
554
- (cirq .ISWAP ** - 1.0 , np .pi / 2 , 0 ),
555
- (cirq .ISWAP ** 0.0 , 0 , 0 ),
551
+ (cirq .ISWAP ** 0.5 , - np .pi / 4 , 0 ),
552
+ (cirq .ISWAP ** - 0.5 , np .pi / 4 , 0 ),
553
+ (cirq .ISWAP ** 1.0 , - np .pi / 2 , 0 ),
554
+ (cirq .ISWAP ** - 1.0 , np .pi / 2 , 0 ),
555
+ (cirq .ISWAP ** 0.0 , 0 , 0 ),
556
556
(cirq .CZ , 0 , np .pi ),
557
- (cirq .CZ ** - 1.0 , 0 , np .pi ),
557
+ (cirq .CZ ** - 1.0 , 0 , np .pi ),
558
558
(cirq .FSimGate (theta = 0 , phi = 0 ), 0 , 0 ),
559
559
(cirq .FSimGate (theta = 0 , phi = np .pi ), 0 , - np .pi ),
560
560
(cirq .FSimGate (theta = 0 , phi = - np .pi ), 0 , - np .pi ),
@@ -665,8 +665,8 @@ def test_serialize_deserialize_iswap_symbols(phys_z):
665
665
@pytest .mark .parametrize (
666
666
'gate' ,
667
667
[
668
- cirq .ISWAP ** 0.25 ,
669
- cirq .ISWAP ** 0.75 ,
668
+ cirq .ISWAP ** 0.25 ,
669
+ cirq .ISWAP ** 0.75 ,
670
670
cirq .FSimGate (theta = 0.1 , phi = 0 ),
671
671
cirq .FSimGate (theta = 0 , phi = 0.1 ),
672
672
cirq .FSimGate (theta = sympy .Symbol ('t' ), phi = 0.1 ),
0 commit comments