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