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:

Warning

This gate is deprecated. Instead, the following replacements should be used

U2(ϕ,λ)=U(π2,ϕ,λ)U2(\phi, \lambda) = U\left(\frac{\pi}{2}, \phi, \lambda\right)
circuit = QuantumCircuit(1)
circuit.u(pi/2, phi, 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(ϕ,λ)=eiϕ+λ2RZ(ϕ)RY(π2)RZ(λ)=eiπ4P(π2+ϕ)XP(λπ2)U2(\phi,\lambda) = e^{i \frac{\phi + \lambda}{2}}RZ(\phi) RY\left(\frac{\pi}{2}\right) RZ(\lambda) = e^{- i\frac{\pi}{4}} P\left(\frac{\pi}{2} + \phi\right) \sqrt{X} P\left(\lambda- \frac{\pi}{2}\right)U2(0,π)=HU2(0, \pi) = HU2(0,0)=RY(π/2)U2(0, 0) = RY(\pi/2)U2(π/2,π/2)=RX(π/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

condition_bits

Get Clbits in condition.

Return type

List[Clbit]

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

name

Return the name.

num_clbits

Return the number of clbits.

num_qubits

Return the number of qubits.

params

return instruction params.

unit

Get the time unit of duration.

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