RX rotation

Rotates the qubit by an angle θ about the X axis of the Bloch sphere.

Rotation · 1 qubit · reviewed November 2026

Matrix

[ cos(θ/2)     −i·sin(θ/2) ]
[ −i·sin(θ/2)    cos(θ/2)  ]

What it does

|0⟩, θ = π→−i|1⟩
|0⟩, θ = π/2→(|0⟩ − i|1⟩)/√2

In plain words

Rotation gates give a continuous knob. RX at θ = π is an X gate up to a global phase. Variational algorithms tune the angles to minimise a cost function.

Identities

  • RX(θ)·RX(−θ) = I
  • RX(π) = −i·X

Where it is used

  • Variational circuits
  • Preparing arbitrary single-qubit states
  • Pulse-level calibration

Code

# Qiskit
qc.rx(theta, 0)

// OpenQASM 2.0
rx(theta) q[0];

Qiskit prints qubit 0 on the right of a bitstring. The builder prints it on the left.

Related gates

Questions

Why θ/2 inside the cosine?

A Bloch-sphere rotation by θ corresponds to a state rotation by θ/2, because states of opposite Bloch direction are orthogonal, a half-angle apart in state space.

Try the Rx(θ) gate in the Circuit Builder →