cirq.deconstruct_single_qubit_matrix_into_angles
Breaks down a 2x2 unitary into ZYZ angle parameters.
cirq.deconstruct_single_qubit_matrix_into_angles(
mat: np.ndarray
) -> Tuple[float, float, float]
Given a unitary U, this function returns three angles: \(\phi_0, \phi_1, \phi_2\),
such that: \(U = Z^{\phi_2 / \pi} Y^{\phi_1 / \pi} Z^{\phi_0/ \pi}\)
for the Pauli matrices Y and Z. That is, phasing around Z by \(\phi_0\) radians,
then rotating around Y by \(\phi_1\) radians, and then phasing again by
\(\phi_2\) radians will produce the same effect as the original unitary.
(Note that the matrices are applied right to left.)
Args |
mat
|
The 2x2 unitary matrix to break down.
|
Returns |
A tuple containing the amount to phase around Z, then rotate around Y,
then phase around Z (all in radians).
|
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."],[],[]]