Skip to content

Commit c19e71d

Browse files
authored
Remove stale condition from assert_controlled_and_controlled_by_identical test (quantumlib#5391)
* Remove stale condition from assert_controlled_and_controlled_by_identical test * Fix lint errors
1 parent b86dd63 commit c19e71d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

cirq/testing/consistent_controlled_gate_op.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from typing import Sequence, Optional, Union, Collection
1616

17-
from cirq import protocols, devices, ops
17+
from cirq import devices, ops
1818

1919

2020
def assert_controlled_and_controlled_by_identical(
@@ -39,10 +39,6 @@ def _assert_gate_consistent(
3939
num_controls: int,
4040
control_values: Optional[Sequence[Union[int, Collection[int]]]],
4141
) -> None:
42-
if isinstance(gate, ops.DensePauliString) and protocols.is_parameterized(gate):
43-
# Parameterized `DensePauliString`s cannot be applied to qubits to produce valid operations.
44-
# TODO: This behavior should be fixed (https://github.com/quantumlib/Cirq/issues/4508)
45-
return None
4642
gate_controlled = gate.controlled(num_controls, control_values)
4743
qubits = devices.LineQid.for_gate(gate_controlled)
4844
control_qubits = qubits[:num_controls]

0 commit comments

Comments
 (0)