Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.quantum_info.OneQubitEulerDecomposer

class OneQubitEulerDecomposer(basis='U3')

GitHub

A class for decomposing 1-qubit unitaries into Euler angle rotations.

The resulting decomposition is parameterized by 3 Euler rotation angle parameters (θ,ϕ,λ)(\theta, \phi, \lambda), and a phase parameter γ\gamma. The value of the parameters for an input unitary depends on the decomposition basis. Allowed bases and the resulting circuits are shown in the following table. Note that for the non-Euler bases (U3, U1X, RR), the ZYZ euler parameters are used.

BasisEuler Angle BasisDecomposition Circuit
‘ZYZ’Z(ϕ)Y(θ)Z(λ)Z(\phi) Y(\theta) Z(\lambda)eiγRZ(ϕ).RY(θ).RZ(λ)e^{i\gamma} R_Z(\phi).R_Y(\theta).R_Z(\lambda)
‘ZXZ’Z(ϕ)X(θ)Z(λ)Z(\phi) X(\theta) Z(\lambda)eiγRZ(ϕ).RX(θ).RZ(λ)e^{i\gamma} R_Z(\phi).R_X(\theta).R_Z(\lambda)
‘XYX’X(ϕ)Y(θ)X(λ)X(\phi) Y(\theta) X(\lambda)eiγRX(ϕ).RY(θ).RX(λ)e^{i\gamma} R_X(\phi).R_Y(\theta).R_X(\lambda)
‘U3’Z(ϕ)Y(θ)Z(λ)Z(\phi) Y(\theta) Z(\lambda)eiγU3(θ,ϕ,λ)e^{i\gamma} U_3(\theta,\phi,\lambda)
‘U’Z(ϕ)Y(θ)Z(λ)Z(\phi) Y(\theta) Z(\lambda)eiγU3(θ,ϕ,λ)e^{i\gamma} U_3(\theta,\phi,\lambda)
‘PSX’Z(ϕ)Y(θ)Z(λ)Z(\phi) Y(\theta) Z(\lambda)eiγU1(ϕ+π).RX(π2).e^{i\gamma} U_1(\phi+\pi).R_X\left(\frac{\pi}{2}\right). U1(θ+π).RX(π2).U1(λ)U_1(\theta+\pi).R_X\left(\frac{\pi}{2}\right).U_1(\lambda)
‘ZSX’Z(ϕ)Y(θ)Z(λ)Z(\phi) Y(\theta) Z(\lambda)eiγU1(ϕ+π).RX(π2).e^{i\gamma} U_1(\phi+\pi).R_X\left(\frac{\pi}{2}\right). RZ(θ+π).SX(π2).U1(λ)R_Z(\theta+\pi).S_X\left(\frac{\pi}{2}\right).U_1(\lambda)
‘U1X’Z(ϕ)Y(θ)Z(λ)Z(\phi) Y(\theta) Z(\lambda)eiγU1(ϕ+π).RX(π2).e^{i\gamma} U_1(\phi+\pi).R_X\left(\frac{\pi}{2}\right). U1(θ+π).RX(π2).U1(λ)U_1(\theta+\pi).R_X\left(\frac{\pi}{2}\right).U_1(\lambda)
‘RR’Z(ϕ)Y(θ)Z(λ)Z(\phi) Y(\theta) Z(\lambda)eiγR(π,ϕλ+π2).e^{i\gamma} R\left(-\pi,\frac{\phi-\lambda+\pi}{2}\right). R(θ+π,π2λ)R\left(\theta+\pi,\frac{\pi}{2}-\lambda\right)

Initialize decomposer

Supported bases are: ‘U’, ‘PSX’, ‘ZSX’, ‘U3’, ‘U1X’, ‘RR’, ‘ZYZ’, ‘ZXZ’, ‘XYX’.

Parameters

basis (str) – the decomposition basis [Default: ‘U3’]

Raises

QiskitError – If input basis is not recognized.

__init__

__init__(basis='U3')

Initialize decomposer

Supported bases are: ‘U’, ‘PSX’, ‘ZSX’, ‘U3’, ‘U1X’, ‘RR’, ‘ZYZ’, ‘ZXZ’, ‘XYX’.

Parameters

basis (str) – the decomposition basis [Default: ‘U3’]

Raises

QiskitError – If input basis is not recognized.


Methods

__init__([basis])Initialize decomposer
angles(unitary)Return the Euler angles for input array.
angles_and_phase(unitary)Return the Euler angles and phase for input array.

Attributes

basisThe decomposition basis.

angles

angles(unitary)

Return the Euler angles for input array.

Parameters

unitary (np.ndarray) – 2x2 unitary matrix.

Returns

(theta, phi, lambda).

Return type

tuple

angles_and_phase

angles_and_phase(unitary)

Return the Euler angles and phase for input array.

Parameters

unitary (np.ndarray) – 2x2 unitary matrix.

Returns

(theta, phi, lambda, phase).

Return type

tuple

basis

The decomposition basis.

Was this page helpful?
Report a bug or request content on GitHub.