8. Complex Numbers: Phases

Phases

You are drilled on the math, but here is where students often get tricked. In Quantum Computing, not all phases are created equal. You must distinguish between Global Phase and Relative Phase. One matters immensely; the other is mathematically real but physically meaningless.

1. Global Phase (The Ghost)

If we multiply the entire state vector $|\psi\rangle$ by a phase factor $e^{i\gamma}$, we get a new state $|\psi'\rangle = e^{i\gamma}|\psi\rangle$.

$$|\psi'\rangle = e^{i\gamma}(\alpha|0\rangle + \beta|1\rangle) = (e^{i\gamma}\alpha)|0\rangle + (e^{i\gamma}\beta)|1\rangle$$

Here is the brutal truth: Global phase has zero physical effect. You cannot measure it. It does not change the statistics of measurement outcomes. To the observer, $|\psi\rangle$ and $-|\psi\rangle$ (where $\gamma = \pi$) are identical states.

2. Relative Phase (The Engine)

Relative phase is the difference in phase between the coefficients $\alpha$ and $\beta$. This is the parameter $\phi$ on the Bloch Sphere.

Bloch Sphere showing relative phase phi

The angle $\phi$ around the Z-axis is the Relative Phase.

We can rewrite the state vector to isolate this relative phase:

$$|\psi\rangle = \cos(\frac{\theta}{2})|0\rangle + e^{i\phi}\sin(\frac{\theta}{2})|1\rangle$$

(Note: We often ignore the global phase on $\alpha$ by convention).

When you change $\phi$ (the Relative Phase), you rotate the state vector around the Z-axis of the Bloch sphere. This changes the state's superposition profile. While it doesn't change the probabilities of measuring $|0\rangle$ or $|1\rangle$ immediately (since $|e^{i\phi}|^2 = 1$), it crucially changes how the state interferes with other states in subsequent gates (like the Hadamard gate).

If you don't control the relative phase, you don't have a quantum algorithm. You just have a probabilistic coin flip.

H
X
Y
Z
S
T
Rx
Ry
Rz
CNOT
SWAP
M
Run simulation to see results...