View source on GitHub |
Determines if a channel is completely positive trace preserving (CPTP).
cirq.is_cptp(
*,
kraus_ops: Sequence[np.ndarray],
rtol: float = 1e-05,
atol: float = 1e-08
)
A channel composed of Kraus operators K[0:n] is a CPTP map if the sum of
the products adjoint(K[i]) * K[i])
is equal to 1.
Args | |
---|---|
kraus_ops
|
The Kraus operators of the channel to check. |
rtol
|
The relative tolerance on equality. |
atol
|
The absolute tolerance on equality. |