From 5e9a40bd904bc5f104eb1ccf3a16fe2e5d32d982 Mon Sep 17 00:00:00 2001 From: Anurudh Peduri Date: Mon, 1 Apr 2024 10:25:52 +0100 Subject: [PATCH] check global phase operation only --- qualtran/cirq_interop/t_complexity_protocol.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qualtran/cirq_interop/t_complexity_protocol.py b/qualtran/cirq_interop/t_complexity_protocol.py index 759ca18999..5ee882a1d8 100644 --- a/qualtran/cirq_interop/t_complexity_protocol.py +++ b/qualtran/cirq_interop/t_complexity_protocol.py @@ -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):