cirq.is_orthogonal¶
-
cirq.is_orthogonal(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 orthogonal.
A matrix is orthogonal if it’s square and real and its transpose is itsinverse.Parameters: - matrix – The matrix to check.
- tolerance – The per-matrix-entry tolerance on equality.
Returns: Whether the matrix is orthogonal within the given tolerance.