quantum gate directory

Gates Groups SDKs GitHub
$U_2$

misc & legacy· 1 qubit ·2 parameters

U2

Legacy IBM gate performing a fixed $\pi/2$ rotation dressed by two $z$ rotations, $U_2(\phi, \lambda) = U_3(\pi/2, \phi, \lambda)$.

Open in Quirk ↗ with $\phi = 2\pi t,\ \lambda = 4\pi t$

The $U_2$ gate is the two-parameter member of the legacy OpenQASM 2 family $u_1, u_2, u_3$: a rotation with the angle frozen at $\pi/2$, sandwiched between two independent $z$ rotations:

$$ \begin{align*} U_2(\phi, \lambda) & = R_z(\phi) \, R_y(\pi/2) \, R_z(\lambda) \\ & = \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & -\mathrm{e}^{i\lambda} \\ \mathrm{e}^{i\phi} & \mathrm{e}^{i(\phi+\lambda)} \end{bmatrix} \end{align*} $$

Historically it exposed IBM's hardware calibration in gate form: the $R_y(\pi/2)$ is the one physical microwave pulse, and $\phi$, $\lambda$ are virtual $z$ rotations implemented as frame changes that cost nothing.

Special values

Parameters Gate
$\phi = 0$, $\lambda = \pi$ Hadamard
$\phi = 0$, $\lambda = 0$ $R_y(\pi/2)$
$\lambda = -\phi$ Phased rotation $R(\pi/2, \phi + \pi/2)$, up to global phase

Properties

  • The fixed-$\theta$ slice of $U_3$: $U_2(\phi, \lambda) = U_3(\pi/2, \phi, \lambda)$. The one-parameter sibling $u_1$ is simply the phase gate.
  • Since $\phi$ and $\lambda$ are independent, $U_2$ generally includes a net $z$ rotation — unlike the phased rotation $R(\theta, \phi)$, whose frame change cancels. The two families overlap exactly on the $\lambda = -\phi$ slice.
  • Any single-qubit unitary is expressible with two $U_2$ gates and virtual phases, which is why one calibrated $\pi/2$ pulse per gate was enough for universality.

Usage

  • Legacy: OpenQASM 2 and early Qiskit compiled everything to $u_1, u_2, u_3$. Modern stacks target $\{R_z, \sqrt{X}, X\}$ or pulse-level natives instead, and Qiskit has deprecated the gate in favor of $U(\theta, \phi, \lambda)$. Kept here as reference material — the gate still appears throughout older papers, textbooks, and QASM files.

Also written

  • $U_2(\phi, \lambda)$
  • $\mathrm{U2}(\phi, \lambda)$

Data

  • This gate as JSON
  • Edit this page on GitHub

The unitary, drawn

Every entry of the matrix as a disc. The area is the transition probability $|U_{jk}|^2$; the colour and the hand are the phase. Rows are outputs $\langle j|$, columns inputs $|k\rangle$, in the computational basis. Each parameter has a slider; play runs through the family along the path of the Quirk link ($\phi = 2\pi t,\ \lambda = 4\pi t$).

Phase

Disc area $= |U_{jk}|^2$. Hover an entry for its value, or take the JSON.

SDK support

How to call this gate in each framework. Hover a ⓘ for a note; the support matrix compares every gate at once.

SDKName
Qiskit qiskit.circuit.library.U2Gate ⓘ
PennyLane pennylane.U2
Cirq — ⓘ
Q# —
PyQuil — ⓘ
Braket — ⓘ
BQSKit bqskit.ir.gates.U2Gate
Qibo qibo.gates.U2 ⓘ
pytket pytket.circuit.OpType.U2 ⓘ
Stim —
OpenQASM stdgates.inc: u2 ⓘ

← All gates

gate.directory made by nts $\oplus$ rdls