cirq.GateOperation.validate_args

GateOperation.validate_args(qubits: Sequence[cirq.Qid])
Raises an exception if the qubits don’t match this operation’s qid
shape.

Call this method from a subclass’s with_qubits method.

Parameters

qubits – The new qids for the operation.

Raises

ValueError – The operation had qids that don’t match it’s qid shape.