unitary_eig(matrix: numpy.ndarray, check_preconditions: bool = True, atol: float = 1e-08) → Tuple[numpy.array, numpy.ndarray]¶
Gives the guaranteed unitary eigendecomposition of a normal matrix.All hermitian and unitary matrices are normal matrices. This method wasintroduced as for certain classes of unitary matrices (where the eigenvaluesare close to each other) the eigenvectors returned by
numpy.linalg.eigarenot guaranteed to be orthogonal.For more information, see https://github.com/numpy/numpy/issues/15461.
matrix – a normal matrix. If not normal, this method is not guaranteed to return correct eigenvalues.
check_preconditions – when true and matrix is not unitary, a ValueError is raised
atol – the absolute tolerance when checking whether the original matrix was unitary
the eigenvalues of matrix V: the unitary matrix with the eigenvectors as columns
- Return type