cirq.is_special_unitary(matrix: numpy.ndarray, tolerance: cirq.linalg.tolerance.Tolerance = Tolerance(rtol=1e-05, atol=1e-08, equal_nan=False)) → bool[source]

Determines if a matrix is approximately unitary with unit determinant.

A matrix is special-unitary if it is square and its adjoint is its inverse
and its determinant is one.
  • matrix – The matrix to check.
  • tolerance – The per-matrix-entry tolerance on equality.

Whether the matrix is unitary with unit determinant within the given tolerance.