Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK. Go to the latest version

U2Gate

class U2Gate(phi, lam, label=None)

GitHub

Bases: qiskit.circuit.gate.Gate

Single-qubit rotation about the X+Z axis.

Implemented using one X90 pulse on IBM Quantum systems:

U2(ϕ,λ)=RZ(ϕ).RY(π2).RZ(λ)U2(\phi, \lambda) = RZ(\phi).RY(\frac{\pi}{2}).RZ(\lambda)

Circuit symbol:

     ┌─────────┐
q_0:U2(φ,λ)
     └─────────┘

Matrix Representation:

U2(ϕ,λ)=12(1eiλeiϕei(ϕ+λ))\begin{split}U2(\phi, \lambda) = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & -e^{i\lambda} \\ e^{i\phi} & e^{i(\phi+\lambda)} \end{pmatrix}\end{split}

Examples:

U2(0,π)=HU2(0,0)=RY(π/2)U2(π/2,π/2)=RX(π/2)U2(0, \pi) = H U2(0, 0) = RY(\pi/2) U2(-\pi/2, \pi/2) = RX(\pi/2)
See also

U3Gate: U3 is a generalization of U2 that covers all single-qubit rotations, using two X90 pulses.

Create new U2 gate.


Methods Defined Here

inverse

U2Gate.inverse()

Return inverted U2 gate.

U2(ϕ,λ)=U2(λπ,ϕ+π)U2(\phi, \lambda)^{\dagger} =U2(-\lambda-\pi, -\phi+\pi))


Attributes

decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

definition

Return definition in terms of other basic gates.

duration

Get the duration.

label

Return instruction label

Return type

str

params

return instruction params.

unit

Get the time unit of duration.

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