← All posts

Quantum Computing: A Ground-Up Technical Primer

Published · 15 min read

From superposition to Shor's algorithm. Zero quantum mechanics assumed. Just classical CS + linear algebra.

0. Why Quantum Computing?

"Nature isn't classical, dammit, and if you want to make a simulation of nature, you'd better make it quantum mechanical, and by golly it's a wonderful problem, because it doesn't look so easy." — Richard Feynman, Simulating Physics with Computers, 1982

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
Important: Quantum computers are not uniformly faster. For most problems we know of no speedup. They are special-purpose machines for problems with structure that interference can exploit.

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$:

$$|\psi\rangle = \alpha|0\rangle + \beta|1\rangle = \begin{bmatrix} \alpha \\ \beta \end{bmatrix}, \quad \alpha,\beta \in \mathbb{C}, \quad |\alpha|^2 + |\beta|^2 = 1$$

$|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:

$$\text{Outcome } 0 \text{ with probability } |\langle 0|\psi\rangle|^2 = |\alpha|^2$$ $$\text{Outcome } 1 \text{ with probability } |\langle 1|\psi\rangle|^2 = |\beta|^2$$

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.

No-Cloning Theorem: There is no unitary $U$ such that $U|\psi\rangle|0\rangle = |\psi\rangle|\psi\rangle$ for arbitrary $|\psi\rangle$. Proof: cloning is non-linear, unitaries are linear. Consequence: you cannot copy an unknown quantum state, which breaks many classical error correction ideas.

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:

$$|+\rangle = \frac{|0\rangle + |1\rangle}{\sqrt{2}} \quad \text{vs} \quad |-\rangle = \frac{|0\rangle - |1\rangle}{\sqrt{2}}$$

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:

$$|\psi\rangle = \cos\frac{\theta}{2}|0\rangle + e^{i\phi}\sin\frac{\theta}{2}|1\rangle$$

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

|0⟩ |1⟩ |+⟩ |-⟩ |+i⟩ |-i⟩

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$
Key Fact: $HZH = X$. The Hadamard basis change swaps $X$ and $Z$. This is why $|+\rangle, |-\rangle$ are eigenstates of $X$: $X|+\rangle = |+\rangle$, $X|-\rangle = -|-\rangle$.

Circuit Symbols for Single-Qubit Gates

H Hadamard X Pauli-X Z Pauli-Z S Phase T π/8 Measure

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:

$$|\psi\rangle = \alpha_{00}|00\rangle + \alpha_{01}|01\rangle + \alpha_{10}|10\rangle + \alpha_{11}|11\rangle$$

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.

$$|\Phi^+\rangle = \frac{|00\rangle + |11\rangle}{\sqrt{2}} \quad |\Phi^-\rangle = \frac{|00\rangle - |11\rangle}{\sqrt{2}}$$ $$|\Psi^+\rangle = \frac{|01\rangle + |10\rangle}{\sqrt{2}} \quad |\Psi^-\rangle = \frac{|01\rangle - |10\rangle}{\sqrt{2}}$$

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 = \begin{bmatrix}1&0&0&0\\0&1&0&0\\0&0&0&1\\0&0&1&0\end{bmatrix}$$

CNOT Gate & Bell State Creation Circuit

CNOT Symbol control target Create |Φ+⟩ |0⟩ |0⟩ H → |Φ⁺⟩ |00⟩ → H⊗I → (|0⟩+|1⟩)|0⟩/√2 → CNOT → (|00⟩+|11⟩)/√2 Toffoli / CCNOT: Universal for classical reversible computing

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

|ψ⟩ Alice |0⟩ Alice |0⟩ Bob H M1: c1 H M2: c2 X if c2=1 Z if c1=1 |ψ⟩ Result: Bob's qubit becomes |ψ⟩. Alice's qubits are destroyed. No cloning occurs.

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.

$$U_f|x\rangle|y\rangle = |x\rangle|y \oplus f(x)\rangle$$

Deutsch-Jozsa Circuit

|0⟩ⁿ |1⟩ Hⁿ Uf Hⁿ H If all 0s measured → constant. If any 1 → balanced.

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.

Pattern: All these use Hadamards to create superposition, query $U_f$ for phase kickback, then Hadamards to interfere. This is the template for the Quantum Fourier Transform.

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

Quantum Period Finding

