|View source on GitHub|
An object that explicitly specifies how to act on specific qubits.
cirq.protocols.SupportsActOnQubits( *args, **kwargs )
_act_on_( args: 'cirq.OperationTarget', qubits: Sequence['cirq.Qid'] ) -> Union[NotImplementedType, bool]
Applies an action to the given argument, if it is a supported type.
For example, unitary operations can implement an
_act_on_ method that
isinstance(args, cirq.ActOnStateVectorArgs) and, if so,
apply their unitary effect to the state vector.
cirq.act_on method looks for whether or not the given
argument has this value, before attempting any fallback strategies
specified by the argument being acted on.
If implementing this on an
||An object of unspecified type. The method must check if this object is of a recognized type and act on it if so.|
||The sequence of qubits to use when applying the action.|
The receiving object (
The receiving object did not act on the argument.
All other return values are considered to be errors.