cirq.diagonalize_real_symmetric_matrix

Returns an orthogonal matrix that diagonalizes the given matrix.

matrix A real symmetric matrix to diagonalize.
rtol Relative error tolerance.
atol Absolute error tolerance.
check_preconditions If set, verifies that the input matrix is real and symmetric.

An orthogonal matrix P such that P.T @ matrix @ P is diagonal.

ValueError Matrix isn't real symmetric.