Skip to content

Commit 2861087

Browse files
pavoljuhasbabacry
authored andcommitted
Avoid using NotImplemented as a boolean (quantumlib#7259)
Address DeprecationWarning: NotImplemented should not be used in a boolean context This fixes check/pytest -Werror:"NotImplemented should":DeprecationWarning
1 parent 31e9ceb commit 2861087

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cirq-core/cirq/ops/clifford_gate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def from_op_list(
310310
ValueError: When one or more operations do not have stabilizer effect.
311311
"""
312312
for op in operations:
313-
if op.gate and op.gate._has_stabilizer_effect_():
313+
if op.gate and protocols.has_stabilizer_effect(op.gate):
314314
continue
315315
raise ValueError(
316316
"Clifford Gate can only be constructed from the "

0 commit comments

Comments
 (0)