Returns an orthogonal matrix that diagonalizes the given matrix.
cirq.diagonalize_real_symmetric_matrix(
matrix: np.ndarray,
*,
rtol: float = 1e-05,
atol: float = 1e-08,
check_preconditions: bool = True
) -> np.ndarray
Args |
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.
|
Returns |
An orthogonal matrix P such that P.T @ matrix @ P is diagonal.
|
Raises |
ValueError
|
Matrix isn't real symmetric.
|