# Term 0 — Mathematical & Computational Foundations

> The mathematical machine room of quantum computing. Quantum mechanics *is* linear algebra over
> complex Hilbert spaces, with probability for measurement and Fourier analysis for its most famous
> algorithms. This term is a **rigorous refresher repurposed for QM** — you've seen most of these
> ideas; here we sharpen them into exactly the tools Terms 1–5 demand, in the notation we'll use
> forever after.

**Estimated time:** ~70 hours · **Lessons:** 16 across 4 courses
**Prerequisites:** the program's assumed background (linear algebra, calculus, probability, Python).
**You should also have done:** [Appendix A — Braket Setup](../appendix/A-braket-setup.md) and
[Appendix B — Python/NumPy Refresher](../appendix/B-python-numpy-refresher.md).

---

## Why this term exists

You can't reason about a qubit without complex inner-product spaces; you can't understand
measurement without probability; you can't grasp Shor or the QFT without the discrete Fourier
transform; and you can't appreciate *why quantum is interesting* without classical complexity. We
front-load this so that from [Term 1](../term-1-quantum-mechanics/README.md) onward every concept
has its prerequisites already in place — **no concept is introduced before its dependencies.**

If you're confident in a course, skim its lessons and go straight to the **Checkpoint** at the end
of each; if you can answer those, move on.

## Course Map

```mermaid
flowchart TD
    C1["0.1 Linear Algebra for QM\n(7 lessons)"]
    C2["0.2 Probability, Statistics & Information\n(3 lessons)"]
    C3["0.3 Complex Analysis & Fourier Methods\n(3 lessons)"]
    C4["0.4 Classical Computation & Complexity\n(3 lessons)"]

    C1 --> T1["→ Term 1: Quantum Mechanics"]
    C2 --> T1
    C3 --> QFT["→ Term 2.4: QFT / Phase Estimation"]
    C4 --> BQP["→ Term 3.6: BQP & Quantum Complexity"]
    C1 -. "tensor products" .-> C2
```

**Dependency notes.** Course 0.1 (Linear Algebra) is load-bearing for *everything* — do it first
and thoroughly. Courses 0.2–0.4 are largely independent of each other and can be taken in any order
after 0.1, though the lesson sequence below is the recommended path.

---

## Courses & Lessons

### Course 0.1 — Linear Algebra for Quantum Mechanics  `c01-linear-algebra/`
The vocabulary of quantum states and operations. **The most important course in Term 0.**
1. [Complex Vector Spaces](c01-linear-algebra/01-complex-vector-spaces.md) — fields, $\mathbb{C}^n$, basis, dimension, subspaces.
2. [Inner Products & Norms](c01-linear-algebra/02-inner-products-norms.md) — inner products, Cauchy–Schwarz, orthonormality, Gram–Schmidt.
3. [Dirac Notation](c01-linear-algebra/03-dirac-notation.md) — bras, kets, outer products, the resolution of identity.
4. [Linear Operators & Matrices](c01-linear-algebra/04-linear-operators-matrices.md) — operators, matrix elements, the adjoint, change of basis, trace.
5. [Eigenvalues & the Spectral Theorem](c01-linear-algebra/05-eigen-spectral-theorem.md) — diagonalization, normal operators, the spectral theorem.
6. [Special Operators](c01-linear-algebra/06-special-operators.md) — Hermitian, unitary, projection, positive operators; functions of operators.
7. [Tensor Products](c01-linear-algebra/07-tensor-products.md) — combining systems; Kronecker product; the seed of entanglement.

### Course 0.2 — Probability, Statistics & Information  `c02-probability-information/`
The language of measurement outcomes and the statistics of finite-shot estimation.
1. [Probability Spaces](c02-probability-information/01-probability-spaces.md) — axioms, conditioning, independence, Bayes.
2. [Random Variables & Expectation](c02-probability-information/02-random-variables-expectation.md) — distributions, expectation/variance, LLN/CLT, concentration; the $1/\sqrt{M}$ shot-noise law.
3. [Classical Information Theory](c02-probability-information/03-classical-information-theory.md) — Shannon entropy, mutual information, KL divergence.

### Course 0.3 — Complex Analysis & Fourier Methods  `c03-fourier-methods/`
Phases, frequencies, and the transform at the heart of quantum algorithms.
1. [Complex Numbers & Functions](c03-fourier-methods/01-complex-numbers-functions.md) — polar form, Euler, roots of unity.
2. [Fourier Series & Transforms](c03-fourier-methods/02-fourier-series-transforms.md) — frequency domain, convolution theorem, Parseval.
3. [The Discrete Fourier Transform](c03-fourier-methods/03-discrete-fourier-transform.md) — the unitary DFT matrix; FFT; the bridge to the QFT.

### Course 0.4 — Classical Computation & Complexity  `c04-computation-complexity/`
What "efficient" means, and why a quantum computer might change the answer.
1. [Models of Computation](c04-computation-complexity/01-models-of-computation.md) — Turing machines, circuits, universality.
2. [Complexity Classes](c04-computation-complexity/02-complexity-classes.md) — P, NP, BPP, PSPACE; reductions.
3. [Reversible Computation](c04-computation-complexity/03-reversible-computation.md) — Landauer, Toffoli/Fredkin; the bridge to unitary gates.

---

## Term Learning Outcomes

By the end of Term 0 you will be able to:

1. Manipulate vectors and operators on finite-dimensional complex inner-product spaces in **Dirac
   notation**, including tensor products of subsystems.
2. Diagonalize normal operators via the **spectral theorem** and compute **functions of operators**
   (including the matrix exponential).
3. Model random outcomes with probability spaces and **quantify estimation error** as a function of
   sample size (the basis of shot budgeting).
4. Compute the **discrete Fourier transform** and prove its (normalized) matrix is unitary —
   the classical shadow of the QFT.
5. Place computational problems in the **P / NP / BPP / PSPACE** landscape and explain why
   reversibility (Landauer, Toffoli) connects classical logic to quantum gates.

---

← Back to [Program Index](../README.md) · Begin: [0.1.1 Complex Vector Spaces](c01-linear-algebra/01-complex-vector-spaces.md) →
