def with_line_qubits_mapped_to(self, qubits: List['cirq.Qid']) -> 'Cell': return ParityControlCell( qubits=Cell._replace_qubits(self.qubits, qubits), basis_change=tuple( op.with_qubits(*Cell._replace_qubits(op.qubits, qubits)) for op in self._basis_change), )
def with_line_qubits_mapped_to(self, qubits: List['cirq.Qid']) -> 'Cell': return ArithmeticCell(identifier=self.identifier, target=Cell._replace_qubits(self.target, qubits), inputs=[ e if e is None or isinstance(e, int) else Cell._replace_qubits(e, qubits) for e in self.inputs ])
def with_line_qubits_mapped_to(self, qubits: List['cirq.Qid']) -> 'Cell': return InputRotationCell( self.identifier, None if self.register is None else Cell._replace_qubits( self.register, qubits), self.base_operation.with_qubits( *Cell._replace_qubits(self.base_operation.qubits, qubits)), exponent_sign=self.exponent_sign)
def with_line_qubits_mapped_to(self, qubits: List['cirq.Qid']) -> 'Cell': return InputCell(qubits=Cell._replace_qubits(self.qubits, qubits), letter=self.letter)
def with_line_qubits_mapped_to(self, qubits: List['cirq.Qid']) -> 'Cell': return SwapCell( qubits=Cell._replace_qubits(self._qubits, qubits), controls=Cell._replace_qubits(self._controls, qubits), )