cirq.has_channelΒΆ

cirq.has_channel(val: Any) → bool[source]ΒΆ

Returns whether the value has a channel representation.

Returns:If val has a _has_channel_ method and its result is not NotImplemented, that result is returned. Otherwise, if val has a _has_mixture_ method and its result is not NotImplemented, that result is returned. Otherwise if val has a _has_unitary_ method and its results is not NotImplemented, that result is returned. Otherwise, if the value has a _channel_ method return if that has a non-default value. Returns False if none of these functions exists.