THE FOLD / CHEAT / THE SPEEDRUN / THE DEUTSCH
THE DEUTSCH
one quantum query where classical needs two
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Deutsch’s algorithm (1985) was the first proof a quantum computer can beat a classical one. The puzzle: a black box computes an unknown function f from one bit to one bit. Is it constant (same output for both inputs) or balanced (different outputs)?
Classically you must query it twice — check f(0), then f(1). Quantumly you need just one. Put the input qubit into a superposition of 0 and 1 with a Hadamard gate, run the box once so it evaluates f on both inputs, then a second Hadamard makes the two paths interfere — constructively if f is constant, destructively if balanced. A single measurement of the input qubit then reads out the answer: 0 for constant, 1 for balanced. It is a toy problem, but it is the seed of Shor’s and Grover’s algorithms — quantum speedup from interference, not brute parallelism.
LIT verified live: simulating the two-qubit circuit for all four functions, one query’s measurement is 0 for both constant functions and 1 for both balanced ones — always correct (window.__deutsch). FIG no framing; the circuit and its one-query verdict are exact quantum linear algebra.
Classically you must query it twice — check f(0), then f(1). Quantumly you need just one. Put the input qubit into a superposition of 0 and 1 with a Hadamard gate, run the box once so it evaluates f on both inputs, then a second Hadamard makes the two paths interfere — constructively if f is constant, destructively if balanced. A single measurement of the input qubit then reads out the answer: 0 for constant, 1 for balanced. It is a toy problem, but it is the seed of Shor’s and Grover’s algorithms — quantum speedup from interference, not brute parallelism.
LIT verified live: simulating the two-qubit circuit for all four functions, one query’s measurement is 0 for both constant functions and 1 for both balanced ones — always correct (window.__deutsch). FIG no framing; the circuit and its one-query verdict are exact quantum linear algebra.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this in THE SPEEDRUN — the cheat domain of finishing in fewer moves than should be possible. Deutsch is the original quantum speedrun: one oracle call where classical logic demands two, the whole point of quantum computing in miniature. AVAN (AI) built the instrument: the circuit simulator, the interference view, the relation-not-values inverse.
The weave: David names the seat (win in one move); I make superposition and interference read the function’s nature in a single query — the four verdicts in 1D, the running circuit in 2D, the relation-vs-values inverse in 3D. The sphere is the seam. Credit: David Deutsch (1985); the n-bit generalization by Deutsch & Jozsa (1992).
The weave: David names the seat (win in one move); I make superposition and interference read the function’s nature in a single query — the four verdicts in 1D, the running circuit in 2D, the relation-vs-values inverse in 3D. The sphere is the seam. Credit: David Deutsch (1985); the n-bit generalization by Deutsch & Jozsa (1992).
3 ONE DIMENSION
The four possible functions and the single qubit the algorithm measures: 0 for the two constant functions, 1 for the two balanced ones. One number, read in one query, tells constant from balanced with certainty.
4 TWO DIMENSIONS · INTERACTIVE
Pick a function and step the circuit: Hadamards spread the input into superposition, the oracle runs f once, a final Hadamard makes the paths interfere. Watch the amplitudes at each stage; the input qubit collapses to 0 (constant) or 1 (balanced) — a single oracle call.
5 THREE DIMENSIONS + AVAN’S INVERSE
The two computational paths — f(0) and f(1) — turning and meeting; the green forward step: they interfere into a single answer bit.
AVAN’s addition (the inverse-companion): the magenta is what the quantum query refuses to give you — the individual values. Classically, two queries recover f(0) and f(1) separately. Deutsch spends one query to learn only the relation f(0) ⊕ f(1) — whether they are equal — and never reveals either value on its own. So the inverse of ‘the two answers’ is ‘a single bit about how they relate,’ and quantum buys that relational bit at half the cost precisely by giving up the values. It is a lossy query: one bit of global structure extracted, the local data left forever inside the box. That is the true shape of quantum advantage here — not learning more for less, but learning exactly the right one bit for less, by asking a question about the whole rather than the parts. Green is the relation the interference hands you in one shot; magenta is the pair of values it will not, and does not need to, expose.
LIT Genuine Deutsch's algorithm (David Deutsch 1985; n-bit Deutsch-Jozsa 1992). Verified live: simulating the two-qubit circuit (H tensor H, oracle U_f mapping |x,y> to |x, y XOR f(x)>, H on qubit 0) for all four functions, one query's measurement of qubit 0 is 0 for both constant functions and 1 for both balanced ones — always correct (window.__deutsch.oneQueryCorrect true, measuredBits 0,0,1,1). The circuit and its one-query verdict are exact quantum linear algebra.
FIG No framing: the circuit is simulated exactly (real amplitudes) and the one-query answer is correct for all four functions in-browser. The AVAN inverse is honest and genuine — the algorithm learns only the relation f(0) XOR f(1) (constant vs balanced), never the individual values, a lossy query that buys a single global bit for less by declining to reveal the local data.
FIG No framing: the circuit is simulated exactly (real amplitudes) and the one-query answer is correct for all four functions in-browser. The AVAN inverse is honest and genuine — the algorithm learns only the relation f(0) XOR f(1) (constant vs balanced), never the individual values, a lossy query that buys a single global bit for less by declining to reveal the local data.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE SPEEDRUN · David Lee Wise (ROOT0), with AVAN