cirq.protocols.SupportsExplicitHasUnitary

An object that explicitly specifies whether it has a unitary effect.

Methods

_has_unitary_

View source

Determines whether the receiver has a unitary effect.

This method is used preferentially by the global cirq.has_unitary method, because this method is much cheaper than the fallback strategies such as checking value._unitary_ (which causes a large matrix to be computed).

Returns
Whether or not the receiving object (self) has a unitary effect.