cirq.so4_to_magic_su2s
Finds 2x2 special-unitaries A, B where mat = Mag.H @ kron(A, B) @ Mag.
cirq.so4_to_magic_su2s(
mat: np.ndarray,
*,
rtol: float = 1e-05,
atol: float = 1e-08,
check_preconditions: bool = True
) -> Tuple[np.ndarray, np.ndarray]
Mag is the magic basis matrix:
1 0 0 i
0 i 1 0
0 i -1 0 (times sqrt(0.5) to normalize)
1 0 0 -i
Args |
mat
|
A real 4x4 orthogonal matrix.
|
rtol
|
Per-matrix-entry relative tolerance on equality.
|
atol
|
Per-matrix-entry absolute tolerance on equality.
|
check_preconditions
|
When set, the code verifies that the given
matrix is from SO(4). Defaults to set.
|
Returns |
A pair (A, B) of matrices in SU(2) such that Mag.H @ kron(A, B) @ Mag
is approximately equal to the given matrix.
|
Raises |
ValueError
|
Bad matrix.
|
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."],[],[]]