Skip to content
Quantum ComputingAN INTERACTIVE OPEN TEXTBOOK
charithj.com.au

Quantum phase and interference

The invisible difference that another gate can make visible.

12 min readDr. Charith Jayasekara↓ Chapter PDF
By the end, you’ll be able to
  • Distinguish global phase from relative phase.
  • Derive the output of an H–phase–H circuit.

Multiplying an entire state by eiγe^{i\gamma} does not change measurement probabilities. For any measurement vector ∣v⟩\lvert v\rangle,

∣⟨v∣eiγψ⟩∣2=∣eiγ∣2∣⟨v∣ψ⟩∣2=∣⟨v∣ψ⟩∣2.|\langle v|e^{i\gamma}\psi\rangle|^2=|e^{i\gamma}|^2|\langle v|\psi\rangle|^2=|\langle v|\psi\rangle|^2.

Relative phase is different. Multiplying just one component changes its relationship with the others.

Prepare ∣0⟩\lvert0\rangle, apply H, then P(ϕ)=diag⁡(1,eiϕ)P(\phi)=\operatorname{diag}(1,e^{i\phi}), then H again:

∣0⟩⟼∣0⟩+∣1⟩2⟼∣0⟩+eiϕ∣1⟩2⟼1+eiϕ2∣0⟩+1−eiϕ2∣1⟩.\lvert0\rangle\longmapsto \frac{\lvert0\rangle+\lvert1\rangle}{\sqrt2} \longmapsto\frac{\lvert0\rangle+e^{i\phi}\lvert1\rangle}{\sqrt2} \longmapsto\frac{1+e^{i\phi}}2\lvert0\rangle+\frac{1-e^{i\phi}}2\lvert1\rangle.

The final probabilities are

P(0)=cos⁡2(ϕ/2),P(1)=sin⁡2(ϕ/2).P(0)=\cos^2(\phi/2),\qquad P(1)=\sin^2(\phi/2).

Before the second H, the Z probabilities are always 50/50. The final H recombines amplitudes and exposes the phase difference.

L03 · INTERACTIVE LABRuns on your device

Superposition & interference

The two Hadamard gates recombine amplitudes. A relative phase between them changes the result even though the intermediate Z-basis probabilities stay at 50/50.

Make a prediction first

H then H returns 0. What do you expect if a Z gate is placed between them?

Experiment controls
|0⟩ — H — P(φ) — H — M

P(φ) = diag(1, e^(iφ)). P(180°) is the Z gate.

Exact probability
|0⟩
100.0%
|1⟩
0.0%

Exact ideal-model predictions · run a measurement experiment to compare.

MODEL · Ideal pure-state vector, complex double precisionORDER · q0 is the leftmost bit
Take it further

Set the phase to 180°. Explain why the final probability of 1 becomes 100%.

  • At 0°, the amplitudes for 1 cancel; the result is 0.
  • At 180°, the amplitudes for 0 cancel; the result is 1.
  • At 90°, the output probabilities are equal.

Challenge: explain why applying a global minus sign at the middle of the circuit cannot replace the Z gate. Z changes the relative sign; a global minus multiplies both amplitudes.

Reference: IBM Quantum — Single systems.

ONE IDEA FURTHER

Ready for the next step?

Your progress stays in this browser.