Single-Qubit

Rotation X (RX)

Rotates the qubit state by angle θ around the X-axis of the Bloch sphere.

Mathematical Representation
cos(θ/2)
-i·sin(θ/2)
-i·sin(θ/2)
cos(θ/2)
Syntax & Usage Examples
RX 0
RX 0 0.5
RX 0 90deg
RX 0 1rad
RX 0 pi/4
RX(0.5) 0
RX(1) 0
RX (0,1) 0.25
RX [0,1] pi/2
Bloch Sphere Representation
; |0⟩ |1⟩ |+⟩ |−⟩ |−i⟩ |i⟩
θ rotation about the X-axis
Qubi Gate Block Definition

This is how the RX gate is defined in Qubi preprocessor style. You can declare similar definitions in custom gate { } blocks:

gate RX {
  name: Rotation X
  label: RX
  color: #dc2626
  matrix: [cos(θ/2) -i·sin(θ/2); -i·sin(θ/2) cos(θ/2)]
  qubits: 1
}
Circuit Builder Layout
q[0]RX

Technical Reference Details

Default angle is π/2 when omitted. Plain numbers are multiples of π. Supports deg, rad, pirad suffixes. For angles in parentheses, attach them to the gate name: RX(θ) q - not RX (θ) q. Parentheses with a space before ( are qubit lists only: RX (0,1). When angle = π, equivalent to X gate (up to global phase).

Parameter: θ (default: π/2)
LaTeX formula: \begin{bmatrix}\cos(\theta/2)&-i\sin(\theta/2)\\-i\sin(\theta/2)&\cos(\theta/2)\end{bmatrix}
Compiler Representation: Gate ID is RX.