|q⟩ Bad Qubits

beginner · Physics · Math Foundations: Complex Numbers

Modulus and Argument

Every complex number z=a+biz = a + bi has a modulus (or magnitude)

z=a2+b2,|z| = \sqrt{a^2 + b^2},

the distance from the origin in the complex plane, and an argument arg(z)=atan2(b,a)\arg(z) = \operatorname{atan2}(b, a), the angle it makes with the positive real axis. Together they give the polar form z=zeiarg(z)z = |z|\,e^{i\arg(z)}.

The modulus is exactly what the Born rule needs: if a quantum amplitude is zz, the corresponding probability is z2|z|^2. So fluency with z|z| is fluency with quantum measurement.

Try it

This is a numerical exercise — your code should return a number, not a circuit. Compute the modulus of z=3+4iz = 3 + 4i (the classic 3–4–5 triangle).

Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.