Skip to content

Commit

Permalink
check global phase operation only
Browse files Browse the repository at this point in the history
  • Loading branch information
anurudhp committed Apr 1, 2024
1 parent 3a0d092 commit 5e9a40b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions qualtran/cirq_interop/t_complexity_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ def _is_clifford_or_t(stc: Any, fail_quietly: bool) -> Optional[TComplexity]:
if not isinstance(stc, (cirq.Gate, cirq.Operation)):
return None

if isinstance(stc, cirq.GlobalPhaseGate) or (
isinstance(stc, cirq.Operation) and isinstance(stc.gate, cirq.GlobalPhaseGate)
):
if isinstance(stc, cirq.Operation) and isinstance(stc.gate, cirq.GlobalPhaseGate):
return TComplexity()

if isinstance(stc, cirq.ClassicallyControlledOperation):
Expand Down

0 comments on commit 5e9a40b

Please sign in to comment.