|View source on GitHub|
Determines if a matrix is approximately unitary.
cirq.is_unitary( matrix: np.ndarray, *, rtol: float = 1e-05, atol: float = 1e-08 ) -> bool
A matrix is unitary if it's square and its adjoint is its inverse.
||The matrix to check.|
||The per-matrix-entry relative tolerance on equality.|
||The per-matrix-entry absolute tolerance on equality.|
|Whether the matrix is unitary within the given tolerance.|