cirq.has_mixture

cirq.has_mixture(val: Any) → bool[source]

Returns whether the value has a mixture representation.

Returns:If val has a _has_mixture_ method and its result is not NotImplemented, that result is returned. Otherwise, if the value has a _mixture_ method return True if that has a non-default value. Returns False if neither function exists.