View source on GitHub |
Tests whether a value's _applychannel is correct.
cirq.testing.assert_has_consistent_apply_channel(
val: Any, *, atol: float = 1e-08
) -> None
Contrasts the effects of the value's _apply_channel_
with the superoperator calculated from
the Kraus components returned by the value's _kraus_
method.
Args | |
---|---|
val
|
The value under test. Should have a __pow__ method.
|
atol
|
Absolute error tolerance. |