cirq.unitary_eig
Gives the guaranteed unitary eigendecomposition of a normal matrix.
cirq.unitary_eig(
matrix: np.ndarray, check_preconditions: bool = True, atol: float = 1e-08
) -> Tuple[np.ndarray, np.ndarray]
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
Args |
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.
|
Returns |
A Tuple of
eigvals: The eigenvalues of matrix .
V: The unitary matrix with the eigenvectors as columns.
|
Raises |
ValueError
|
if the input matrix is not normal.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-27 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-27 UTC."],[],[]]