diff --git a/tests/test_optimization.py b/tests/test_optimization.py index 39b332a5..7d217f85 100644 --- a/tests/test_optimization.py +++ b/tests/test_optimization.py @@ -178,10 +178,10 @@ def test_drop_rz_before_measurement(self, qubits): assert len(new) == 2 # still 2 Moments # the ZPowGate preceding the measurement has been dropped assert len(tuple(new.all_operations())) == 3 - op = new[0].operations[0] + op = new[0].operations[0] # pylint: disable=no-member assert isinstance(op.gate, cirq.XPowGate) assert op.qubits == (q0,) - op = new[0].operations[1] + op = new[0].operations[1] # pylint: disable=no-member assert isinstance(op.gate, cirq.ZPowGate) assert op.qubits == (q2,) @@ -202,7 +202,7 @@ def test_drop_rz_before_measurement_drop_final(self, qubits): assert len(new) == 2 # still 2 Moments # both ZPowGates were dropped assert len(tuple(new.all_operations())) == 2 - op = new[0].operations[0] + op = new[0].operations[0] # pylint: disable=no-member assert isinstance(op.gate, cirq.XPowGate) assert op.qubits == (q0,)