Use 2 registers: $|x\rangle|0\rangle$ for $x \in [0,Q)$ where $Q \approx N^2$. Steps:

  1. $H^{\otimes n}$ on first register: $\frac{1}{\sqrt{Q}}\sum_x |x\rangle|0\rangle$
  2. Compute $a^x \bmod N$ in second register: $\frac{1}{\sqrt{Q}}\sum_x |x\rangle|a^x \bmod N\rangle$
  3. Measure second register. First collapses to superposition of $x$ with same $a^x$: $\frac{1}{\sqrt{M}}\sum_{k=0}^{M-1} |x_0 + kr\rangle$
  4. Apply Quantum Fourier Transform to first register
  5. Measure: get $j$ such that $j/Q \approx d/r$ for some $d$. Classical continued fractions recovers $r$.

Quantum Fourier Transform

QFT on $n$ qubits is the unitary:

$$QFT|j\rangle = \frac{1}{\sqrt{2^n}}\sum_{k=0}^{2^n-1} e^{2\pi i j k / 2^n} |k\rangle$$

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.

QFT Circuit for 3 Qubits

|x₂⟩ |x₁⟩ |x₀⟩ H R₂ R₃ H R₂ SWAP H Rₖ = controlled phase: [1 0; 0 e^{2πi/2ᵏ}]

Complexity: BQP vs NP

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.

Impact: A 4000-logical-qubit quantum computer with ~$10^9$ gates could factor 2048-bit RSA in hours. Current largest: 1000+ physical qubits, 0 logical qubits. We are in the NISQ era.

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:

  1. Oracle $U_w$: flip phase of $|w\rangle$. $U_w = I - 2|w\rangle\langle w|$
  2. 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$.

$$\theta = \arcsin\frac{1}{\sqrt{N}} \approx \frac{1}{\sqrt{N}}, \quad \text{Iterations: } \frac{\pi}{4\theta} \approx \frac{\pi}{4}\sqrt{N}$$

Grover Iteration: Geometric View

|w⟩ |w⊥⟩ |s⟩ U_w|s⟩ G|s⟩ θ Each iteration rotates ~2/√N toward |w⟩

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

Bit Flip: X error |0⟩ |1⟩ |0⟩→|1⟩ Phase Flip: Z error |+⟩ |-⟩ |+⟩→|-⟩

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.

$$|0_L\rangle = \frac{(|000\rangle + |111\rangle)^{\otimes 3}}{2\sqrt{2}}$$ $$|1_L\rangle = \frac{(|000\rangle - |111\rangle)^{\otimes 3}}{2\sqrt{2}}$$

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

D D D D D D D D D D D D D D D D X X X X X X Z Z Z Z Z Z 17 physical qubits → 1 logical qubit, distance 3

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.

Resource estimates: A logical qubit with error $10^{-15}$ needs distance ~25-30 surface code, i.e. ~1000 physical qubits. Shor 2048-bit needs ~4000 logicals → ~4M physical 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:

  1. Now: 100-1000 physical qubits, 0 logical. NISQ experiments.
  2. 5 years: 1-10 error-corrected logical qubits. Demonstrate surface code advantage.
  3. 10 years: 100 logical qubits. Useful quantum simulation, maybe break elliptic curve crypto.
  4. 15-20 years: 1000-4000 logical qubits. Run Shor 2048, quantum chemistry for drug design.
Reality Check: All projections assume error rates keep improving and manufacturing scales. Each step is 10x harder. May hit unknown physics limits. But progress has been steady for 20 years.

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

  1. Feynman 1982 — Original motivation
  2. Deutsch 1985 — First quantum algorithm
  3. Shor 1994 — Factoring
  4. Grover 1996 — Search
  5. Preskill 2018 — NISQ definition

12. References

  1. Feynman, R. P. (1982). "Simulating physics with computers." International Journal of Theoretical Physics, 21(6/7), 467–488.
  2. Shor, P. W. (1994). "Algorithms for quantum computation: discrete logarithms and factoring." Proc. 35th FOCS, 124–134.
  3. Grover, L. K. (1996). "A fast quantum mechanical algorithm for database search." Proc. 28th STOC, 212–219.
  4. Preskill, J. (2018). "Quantum Computing in the NISQ era and beyond." Quantum, 2, 79.
  5. Fowler, A. G., et al. (2012). "Surface codes: Towards practical large-scale quantum computation." Phys. Rev. A, 86(3), 032324.
  6. Nielsen, M. A., & Chuang, I. L. (2010). Quantum Computation and Quantum Information. Cambridge University Press.
  7. 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.

Built as a single-file technical primer. All equations rendered with MathJax. SVGs are accessible and responsive.