View source on GitHub |
Tests whether a value's _applyunitary is correct.
cirq.testing.assert_has_consistent_apply_unitary(
val: Any, *, atol: float = 1e-08
) -> None
Contrasts the effects of the value's _apply_unitary_
with the
matrix returned by the value's _unitary_
method.
Args | |
---|---|
val
|
The value under test. Should have a __pow__ method.
|
atol
|
Absolute error tolerance. |