Quantum computing, in full

The Machinery

The machinery every algorithm on this site actually runs on.

Every pillar page on this site already teaches its ideas at three depths, toggled in place. This is a different kind of depth: not another tier of the same explanations, but the actual mathematical objects (state spaces, density matrices, measurement operators) that a real course builds before it lets you near Shor's algorithm. Nothing here is hand-waved. Every claim either has a proof or says plainly that it doesn't.

41topics live
of 41 planned
15sections built
of 15
5of 41 topics link
a primary paper
A black-and-white group photograph of 29 scientists in formal dress, standing and seated in three rows in front of a building.
The fifth Solvay Conference, Brussels, October 1927, where the people who built quantum mechanics argued over what the theory means. Photograph by Benjamin Couprie, public domain, source.

Why this page exists, separately

Every quantum claim on this site (Shor's algorithm breaks ECDSA, a surface code suppresses errors exponentially, a decoder reads a syndrome) rests on the same handful of mathematical facts: what a quantum state is, how it evolves, what happens when you measure it, and what you provably cannot do to it. Those facts are usually asserted on the page that needs them and moved past quickly, because that page has its own job. This page is where they get built properly, once, so every other page can point back here instead of re-deriving them.

This page's nine planned sections, and a tenth part of five more, are now all built: a seventh, added 2026-08-26, once topics 16–17's own Hamiltonians existed to ask the natural next question: exactly how hard is finding one of these ground energies, in general? An eighth, added 2026-10-20, came from the other direction: the error-correction lesson's Formal tier leans on the stabilizer formalism, and nothing on this page had taught it. A ninth, added the same day, came from the algorithms everyone has heard of: this page taught the pieces of Shor's algorithm (topics 11 to 13) and the oracle trick under Grover's (topic 08) but never the two algorithms themselves, so topics 22 and 23 assemble them, each with a problem set and a notebook you can run. The tenth part, added 2026-10-25, answers a practical question the first nine never touched: how do researchers actually compute what a superconducting qubit does? Topics 24 to 41, The Workbench, teach the arrays and the equation under every simulation, the circuits themselves, the two free programs people reach for to simulate a superconducting qubit (QuTiP and scqubits), a chip fitted to a measurement, and, added the next day, the two Python toolkits people write circuits in (Qiskit and Cirq) and what compiling for a chip and adding noise do to a circuit. That doesn't mean quantum computing is exhausted. It means the load-bearing mathematics behind every other page on this site now has a proper home, once, instead of being asserted piecemeal.

The Formal FrameworkFour topics, each taught four ways

Your progress: 0 of 41 understood

ProtocolsThree topics, the postulates turned into something you can do

Everything above described what a quantum state is. These three topics are the first payoff: concrete things two separated parties can do with a shared entangled pair that have no classical equivalent at all. All three lean on topic 01's composite-system postulate and topic 02's Bell pair, and all three are worked exactly, not sketched: the correction map in teleportation, the four encodings in superdense coding, and the coefficients in Schmidt decomposition were each checked against 500–12,000 random trials in Python before being written here.

Building-block algorithmsThree topics, the first speedups you can actually prove

These three are historically where quantum computing stopped being only physics. Each solves a promise problem: the input is guaranteed to have one of a small number of structures, and the algorithm's job is to find out which, and each does it with a query-complexity gap over any classical algorithm that can be proven outright, not benchmarked. None of them do anything commercially useful on their own; their importance is that they are the first proofs, small and completely worked, of the exact mechanism (phase kickback, then interference) that later algorithms on this site (Shor's, Grover's) scale up to problems that matter. The honest caveat, stated once here because it applies to all three: these are separations against an oracle (a black box promised to compute f, queried as a whole) not proofs that quantum computers are faster at every real problem. That is a real, provable gap in the query-complexity model, not a lesser one, but it is a different claim from separating complexity classes like P and BQP outright, which remains open.

The Fourier transformThree topics: the machinery Shor's algorithm is actually built from

Simon's algorithm (topic 10) found a hidden XOR-period using n Hadamard gates and ordinary linear algebra, because XOR-periods live in the group (ℤ/2ℤ)ⁿ and the Hadamard transform is exactly the Fourier transform over that group. Real periods (the ones behind factoring) live in ℤ/2tℤ instead, a bigger, different group, and finding them needs the Fourier transform for that group: the quantum Fourier transform. These three topics build it, use it to read out an unknown phase, and use that to recover a period: the exact chain Shor's algorithm runs, derived here instead of asserted there.

Information theoryTwo topics: putting a number on uncertainty, classical and quantum

Every topic up to here has talked about qubits, measurement, and algorithms without ever asking the most basic question a communication engineer would ask first: how much information is actually here, measured in bits? That question has a classical answer nearly 80 years old, and a quantum generalisation that both agrees with it in the classical limit and produces one result with no classical analogue at all: the fact that a perfectly certain whole can have a genuinely uncertain half. This closes two loose threads left open on purpose: topic 02 promised the object entropy is computed from, and topic 07 promised the number that finally says how much two systems are entangled, not just whether they are.

Quantum algorithms for optimization & simulationTwo topics: the near-term half of the zoo, with no speedup proof to its name

Every algorithm this page has built so far is proven: Deutsch's, Simon's, Shor's period-finding all come with a fixed circuit and a guaranteed advantage over any classical algorithm attacking the identical problem. This section is the honest counterpart. QAOA and VQE are a completely different kind of algorithm: built for the noisy, shallow-circuit hardware that actually exists today, and carrying a different guarantee: not "this is fast," but "this can never quietly report a wrong answer as if it were right." Nobody has a proof either one beats its best classical rival on the problems people actually care about: a fact this section states as plainly as the rest of this page states its proofs.

Complexity theoryThree topics: how hard the general versions of this page's own problems actually are

Topics 16–17 built VQE: a loop that always reports an energy honestly no lower than the truth, because the variational principle proves it. What that loop does not come with is a promise that it ever finds the true ground energy in reasonable time, on a general Hamiltonian. This section asks the question directly: exactly how hard is "find this Hamiltonian's ground energy," as a decision problem, and does the answer explain, rather than just describe, why every near-term algorithm on this page ships without a speed guarantee?

StabilizersOne topic: the language error correction is written in

Topic 04 showed that an unknown state cannot be copied, which is why error correction cannot simply keep three copies. This topic shows what it does instead: it names a state by the operators that leave it unchanged, and reads errors off by checking those operators. It sits last because it was written last, not because it must be read last: it needs topic 01 and the Bell pair of topic 02, and the error-correction lesson's Formal tier points here.

The two landmark algorithmsTwo topics: search in about √N steps, and factoring in polynomial time

Every algorithm on this page so far has been a part or a special case. These two are the ones the world has heard of, and they are the two the rest of this site leans on: Grover's quadratic speed-up for unstructured search, which sets how much a symmetric key must grow, and Shor's exponential one for factoring, which is why public-key cryptography is being replaced. Each topic has a problem set with worked solutions, and a notebook that runs the whole thing with nothing but NumPy.

The Workbench: before the toolsThree topics: the arrays, the equation of motion and the oscillator that every circuit simulation is made of

Everything above is mathematics you can do on paper. This part is the other half: what a researcher does on a computer to see how a superconducting qubit behaves. Two free programs do most of it, QuTiP for how a system changes in time and scqubits for the levels of a circuit, and both are taught here from the beginning. This first group builds what they are made of: a state as a list of numbers, the one equation that moves it, and the oscillator that a resonator is. Every number in the part was produced by QuTiP 5.2.0 or scqubits 4.3.1, every example prints what the page says it prints, and each topic has an explorer you can move; all of them are on one page, the Workbench. If you only want to install the programs, start at topic 33.

The Workbench: a qubit in the labTwo topics: driving a qubit with a microwave tone, and what its environment does to it

A qubit is never simulated alone and never undisturbed. The first topic here turns a qubit with a drive, the experiment every lab runs first. The second adds the environment, which gives the two clocks T1 and T2 and the equation (Lindblad’s) that QuTiP’s open-system solver is built on.

The Workbench: the circuitsFour topics: the transmon, the fluxonium, a qubit with its resonator, and two qubits together

These four topics are the physics the two programs encode: the Hamiltonians of the common superconducting circuits, the way a resonator reads one out, and what happens when two sit side by side. Each is worked by diagonalising a matrix, so each can be checked against the programs in the next group, and each ends in numbers a design review would ask for.

The Workbench: the two programsFive topics: set up the bench, then QuTiP and scqubits, two topics each

Installation first, with the exact error messages you are likely to meet, and a map of where each program’s own documentation lives. Then QuTiP in two topics (objects, then solvers) and scqubits in two (a qubit, then coupled systems and sweeps). The last of them joins the two programs, which is how they are used together. The code is meant to be copied and changed.

The Workbench: from a chip to a numberTwo topics: where the numbers come from, and fitting a chip to a measurement

The last two topics step back. The first follows a chip from its layout to the numbers EJ and EC, names the other open tools used on either side of the two programs, and says plainly what could not be established about which of them is used where. The second turns it round: given three measured numbers, find the circuit that makes them.

The Workbench: circuits in codeTwo topics: Qiskit and Cirq side by side, then from a circuit to a chip with noise

The Workbench so far simulated the physics under a qubit. These two topics go up a level, to the circuits people write and run. The first writes the same circuits in Qiskit and in Cirq and shows the one trap they share, the order of the bits. The second compiles a circuit for a chip with a small set of gates and a line of couplers, and adds noise to the Bell pair to see how much it takes to lose its entanglement. Every number is from the real packages, Qiskit 2.6.1 and Cirq 1.7.0, and nothing here is run on, or says anything about, a real device.