QuantumSimulator
Interactive Course
Interactive chapters from intuition to mastery
Structured Lessons
Eight modules with formulas and self-checks
Quantum Brain
Navigate lessons, laws, gates, devices, and tools
Guided Experiments
Hands-on circuits that teach one idea each
Circuit Lab
Build circuits, run them, and see the results
Gate Reference
Quick reference for all quantum gates
Cryostat Studio
3D cryostat design and simulation
Component Catalog
Browse all cryostat components
System Checks
Check your design for errors
Menu
physics
Interactive Course
Interactive chapters from intuition to mastery
Structured Lessons
Eight modules with formulas and self-checks
Quantum Brain
Navigate lessons, laws, gates, devices, and tools
Guided Experiments
Hands-on circuits that teach one idea each
simulator
Circuit Lab
Build circuits, run them, and see the results
Gate Reference
Quick reference for all quantum gates
wiringStudio
Cryostat Studio
3D cryostat design and simulation
Component Catalog
Browse all cryostat components
System Checks
Check your design for errors
Home/Quantum Physics/Lessons/Phase Gate (S Gate)
P

Phase Gate (S Gate)

PhaseSingle-qubit+π/2

Rotates the phase of the ∣1⟩ amplitude by 90°, multiplying it by i.

Intuition

The Phase gate (also called the S gate) multiplies the ∣1⟩ amplitude by i (the imaginary unit), while leaving ∣0⟩ unchanged. This is a 90° phase rotation, compared to the Z gate’s full 180° phase flip. Like Z, it does not change measurement probabilities in the computational basis. The factor of i is invisible if you measure right away, but it shifts how the state interferes with other states later. The Phase gate demonstrates concretely that quantum amplitudes are complex numbers, not just real-valued weights.

Matrix representation
(10​0i​)
Action on states
∣0⟩→∣0⟩,∣1⟩→i∣1⟩
Bloch sphere
|+⟩
→
|+i⟩
Circuit
q0HP
State comparison
Before Phase
|+⟩
|0\u27E9
50%
|1\u27E9
50%
Bloch: (1.00, 0.00, 0.00)
→
After Phase
|+i⟩
|0\u27E9
50%
|1\u27E9
50%
Bloch: (0.00, 1.00, 0.00)
Full technical statement

The Phase gate is a diagonal matrix with entries (1, i). A diagonal matrix acts on each basis state independently without mixing them. Phase is a special case of the RZ rotation: S = RZ(π/2) up to a global phase factor. Applying it twice gives Z, because i² = −1, so S² = Z. Its eigenvalues (the factors each eigenstate gets multiplied by) are 1 and i, with eigenstates ∣0⟩ and ∣1⟩. On the Bloch sphere, it is a 90° rotation around the Z axis. Together with H, the S gate generates the Clifford group for a single qubit (the set of gates that map Pauli operators to Pauli operators under conjugation).

What changes in measurements

No change to measurement probabilities in the computational basis.

What stays hidden until later

A 90° phase shift accumulates on the ∣1⟩ amplitude. This becomes visible only after a mixing gate like H converts phase into probability.

Bloch sphere

Rotates the Bloch vector 90° around the Z axis. The poles stay fixed. Equatorial states rotate by a quarter-turn.

Step-by-step example

Building up phase in steps

  1. 1Start with ∣+⟩=H∣0⟩=(∣0⟩+∣1⟩)/2​.
  2. 2Apply Phase. The ∣1⟩ amplitude is multiplied by i. The state becomes (∣0⟩+ i∣1⟩/2​.
  3. 3Apply Phase again. The ∣1⟩ amplitude is now multiplied by i² = −1. The state becomes (∣0⟩ − ∣1⟩/2​= |−⟩. Two S gates equal one Z gate.
  4. 4Apply H. Hadamard maps |−⟩ to ∣1⟩. Measurement now gives 1 with certainty, confirming the accumulated phase.
Where this gate appears
  • Clifford group circuits, where S and H together generate all single-qubit Clifford operations
  • Phase estimation subroutines
  • Quantum Fourier Transform building blocks
  • T gate decomposition, since T² = S
Connected gates
  • S² = Z — two 90° phase rotations equal one 180° phase flip, because i² = −1
  • S = RZ(π/2) up to a global phase factor
  • S† (S-dagger) rotates by −π/2, multiplying |1⟩ by −i instead of i
  • T² = S — the T gate is the square root of S, adding half as much phase
Tempting but wrong

It is tempting to think the Phase gate does nothing useful because it does not change measurement probabilities. That sounds plausible because the histogram looks identical before and after. What actually happens is that the phase shift changes how the state interferes with other states, and quantum algorithms rely on these accumulated phase shifts to bias the final measurement toward the correct answer.

Why this gate matters for what comes next

The Phase gate shows that quantum information is richer than probabilities alone. The factor of i is physically real. It lives in the phase dimension, and you need interference (via a gate like H) to access it. Understanding this is essential for grasping how quantum algorithms extract answers.

Test your understanding

How many S gates does it take to equal one Z gate?

Quick reference →↗ Nielsen and Chuang, Quantum Computation and Quantum Information
←
Previous
Swap
Next
RX Gate
→
← Back to all lessons