From 352a976b27a00d1a2160307a34f20dce02e34236 Mon Sep 17 00:00:00 2001 From: Tanuj Khattar Date: Mon, 23 May 2022 11:57:45 -0700 Subject: [PATCH] Remove stale condition from assert_controlled_and_controlled_by_identical test (#5391) * Remove stale condition from assert_controlled_and_controlled_by_identical test * Fix lint errors --- cirq-core/cirq/testing/consistent_controlled_gate_op.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cirq-core/cirq/testing/consistent_controlled_gate_op.py b/cirq-core/cirq/testing/consistent_controlled_gate_op.py index 11e5e4beb18..915e6a896e9 100644 --- a/cirq-core/cirq/testing/consistent_controlled_gate_op.py +++ b/cirq-core/cirq/testing/consistent_controlled_gate_op.py @@ -14,7 +14,7 @@ from typing import Sequence, Optional, Union, Collection -from cirq import protocols, devices, ops +from cirq import devices, ops def assert_controlled_and_controlled_by_identical( @@ -39,10 +39,6 @@ def _assert_gate_consistent( num_controls: int, control_values: Optional[Sequence[Union[int, Collection[int]]]], ) -> None: - if isinstance(gate, ops.DensePauliString) and protocols.is_parameterized(gate): - # Parameterized `DensePauliString`s cannot be applied to qubits to produce valid operations. - # TODO: This behavior should be fixed (https://github.com/quantumlib/Cirq/issues/4508) - return None gate_controlled = gate.controlled(num_controls, control_values) qubits = devices.LineQid.for_gate(gate_controlled) control_qubits = qubits[:num_controls]