cirq.protocols.channel

Returns a list of matrices describing the channel for the given value.

Used in the notebooks

Used in the tutorials

These matrices are the terms in the operator sum representation of a quantum channel. If the returned matrices are ${A_0,A_1,..., A_{r-1} }$, then this describes the channel:

$$ \rho \rightarrow \sum_{k=0}^{r-1} A_k \rho A_k^\dagger $$

These matrices are required to satisfy the trace preserving condition

$$ \sum_{k=0}^{r-1} A_k^\dagger A_k = I $$

where $I$ is the identity matrix. The matrices $A_k$ are sometimes called Kraus or noise operators.

val The value to describe by a channel.
default Determines the fallback behavior when val doesn't have a channel. If default is not set, a TypeError is raised. If default is set to a value, that value is returned.

If val has a _channel_ method and its result is not NotImplemented, that result is returned. Otherwise, if val has a _mixture_ method and its results is not NotImplement a tuple made up of channel corresponding to that mixture being a probabilistic mixture of unitaries is returned. Otherwise, if val has a _unitary_ method and its result is not NotImplemented a tuple made up of that result is returned. Otherwise, if a default value was specified, the default value is returned.

TypeError val doesn't have a channel or unitary method (or that method returned NotImplemented) and also no default value was specified.