0. Why Quantum Computing?
Classical computers store information in bits: 0 or 1. To represent the state of $n$ physical particles, you often need numbers that grow as $2^n$. Feynman’s insight: a quantum system of $n$ particles already is a system with $2^n$ complex amplitudes. Maybe we can compute with that.
The Core Bet
A quantum computer exploits 3 quantum phenomena that have no classical analogue:
1. Superposition
A qubit can be in $|0\rangle$, $|1\rangle$, or a linear combination $\alpha|0\rangle + \beta|1\rangle$. $n$ qubits can be in superposition of all $2^n$ basis states at once.
2. Entanglement
Multiple qubits can be correlated such that you cannot describe them independently. Measurement results are correlated even for spacelike-separated qubits.
3. Interference
Amplitudes $\alpha, \beta \in \mathbb{C}$ can add constructively or destructively. Algorithms work by making wrong answers interfere away and right answers add up.
What Problems Might Benefit?
| Problem Class | Classical Complexity | Quantum Complexity | Speedup |
|---|---|---|---|
| Factoring $N$-bit integers | $2^{O(N^{1/3})}$ sub-exp | $O(N^3)$ Shor | Exponential |
| Unstructured search | $O(N)$ | $O(\sqrt{N})$ Grover | Quadratic |
| Quantum simulation | $2^{O(n)}$ for $n$ particles | $poly(n)$ | Exponential |
1. The Rules of the Game – Qubits
Dirac Notation & State Vectors
A classical bit is 0 or 1. A quantum bit or qubit is a unit vector in a 2D complex Hilbert space $\mathbb{C}^2$:
$|0\rangle = \begin{bmatrix}1 \\ 0\end{bmatrix}$ and $|1\rangle = \begin{bmatrix}0 \\ 1\end{bmatrix}$ are the computational basis states. $\langle \psi |$ is the conjugate transpose: $\langle\psi| = \begin{bmatrix}\alpha^* & \beta^*\end{bmatrix}$.
Measurement & The Born Rule
If you measure $|\psi\rangle$ in the computational basis, you get:
After measurement, the state collapses to the outcome you observed. You cannot learn $\alpha$ and $\beta$ from one copy. Measurement is irreversible and destroys superposition.
Global vs Relative Phase
States $|\psi\rangle$ and $e^{i\theta}|\psi\rangle$ are physically indistinguishable: global phase doesn't affect measurement outcomes because $|e^{i\theta}\alpha|^2 = |\alpha|^2$. However, relative phase matters:
These are orthogonal, maximally distinguishable states. The minus sign is a relative phase of $\pi$.
The Bloch Sphere
Ignoring global phase, any single-qubit state can be written:
This maps to a point $(\theta, \phi)$ on the unit sphere in $\mathbb{R}^3$. $|0\rangle$ is north pole, $|1\rangle$ is south pole.
Bloch Sphere with Key States
2. One Qubit Gates
Quantum evolution between measurements must be unitary: $|\psi'\rangle = U|\psi\rangle$ where $U^\dagger U = I$. This ensures probabilities sum to 1 and makes all operations reversible.
Pauli Gates
| Gate | Matrix | Action | Bloch Effect |
|---|---|---|---|
| $X$ (NOT) | $\begin{bmatrix}0&1\\1&0\end{bmatrix}$ | $X|0\rangle = |1\rangle$, $X|1\rangle = |0\rangle$ | Rotate $\pi$ around X |
| $Y$ | $\begin{bmatrix}0&-i\\i&0\end{bmatrix}$ | $Y|0\rangle = i|1\rangle$, $Y|1\rangle = -i|0\rangle$ | Rotate $\pi$ around Y |
| $Z$ | $\begin{bmatrix}1&0\\0&-1\end{bmatrix}$ | $Z|0\rangle = |0\rangle$, $Z|1\rangle = -|1\rangle$ | Rotate $\pi$ around Z |
Hadamard and Phase Gates
| Gate | Matrix | Action |
|---|---|---|
| $H$ | $\frac{1}{\sqrt{2}}\begin{bmatrix}1&1\\1&-1\end{bmatrix}$ | $H|0\rangle = |+\rangle$, $H|1\rangle = |-\rangle$. Creates superposition. |
| $S = \sqrt{Z}$ | $\begin{bmatrix}1&0\\0&i\end{bmatrix}$ | Phase gate. $S|1\rangle = i|1\rangle$ |
| $T = \sqrt{S}$ | $\begin{bmatrix}1&0\\0&e^{i\pi/4}\end{bmatrix}$ | Adds $\pi/4$ phase to $|1\rangle$ |
Circuit Symbols for Single-Qubit Gates
3. Multiple Qubits & Entanglement
Tensor Products
A 2-qubit system lives in $\mathbb{C}^2 \otimes \mathbb{C}^2 \cong \mathbb{C}^4$. Basis: $|00\rangle, |01\rangle, |10\rangle, |11\rangle$. General state:
Normalization: $\sum_{ij} |\alpha_{ij}|^2 = 1$. An $n$-qubit state has $2^n$ complex amplitudes. This is the "exponential state space" Feynman referred to.
Entanglement
A state is separable if $|\psi\rangle = |\phi\rangle \otimes |\chi\rangle$. Otherwise it is entangled. Example: The Bell states are maximally entangled.
Measuring the first qubit of $|\Phi^+\rangle$ gives 0 or 1 with 50% probability. But if you get 0, the second qubit is instantly 0, even if spacelike separated. This is correlation, not communication.
CNOT: The Key Two-Qubit Gate
Controlled-NOT flips the target if control is $|1\rangle$: $CNOT|x,y\rangle = |x, x \oplus y\rangle$.
CNOT Gate & Bell State Creation Circuit
CZ and Toffoli/CCNOT gates are also common. Toffoli is $|x,y,z\rangle \to |x,y,z\oplus(xy)\rangle$. It is universal for classical reversible computation.
4. Quantum Circuits & Universality
Reversible Computing
All quantum gates except measurement are unitary, hence reversible. Classical logic: AND, OR are irreversible. But any classical function $f: \{0,1\}^n \to \{0,1\}^m$ can be made reversible as $U_f|x\rangle|y\rangle = |x\rangle|y \oplus f(x)\rangle$ using ancilla bits. Toffoli + ancillae suffice.
Universal Gate Sets
A set of gates is universal if any unitary on $n$ qubits can be approximated arbitrarily well. Key results:
{H, T, CNOT}
Standard universal set. H + T generate dense subgroup of SU(2). CNOT creates entanglement.
{H, S, CNOT, Toffoli}
Universal and includes Toffoli for easy classical embedding.
Solovay-Kitaev Theorem
Any 1-qubit gate can be approximated to $\epsilon$ using $O(\log^c(1/\epsilon))$ gates from a finite universal set. Overhead is polylog.
Quantum Teleportation
Uses 1 Bell pair + 2 classical bits to transmit 1 unknown qubit state. Demonstrates that entanglement is a resource.
Quantum Teleportation Circuit
5. Algorithms 101: Query Complexity Separations
Early quantum algorithms showed advantage in query complexity: how many times must you query a black-box function $f$?
Deutsch-Jozsa Algorithm
Problem: $f:\{0,1\}^n \to \{0,1\}$ is promised to be either constant or balanced. Decide which with one query.
Classical deterministic: $2^{n-1}+1$ queries worst case. Quantum: 1 query.
Deutsch-Jozsa Circuit
Analysis: Starting $|0\rangle^n|1\rangle$, after first Hadamards: $\frac{1}{\sqrt{2^{n+1}}}\sum_x|x\rangle(|0\rangle-|1\rangle)$. After $U_f$: phase kickback gives $(-1)^{f(x)}$. Final Hadamards interfere: amplitude of $|0\rangle^n$ is $\frac{1}{2^n}\sum_x (-1)^{f(x)}$, which is 1 if constant, 0 if balanced.
Bernstein-Vazirani
Find hidden $s \in \{0,1\}^n$ where $f(x) = s \cdot x \bmod 2$. Classical: $n$ queries. Quantum: 1 query using DJ circuit. Output is $s$ directly.
Simon's Algorithm
Find hidden $s \neq 0^n$ such that $f(x) = f(y)$ iff $y = x \oplus s$. Classical: $2^{n/2}$ queries expected. Quantum: $O(n)$ queries. This was the first exponential separation and inspired Shor.
Key idea: Quantum circuit produces random $y$ such that $y \cdot s = 0 \bmod 2$. Collect $n-1$ linearly independent $y$ and solve for $s$ classically.
6. Shor's Algorithm: Breaking RSA
RSA security relies on factoring being hard: Given $N=pq$, find $p,q$. Best classical: General Number Field Sieve $2^{O(n^{1/3})}$ where $n=\log N$. Shor: $O(n^3)$ quantum.
Reduction: Factoring → Period Finding
Pick random $a Use 2 registers: $|x\rangle|0\rangle$ for $x \in [0,Q)$ where $Q \approx N^2$. Steps: QFT on $n$ qubits is the unitary: Matrix form for 1 qubit: $H = \frac{1}{\sqrt{2}}\begin{bmatrix}1&1\\1&-1\end{bmatrix}$. For $n$ qubits, can be implemented with $O(n^2)$ Hadamard + controlled phase gates. BQP: Bounded-error Quantum Polynomial time. Shor shows Factoring ∈ BQP. Widely believed Factoring ∉ P. But Factoring also not NP-complete. So quantum won’t solve NP-complete problems in general. Where does BQP sit? We know P ⊆ BQP and BQP ⊆ PSPACE, but relation to NP unknown.Quantum Period Finding
Quantum Fourier Transform
QFT Circuit for 3 Qubits
Complexity: BQP vs NP
7. Grover's Algorithm: Unstructured Search
Problem: Given $f:\{0,1\}^n \to \{0,1\}$ with one $w$ such that $f(w)=1$, find $w$. Classical: $O(N)$ queries where $N=2^n$. Grover: $O(\sqrt{N})$ queries. Provably optimal.
Amplitude Amplification
Start with uniform superposition $|s\rangle = \frac{1}{\sqrt{N}}\sum_x |x\rangle$. Goal: rotate toward $|w\rangle$. Each Grover iteration does:
- Oracle $U_w$: flip phase of $|w\rangle$. $U_w = I - 2|w\rangle\langle w|$
- Diffusion $U_s$: inversion about mean. $U_s = 2|s\rangle\langle s| - I = H^{\otimes n}(2|0\rangle\langle0| - I)H^{\otimes n}$
Geometrically: Start with $|s\rangle$ at angle $\theta$ from $|w^\perp\rangle$ where $\sin\theta = 1/\sqrt{N}$. Each iteration rotates by $2\theta$ toward $|w\rangle$.
Grover Iteration: Geometric View
Applications & Limits
Grover gives quadratic speedup for NP problems, but not exponential. Breaking AES-128 needs $2^{64}$ Grover iterations vs $2^{128}$ classical. AES-256 still needs $2^{128}$ quantum. So symmetric crypto is weakened but not broken. Main use: subroutines in other algorithms.
8. Physical Qubits & Noise
Mathematical qubits assume perfect unitaries. Real qubits decohere. The challenge: engineer two-level systems with long coherence, high-fidelity control, and scalability.
Major Platforms
Superconducting
IBM, Google, Rigetti. Josephson junctions at 15mK. Fast gates: 10-100ns. T1~100μs, T2~100μs. 2D connectivity. Basis: |0⟩=ground, |1⟩=first excited.
Trapped Ion
IonQ, Quantinuum. Yb+ or Ca+ ions in EM trap. Laser gates: 10-100μs. T1~seconds, T2~seconds. All-to-all connectivity. Very high fidelity >99.9%.
Photonic
PsiQuantum, Xanadu. Polarization/paths. Measurement-based. Room temp. Hard to do 2-qubit gates deterministically.
Neutral Atoms
QuEra, Pasqal. Rydberg blockade for gates. 2D arrays, reconfigurable. T1~seconds.
Noise Models
| Error Type | Physical Cause | Effect on Bloch Sphere | Timescale |
|---|---|---|---|
| T1: Amplitude damping | Energy loss to environment | |1⟩ → |0⟩, shrinks toward north pole | 10μs - 1s |
| T2: Dephasing | Phase noise, magnetic fluctuations | Equatorial plane shrinks to Z-axis | 10μs - 1s. T2 ≤ 2T1 |
| Gate error | Control pulse imperfection | Over/under rotation | Per gate: 0.1% - 1% |
| Readout error | Amplifier noise | |0⟩ read as 1 or vice versa | 1% - 5% |
NISQ Era: Noisy Intermediate-Scale Quantum
Coined by Preskill 2018. Refers to 50-1000 qubit devices with no error correction. Noise limits circuit depth to ~100-1000 gates. What can we do? Variational algorithms like VQE and QAOA where a shallow quantum circuit is optimized by classical loop. Hopes for quantum advantage in chemistry, optimization. No proof yet.
Error Model: Bit-Flip vs Phase-Flip
9. Quantum Error Correction
Classical repetition fails due to no-cloning and measurement collapse. Solution: encode 1 logical qubit into many physical qubits, detect errors without measuring the logical state.
Why Can't We Just Copy?
No-cloning: can't make $|\psi\rangle|\psi\rangle$. Also measuring to detect errors destroys superposition. Need syndrome measurements that learn about errors but not about data.
Shor 9-Qubit Code
First QEC code. Encodes 1 qubit, corrects 1 arbitrary error. Idea: concatenate 3-qubit bit-flip and phase-flip codes.
Each block of 3 corrects bit flips. Comparing blocks corrects phase flips. Uses 9 physical qubits for 1 logical.
Surface Code: The Leading Candidate
Qubits arranged in 2D grid. Data qubits + measure qubits. Four-body stabilizers: $X^{\otimes 4}$ on plaquettes, $Z^{\otimes 4}$ on vertices. Syndrome: which stabilizers flip tells you error location.
Key metric: code distance $d$. Can correct $\lfloor(d-1)/2\rfloor$ errors. Logical error rate $p_L \approx (p/p_{th})^{(d+1)/2}$ where $p_{th} \approx 1\%$ is threshold.
Distance-3 Surface Code
Threshold Theorem
If physical error rate $p < p_{th}$, then arbitrarily good logical qubits can be made by increasing code distance. Overhead: $polylog(1/\epsilon)$ physical per logical. For surface code, $p_{th} \approx 0.5-1\%$, which is why it's favored: achievable with superconducting qubits.
10. Where Are We Now?
NISQ: 2019 - Present
| Milestone | Year | Significance |
|---|---|---|
| Google "Quantum Supremacy" | 2019 | 53 qubits, 200s vs 10k years classical claim. Random circuit sampling. Debated. |
| USTC Jiuzhang | 2020 | Photonic Gaussian boson sampling. 76 photons. |
| IBM 127q Eagle | 2021 | First >100 qubit processor. Heavy-hex lattice. |
| Google 105q logical error | 2024 | Showed surface code below threshold. d=5,7 logicals. |
Near-Term Algorithms
VQE
Variational Quantum Eigensolver. Find ground state energy of molecules. Ansatz circuit + classical optimizer. Hope: chemistry beyond classical.
QAOA
Quantum Approximate Optimization Algorithm. For MaxCut, portfolio optimization. p-layer circuits approximate adiabatic evolution.
Quantum ML
Quantum kernels, variational classifiers. No proven advantage yet. Barren plateaus problem: gradients vanish exponentially.
Roadmap to Fault-Tolerance
Industry consensus path:
- Now: 100-1000 physical qubits, 0 logical. NISQ experiments.
- 5 years: 1-10 error-corrected logical qubits. Demonstrate surface code advantage.
- 10 years: 100 logical qubits. Useful quantum simulation, maybe break elliptic curve crypto.
- 15-20 years: 1000-4000 logical qubits. Run Shor 2048, quantum chemistry for drug design.
11. How to Learn More
Textbooks
- Nielsen & Chuang, "Quantum Computation and Quantum Information" — The bible. Comprehensive, rigorous. Chapters 1-6 cover algorithms.
- David Mermin, "Quantum Computer Science" — For computer scientists. No physics background needed. Gentle introduction.
- John Preskill's Lecture Notes — Available online. Ph219 Caltech. Best modern treatment.
Simulators & Frameworks
Qiskit
IBM. Python. Most complete: simulators + real hardware access. Best docs.
Cirq
Google. Python. Focused on NISQ and Google hardware. Good for algorithms.
PennyLane
Xanadu. Differentiable quantum programming. Great for QML.
Online Courses
- IBM Quantum Learning: free, hands-on with real QPUs
- MIT 8.370: Quantum Computation, EdX
- Brilliant.org Quantum Computing
Key Papers to Read
- Feynman 1982 — Original motivation
- Deutsch 1985 — First quantum algorithm
- Shor 1994 — Factoring
- Grover 1996 — Search
- Preskill 2018 — NISQ definition
12. References
- Feynman, R. P. (1982). "Simulating physics with computers." International Journal of Theoretical Physics, 21(6/7), 467–488.
- Shor, P. W. (1994). "Algorithms for quantum computation: discrete logarithms and factoring." Proc. 35th FOCS, 124–134.
- Grover, L. K. (1996). "A fast quantum mechanical algorithm for database search." Proc. 28th STOC, 212–219.
- Preskill, J. (2018). "Quantum Computing in the NISQ era and beyond." Quantum, 2, 79.
- Fowler, A. G., et al. (2012). "Surface codes: Towards practical large-scale quantum computation." Phys. Rev. A, 86(3), 032324.
- Nielsen, M. A., & Chuang, I. L. (2010). Quantum Computation and Quantum Information. Cambridge University Press.
- Deutsch, D., & Jozsa, R. (1992). "Rapid solution of problems by quantum computation." Proc. R. Soc. Lond. A, 439(1907), 553–558.
13. Glossary
- Amplitude
- Complex coefficient $\alpha$ in $|\psi\rangle = \alpha|0\rangle + \beta|1\rangle$. Probabilities are $|\alpha|^2$.
- Bloch Sphere
- Geometrical representation of 1-qubit pure states as points on unit sphere.
- BQP
- Bounded-error Quantum Polynomial time. Class of problems solvable by quantum computer in poly time with ≤1/3 error.
- Decoherence
- Loss of quantum information to environment. Characterized by T1 and T2 times.
- Entanglement
- Non-classical correlation between qubits. State cannot be written as tensor product of individual states.
- Logical Qubit
- Error-corrected qubit encoded in many physical qubits via QEC code.
- NISQ
- Noisy Intermediate-Scale Quantum. 50-1000 qubit era with no error correction.
- QFT
- Quantum Fourier Transform. Quantum analogue of DFT. Key subroutine in Shor, phase estimation.
- Superposition
- Linear combination of basis states: $\alpha|0\rangle + \beta|1\rangle$.
- Surface Code
- Topological QEC code on 2D lattice. Leading candidate for fault-tolerance. Threshold ~1%.
- Threshold Theorem
- If physical error rate below threshold, arbitrary quantum computation possible with poly overhead.
- Unitary
- Linear transformation $U$ with $U^\dagger U = I$. Preserves norm. All quantum gates except measurement are unitary.