← Quantum Store · Guides · Lessons · Glossary · About · Türkçe

Preparation course: maths for quantum computing · Lesson 7 / 7 · 10 min

Angles and phase: turning with e^{iθ}

Complex numbers of size 1 lie on a circle and are written e^{iθ}. Learn radians, Euler’s formula and why the Z, S and T gates are half, quarter and eighth turns. The last preparation for the intermediate course.

Turns and radians

It is easy to think of angles in turns instead of degrees: a full turn is 360°, half a turn 180°, a quarter turn 90°. Mathematics and physics use radians: a full turn is 2π (about 6.28), half a turn π, a quarter turn π/2 and an eighth of a turn π/4 radians.

Quantum textbooks call the T gate the “π/4 phase gate” and the S gate the “π/2 phase gate”. Those numbers are simply an eighth and a quarter of a turn in radians.

The unit circle and Euler’s formula

All complex numbers of size 1 lie on a circle of radius 1 centred on the origin. The point at angle θ on that circle is the number cos θ + i·sin θ. Euler’s formula writes it compactly as e^{iθ}.

The beauty of this notation is that multiplying by e^{iθ} means turning by θ, and turns add up. e^{iπ/2} = i (a quarter turn), e^{iπ} = −1 (half a turn), e^{iπ/4} ≈ 0.707 + 0.707i (an eighth of a turn).

Phase gates and the invisible phase

The Z, S and T gates multiply the amplitude of |1⟩ by e^{iπ}, e^{iπ/2} and e^{iπ/4} respectively. Because turns add up, two T gates make an S, two S gates a Z, and four T gates a Z. The size does not change, so the probabilities do not change; what changes is the phase, the direction of the amplitude.

Multiplying the whole state by the same e^{iθ} is invisible to every measurement; this is called a global phase and does not matter. What matters is the phase difference between |0⟩ and |1⟩ (the relative phase): an interference step such as H turns that difference into measurable results. You are now ready for the phase, Fourier transform and phase estimation lessons of the intermediate course.

Try it yourself

In the four T example the result is always 1, just like H, Z, H. Remove one T: three eighths of a turn remain and the probability of 1 drops to about 85%. Remove another T: one S remains and the result is 50–50.

Open the circuit in your browser

The circuit playground is in Turkish. Button guide: “1000 kez ölç” = measure 1000 times, “Durum vektörünü göster” = show the state vector, “Bu devrenin Qiskit kodu” = this circuit’s Qiskit code, “Geri al” = undo, “Temizle” = clear. Click a gate in the circuit to remove it.

Key points

Test yourself

What is e^{iπ} equal to?

Show the answer

−1. π radians is half a turn. Start at 1 on the unit circle and turn half way round and you reach −1: e^{iπ} = −1. That is exactly the Z gate.

← The tensor product: putting qubits together · Beginner course →

Share: X · LinkedIn