@@ -90,7 +90,7 @@ def __pow__(self, power: int):
9090
9191 def decompose_from_registers (
9292 self , * , context : cirq .DecompositionContext , ** quregs : NDArray [cirq .Qid ] # type: ignore[type-var]
93- ) -> cirq .OP_TREE :
93+ ) -> Iterator [ cirq .OP_TREE ] :
9494 """Decomposes the gate into 4N And and And† operations for a T complexity of 4N.
9595
9696 The decomposition proceeds from the most significant qubit -bit 0- to the least significant
@@ -217,7 +217,7 @@ def signature(self) -> Signature:
217217
218218 def decompose_from_registers (
219219 self , * , context : cirq .DecompositionContext , ** quregs : NDArray [cirq .Qid ]
220- ) -> cirq .OP_TREE :
220+ ) -> Iterator [ cirq .OP_TREE ] :
221221 x , y , ancilla = quregs ['x' ], quregs ['y' ], quregs ['ancilla' ]
222222 x_msb , x_lsb = x
223223 y_msb , y_lsb = y
@@ -310,7 +310,7 @@ def signature(self) -> Signature:
310310
311311 def decompose_from_registers (
312312 self , * , context : cirq .DecompositionContext , ** quregs : NDArray [cirq .Qid ]
313- ) -> cirq .OP_TREE :
313+ ) -> Iterator [ cirq .OP_TREE ] :
314314 a = quregs ['a' ]
315315 b = quregs ['b' ]
316316 less_than = quregs ['less_than' ]
@@ -358,7 +358,7 @@ def _sq_cmp() -> SingleQubitCompare:
358358
359359def _equality_with_zero (
360360 context : cirq .DecompositionContext , qubits : Sequence [cirq .Qid ], z : cirq .Qid
361- ) -> cirq .OP_TREE :
361+ ) -> Iterator [ cirq .OP_TREE ] :
362362 """Helper decomposition used in `LessThanEqual`"""
363363 if len (qubits ) == 1 :
364364 (q ,) = qubits
@@ -451,7 +451,7 @@ def __pow__(self, power: int):
451451
452452 def _decompose_via_tree (
453453 self , context : cirq .DecompositionContext , X : Sequence [cirq .Qid ], Y : Sequence [cirq .Qid ]
454- ) -> cirq .OP_TREE :
454+ ) -> Iterator [ cirq .OP_TREE ] :
455455 if len (X ) == 1 :
456456 return
457457 if len (X ) == 2 :
@@ -467,7 +467,7 @@ def _decompose_via_tree(
467467
468468 def decompose_from_registers (
469469 self , * , context : cirq .DecompositionContext , ** quregs : NDArray [cirq .Qid ]
470- ) -> cirq .OP_TREE :
470+ ) -> Iterator [ cirq .OP_TREE ] :
471471 lhs , rhs , (target ,) = list (quregs ['x' ]), list (quregs ['y' ]), quregs ['target' ]
472472
473473 n = min (len (lhs ), len (rhs ))
0 commit comments