@@ -65,7 +65,7 @@ def split_qubits(
6565
6666def merge_qubits (
6767 registers : Iterable [Register ],
68- ** qubit_regs : Union ['cirq.Qid' , Sequence ['cirq.Qid' ], NDArray ['cirq.Qid' ]],
68+ ** qubit_regs : Union ['cirq.Qid' , Sequence ['cirq.Qid' ], NDArray ['cirq.Qid' ]], # type: ignore[type-var]
6969) -> List ['cirq.Qid' ]:
7070 """Merges the dictionary of appropriately shaped qubit arrays into a flat list of qubits."""
7171
@@ -84,7 +84,7 @@ def merge_qubits(
8484 return ret
8585
8686
87- def get_named_qubits (registers : Iterable [Register ]) -> Dict [str , NDArray ['cirq.Qid' ]]:
87+ def get_named_qubits (registers : Iterable [Register ]) -> Dict [str , NDArray ['cirq.Qid' ]]: # type: ignore[type-var]
8888 """Returns a dictionary of appropriately shaped named qubit signature for input `signature`."""
8989
9090 def _qubit_array (reg : Register ):
@@ -327,7 +327,7 @@ def _num_qubits_(self) -> int:
327327 return total_bits (self .signature )
328328
329329 def decompose_from_registers (
330- self , * , context : 'cirq.DecompositionContext' , ** quregs : NDArray ['cirq.Qid' ]
330+ self , * , context : 'cirq.DecompositionContext' , ** quregs : NDArray ['cirq.Qid' ] # type: ignore[type-var]
331331 ) -> 'cirq.OP_TREE' :
332332 raise DecomposeNotImplementedError (f"{ self } does not declare a decomposition." )
333333
@@ -361,7 +361,7 @@ def on(self, *qubits) -> 'cirq.Operation':
361361 return cirq .Gate .on (self , * qubits )
362362
363363 def on_registers (
364- self , ** qubit_regs : Union ['cirq.Qid' , Sequence ['cirq.Qid' ], NDArray ['cirq.Qid' ]]
364+ self , ** qubit_regs : Union ['cirq.Qid' , Sequence ['cirq.Qid' ], NDArray ['cirq.Qid' ]] # type: ignore[type-var]
365365 ) -> 'cirq.Operation' :
366366 return self .on (* merge_qubits (self .signature , ** qubit_regs ))
367367
0 commit comments