{
  "_about": "The theory, one chapter per row, in the order a reader should meet them. 'line' is the one sentence. 'body' is paragraphs. 'demo' names the animation the build inserts. 'try' is what the reader can do with it. 'sources' are where to check.",
  "chapters": [
    {
      "id": "bit",
      "title": "A coin on the table, a coin in the air",
      "line": "A bit is a coin lying on the table: heads or tails. A qubit is a coin in the air.",
      "body": [
        "Every ordinary computer, from a wristwatch to the biggest machine on earth, works on bits. A bit is one switch, on or off, and there is nothing in between. Eight billion of them on a chip, each one on or off, and that is the whole story.",
        "A qubit is different in one way. Until you look at it, it is not on or off. It is in a mix of the two, called a superposition, and the mix has a lean: maybe mostly on with a little off, maybe half and half. When you look, which is called measuring, it lands on one side, on or off, with odds set by the lean. Then it stays there.",
        "So the coin picture is this. A bit is a coin on the table. A qubit is a coin spinning in the air. You can shape how it spins. But the moment you slap it flat to read it, it is heads or tails and the spin is gone.",
        "The thing that trips most people up: the qubit is not secretly heads or tails the whole time with you not knowing. Einstein thought it must be. The Bell tests, further down, showed it is not. Before you look, there is no answer yet. That is the physics, not a gap in our knowledge.",
        "One more thing the coin picture gets wrong, and it matters for everything after. A coin in the air has a chance of heads, say 70%. A qubit has something underneath the chance, called an amplitude, which can be positive or negative or point in any direction on a clock face. The chance is the amplitude squared. Two positive amplitudes add up. A positive and a negative cancel. Chances never cancel; amplitudes do. Hold onto that, because it is the whole trick."
      ],
      "demo": "coin",
      "try": "Press Measure. The qubit lands. Press Reset and it is in the air again. Drag the lean and the tally over many measurements follows it.",
      "sources": [["Nielsen & Chuang, Quantum Computation and Quantum Information, ch. 1", "https://en.wikipedia.org/wiki/Quantum_Computation_and_Quantum_Information"], ["Qubit", "https://en.wikipedia.org/wiki/Qubit"]]
    },
    {
      "id": "sphere",
      "title": "Where the arrow points",
      "line": "One qubit is an arrow that can point anywhere on a ball. Up is 0, down is 1, and the sideways part is what makes it quantum.",
      "body": [
        "Physicists draw one qubit as an arrow from the centre of a ball to its surface. This is the Bloch sphere, after Felix Bloch. The north pole is 0. The south pole is 1. Anywhere else is a superposition.",
        "How far the arrow tilts from the poles sets the odds. Straight up: 0 every time. Straight down: 1 every time. On the equator: 50-50. The odds only depend on the tilt.",
        "Which way round the equator the arrow points, the direction on the clock face, does not change the odds at all. That is the phase. It looks useless, since measuring cannot see it. It is the most useful thing in the machine, because phase is what decides whether two paths add up or cancel when they meet.",
        "Every one-qubit operation is a turn of this arrow. A gate called X flips it top to bottom, the quantum version of NOT. A gate called Z spins it half a turn around the pole, changing phase and nothing you could measure. A gate called H, for Hadamard, tips a straight-up arrow onto the equator, which is how a computer puts a qubit 'in the air' to begin with.",
        "The ball is a picture of one qubit. Two qubits do not fit on two balls, because they can be entangled, and then neither one has its own arrow. That is the next chapter but one."
      ],
      "demo": "bloch",
      "try": "Drag the tilt to set the odds, and the spin to set the phase. Notice the odds ignore the spin. Press the gate buttons to see what X, Z and H do to the arrow.",
      "sources": [["Bloch sphere", "https://en.wikipedia.org/wiki/Bloch_sphere"], ["Quantum logic gate", "https://en.wikipedia.org/wiki/Quantum_logic_gate"]]
    },
    {
      "id": "waves",
      "title": "Ripples that cancel",
      "line": "Drop two stones in a pond. Where crest meets crest the water leaps; where crest meets trough it goes flat. A quantum computer is arranged so wrong answers meet trough and go flat.",
      "body": [
        "This is interference and it is the engine. Everything inside a quantum computer is a wave, which de Broglie said in 1924 and every experiment since has agreed with. Waves add. Two crests make a bigger crest. A crest and a trough make nothing.",
        "In the coin chapter the amplitude could be positive or negative. Now it has a picture: positive is a crest, negative is a trough, and the phase is where in the up-and-down the wave is at the moment two waves meet.",
        "The famous demonstration is the two-slit experiment. Fire single electrons, one at a time, at a wall with two slits and a screen behind. Each electron lands at one point, like a particle. But the points build up into stripes, a pattern of bright and dark bands, as if each electron went through both slits as a wave and interfered with itself. Cover one slit and the stripes vanish. Watch which slit it goes through and the stripes vanish. Feynman called this the only mystery.",
        "A quantum algorithm is a set of turns that gets the amplitudes of the paths leading to wrong answers to point opposite ways, so they cancel, while the paths leading to the right answer point the same way and pile up. Then you measure and the right answer is what you get, most of the time. It is not 'trying every answer at once'. It is arranging the waves so that the bad answers wash each other out."
      ],
      "demo": "waves",
      "try": "Slide the phase of the second wave. At 0 the two add to double height. At half a turn they cancel to a flat line. Below, run the two-slit screen and watch the stripes build up one dot at a time; then close a slit.",
      "sources": [["Double-slit experiment", "https://en.wikipedia.org/wiki/Double-slit_experiment"], ["Feynman Lectures, vol. III ch. 1", "https://www.feynmanlectures.caltech.edu/III_01.html"]]
    },
    {
      "id": "entangle",
      "title": "Two coins that always match",
      "line": "Two entangled qubits are two coins in the air that, when you catch them, always land the same way, no matter how far apart, and neither one had picked before you looked.",
      "body": [
        "Put two qubits through the right gates and they become entangled. Measure one and you get 0 or 1 at random. Measure the other, in the next room or the next galaxy, and it matches. Every time.",
        "That alone is not strange. Put one left glove and one right glove in two boxes, mail them apart, open one: you know what is in the other. The gloves were decided when they were packed. Einstein said the qubits must be like the gloves, decided from the start, with the decision hidden from us.",
        "John Bell, in 1964, found a way to tell gloves from qubits. If you can measure at more than one angle, and the results were fixed in advance, the pattern of matches is limited in a way you can count. Quantum mechanics predicts more matches than that limit allows. The test was run in 1972, 1982, 2015 and many times since, and it always comes out on the quantum side. The 2022 Nobel Prize was for these tests. There is no hidden decision. The coins pick when caught, and they pick together.",
        "This does not send messages faster than light. You see random 0s and 1s at your end whatever the other person does. The match only shows up when you compare notes, and the notes travel the ordinary way.",
        "What it is good for: entanglement is how qubits share their amplitudes, so that a turn on one path affects the whole computation. It is why the space of a quantum computer grows by doubling with each qubit added. Twenty qubits carry a million amplitudes; three hundred carry more than there are atoms in the known universe. You cannot read them out, but you can make them interfere."
      ],
      "demo": "pair",
      "try": "Measure the left coin. The right one lands to match. Run it twenty times and count. Then switch to the Bell test: three angles, and the match rate beats what any glove-in-a-box story allows.",
      "sources": [["Quantum entanglement", "https://en.wikipedia.org/wiki/Quantum_entanglement"], ["Bell test", "https://en.wikipedia.org/wiki/Bell_test"], ["Nobel Prize in Physics 2022", "https://www.nobelprize.org/prizes/physics/2022/popular-information/"]]
    },
    {
      "id": "gates",
      "title": "The switches",
      "line": "A quantum program is a short list of turns applied to qubits, drawn as wires and boxes. Everything the machine does is a few kinds of turn, over and over.",
      "body": [
        "An ordinary chip has logic gates: AND, OR, NOT. A quantum computer has gates too, and a program is drawn as a circuit: one horizontal line per qubit, time running left to right, a box wherever a gate acts.",
        "The one-qubit gates are turns of the arrow from the sphere chapter. H puts a qubit in the air. X flips it. Z and its smaller cousins turn the phase. The two-qubit gate that matters most is CNOT: flip the second qubit if the first is 1. Put an H on the first qubit and then a CNOT, and the two are entangled. That two-gate circuit is the hello-world of the field.",
        "Every gate is reversible. Run the circuit backwards and you get the input back. Nothing is erased, because erasing is the one thing quantum mechanics does not allow in the middle of a computation. Measurement, at the end, is the exception; it is the only step that throws information away.",
        "A small set of gates, H, one phase gate called T, and CNOT, is enough to build any quantum program at all, the way NAND alone builds any ordinary one. Real chips offer a handful of native gates and compile everything else into them.",
        "Counts to have in your head: a useful program might need millions of gates on a few thousand error-corrected qubits. Today's machines run a few thousand gates on a few hundred noisy ones before the answer turns to mush. That gap is the field."
      ],
      "demo": "circuit",
      "try": "Step through the two-gate circuit. Watch the first arrow tip onto the equator, then watch the CNOT tie the pair. The last panel shows the four possible readouts and their odds.",
      "sources": [["Quantum circuit", "https://en.wikipedia.org/wiki/Quantum_circuit"], ["Controlled NOT gate", "https://en.wikipedia.org/wiki/Controlled_NOT_gate"]]
    },
    {
      "id": "grover",
      "title": "Finding a needle in fewer tries",
      "line": "Grover's method finds one marked item in a million by looking about a thousand times. An ordinary computer looks half a million. The trick is amplifying the right answer's wave a little with every pass.",
      "body": [
        "Suppose one name in a phone book of a million has a star next to it and you can only check one name at a time. On average you check half a million. There is no shortcut for an ordinary computer.",
        "Grover's method starts by putting all million names in superposition, each with the same small amplitude. Then it does two things, over and over. First, it flips the sign of the starred name's amplitude, crest to trough. Second, it reflects every amplitude about the average. The starred one, being the odd one out, gets pushed up; the rest get pushed down by a hair.",
        "Each round the starred amplitude grows. After about a thousand rounds, the square root of a million, it is nearly all the wave, and a measurement reads it out. Go too many rounds and it starts shrinking again, so you have to count.",
        "That is a square-root speed-up. A million to a thousand is good. A trillion to a million is better. It is not the exponential leap of Shor's method, but it applies to almost any search or optimisation you can phrase as 'check whether this guess is right', which is why it comes up so much.",
        "It has also been proved you cannot do better than the square root for a plain unsorted search. The quantum computer is not magic here. It is a wave doing what a wave can do."
      ],
      "demo": "grover",
      "try": "Sixteen boxes, one marked. Press Step. Watch the marked bar grow and the rest shrink. It takes three steps. Keep pressing past the peak and watch it fall away again.",
      "sources": [["Grover's algorithm", "https://en.wikipedia.org/wiki/Grover%27s_algorithm"], ["Grover, 1996, arXiv:quant-ph/9605043", "https://arxiv.org/abs/quant-ph/9605043"]]
    },
    {
      "id": "shor",
      "title": "Breaking the locks",
      "line": "The locks on the internet rest on one fact: multiplying two big primes is easy, and undoing it is not. Shor showed a quantum computer can undo it, by finding a rhythm.",
      "body": [
        "When you buy something online, your browser and the shop agree on a secret using a scheme called RSA, or a cousin of it. RSA's lock is a number that is two large primes multiplied together. Anyone can see the number. Finding the two primes, for the sizes used in practice, would take ordinary computers longer than the universe has existed.",
        "Peter Shor's idea, in 1994, was to turn factoring into finding a rhythm. Pick a number, say 7, and keep raising it to higher powers, dividing by the lock number each time and keeping the remainder. For lock number 15 the remainders go 7, 4, 13, 1, 7, 4, 13, 1. The pattern repeats every 4. That repeat length, called the period, is enough to work out the primes with a bit of ordinary arithmetic. For 15 it gives 3 and 5.",
        "For a big lock number the period is astronomically long and an ordinary computer would take forever to spot it. A quantum computer puts all the powers in superposition at once, and then applies a quantum version of the tool engineers use to find the pitch of a sound, the Fourier transform. The rhythm shows up as interference: every period-length that is wrong cancels out, and the right one is what you measure.",
        "Nobody has broken a real key this way. The largest number factored by an honest run of Shor's method is small enough to do in your head. The estimates for breaking a real 2048-bit RSA key have come down over the years, from tens of millions of noisy qubits to about a million as of 2025, running for a week or so. The machines that exist are hundreds of times too small and far too noisy.",
        "Governments did not wait. In 2024 NIST published new lock designs that do not rest on factoring, and banks, browsers and phone makers are switching now. The reason to switch early is called harvest now, decrypt later: anything recorded today can be opened whenever the machine arrives."
      ],
      "demo": "period",
      "try": "The wheel shows the remainders of 7 to the power of 1, 2, 3 and so on, divided by 15. Press Run and watch the hand land on the same four spots forever. Change the base and see the period change; the factors come out the same.",
      "sources": [["Shor's algorithm", "https://en.wikipedia.org/wiki/Shor%27s_algorithm"], ["Gidney 2025, 'How to factor 2048 bit RSA integers with less than a million noisy qubits'", "https://arxiv.org/abs/2505.15917"], ["NIST post-quantum standards, August 2024", "https://www.nist.gov/news-events/news/2024/08/nist-releases-first-3-finalized-post-quantum-encryption-standards"]]
    },
    {
      "id": "noise",
      "title": "Why it falls apart",
      "line": "A qubit in the air is a coin balanced on its edge in a barn full of drafts. Anything that touches it, heat, a stray radio wave, a cosmic ray, counts as a look, and the coin falls.",
      "body": [
        "The reason quantum computers are hard is not that the physics is exotic. It is that the physics is fragile. A superposition survives only as long as nothing in the outside world learns which way it leans. The world does not have to be a person with a meter. A single air molecule bouncing off, one photon of heat, a magnetic wobble from a passing truck: each one takes a little of the information away, and the qubit slides toward being a plain coin on the table.",
        "This is decoherence. It happens on a clock. For a superconducting qubit today the clock runs out in about a hundred millionths of a second, sometimes a thousandth. For a trapped ion it can be seconds or minutes. The number is called T2, and a machine's whole design is an argument with it.",
        "So the machines are cold, very cold: the superconducting kind sits at about 15 thousandths of a degree above absolute zero, colder than deep space, in a nested set of gold-plated cans that looks like a chandelier. Ions and atoms float in vacuum held by lasers and electric fields. Everything is shielded. And still every gate errs about once in a thousand, and every second of waiting costs a little.",
        "Errors in a quantum computer are worse than a flipped bit. A bit can only flip. A qubit's arrow can drift by any angle in any direction, and drift is continuous, so there is no clean 'right' and 'wrong' to compare against. That is why people thought for a while that error correction was impossible, and why the 1995 discovery that it is possible was the field's second birth."
      ],
      "demo": "decay",
      "try": "Start a qubit on the equator and watch the arrow shrink toward the centre as the drafts get to it. Turn the temperature up and it collapses faster. Turn it to ion-trap cold and it lasts.",
      "sources": [["Quantum decoherence", "https://en.wikipedia.org/wiki/Quantum_decoherence"], ["Dilution refrigerator", "https://en.wikipedia.org/wiki/Dilution_refrigerator"]]
    },
    {
      "id": "correct",
      "title": "Fixing errors without looking",
      "line": "You cannot copy a qubit and you cannot look at it. So you spread it across many qubits and ask the neighbours whether they still agree, without asking what they say.",
      "body": [
        "An ordinary computer fixes errors by keeping three copies and taking a vote. That is out: a qubit cannot be copied, and reading it to compare would wreck it.",
        "The way round, found in 1995, is to store one qubit's worth of information in the relationships between several qubits, and then measure only the relationships. You can ask 'are qubits 1 and 2 the same?' without learning what either one is. If they were the same and now they are not, one of them flipped, and asking a second question tells you which. Then you flip it back. The stored information was never read.",
        "The surface code is the version the leading machines use. Picture a checkerboard. The qubits that hold the data sit on the white squares. The black squares are checker qubits whose only job is to ask their four neighbours whether they still agree. Run the checks over and over, feed the pattern of complaints to an ordinary computer, and it works out where the errors are.",
        "The threshold theorem from 1997 says: if each part errs less than about one time in a hundred, a bigger checkerboard gives a more reliable stored qubit, and you can make the reliability as high as you like by making the board bigger. Above that rate, a bigger board is worse. For 25 years every machine was above the line. In December 2024 Google's Willow chip showed the error halving each time the board grew, from 3×3 to 5×5 to 7×7. That is the line, crossed.",
        "The cost is the catch. One good stored qubit, called a logical qubit, takes a board of several hundred to a couple of thousand physical qubits at today's error rates. A useful machine wants a few thousand logical qubits. That multiplies to a few million physical ones. Nobody is close. Newer codes found in 2023 and 2024 cut the multiplier roughly tenfold, and that is where much of the research is."
      ],
      "demo": "vote",
      "try": "Three qubits hold one bit's worth. Press Noise to flip one at random. The two checks light up to say which pair disagrees, and Fix flips it back. Then the surface-code panel: grow the board and watch the logical error fall when the physical error is under the line, and climb when it is over.",
      "sources": [["Quantum error correction", "https://en.wikipedia.org/wiki/Quantum_error_correction"], ["Toric code", "https://en.wikipedia.org/wiki/Toric_code"], ["Google Quantum AI, 'Quantum error correction below the surface code threshold', Nature 2025", "https://www.nature.com/articles/s41586-024-08449-y"]]
    },
    {
      "id": "myths",
      "title": "What it is not",
      "line": "It does not try every answer at once, it is not faster at everything, and it is not about to replace your laptop.",
      "body": [
        "**It does not try every answer at once.** It holds every answer's amplitude at once, which is different, because you can only read one out. The whole art is in getting the wrong ones to cancel before you read. For most problems nobody knows how to do that, and for some it has been proved impossible.",
        "**It is not a faster computer.** For adding up a spreadsheet, rendering a game or serving a web page, a quantum computer is slower, by a lot, and always will be. The gates are slow, the readout is slow, and there is no wave trick for those jobs. The speed-ups are for particular problems: factoring, searching, and above all simulating molecules and materials, which are quantum themselves.",
        "**Bigger qubit counts are not the score.** A thousand noisy qubits are worth less than a hundred clean ones. The numbers that matter are the error rate per gate, how long a qubit lasts, and how many error-corrected logical qubits a machine can hold. Companies lead with the count because it is the number that goes up.",
        "**It has not broken any code.** Every announced 'factoring record' either used a toy number, or used a shortcut that does not scale, or was an annealer doing something Shor's method is not. The internet's locks are being changed anyway, ahead of time, because a recording made today can be opened later.",
        "**Annealers and gate machines are different things.** D-Wave's machines settle into a low-energy state to answer optimisation questions. They are quantum, they are big, and they cannot run Shor's or Grover's method or any general program. When a headline says 'a 5,000-qubit quantum computer', check which kind.",
        "**The cat is a joke.** Schrödinger meant the alive-and-dead cat as an argument that something was wrong with the theory as read. The current reading is that a cat is far too big and warm to stay in superposition for any length of time; it decoheres in less time than light takes to cross it. A qubit is the smallest, coldest, most isolated thing people can make, so that it stays in superposition for a fraction of a second. That is the whole engineering problem."
      ],
      "demo": "",
      "try": "",
      "sources": [["Scott Aaronson, 'The Limits of Quantum Computers', Scientific American 2008", "https://www.scottaaronson.com/writings/limitsqc-draft.pdf"], ["Quantum supremacy", "https://en.wikipedia.org/wiki/Quantum_supremacy"]]
    }
  ]
}
