beginner · Physics · Math Foundations: Complex Numbers
Checkpoint: Complex Number Workout
This checkpoint pulls together every complex-number skill from Module 1.
Each sub-problem below targets one concept that quantum mechanics uses daily —
read the derivations, then put them into code.
(A) Modulus and the Born rule
The modulus of z=a+bi is the distance from the origin in the complex plane:
∣z∣=a2+b2.
For z=3+4i: ∣z∣=9+16=25=5.
The Born rule ties modulus to physics: if a quantum amplitude is z, the
probability of that outcome is ∣z∣2. Fluency with moduli is therefore fluency
with quantum measurement.
(B) Complex multiplication and conjugates
Multiplying two complex numbers (a+bi)(c+di)=(ac−bd)+(ad+bc)i follows
from treating i2=−1. Squaring 2+i:
(2+i)2=22+2⋅2⋅i+i2=4+4i−1=3+4i.
The real part is 3.
The complex conjugatez∗=a−bi flips the imaginary sign. A key identity is
z⋅z∗=∣z∣2, which is why inner products in quantum mechanics always pair a
bra with a ket: ⟨ψ∣ϕ⟩ implicitly conjugates one factor.
(C) Euler's formula and phases
Euler's formula is the bridge between exponentials and trigonometry:
eiθ=cosθ+isinθ.
So eiθ has real part cosθ and imaginary part sinθ. For θ=π/3:
Re(eiπ/3)=cos(3π)=21.
Quantum states carry phase factors of the form eiθ. Because
∣eiθ∣2=cos2θ+sin2θ=1, a global phase never changes
measurement probabilities — only relative phases between terms matter.
(D) Roots of unity and the unit circle
The n-th roots of unity solve zn=1. There are exactly n of them:
ωk=e2πik/n,k=0,1,…,n−1.
They are equally spaced on the unit circle, so every root of unity has modulus 1.
For n=5 the primitive root is ω=e2πi/5, and
∣ω∣=e2πi/5=cos2(52π)+sin2(52π)=1.
Roots of unity appear in the quantum Fourier transform, the backbone of Shor's
factoring algorithm.
Try it
Compute the four answers and return their sum. The four values are:
(A) ∣3+4i∣, (B) Re((2+i)2), (C) Re(eiπ/3),
and (D) ∣e2πi/5∣.
Run your code to see the quantum state.
Sign in on the full site to ask questions and join the discussion.