7. Complex Numbers: Euler's Formula

Euler's Formula

You’ve grasped the core of probability with the Inner Product. Now, you need Euler's Formula because it is the fundamental engine of quantum operations. It connects the arithmetic of complex numbers to the geometry of rotation, which is how we manipulate a qubit.

1. The Formula

Euler's formula provides a compact way to represent any complex number $z$ that lies on the unit circle (a complex number with a magnitude of 1, like your probability amplitudes):

$$e^{i\theta} = \cos(\theta) + i \sin(\theta)$$

Here, $e$ is Euler's number (the base of the natural logarithm), $i$ is the imaginary unit, and $\theta$ (theta) is the phase angle in radians.

2. ⚛️ QC Interpretation: The Phase Factor

In quantum computing, this complex exponential $e^{i\theta}$ is called a Phase Factor.

  • Magnitude is 1: Because $\cos^2(\theta) + \sin^2(\theta) = 1$, the length (magnitude) of $e^{i\theta}$ is always 1. When you multiply a state vector by $e^{i\theta}$, you rotate it without changing its length, meaning probability is conserved.
  • Rotation: Multiplying a complex number $z$ by $e^{i\theta}$ rotates $z$ by an angle $\theta$ on the complex plane. This is how all single-qubit gates work—they are just rotations.
  • The Power of Interference: The phase $\theta$ is the physical degree of freedom we exploit for quantum interference. By applying phase gates (like the $R_z$ gate), we introduce a specific $\theta$ to the $|1\rangle$ component of a superposition, which is necessary for algorithms like the Quantum Fourier Transform.

🎯 Interactive Task

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