# cirq.unitary_eig

Gives the guaranteed unitary eigendecomposition of a normal matrix.

All hermitian and unitary matrices are normal matrices. This method was introduced as for certain classes of unitary matrices (where the eigenvalues are close to each other) the eigenvectors returned by numpy.linalg.eig are not 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. A normal matrix is one where $$A A^\dagger = A^\dagger A$$.
check_preconditions When true and matrix is not unitary, a ValueError is raised when the matrix is not normal.
atol The absolute tolerance when checking whether the original matrix was unitary.

A Tuple of eigvals: The eigenvalues of matrix. V: The unitary matrix with the eigenvectors as columns.

ValueError if the input matrix is not normal.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]