Start with the preview
Start here — today's preview. Watch “Quantum Computers, Explained With Quantum Physics” from Quanta Magazine before (or after) this session. The lab will wait. Mostly.
Quantum Computers, Explained With Quantum Physics
Quanta's ten-minute primer opens by insisting that quantum computers are not the next generation of supercomputers but something else entirely, then lays out the physics they run on. Watch it with one question in mind: where does the speed-up actually come from? Part 5 of the lesson gives the full answer, and it is interference, not parallel guessing.
Watch on YouTubeMore from the video vault
But what is quantum computing? (Grover's Algorithm)
Grant Sanderson treats a quantum state as a vector, gates as rotations, and Grover's search as a sequence of reflections, and confronts the 'tries every answer at once' myth directly. Best watched after Part 6; the rotation picture there is exactly the geometry behind the square-root speed-up.
Watch on YouTubeHow Quantum Computers Break Encryption | Shor's Algorithm Explained
A hand-drawn walk through Shor's algorithm: how factoring turns into finding a period, and how a quantum Fourier transform makes the wrong periods interfere away. A natural companion to Part 6 and a bridge to next session's cryptography.
Watch on YouTube- Quantum Computers, Explained With Quantum Physics — Quanta Magazine — https://www.youtube.com/watch?v=jHoEjvuPoB8
- But what is quantum computing? (Grover's Algorithm) — 3Blue1Brown — https://www.youtube.com/watch?v=RQWpF2Gb-gU
- How Quantum Computers Break Encryption | Shor's Algorithm Explained — minutephysics — https://www.youtube.com/watch?v=lvTqbM5Dq4Q
Today's mission
Dr. Q · cold openGreat Planck's ghost, you made it out of the cat box! Last session you watched decoherence, the environment's relentless eavesdropping, shred superpositions faster than a blink. Today I propose something gloriously perverse: a machine whose entire job is to protect superpositions, entangle them on command and steer their amplitudes until the wrong answers cancel themselves out. Some people will tell you such a machine tries every answer at once. It does not, and by the end of this session you will be able to say exactly why, and what it does instead. We will spin qubits around a globe, forge an entangled pair with two gates, search a haystack in roughly the square root of the usual number of tries and look Shor's code-breaker in the eye. Goggles on. The refrigerator is humming.
By the end of this session you will be able to:
- Describe a qubit as a normalized pair of complex amplitudes and locate any single-qubit state on the Bloch sphere.
- Predict the action of the X, Z, Hadamard and CNOT gates and build the Bell state (1/√2)(|00⟩ + |11⟩) from |00⟩.
- Explain why n qubits need 2ⁿ amplitudes and why quantum algorithms work by choreographing interference rather than by trying every answer.
- Outline the idea behind the Deutsch–Jozsa algorithm, then Grover's search and Shor's factoring algorithm, and calculate how many rounds Grover's search requires.
- Compare superconducting, trapped-ion, neutral-atom, photonic and spin qubits and the role decoherence plays in each.
- Explain how error correction builds logical qubits and summarise, with dates, what quantum computers could and could not do as of 2026.
Read it — or listen along
8 parts. Press play on any part and the paragraph being read lights up as Dr. Q speaks.
From Bits to Qubits
A classical bit is any physical system with two distinguishable states labelled 0 and 1, such as a transistor switched on or off. Your laptop runs on billions of them, each definitely 0 or definitely 1 at every instant. A quantum bit, or qubit, also has two distinguishable states, written |0⟩ and |1⟩ in the Dirac notation of Chapter 14, but it obeys quantum mechanics. You have met several: an electron's spin, a photon's polarisation, an atom's two lowest energy levels.
A qubit can therefore occupy a superposition α|0⟩ + β|1⟩, where α and β are complex numbers called probability amplitudes. Measure it and you get exactly one bit: 0 with probability |α|², or 1 with probability |β|²; hence |α|² + |β|² = 1, the normalization condition. As Chapter 15 insisted, this is not ignorance of a hidden value. Amplitudes, unlike probabilities, can be negative or complex, so contributions can cancel. That cancellation, interference, together with the entanglement of Part 4, powers every quantum algorithm.
In 1980 Paul Benioff described a quantum-mechanical model of a computer. In a 1981 lecture at MIT, published in 1982, Richard Feynman argued that ordinary computers seem to need exponentially growing resources to simulate quantum systems, so nature is best simulated by quantum hardware. In 1985 David Deutsch at Oxford defined a universal quantum computer, the quantum heir of Alan Turing's universal machine.
Watch this part
The Bloch Sphere: A Globe for One Qubit
Two complex amplitudes contain four real numbers, but only two matter. Normalization removes one; another vanishes because multiplying both amplitudes by the same complex factor of size one, a global phase, changes no measurement probability. What survives is the balance between the amplitudes, set by an angle θ, and the relative phase φ between them: the amplitude on |0⟩ is the cosine of θ/2, while the amplitude on |1⟩ has a size equal to the sine of θ/2 and carries the phase φ.
Read θ as the angle down from the north pole and φ as the longitude, and every qubit state becomes a point on a sphere of radius one, the Bloch sphere, named for Felix Bloch. |0⟩ sits at the north pole, |1⟩ at the south pole, and the equator holds the equal superpositions, with |+⟩ = (1/√2)(|0⟩ + |1⟩) on the positive x axis and |−⟩ = (1/√2)(|0⟩ − |1⟩) opposite it. The chance of reading 0 is the cosine squared of θ/2, the spin rule of Chapter 17: a spin-one-half particle is a qubit, and the Bloch arrow is its spin direction.
Two cautions. Opposite points on the sphere are orthogonal, perfectly distinguishable states, although they sit 180° apart rather than 90°; the half-angles take care of that. And the sphere pictures one qubit alone. An entangled qubit has no point on the surface: its individual description shrinks inside the ball, and the shared information lives in correlations that no single globe can draw.
Watch this part
Gates: Steering the Arrow
Quantum mechanics restricts what a gate can be. Between measurements an isolated system evolves by the Schrödinger equation of Chapter 10, which is linear and preserves total probability. Such operations are called unitary, and every unitary can be undone. For one qubit the result is beautifully visual: every gate rotates the Bloch sphere.
The X gate is the quantum NOT, a half-turn about the x axis that swaps the poles: X|0⟩ = |1⟩ and X|1⟩ = |0⟩. The Z gate, a half-turn about the z axis, has no classical counterpart: it leaves |0⟩ alone and multiplies |1⟩ by −1, a phase flip. Z changes no 0-or-1 probability, yet it turns |+⟩ into |−⟩, a hidden sign that steers any later interference. The Hadamard gate H is a half-turn about the axis midway between x and z, carrying |0⟩ to |+⟩ and |1⟩ to |−⟩, and back again.
Apply H twice and the qubit returns home; seeing why is this chapter's most important calculation. The first H makes (1/√2)(|0⟩ + |1⟩). The second acts on each piece: the |0⟩ piece adds 1/2 to |0⟩ and 1/2 to |1⟩, while the |1⟩ piece adds 1/2 to |0⟩ and −1/2 to |1⟩. The routes to |0⟩ add up to 1; the routes to |1⟩ cancel to zero, the same destructive interference that darkens double-slit fringes.
Circuit diagrams draw each qubit as a wire, time running left to right, gates as boxes. A circuit is a product of unitary matrices, so order matters: H, then Z, then H equals X, while Z followed by two Hadamards is just Z. The trio H, CNOT and T, an eighth-turn about the z axis, is universal: strung together, these gates approximate any unitary as closely as desired.
Watch this part
Two Qubits, One Story: CNOT and the Bell State
Rotating qubits one at a time never entangles them; they must interact. The workhorse is the controlled-NOT, or CNOT: if its control qubit is 0 nothing happens, and if the control is 1 the target is flipped. On basis states it acts like a reversible classical gate, sending |10⟩ to |11⟩ and |11⟩ to |10⟩ and leaving |00⟩ and |01⟩ alone. The surprise comes when the control is in superposition.
Start in |00⟩ and apply H to the first qubit, giving (1/√2)(|00⟩ + |10⟩): the first qubit undecided, the second definitely 0. Now apply CNOT with the first qubit as control. The |00⟩ branch is untouched, and in the |10⟩ branch the target flips to |11⟩. The result is (1/√2)(|00⟩ + |11⟩), the Bell state |Φ+⟩ of Chapter 20: measure both qubits and you get 00 or 11, each half the time, never 01 or 10. Two gates have built the correlations Einstein derided as spooky action at a distance, which, as Chapter 20 showed, can never carry a message.
Entanglement also makes quantum states costly to write down. Two qubits need four amplitudes, for 00, 01, 10 and 11, and the Bell state shows they cannot in general be split qubit by qubit; n qubits need 2ⁿ. Fifty qubits require about 1.1×10¹⁵ complex amplitudes, roughly 18 petabytes of memory at 16 bytes apiece, and 266 qubits need more amplitudes than the observable universe has atoms, about 10⁸⁰. No wonder Feynman expected classical computers to choke on quantum physics.
Watch this part
Not Every Answer at Once: Choreographing Interference
Now the most repeated myth in popular science: a quantum computer puts its input into a superposition of every value, evaluates the function once, and so tries every answer in parallel. The first half is true. Compute f on an equal superposition of all 2ⁿ inputs and you do hold every input paired with its output. But measurement returns one pair at random, exactly what an ordinary computer gets by trying a random input. Superposition alone buys nothing.
Quantum algorithms instead choreograph interference. Every computational path carries an amplitude with a sign or phase, and a good circuit makes the paths to wrong answers arrive out of step and cancel while the paths to the right answer reinforce. Large speed-ups need exploitable structure, such as a hidden period or a global property of a function; without it, the most interference can buy is the square-root gain of Grover's search in Part 6.
The cleanest demonstration is the Deutsch–Jozsa algorithm, published by David Deutsch and Richard Jozsa in 1992. An oracle, a black box, computes a function f from n-bit inputs to 0 or 1, promised to be either constant or balanced, giving 0 for exactly half the inputs. A classical computer that must be certain may need to query one more than half of the 2ⁿ inputs; the quantum algorithm needs one query. Hadamards spread the input across all 2ⁿ values; the oracle, by a trick called phase kickback, multiplies each amplitude by −1 wherever f equals 1; Hadamards fold the paths back together. The final all-zeros amplitude is the average of those signs: ±1 if f is constant, exactly zero if it is balanced.
Since sampling a few random inputs answers classically with high confidence, the Deutsch–Jozsa algorithm is a proof of principle, not a practical tool. Its lesson is the mechanism, phases written by an oracle and read by interference, on which useful algorithms build.
Watch this part
Grover and Shor: Searching and Factoring
In 1996 Lov Grover of Bell Labs found a quantum algorithm for unstructured search: finding one marked item among N using only a yes-or-no check. Classically you need about N/2 checks on average; Grover needs only about π/4 × √N. Each round flips the sign of the marked item's amplitude, then reflects every amplitude about the average, so the marked one grows while the rest shrink. In effect the state rotates by a fixed small angle toward the answer, so timing matters: overdo it and you rotate past.
The speed-up is quadratic, not exponential: a million items need about 785 rounds instead of about 500,000 checks. In 1997 Charles Bennett, Ethan Bernstein, Gilles Brassard and Umesh Vazirani proved that no quantum algorithm can search an unstructured list with fewer than about √N queries, so Grover is essentially optimal. It roughly halves the effective key length of symmetric ciphers, one reason 256-bit AES keys are recommended for long-term secrets.
Shor's algorithm is the exponential headline. In 1994 Peter Shor, also of Bell Labs, showed that a quantum computer could factor integers and compute discrete logarithms in polynomial time. Factoring N reduces to finding the period r of the remainders left when successive powers of a number a are divided by N; a greatest-common-divisor calculation then yields the factors. A quantum Fourier transform makes the amplitudes interfere so that a measurement is likely to reveal r. The best classical method known, the general number field sieve, slows faster than any polynomial in the number of digits.
On a large enough error-corrected machine, Shor's algorithm would break both RSA, invented by Ron Rivest, Adi Shamir and Leonard Adleman in 1977, and elliptic-curve cryptography, which together protect much of the internet. Estimates of the machine required keep falling: about 20 million noisy qubits for eight hours (Gidney and Ekerå, 2019), fewer than a million for under a week (Gidney, 2025), and a March 2026 preprint argues that 10,000 reconfigurable atoms could suffice, given far longer run times. Actual runs of Shor's algorithm, on simplified circuits, have factored only 15 (2001) and 21 (2012). But data harvested now could be decrypted later, so NIST finalized post-quantum cryptography standards in August 2024.
Watch this part
Building Qubits: Five Hardware Families
A good qubit must be isolated enough to keep its superposition yet controllable enough to steer and measure. Decoherence, the environmental eavesdropping of Chapter 22, is the enemy, summarised by two times: T₁, how long |1⟩ survives before relaxing to |0⟩, and T₂, how long the relative phase survives. What counts is how many gates fit inside them.
Superconducting circuits, pursued by Google, IBM and others, are tiny circuits of aluminium or niobium interrupted by Josephson junctions, the tunnelling barriers of Chapter 12, and chilled to about 10 millikelvin. The junction makes each circuit an anharmonic oscillator, unlike the even ladder of Chapter 13, so microwave pulses can address just its lowest two levels. John Clarke, Michel Devoret and John Martinis showed in 1984 and 1985 that such a circuit acts as one quantum object, earning the 2025 Nobel Prize in Physics. Gates take tens of nanoseconds; coherence lasts tens to hundreds of microseconds.
Trapped ions, used by Quantinuum, IonQ and others, are charged atoms held in vacuum by electric fields and driven by lasers or microwaves. Identical by nature, they stay coherent for seconds or longer and post some of the best fidelities, but two-qubit gates take microseconds to hundreds of microseconds. Neutral atoms, pursued by QuEra, Pasqal and others, sit in grids of laser beams called optical tweezers and are entangled through Rydberg states, highly excited states whose enormous electron clouds make neighbouring atoms interact strongly; a Caltech group has trapped more than 6,100 atoms in one array.
Photonic qubits barely decohere and travel at room temperature, though the best detectors need cooling; photons hardly interact, so two-qubit operations rely on measurement tricks, and lost photons are the main danger. Spin qubits, proposed by Daniel Loss and David DiVincenzo in 1998, use the spin of a single electron, or of a hole (a missing electron), trapped in silicon or germanium, and could be made in chip foundries. As of 2026 the best two-qubit gates fail roughly once in a thousand to ten thousand operations, yet Shor's algorithm at cryptographic scale needs billions of operations. Raw qubits will not do.
Watch this part
Error Correction, Logical Qubits and the State of Play
The simplest classical error correction copies each bit several times and takes a majority vote. Quantum mechanics seems to forbid this twice over: an unknown state cannot be copied, the no-cloning theorem of next session, and checking a qubit destroys its superposition. Peter Shor found a way through in 1995 with a nine-qubit code, followed by Andrew Steane's seven-qubit code in 1996. Spread one qubit across several entangled qubits and measure only collective parity checks, such as whether two qubits agree. The answers, called the error syndrome, reveal the error without revealing the encoded amplitudes.
The protected qubit is a logical qubit. The threshold theorem, proved by several groups in 1996 and 1997, guarantees that if physical operations fail less often than some threshold, enlarging the code suppresses logical errors exponentially. The leading design, the surface code, grew from Alexei Kitaev's 1997 toric code: a checkerboard of data and measurement qubits with a threshold near 1 percent. A patch of code distance d uses d² data qubits and d² − 1 measurement qubits and corrects up to (d − 1)/2 errors.
The decisive test came in December 2024. On its 105-qubit Willow chip, Google Quantum AI ran surface codes of distance 3, 5 and 7, and each step cut the logical error rate by a factor of about 2.14; the 101-qubit distance-7 logical qubit failed in 0.143 percent of correction cycles and outlived the chip's best physical qubit 2.4 times over. Other teams run dozens of logical qubits: in 2023 a neutral-atom processor at Harvard, MIT and QuEra ran 48 logical qubits with error detection, not full correction, and in 2025 Quantinuum reported 48 error-corrected ones on its 98-ion Helios.
The state of play as of 2026: processors hold from dozens to over a thousand physical qubits, no quantum computer has factored a number of cryptographic size or run a long, fully fault-tolerant algorithm, and claimed quantum advantages concern specially designed sampling and simulation tasks, several since narrowed by better classical algorithms. Roadmaps target hundreds of logical qubits around 2029 to 2030; treat them as goals, not results. Nor will quantum computers replace laptops: they are expected to be specialised co-processors reached over the cloud, most promising for simulating molecules and materials.
Watch this part
Go deeper on video
25 more videos for this chapter, 21 of them from universities, research institutes and Nobel lectures. The clips under “Watch this part” in the lesson start at the moment that matters.
Key equations
A qubit and the Born rule
A qubit's state is a weighted combination of the two basis states. The squared magnitudes of the complex amplitudes are the probabilities of reading 0 or 1, so they must add up to one.
| Symbol | Meaning | Unit |
|---|---|---|
| |ψ⟩ | state of the qubit | dimensionless (a unit vector) |
| α, β | complex probability amplitudes for |0⟩ and |1⟩ | dimensionless |
| |α|², |β|² | probabilities of measuring 0 and 1 | dimensionless, between 0 and 1 |
Say it: “psi equals alpha times ket zero plus beta times ket one, where the squared size of alpha plus the squared size of beta equals one”
Bloch-sphere coordinates
After normalization and the invisible global phase are removed, two angles remain. Theta, measured down from the north pole, sets the odds of 0 versus 1; phi, the longitude, is the relative phase that only shows up through interference.
| Symbol | Meaning | Unit |
|---|---|---|
| θ | polar angle from the north pole (|0⟩) toward the south pole (|1⟩) | degrees or radians, 0 to 180° |
| φ | azimuthal angle (longitude): the relative phase between the two amplitudes | degrees or radians, 0 to 360° |
| P(0) | probability of measuring 0 | dimensionless |
Say it: “psi equals cosine of theta over two times ket zero, plus e to the i phi times sine of theta over two times ket one; the probability of reading zero is cosine squared of theta over two”
The basic single-qubit gates
Each column shows where a basis state goes: X swaps |0⟩ and |1⟩, Z puts a minus sign on |1⟩, and H sends |0⟩ to |+⟩ and |1⟩ to |−⟩. All three are unitary, and each is its own inverse: applying it twice changes nothing.
| Symbol | Meaning | Unit |
|---|---|---|
| X | bit flip, the quantum NOT: a half-turn about the x axis | dimensionless 2×2 matrix |
| Z | phase flip: a half-turn about the z axis | dimensionless 2×2 matrix |
| H | Hadamard gate: a half-turn about the axis midway between x and z | dimensionless 2×2 matrix |
Say it: “X is the matrix with rows zero one and one zero; Z has rows one zero and zero minus one; H is one over root two times the matrix with rows one one and one minus one”
Making a Bell pair
The Hadamard makes the control qubit undecided; the CNOT copies that indecision into a correlation, flipping the target only in the branch where the control is 1. The result is the maximally entangled Bell state.
| Symbol | Meaning | Unit |
|---|---|---|
| H ⊗ I | Hadamard on the first qubit, nothing (the identity) on the second | dimensionless 4×4 matrix |
| CNOT | controlled-NOT: flips the second qubit when the first is 1 | dimensionless 4×4 matrix |
| |00⟩, |10⟩, |11⟩ | two-qubit basis states, first digit for the control | dimensionless |
Say it: “A Hadamard on the first qubit turns ket zero zero into the sum of ket zero zero and ket one zero, divided by root two; a CNOT then turns that into the sum of ket zero zero and ket one one, divided by root two”
An n-qubit register
Describing n qubits takes one complex amplitude for every n-bit string, so the description doubles with each added qubit. Measurement nevertheless returns a single string x, with probability equal to the squared size of its amplitude.
| Symbol | Meaning | Unit |
|---|---|---|
| n | number of qubits | count |
| x | an n-bit string, read as a whole number from 0 to 2ⁿ − 1 | dimensionless |
| cₓ | complex amplitude of the basis state |x⟩ | dimensionless |
Say it: “The register's state is a sum over all two to the n basis states x, each with its own complex amplitude c x, and the squared sizes of all the amplitudes add up to one”
Grover's search
Each Grover round rotates the state by an angle two theta toward the marked item. Success peaks after about pi over four times the square root of N rounds and falls again if you keep going.
| Symbol | Meaning | Unit |
|---|---|---|
| N | number of items searched | count |
| k | number of Grover rounds (oracle queries) | count |
| θ | half the rotation angle per round | radians |
| P_k | probability that measurement reveals the marked item after k rounds | dimensionless |
Say it: “After k rounds the chance of finding the marked item is sine squared of two k plus one, times theta, where sine theta equals one over root N; the best number of rounds is about pi over four times root N”
Real numbers, step by step
Cover the steps, try the problem yourself, then reveal the solution one step at a time.
Two Hadamards: interference by hand
A qubit starts in |0⟩ and passes through H twice. Track every amplitude and find the probability of reading 0 at the end. Then repeat with a measurement inserted between the two gates.
Step 1: The rule: H sends |0⟩ to (1/√2)|0⟩ + (1/√2)|1⟩ and sends |1⟩ to (1/√2)|0⟩ − (1/√2)|1⟩.
Step 2: After the first H the state is (1/√2)|0⟩ + (1/√2)|1⟩, with each amplitude about 0.707.
Step 3: Second H, amplitude of |0⟩: the |0⟩ piece gives (1/√2)(1/√2) = 1/2 and the |1⟩ piece gives (1/√2)(1/√2) = 1/2, total 1.
Step 4: Second H, amplitude of |1⟩: the |0⟩ piece gives 1/2 and the |1⟩ piece gives −1/2, total 0. The final state is |0⟩, so P(0) = 1² = 1.
Step 5: With a measurement in between: the qubit is found as |0⟩ or |1⟩, each with probability 1/2. The second H turns these into |+⟩ or |−⟩, and each of those gives 0 with probability 1/2. Overall P(0) = 1/2 × 1/2 + 1/2 × 1/2 = 1/2.
Without the middle measurement P(0) = 1, because the two routes to |1⟩ cancel; with it, P(0) = 0.5
Why it matters: The mid-circuit measurement destroys the relative phase the interference needed, just as which-path information erases double-slit fringes. Quantum algorithms are built from exactly this kind of cancellation, which is why they avoid peeking until the end.
The Bell-pair factory, amplitude by amplitude
Two qubits start in |00⟩. Apply H to the first qubit, then CNOT with the first as control. Find the four final amplitudes and the measurement probabilities, show that the result cannot be a product of single-qubit states, and then find the output when the qubits start in |11⟩ instead.
Step 1: After H on the first qubit: (1/√2)|00⟩ + (1/√2)|10⟩, so the amplitudes for 00, 01, 10 and 11 are 0.707, 0, 0.707 and 0.
Step 2: CNOT leaves |00⟩ alone and sends |10⟩ to |11⟩, giving (1/√2)(|00⟩ + |11⟩): amplitudes 0.707, 0, 0, 0.707.
Step 3: Probabilities are squared amplitudes: P(00) = P(11) = 0.5 and P(01) = P(10) = 0.
Step 4: A product (a|0⟩ + b|1⟩)(c|0⟩ + d|1⟩) has amplitudes a·c, a·d, b·c and b·d. Matching needs a·d = 0, so a or d must be zero, but then a·c or b·d is zero too, whereas both should equal 0.707. No choice works: the state is entangled.
Step 5: Starting from |11⟩: H on the first qubit gives (1/√2)(|01⟩ − |11⟩), and CNOT sends |11⟩ to |10⟩, giving (1/√2)(|01⟩ − |10⟩).
(1/√2)(|00⟩ + |11⟩), with 00 and 11 each found half the time; starting from |11⟩ the same circuit makes the singlet (1/√2)(|01⟩ − |10⟩)
Why it matters: The CNOT does not copy the control's state, which no-cloning forbids; it copies the control's basis value into a correlation. The singlet's minus sign never appears in a 0-or-1 histogram, but it is real and changes how the pair behaves in other measurement bases.
Why 266 qubits outrun the universe
A classical simulator stores each amplitude as a double-precision complex number of 16 bytes. How much memory does it need for 30 and for 50 qubits? How many qubits require more amplitudes than the roughly 10⁸⁰ atoms in the observable universe?
Step 1: 30 qubits: 2³⁰ = 1,073,741,824 ≈ 1.07×10⁹ amplitudes; times 16 bytes gives 1.72×10¹⁰ bytes, about 17 gigabytes, which fits in a well-equipped workstation.
Step 2: 50 qubits: 2⁵⁰ ≈ 1.13×10¹⁵ amplitudes; times 16 bytes gives 1.80×10¹⁶ bytes, about 18 petabytes, comparable to the entire memory of the world's largest supercomputers.
Step 3: Each added qubit doubles the count, so 20 extra qubits multiply the memory by 2²⁰, about a million.
Step 4: We need 2ⁿ to exceed 10⁸⁰. The base-10 logarithm of 2 is 0.30103, so n × 0.30103 must exceed 80, and n must exceed 80 ÷ 0.30103 ≈ 265.8, which means 266 qubits. For comparison, 2³⁰⁰ ≈ 2.0×10⁹⁰.
About 17 gigabytes for 30 qubits, about 18 petabytes for 50 qubits, and from 266 qubits on, more amplitudes than atoms in the observable universe
Why it matters: Brute-force simulation explodes exponentially, which is Feynman's point. Clever classical methods exploit states with limited entanglement, which is why several 'quantum supremacy' claims have later been matched classically. And remember the catch: measuring all those qubits still yields only n bits.
Grover by the numbers
Use the Grover formula: after k rounds the success probability is the sine squared of (2k + 1)θ, where the sine of θ is 1/√N. (a) For N = 4, find the success probability after zero, one and two rounds. (b) For N = 2²⁰ = 1,048,576, estimate the best number of rounds and compare with a classical search.
Step 1: (a) The sine of θ is 1/√4 = 1/2, so θ = 30°.
Step 2: Zero rounds: the sine squared of 30° is 0.25, a blind guess. One round: the sine squared of 90° is 1, certainty.
Step 3: Two rounds: the sine squared of 150° is 0.25 again. The state has rotated past the answer.
Step 4: (b) √N = 1,024, so the best number of rounds is about π/4 × 1,024 ≈ 804. With k = 804 the success probability is about 0.9999998.
Step 5: Classically you check about N/2 = 524,288 items on average, so Grover saves a factor of about 524,288 ÷ 804 ≈ 650.
For N = 4, one round succeeds with certainty and two rounds fall back to 25 percent; for about a million items, about 804 rounds versus about 524,288 classical checks
Why it matters: The saving grows only as √N: quadratic, not exponential. Grover is a rotation, not a sieve, so the number of rounds must be chosen in advance; more rounds can make things worse.
What everyone gets wrong
Read the myth, decide whether you believed it, then bust it.
- Myth #1
Quantum computers try all the answers in parallel and simply pick the right one.
TruthA register can hold a superposition of all inputs, but measuring it returns one outcome at random, which is no better than guessing. Speed-ups come from interference: the algorithm arranges amplitudes so that paths to wrong answers cancel and paths to the right answer reinforce. Large speed-ups need problems with special structure, such as the hidden period Shor's algorithm exploits. For unstructured search the best possible gain is Grover's quadratic one, and most everyday problems see no useful quantum advantage at all.
- Myth #2
Quantum computers will soon replace laptops and phones.
TruthThey are specialised co-processors, most of them housed in refrigerators near absolute zero or in ultra-high vacuum and reached over the cloud. They offer no speed-up for browsing, video or spreadsheets, and every quantum computation needs classical computers to control it, decode its error syndromes and read out the results. The likely winners are simulations of molecules and materials, factoring and some other structured problems.
- Myth #3
The more qubits a machine has, the more powerful it is.
TruthQuality matters as much as quantity. A thousand qubits that fail on one gate in a hundred cannot run deep circuits, while a smaller machine with lower error rates and better connectivity may outperform it. The meaningful measures are logical qubits and the number of reliable operations, not the raw physical count.
- Myth #4
Shor's algorithm means today's encryption is already broken.
TruthAs of 2026 no quantum computer has factored anything close to a 2,048-bit RSA number; demonstrations of Shor's algorithm have factored only tiny numbers such as 15 and 21. The best 2025 estimate for RSA-2048 calls for fewer than a million noisy physical qubits running for less than a week, and a 2026 preprint trades fewer qubits for much longer run times. The real present-day risk is data harvested now and decrypted later, which is why post-quantum standards were published in 2024.
Your turn at the controls
Welcome to the Qubit Workbench. A Bloch sphere floats on the screen with its arrow pointing at the north pole, |0⟩. Press X, Y, Z, H, S or T, or dial in a rotation of your own, and watch the arrow swing and the odds of reading 0 or 1 change. Beside it, a two-qubit circuit builder lets you place gates and CNOTs on two wires, run the circuit many times and read the measurement histogram. The puzzle levels climb from a single flip to a fully entangled pair.
Your tasks
0/4How it connects to the theory
Every button is a unitary from the lesson. X, Y and Z are half-turns about the three axes, H is a half-turn about the diagonal between x and z, and S and T are quarter- and eighth-turns about z. The histogram samples the Born rule shot by shot, so its bars settle toward the squared amplitudes. The Bell puzzle is the two-gate recipe from Part 4, and the singlet's minus sign, invisible in a 0-or-1 histogram, is the same kind of relative phase that the Z gate hides from a single qubit.
Qubit Workbench: Gates on the Bloch Sphere loads as you scroll down.
Make it stick
Chant the gate rhyme: 'X swaps the poles, Z flips the sign, H tips you down to the equator line; CNOT asks if the boss is one, then flips the worker, and Bell is done.' Then add the algorithm drumbeat 'One, Root, Rout': the Deutsch–Jozsa algorithm settles its question in ONE query, Grover searches in about the square ROOT of N rounds, and Shor ROUTS RSA by finding a period. Use it in the lab: say each line aloud as you press the matching button and watch the Bloch arrow do exactly what the rhyme promises.
A quantum algorithm is like noise-cancelling headphones. The headphones do not play every sound in the room; they add carefully timed anti-waves so that unwanted sound cancels and only the music survives. A quantum circuit likewise arranges its amplitudes so that wrong answers cancel and the right one remains to be measured. Where it breaks: headphone waves are real pressure waves in ordinary space, while amplitudes are complex numbers in a space with 2ⁿ dimensions; headphones can listen to the noise before cancelling it, whereas a quantum computer cannot peek at its amplitudes without destroying them; and the 'music' you finally hear is a single random measurement outcome, so the cancellation must be designed in advance from the problem's structure.
The whole chapter in one lineA qubit is a steerable arrow of amplitudes; gates rotate it, entanglement links qubits, and algorithms win by making wrong answers interfere away.
Flashcards
Saved on this device. Knew it moves a card up a box; still learning sends it back to box 1. Boxes 4–5 count as mastered.
Play it into long-term memory
Match the vocabulary, then take the Quiz Show. Score 70% or better to tick it off your checklist.
Vocab Match
Match each term to its definition, against the clock.
- 12 pairs in 2 rounds
- 100 points a match, more on a streak
- −25 per mistake · speed bonus each round
- Finish with 3 mistakes or fewer to win
Dr. Q's Quantum Quiz Show
Welcome, contestants! 8 questions, 30 seconds each, and one mad scientist judging you, lovingly. Answer fast for a speed bonus; answer right in a row and your points multiply.
- 100 per answer
- +100 speed bonus
- ×2 streak bonus
Prove it on paper
Answer every question, check your work, and read the explanations — the stretch challenge is for the truly mad.
Work through these questions with the lesson closed first, then check yourself against it. For calculations, show every step. Useful facts: H sends |0⟩ to (1/√2)(|0⟩ + |1⟩) and |1⟩ to (1/√2)(|0⟩ − |1⟩); on the Bloch sphere P(0) = cos²(θ/2); a classical simulator stores 16 bytes per amplitude; Grover needs about (π/4)√N rounds.
Part A
Vocabulary
- Qubit
- A two-level quantum system used to store information, whose state is a normalized superposition α|0⟩ + β|1⟩ of two basis states.
- Probability amplitude
- A complex number attached to each possible outcome; its squared magnitude is the outcome's probability, and amplitudes can cancel through interference.
- Bloch sphere
- A unit sphere on which every pure single-qubit state is a point: |0⟩ at the north pole, |1⟩ at the south pole, equal superpositions on the equator.
- Unitary gate
- A reversible operation that preserves total probability; on a single qubit it is a rotation of the Bloch sphere.
- Hadamard gate
- The gate that maps |0⟩ to |+⟩ and |1⟩ to |−⟩ and back again, creating and undoing equal superpositions.
- Phase flip
- The action of the Z gate: it leaves |0⟩ unchanged and multiplies |1⟩ by −1, changing interference without changing 0-or-1 probabilities.
- CNOT gate
- A two-qubit gate that flips the target qubit if and only if the control qubit is 1; with a superposed control it creates entanglement.
- Bell state
- One of four maximally entangled two-qubit states, such as (1/√2)(|00⟩ + |11⟩), made from |00⟩ by a Hadamard followed by a CNOT.
- Oracle
- A black-box subroutine that evaluates a function inside a quantum algorithm, often by marking chosen inputs with a minus sign.
- Quantum Fourier transform
- The quantum version of the discrete Fourier transform, used in Shor's algorithm to make amplitudes interfere so that measurement reveals a period.
- Coherence time
- How long a qubit keeps a well-defined relative phase before its environment scrambles it, often written T₂.
- Logical qubit
- A qubit encoded across many physical qubits by an error-correcting code, so that errors can be detected and fixed without reading the encoded information.
Part B
Questions
Auto-checked except short answers, which you mark yourself.
- Question 1.Multiple choice
A qubit is in the state α|0⟩ + β|1⟩. Which statement about measuring it in the 0-or-1 basis is correct?
- Question 2.True or false
Applying the Z gate to a qubit in the state |+⟩ changes the probabilities of measuring 0 and 1.
- Question 3.Fill in the blank
Quantum gates must be operations: they preserve total probability and can always be undone.
- Question 4.Multiple choice
Two qubits start in |00⟩. Which circuit produces the Bell state (1/√2)(|00⟩ + |11⟩)?
- Question 5.Calculation
A qubit is in the state (√3/2)|0⟩ + (1/2)|1⟩. Find the probabilities of measuring 0 and 1, and the polar angle θ of its Bloch vector.
This one asks for more than one value — give each, with its units.
- Question 6.Calculation
A classical simulator stores each amplitude in 16 bytes. How much memory does it need to hold the full state of 40 qubits?
Give a number and units. 6.63×10⁻³⁴, 6.63e-34 and 6.63 x 10^-34 all work.
- Question 7.Calculation
Grover's algorithm searches N = 10⁸ unsorted items for one marked item. About how many rounds does it need, how many checks does a classical search need on average, and what is the ratio?
Give a number and units. 6.63×10⁻³⁴, 6.63e-34 and 6.63 x 10^-34 all work.
- Question 8.Calculation
Shor's algorithm reduces factoring to finding a period. For N = 15 and a = 7, list the remainders of 7, 7², 7³ and 7⁴ when divided by 15, find the period r, and then find the factors from the greatest common divisors of 15 with the numbers one below and one above 7 raised to the power r/2.
This one asks for more than one value — give each, with its units.
- Question 9.Short answer
In two or three sentences, explain why 'a quantum computer tries every answer at once' is misleading.
- Question 10.Multiple choice
Which hardware platform holds atoms in grids of focused laser beams and entangles them by exciting them to Rydberg states?
- Question 11.True or false
Because quantum states cannot be copied, quantum error correction is impossible.
- Question 12.Fill in the blank
Grover's algorithm gives a speed-up over classical unstructured search.
- Question 13.Short answer
What is a logical qubit, and what does it mean for hardware to operate 'below threshold'?
Part C · optional, dangerous, extremely rewarding
Mad scientist challenge
Scale Willow. In December 2024 Google's distance-7 surface code failed in 0.143 percent of cycles, and each increase of the distance by 2 divided the logical error rate by Λ ≈ 2.14. Assume Λ stays at 2.14 as the code grows. (a) What error rates does this imply for distances 5 and 3? (b) What is the smallest odd distance whose logical error rate is at most 10⁻⁶ per cycle? (c) A distance-d surface-code patch uses 2d² − 1 physical qubits. How many is that per logical qubit at your answer to (b), and how many for 1,000 logical qubits? (d) Give two reasons real requirements might differ.
Recap & sign-off
Key takeaways
- A qubit is a two-level quantum system in a state α|0⟩ + β|1⟩ with |α|² + |β|² = 1; measuring it yields one bit.
- The Bloch sphere maps every single-qubit state to a point, with |0⟩ and |1⟩ at the poles and equal superpositions on the equator; single-qubit gates are rotations of that sphere.
- X flips the bit, Z flips the relative sign, H exchanges |0⟩ and |1⟩ with |+⟩ and |−⟩, and CNOT flips a target when its control is 1; H followed by CNOT turns |00⟩ into the Bell state.
- n qubits need 2ⁿ amplitudes, yet measurement returns only n bits, so algorithms win by choreographing interference, not by trying every answer.
- The Deutsch–Jozsa algorithm decides constant versus balanced in one query, Grover searches N items in about π/4 × √N rounds, and Shor factors in polynomial time, threatening RSA and elliptic-curve cryptography.
- Superconducting circuits, trapped ions, neutral atoms, photons and spin qubits trade speed, coherence and scale; as of 2026 the best two-qubit gates fail about once in a thousand to ten thousand operations.
- Error correction spreads one logical qubit across many physical ones; below threshold, bigger codes suppress errors exponentially, as Google's Willow chip showed in 2024.
- As of 2026 no quantum computer has broken real encryption, and quantum computers are specialised co-processors, not replacements for laptops.
Dr. Q signs offMwahaha — measurably! You can now flip, phase, entangle and search, and you know why a quantum computer is an interference engine rather than a machine that tries every answer. But I left one thread dangling: we cannot copy a qubit. Next session that limitation becomes a superpower. Chapter 24: Quantum Cryptography, Teleportation and Sensing, where eavesdroppers betray themselves, quantum states hop across a lab while the matter stays put, and clocks keep time so steadily they would drift less than a second over the age of the universe.
Your chapter checklist
Tick these off in any order. It's a guide, not a law of physics — you can mark the chapter complete whenever you're ready.
- Listen to the whole lesson (not yet)Or read it all — but the voice is more fun.
- Win the lab challenge (not yet)Qubit Workbench: Gates on the Bloch SphereGo to the lab
- Score 70% or more on the Quiz Show (not yet)Six to eight questions, no penalties for guessing.Take the quiz
- Check your worksheet (not yet)Answer, check, and read the explanations.Open the worksheet
Sources & further reading
- Stanford Encyclopedia of Philosophy — Quantum Computing · plato.stanford.edu
- Peter W. Shor — Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer (arXiv, 1995) · arxiv.org
- Google Quantum AI and Collaborators, Nature 638, 920 (2025) — Quantum error correction below the surface code threshold · doi.org
- Craig Gidney — How to factor 2048 bit RSA integers with less than a million noisy qubits (arXiv, 2025) · arxiv.org
- NIST — NIST Releases First 3 Finalized Post-Quantum Encryption Standards (2024) · nist.gov