cirq.Operation.validate_args

Operation.validate_args(qubits: Sequence[cirq.Qid])[source]
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.