Single-Qubit

Rotation Z (RZ)

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

Mathematical Representation
e-iθ/2
0
0
eiθ/2
Syntax & Usage Examples
RZ 0
RZ 2 90deg
RZ(0.5) 0
RZ (0,1) 0.25
RZ [0,1,2] pi/4
RZ(0.5pirad) 0
Bloch Sphere Representation
|0⟩ |1⟩ |+⟩ |−⟩ |−i⟩ |i⟩
θ rotation about the Z-axis
Qubi Gate Block Definition

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

gate RZ {
  name: Rotation Z
  label: RZ
  color: #2563eb
  matrix: [e^(-iθ/2) 0; 0 e^(iθ/2)]
  qubits: 1
}
Circuit Builder Layout
q[0]RZ

Technical Reference Details

Default angle is π/2 when omitted. Use RZ(θ) q for inline angles (attached parentheses). Diagonal gate - does not change measurement probabilities in the Z basis.

Parameter: θ (default: π/2)
LaTeX formula: \begin{bmatrix}e^{-i\theta/2}&0\\0&e^{i\theta/2}\end{bmatrix}
Compiler Representation: Gate ID is RZ.