# Quantum Computing, End to End — complete Markdown corpus

> Generated from the same semantic sources and manifest as the canonical HTML edition. Each chapter retains its canonical URL, evidence links, dates, exercises, solutions, and review status.

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/00-how-to-use-the-book-layer/ -->

# How to Use This Book

Quantum Computing, End to End is built to be worked, not skimmed: every part ends in something you have to do. This guide gives you the reading order, shows you the furniture every chapter shares, and lays out the study loop that turns a chapter into working knowledge.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How should a reader choose a route through this book and know when a concept is ready to use?

Use the book as a dependency graph, not a 95-page queue: begin with a diagnostic task, follow only the prerequisites exposed by failure, and leave each route by producing an artifact that has an objective check.

Scope and non-goals.

- This page does not summarize quantum computing or promise mastery by completion.

- It does not prescribe one sequence for programmers, physicists, operators, and decision-makers.

[Figure 0.1.](#fig-00-how-to-use-the-book-layer-1) Notice that the arrows point one way but the guides sit outside the sequence. Each stage assumes the previous one, and the guides are where you repair a gap before it compounds.

Prerequisites. None; begin with the stated reader question.

Notation used here. No new mathematical symbols; route labels use the exact manifest titles and slugs.

## Choose the work you need to perform

Separate calculation, implementation, systems review, and evidence-evaluation goals.

Choose an output before choosing a chapter. “Learn quantum computing” does not specify enough to route anyone; calculating a measurement distribution, tracing a protocol, checking an algorithmic speedup, and auditing a hardware claim expose different gaps.

Four starting jobs and the evidence that completes them
 | Job | First observable task | Exit artifact

 | Calculate | Normalize a two-amplitude state and predict a basis measurement. | A derivation whose probabilities sum to one.
 | Implement | Trace a two-qubit circuit in the declared bit order. | An executable statevector fixture with assertions.
 | Review a system | Separate logical operations from native gates, routing, and noise. | A resource and failure-mode ledger.
 | Evaluate evidence | Rewrite one advantage claim as a problem contract and baseline. | A dated claim-to-source dossier with a reversal condition.

Evidence boundary. Quantum computing study requires mathematical, physical, and computational layers rather than a fact-only reading sequence. [National Academies of Sciences](https://doi.org/10.17226/25196) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## A diagnostic before a syllabus

Use four small tasks to expose missing prerequisites.

Attempt these without consulting the chapter summaries. A failed task names a prerequisite; it is not a score of general intelligence or a reason to start at page one.

- State task. Given amplitudes `3/5` and `4i/5`, state the two computational-basis probabilities and check normalization. If the squared magnitudes or the role of phase are unclear, begin with the first two orientation guides and Chapters 3–10.

- Circuit task. Starting in `|00>`, trace Hadamard on `q0` followed by CNOT `q0 → q1`. If wire order or tensor order is ambiguous, take the circuits route through Chapters 13 and 16–20.

- Resource task. Explain why an algorithm with fewer oracle queries can still lose end to end. If query count, gate count, depth, sampling, and classical processing collapse into one number, take the algorithms route through Chapters 22 and 27.

- Evidence task. For “1,000 qubits,” list three measurements needed before inferring useful capacity. If physical and logical qubits or control/readout budgets are missing, use the systems orientation and Chapters 45–63.

The answer to the state task is `9/25` and `16/25`; their sum is one. The circuit task ends in equal amplitudes on `|00>` and `|11>` under the book's most-significant-displayed-bit convention. Those two answers are routing fixtures, not compressed substitutes for the derivations.

Evidence boundary. A route should expose prerequisites in quantum information, circuits, algorithms, and hardware systems. [John Preskill](https://www.preskill.caltech.edu/ph219/) [National Academies of Sciences](https://doi.org/10.17226/25196)

## Four routes through the dependency graph

Map distinct reader goals to canonical chapter sequences.

Canonical routes; follow prerequisites only when a task exposes the need
 | Route | Canonical sequence | Terminal work

 | Mathematical foundations | [Amplitudes, Measurement, and Gates](/playground/quantum/book/orientation-02-amplitudes-measurement-and-gates/); Chapters 8–15 | Derive a density-matrix measurement and verify trace, positivity, and probability normalization.
 | Circuits and algorithms | [Multi-Qubit Circuits](/playground/quantum/book/orientation-03-multi-qubit-circuits-entanglement-and-no-hype/); Chapters 16–35 | Run a small algorithm trace with separate query, gate, depth, sampling, and post-processing records.
 | Hardware and reliability | [Noise and Fault Tolerance](/playground/quantum/book/orientation-05-noise-error-correction-and-fault-tolerance/); Chapters 45–63 | Produce a units-bearing logical-operation budget tied to one physical modality.
 | Applications and evidence | [Applications, Evidence, and Strategy](/playground/quantum/book/orientation-07-applications-evidence-and-strategy/); Chapters 64–82 | Defend a build, partner, wait, or avoid decision against a named classical baseline.

Evidence boundary. The book's diagnostic tasks should reflect the operational competencies used by standard quantum-computing texts. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## Exit conditions for each route

Define observable outputs that demonstrate readiness.

A route is complete when its terminal artifact survives an independent check. Familiar vocabulary, a finished reading list, or the ability to repeat the page's prose does not satisfy that standard. Mathematical work needs an invariant; code needs a deterministic test and a disclosed stochastic tolerance; a system budget needs units and comparable denominators; an evidence judgment needs dated sources and a condition that would reverse it.

Use the solution and pass condition on each page as a local exit. If the work fails, follow the named prerequisite implicated by the error. If it passes, move to the next dependency or skip ahead to the capstone that consumes the artifact. This makes progress observable without pretending every reader needs the same sequence or pace.

## How to report a broken explanation

Connect correction, revision, and errata paths.

A useful correction identifies the route, quotes the smallest inaccurate or ambiguous claim, supplies a counterexample or source, and states the proposed change. Mathematical reports should include notation and the first line where two derivations diverge. Software reports should include the command, environment, seed when relevant, expected output, and observed output. Evidence reports should include the source date and the claim it does or does not support.

Use the page's errata link for a factual or technical defect and the revision-history link to see whether it has already changed. Do not infer silent specialist approval from polished prose: every page discloses its current review status, and pending independent review remains visible until it is actually recorded.

## Interactive route selector and scored diagnostic

Acceptance contract for Interactive route selector and scored diagnostic
 | Field | Reader-visible record

 | Format | Accessible HTML decision tree plus printable one-page worksheet
 | Verification | Automated test resolves every recommended route to an existing canonical page; answer key reproduces all route scores.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Interactive route selector and scored diagnostic",
  "format": "Accessible HTML decision tree plus printable one-page worksheet",
  "acceptance_test": "Automated test resolves every recommended route to an existing canonical page; answer key reproduces all route scores.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Scope boundary

- This page does not summarize quantum computing or promise mastery by completion.

- It does not prescribe one sequence for programmers, physicists, operators, and decision-makers.

Depth commitment. Four diagnostics, four route maps, and explicit exit criteria; no compressed textbook content.

Practice problem

Complete the four diagnostic tasks and select a route without consulting chapter summaries.

** Deliverable** : A route-selection worksheet with each failed task mapped to one prerequisite page.

** Pass condition** : Every failed diagnostic maps to a valid prerequisite and every selected route terminates in a named artifact.

Verification record

Expected solution form. Annotated answer key plus a route-decision table.

Model answer. The state task yields probabilities 9/25 and 16/25; the circuit task yields (|00>+|11>)/sqrt(2). Failures in these tasks route to amplitudes or circuits respectively; resource-account failures route to Chapter 22 and claim-audit failures route to the hardware/evidence guides.

Model result and check. A validator recomputes route selection from each possible diagnostic outcome and matches the published table.

Acceptance test. Every failed diagnostic maps to a valid prerequisite and every selected route terminates in a named artifact.

External review. Open.

Expertise still needed. Quantum-computing curriculum designer familiar with prerequisite sequencing; Technical editor experienced in assessment design and accessible instructional navigation.

Provenance

## Sources and review

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=00-how-to-use-the-book-layer#report)

Continue the thread

## Next concepts from this chapter

- [Computation, Information, and Qubits Orientation guide](/playground/quantum/book/orientation-01-computation-information-and-qubits/)

- [Computation Is Physical Part I. Mental Model · Chapter 1](/playground/quantum/book/01-computation-is-physical/)

- [Amplitudes, Measurement, and Gates Orientation guide](/playground/quantum/book/orientation-02-amplitudes-measurement-and-gates/)

[Previous Book contents](/playground/quantum/book/)[Next Computation, Information, and Qubits](/playground/quantum/book/orientation-01-computation-information-and-qubits/)

In this chapter

- [Choose the work you need to perform](#choose-the-work-you-need-to-perform)

- [A diagnostic before a syllabus](#a-diagnostic-before-a-syllabus)

- [Four routes through the dependency graph](#four-routes-through-the-dependency-graph)

- [Exit conditions for each route](#exit-conditions-for-each-route)

- [How to report a broken explanation](#how-to-report-a-broken-explanation)

- [Interactive route selector and scored diagnostic](#interactive-route-selector-and-scored-diagnostic)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 3 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=00-how-to-use-the-book-layer#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/00-how-to-use-the-book-layer/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/orientation-01-computation-information-and-qubits/ -->

# Computation, Information, and Qubits

A bit is a physical state; a qubit is a physical two-level system; and the entire difference between classical and quantum information fits in one line of mathematics. This guide builds that line carefully: what amplitudes are, why they are not probabilities, and why reversibility is the bridge from classical gates to quantum ones.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. What minimum physical and mathematical model lets a reader distinguish a bit, a probabilistic bit, and a qubit?

A bit, a probability distribution, and a qubit differ in the state descriptions and transformations physics permits: the qubit uses normalized complex amplitudes whose relative phase can affect later measurement, while one measurement still returns a classical outcome.

Scope and non-goals.

- The full linear-algebra formalism and hardware-modality survey belong to later parts.

- A large state space is introduced as necessary machinery, never as sufficient evidence of computational advantage.

[Figure O1.1.](#fig-orientation-01-computation-information-and-qubits-1) Notice that the classical bit has no direction to draw; its whole state is a point. The qubit state is a vector: the measurement odds come from its components, but the vector itself is what every gate acts on.

Prerequisites. 00-how-to-use-the-book-layer

Notation used here. Use |0>, |1>, |+>, and |-> with basis order (|0>, |1>); distinguish amplitude α from probability |α|².

## Three state descriptions for one two-outcome system

Place deterministic bits, random bits, and qubits side by side.

Quantum computing is a model of computation in which information is stored in physical systems whose valid states are described by complex amplitudes, and whose allowed closed-system operations are reversible linear transformations. Every word of that sentence is load-bearing, and this guide unpacks all of them.

The right starting point is computation as physics:

- A bit is a physical system used to encode `0` or `1`.

- A logic gate is a physical process that transforms encoded information.

- A circuit is those transformations composed in sequence.

- A qubit is a physical two-level system whose state can require amplitudes over both classical basis states.

The hard part is not saying that a qubit can be "both 0 and 1." The hard part is learning when that phrase helps, when it misleads, and how to replace it with a calculation.

### Classical bit

A classical bit holds one value from the set \(\{0,1\}\). A one-bit register is in exactly one of two states, full stop. There is no nuance available, and that bluntness is precisely what makes classical hardware so reliable.

### Probabilistic bit

A probabilistic bit carries uncertainty over classical values: \(P(0)=p\) and \(P(1)=1-p\). A fair coin gives \(P(0)=1/2\), \(P(1)=1/2\). Nothing here is quantum. The bit itself is ordinary; the probabilities describe your ignorance of it, not the physics of it.

### Qubit

A qubit state is written \(\lvert\psi\rangle=\alpha\lvert0\rangle+\beta\lvert1\rangle\), where \(\alpha\) and \(\beta\) are complex numbers satisfying \(\lvert\alpha\rvert^2+\lvert\beta\rvert^2=1\). A computational-basis measurement therefore assigns outcome `0` the probability \(\lvert\alpha\rvert^2\) and outcome `1` the probability \(\lvert\beta\rvert^2\).

The amplitudes are not probabilities. Probabilities are derived from the squared magnitudes of amplitudes; and that one extra step, the squaring, is where quantum mechanics keeps both its strangeness and its computational power.

Evidence boundary. Quantum states use normalized complex amplitudes and measurement probabilities follow the Born rule. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## The physical questions behind the symbols

Tie storage, control, noise, and readout to each model.

The slogan points at a real fact: an \(n\) -qubit state carries amplitudes for \(2^n\) basis states. Two qubits give \(\lvert\psi\rangle=a_{00}\lvert00\rangle+a_{01}\lvert01\rangle+a_{10}\lvert10\rangle+a_{11}\lvert11\rangle\); three qubits give eight amplitudes; the count doubles with every added qubit.

But measurement never lets you read those amplitudes. It returns one classical outcome, sampled according to the squared magnitudes. A quantum algorithm earns its speedup only by arranging for wrong answers to cancel through interference and right answers to reinforce; then sampling a distribution that has been shaped in your favor.

The better mental model: quantum algorithms are amplitude-engineering procedures. They do not merely create many branches. They create, transform, cancel, and amplify amplitudes, and then they sample.

Quantum evolution in a closed system is reversible, so quantum gates are not arbitrary functions; each one must preserve enough information to be undone. Classical AND fails that test:

```
a b | a AND b
0 0 | 0
0 1 | 0
1 0 | 0
1 1 | 1

```

Three different inputs map to output `0`. Knowing the output is `0` tells you almost nothing about the input; information was destroyed.

The Toffoli gate repairs AND by keeping the inputs and writing the result into a target bit: \((a,b,c)\mapsto(a,b,c\oplus(a\land b))\). With \(c=0\) this computes \((a,b,0)\mapsto(a,b,a\land b)\):

```
a b c | a b c'
0 0 0 | 0 0 0
0 1 0 | 0 1 0
1 0 0 | 1 0 0
1 1 0 | 1 1 1

```

The inputs survive in the output, so the map can be run backwards. This is the general pattern: any classical computation can be made reversible at modest cost, which is why everything a classical computer can do, a quantum computer can also do; the interesting question is always what it can do differently.

Evidence boundary. Quantum information is embodied in physical systems with preparation, control, and measurement requirements. [National Academies of Sciences](https://doi.org/10.17226/25196) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## A phase difference that survives equal probabilities

Calculate two states with identical Z-basis statistics and different H-basis outcomes.

A one-qubit pure state is a unit vector in a two-dimensional complex vector space: \(\lvert\psi\rangle=\alpha\lvert0\rangle+\beta\lvert1\rangle\) with \(\lvert\alpha\rvert^2+\lvert\beta\rvert^2=1\). The computational basis is \(\lvert0\rangle=\begin{pmatrix}1\\0\end{pmatrix}\) and \(\lvert1\rangle=\begin{pmatrix}0\\1\end{pmatrix}\).

A valid one-qubit closed-system gate is a \(2\times2\) unitary matrix \(U\), meaning \(U^{\dagger}U=I\), where the dagger is the conjugate transpose. Unitarity preserves normalization, so the squared magnitudes still sum to one after the operation; the mathematics refuses to let probabilities leak. Reversibility is not an extra assumption here; it falls straight out of the definition.

- Bits become basis states.

- Probability distributions become the contrast class; the thing amplitudes are not.

- Logic gates become reversible transformations.

- Quantum gates become unitary matrices.

- Algorithms become procedures for arranging interference.

- Measurement becomes a sampling operation with information loss.

If you can follow a state transition, a probability distribution, and a matrix-vector multiplication, you already own every tool this guide uses.

Evidence boundary. Reversible unitary evolution distinguishes quantum gates from arbitrary irreversible Boolean maps. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

\(B=(\lvert0\rangle,\lvert1\rangle),\quad \alpha\in\mathbb C,\quad p_0=\lvert\alpha\rvert^2\)[(O1.1)](#eq-orientation-01-computation-information-and-qubits-1)
Notation contract: Use |0>, |1>, |+>, and |-> with basis order (|0>, |1>); distinguish amplitude α from probability |α|².

## Why reversible evolution enters here

Show how information preservation constrains quantum gates.

A qubit is a physical system, not a symbol floating in space; superconducting circuit energy levels, ion internal states, neutral atom states, photonic modes, silicon spin states, or bosonic encodings; and every implementation has to answer the same seven questions:

- How is the qubit initialized?

- How is it controlled?

- How is it coupled to other qubits?

- How long does it preserve quantum information?

- How accurately can gates be applied?

- How is it measured?

- How does it scale?

Part VII of the book takes these questions modality by modality. For now, hold onto the shape of the list: it is the checklist every hardware claim eventually has to survive.

- Explain the difference between a bit, a probabilistic bit, and a qubit in fewer than 150 words.

- Write down two states with the same computational-basis measurement probabilities but different relative phase.

- Compute \(H\lvert+\rangle\) and \(H\lvert-\rangle\) by hand, showing every step.

- Build the truth table for AND and explain, in one sentence, why it is irreversible.

- Build the Toffoli truth table for all eight inputs and confirm the map is a permutation.

- Write one paragraph explaining why quantum computing is not parallel classical computing.

- Pick one company roadmap and identify whether it emphasizes physical qubits, logical qubits, error correction, applications, or cloud access.

## Readiness test: predict before measuring

Use a short diagnostic to route readers to Chapters 1–7.

Choose the next derivation from the failed task.

- [Physical computation contracts](/playground/quantum/book/01-computation-is-physical/) for state, control, noise, and readout.

- [One-qubit state geometry](/playground/quantum/book/04-qubits-without-mysticism/) when state descriptions remain unclear.

- [Measurement](/playground/quantum/book/05-measurement-and-what-it-does-not-mean/) when probabilities and state update are being conflated.

- [Amplitudes, Measurement, and Gates](/playground/quantum/book/orientation-02-amplitudes-measurement-and-gates/) after all three predictions pass.

Part I of the book takes each idea in this guide and gives it a full chapter:

- [Computation Is Physical](/playground/quantum/book/01-computation-is-physical/); the four questions every computational model must answer.

- [Qubits Without Mysticism](/playground/quantum/book/04-qubits-without-mysticism/); the state space of one qubit, without the slogans.

- [Measurement and What It Does Not Mean](/playground/quantum/book/05-measurement-and-what-it-does-not-mean/); what measurement does, and what it refuses to do.

Then continue to [Amplitudes, Measurement, and Gates](/playground/quantum/book/orientation-02-amplitudes-measurement-and-gates/), which turns the one-qubit picture into working mathematics.

## Bit/probability/qubit comparison simulator

Acceptance contract for Bit/probability/qubit comparison simulator
 | Field | Reader-visible record

 | Format | Single-file interactive with a downloadable calculation sheet
 | Verification | Fixture checks identical Z probabilities and distinct X-basis outcomes for |+> and |->; accessibility test exposes every state in text.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Bit/probability/qubit comparison simulator",
  "format": "Single-file interactive with a downloadable calculation sheet",
  "acceptance_test": "Fixture checks identical Z probabilities and distinct X-basis outcomes for |+> and |->; accessibility test exposes every state in text.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Scope boundary

- The full linear-algebra formalism and hardware-modality survey belong to later parts.

- A large state space is introduced as necessary machinery, never as sufficient evidence of computational advantage.

Depth commitment. One decisive phase calculation, one physical comparison, and a routing diagnostic.

Practice problem

Classify six state descriptions as deterministic classical, probabilistic classical, or quantum, then predict one basis-change result.

Six descriptions to classify
 | Label | Description

 | A | A latched low voltage read as 0.
 | B | An unknown classical bit with P(0)=0.3.
 | C | (3|0>+4i|1>)/5.
 | D | The density operator diag(0.3,0.7).
 | E | A fair coin whose face exists before it is covered.
 | F | |+> with a requested X-basis read.

** Deliverable** : A completed classification table and the calculation for H|+> and H|->.

** Pass condition** : The table gives a physical state model and legal read operation for every row; the two calculations produce different deterministic outputs.

Verification record

Expected solution form. Line-by-line classification key with normalized state calculations.

Model answer. A is deterministic classical; B and E are probabilistic classical descriptions; C, D, and F are quantum descriptions. H|+>=|0> and H|->=|1>, so equal Z-basis probabilities do not erase relative phase.

Model result and check. A small numerical fixture multiplies both statevectors by H and asserts the stated probabilities.

Acceptance test. The table gives a physical state model and legal read operation for every row; the two calculations produce different deterministic outputs.

External review. Open.

Expertise still needed. Quantum information theorist able to review operational state and measurement claims; Computer-science educator experienced in classical versus quantum computation models.

Provenance

## Sources and review

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=orientation-01-computation-information-and-qubits#report)

Dependency graph

## Prerequisites for this chapter

- [How to Use This Book Orientation · Guide 00](/playground/quantum/book/00-how-to-use-the-book-layer/)

Continue the thread

## Next concepts from this chapter

- [Amplitudes, Measurement, and Gates Orientation guide](/playground/quantum/book/orientation-02-amplitudes-measurement-and-gates/)

- [Multi-Qubit Circuits, Entanglement, and No-Hype Protocols Orientation guide](/playground/quantum/book/orientation-03-multi-qubit-circuits-entanglement-and-no-hype/)

- [Quantum Algorithms and Speedups Orientation guide](/playground/quantum/book/orientation-04-quantum-algorithms-and-speedups/)

[Previous How to Use This Book](/playground/quantum/book/00-how-to-use-the-book-layer/)[Next Amplitudes, Measurement, and Gates](/playground/quantum/book/orientation-02-amplitudes-measurement-and-gates/)

In this chapter

- [Three state descriptions for one two-outcome system](#three-state-descriptions-for-one-two-outcome-system)

- [Classical bit](#classical-bit)

- [Probabilistic bit](#probabilistic-bit)

- [Qubit](#qubit)

- [The physical questions behind the symbols](#the-physical-questions-behind-the-symbols)

- [A phase difference that survives equal probabilities](#a-phase-difference-that-survives-equal-probabilities)

- [Why reversible evolution enters here](#why-reversible-evolution-enters-here)

- [Readiness test: predict before measuring](#readiness-test-predict-before-measuring)

- [Bit/probability/qubit comparison simulator](#bit-probability-qubit-comparison-simulator)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 3 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=orientation-01-computation-information-and-qubits#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/orientation-01-computation-information-and-qubits/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/orientation-02-amplitudes-measurement-and-gates/ -->

# Amplitudes, Measurement, and Gates

One qubit, four gates, and a meter — that is all the machinery this guide uses, and it is enough to watch interference happen in arithmetic you can check by hand. You will normalize states, multiply matrices, and learn why the measurement basis is part of the answer.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How can a reader calculate a complete one-qubit experiment from preparation through gate application to measurement?

Represent the qubit as a normalized two-entry complex vector, multiply by the chosen unitary matrices in declared order, and square final magnitudes only after all amplitudes have combined; the measurement basis is part of the experiment.

Scope and non-goals.

- This guide does not cover mixed states, tomography, or multi-qubit entanglement.

- It does not treat a statevector simulator's private state as physically readable output.

[Figure O2.1.](#fig-orientation-02-amplitudes-measurement-and-gates-1) Notice there is no randomness anywhere on this wire: the two H gates split and then exactly cancel the \(\lvert1\rangle\) amplitude, so even the meter reads a deterministic outcome. Randomness enters only when a circuit fails to arrange such cancellation.

Prerequisites. orientation-01-computation-information-and-qubits, 08-complex-numbers-for-quantum-computing

Notation used here. Basis order (|0>, |1>); column vectors; gates act right-to-left in products; global phase equivalence must be stated explicitly.

## Declare the vector before touching a gate

Fix basis order, normalization, and phase conventions.

A quantum state is not a list of probabilities; it is a vector of amplitudes. Gates transform the amplitudes. Measurement then converts the state into classical data, with probabilities computed from the squared magnitudes. Every quantum program, whatever its size, runs the same loop:

- Prepare an initial state.

- Apply gates that transform the amplitudes.

- Arrange interference so useful outcomes grow and useless ones cancel.

- Measure, producing one classical record.

- Interpret the samples, usually over many repeated shots.

Confuse amplitudes with probabilities and almost every quantum algorithm becomes mysterious. Track amplitudes carefully and the mystery turns into linear algebra.

Work in the computational basis, \(\lvert0\rangle=\begin{pmatrix}1\\0\end{pmatrix}\) and \(\lvert1\rangle=\begin{pmatrix}0\\1\end{pmatrix}\). A general pure state is \(\lvert\psi\rangle=\alpha\lvert0\rangle+\beta\lvert1\rangle=\begin{pmatrix}\alpha\\\beta\end{pmatrix}\), subject to the normalization condition \(\lvert\alpha\rvert^2+\lvert\beta\rvert^2=1\). Measurement in this basis returns `0` with probability \(\lvert\alpha\rvert^2\) and `1` with probability \(\lvert\beta\rvert^2\).

Because amplitudes are complex, the squared magnitude deserves one line of care: for \(z=a+bi\), \(\lvert z\rvert^2=a^2+b^2\), equivalently \(\lvert z\rvert^2=z^\ast z\) where \(z^\ast\) is the complex conjugate. Normalize wrong and every probability you compute afterwards is wrong too.

Evidence boundary. A pure one-qubit state is a normalized vector in a two-dimensional complex Hilbert space. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Four matrices, one execution order

Derive X, Z, H, and S actions on the basis states.

### X gate

\(X=\begin{pmatrix}0&1\\1&0\end{pmatrix}\)[(O2.1)](#eq-orientation-02-amplitudes-measurement-and-gates-1)

It swaps the basis states: \(X\lvert0\rangle=\lvert1\rangle\) and \(X\lvert1\rangle=\lvert0\rangle\). On the computational basis this is the quantum analogue of NOT.

### Z gate

\(Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix}\)[(O2.2)](#eq-orientation-02-amplitudes-measurement-and-gates-2)

It leaves \(\lvert0\rangle\) alone and flips the sign of \(\lvert1\rangle\): \(Z\lvert1\rangle=-\lvert1\rangle\). Measure immediately and you see nothing; apply another gate and the flipped phase changes what interferes with what. Z is the purest phase gate in the set.

### H gate

\(H=\frac1{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}\)[(O2.3)](#eq-orientation-02-amplitudes-measurement-and-gates-3)

It maps \(\lvert0\rangle\) to \((\lvert0\rangle+\lvert1\rangle)/\sqrt2=\lvert+\rangle\) and \(\lvert1\rangle\) to \((\lvert0\rangle-\lvert1\rangle)/\sqrt2=\lvert-\rangle\). Hadamard is the simplest gate that creates superposition, which makes it the best gate for learning interference.

### S gate

\(S=\begin{pmatrix}1&0\\0&i\end{pmatrix}\)[(O2.4)](#eq-orientation-02-amplitudes-measurement-and-gates-4)

It leaves \(\lvert0\rangle\) alone and multiplies the \(\lvert1\rangle\) component by \(i\); a quarter-turn of phase where Z applies a half-turn. Four gates, and you can already build every phenomenon this guide discusses.

Take the state \(\lvert+\rangle=(\lvert0\rangle+\lvert1\rangle)/\sqrt2\). A computational-basis measurement gives `0` and `1` with equal probability. But apply \(H\) first and then measure, and \(H\lvert+\rangle=\lvert0\rangle\); the outcome is now `0` with certainty.

Same state, different statistics, because the effective measurement changed. This is why "the measurement probability" is never a complete description of a state: you must specify the basis, or equivalently the circuit that runs before the meter. A claim about a quantum state that does not say how it was measured is an incomplete claim.

Evidence boundary. X, Z, H, and phase gates are unitary matrices whose order of multiplication determines the result. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## The HZH phase detector

Trace an imaginary or negative phase into a measurable outcome.

Two states that differ only by an overall phase; \(\lvert\psi\rangle\) versus \(-\lvert\psi\rangle\), or \(\lvert\psi\rangle\) versus \(i\lvert\psi\rangle\); make identical predictions for every possible measurement. Global phase is unphysical, a residue of the notation.

Relative phase is different. The states \((\lvert0\rangle+\lvert1\rangle)/\sqrt2\) and \((\lvert0\rangle-\lvert1\rangle)/\sqrt2\) differ by a sign on one component only, and as the Hadamard example showed, that sign decides whether a later gate produces \(\lvert0\rangle\) or \(\lvert1\rangle\). The quick test: if you cannot factor the phase out in front of the whole state, it is relative, and it matters.

Interference is amplitude addition, nothing more. When two computational paths contribute amplitudes to the same outcome, those amplitudes add. Aligned, they reinforce; \(1/\sqrt2+1/\sqrt2=\sqrt2\) grows. Opposed, they cancel; \(1/\sqrt2-1/\sqrt2=0\).

A quantum algorithm earns its keep when its circuit steers amplitudes so that wrong or irrelevant outputs cancel and useful outputs survive or grow. Probability can never do this; probabilities only ever add upward. The ability to subtract is the whole game.

Evidence boundary. Measurement probabilities depend on the selected basis and are computed from squared amplitude magnitudes. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

\(B=(\lvert0\rangle,\lvert1\rangle),\quad G_2G_1\lvert\psi\rangle\text{ applies }G_1\text{ first}\)[(O2.5)](#eq-orientation-02-amplitudes-measurement-and-gates-5)
Notation contract: Basis order (|0>, |1>); column vectors; gates act right-to-left in products; global phase equivalence must be stated explicitly.

## Changing the question changes the statistics

Express X-basis measurement as a basis rotation followed by Z measurement.

A small statevector simulator is the reference implementation of everything in this guide:

```
state: complex vector
gate: unitary matrix
operation: state <- gate * state
measurement: sample according to squared magnitudes

```

Four ideas, each one line. This approach will not scale; the vector doubles with every qubit; but it is the right way to build early correctness, and Part V has you write one from scratch.

On a real device there are no matrices; there are pulses, fields, voltages, lasers, and optical elements, each engineered to approximate a target unitary. A symbolic \(H\) in your circuit becomes hardware-specific control, and the approximation is never exact. The questions that determine whether the math survives contact with the machine:

- What gate set is native to the device?

- How long does each gate take?

- What is the measured error rate per gate?

- How many extra gates does compilation add?

- Does limited connectivity force swap operations?

- Does calibration drift change behavior over hours or days?

## A one-qubit calculation protocol

Turn the arithmetic into a reusable checklist and diagnostic.

Use the first failed invariant to choose the next page.

- [Complex amplitudes](/playground/quantum/book/08-complex-numbers-for-quantum-computing/) for conjugation and phase errors.

- [Vectors and basis order](/playground/quantum/book/09-vectors-bases-and-amplitudes/) for coordinate errors.

- [Matrix execution](/playground/quantum/book/11-matrices-as-gates/) for multiplication-order errors.

- [Multi-qubit circuits](/playground/quantum/book/orientation-03-multi-qubit-circuits-entanglement-and-no-hype/) after the state and probability checks pass.

- Normalize \([\sqrt2,0]\), \([1,-1]\), and \([\sqrt2,\sqrt2 i]\).

- Apply \(X\), \(Z\), \(H\), and \(S\) to both \(\lvert0\rangle\) and \(\lvert1\rangle\).

- Compute \(HZH\lvert0\rangle\) and identify the familiar gate you just built.

- Show that \(X^2=I\) and \(Z^2=I\).

- Write down two states with identical computational-basis probabilities but different outcomes after a Hadamard.

- Write pseudocode for a one-qubit statevector simulator.

- Explain why a shot histogram is not the same thing as a quantum state.

Part II of the book turns this working session into a complete toolkit:

- [Complex Numbers for Quantum Computing](/playground/quantum/book/08-complex-numbers-for-quantum-computing/); the arithmetic of phase, done properly.

- [Vectors, Bases, and Amplitudes](/playground/quantum/book/09-vectors-bases-and-amplitudes/); the state space as a vector space.

- [Matrices as Gates](/playground/quantum/book/11-matrices-as-gates/); unitary transformations beyond one qubit's worth of intuition.

- [Interference as Engine of Quantum Algorithms](/playground/quantum/book/06-interference-as-engine-of-quantum-algorithms/); the engine, examined under load.

Then continue to [Multi-Qubit Circuits, Entanglement, and No-Hype Protocols](/playground/quantum/book/orientation-03-multi-qubit-circuits-entanglement-and-no-hype/), where a second qubit changes the game entirely.

## One-qubit calculation notebook

Acceptance contract for One-qubit calculation notebook
 | Field | Reader-visible record

 | Format | Tested Python notebook plus printable hand-calculation grid
 | Verification | Tests verify normalization after every gate, H²=I, HZH=X, and exact probabilities for the guide's examples.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "One-qubit calculation notebook",
  "format": "Tested Python notebook plus printable hand-calculation grid",
  "acceptance_test": "Tests verify normalization after every gate, H²=I, HZH=X, and exact probabilities for the guide's examples.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Scope boundary

- This guide does not cover mixed states, tomography, or multi-qubit entanglement.

- It does not treat a statevector simulator's private state as physically readable output.

Depth commitment. Two complete calculations, four gate definitions, and one reusable protocol.

Practice problem

Trace |0> through S, H, Z, and H in the stated order, checking normalization after each operation and predicting Z-basis outcomes.

** Deliverable** : A state-after-each-gate table with exact complex entries and final probabilities.

** Pass condition** : Each row equals the notebook fixture; norms equal one and probabilities sum to one.

Verification record

Expected solution form. Exact symbolic table followed by a numerical tolerance check.

Model answer. In circuit time order, |0> remains |0> after S, becomes |+> after H, becomes |-> after Z, and becomes |1> after the final H. Every intermediate norm is one; the final Z-basis result is 1 with certainty.

Model result and check. The notebook independently evaluates the matrix product and compares every row to the published solution.

Acceptance test. Each row equals the notebook fixture; norms equal one and probabilities sum to one.

External review. Open.

Expertise still needed. Quantum information theorist comfortable with one-qubit linear algebra; Scientific-computing reviewer able to verify notebook fixtures and floating-point tolerances.

Provenance

## Sources and review

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=orientation-02-amplitudes-measurement-and-gates#report)

Dependency graph

## Prerequisites for this chapter

- [Computation, Information, and Qubits Orientation guide](/playground/quantum/book/orientation-01-computation-information-and-qubits/)

- [Complex Numbers for Quantum Computing Part II. Mathematical Core · Chapter 8](/playground/quantum/book/08-complex-numbers-for-quantum-computing/)

Continue the thread

## Next concepts from this chapter

- [Multi-Qubit Circuits, Entanglement, and No-Hype Protocols Orientation guide](/playground/quantum/book/orientation-03-multi-qubit-circuits-entanglement-and-no-hype/)

- [How to Use This Book Orientation · Guide 00](/playground/quantum/book/00-how-to-use-the-book-layer/)

- [Quantum Algorithms and Speedups Orientation guide](/playground/quantum/book/orientation-04-quantum-algorithms-and-speedups/)

[Previous Computation, Information, and Qubits](/playground/quantum/book/orientation-01-computation-information-and-qubits/)[Next Multi-Qubit Circuits, Entanglement, and No-Hype Protocols](/playground/quantum/book/orientation-03-multi-qubit-circuits-entanglement-and-no-hype/)

In this chapter

- [Declare the vector before touching a gate](#declare-the-vector-before-touching-a-gate)

- [Four matrices, one execution order](#four-matrices-one-execution-order)

- [X gate](#x-gate)

- [Z gate](#z-gate)

- [H gate](#h-gate)

- [S gate](#s-gate)

- [The HZH phase detector](#the-hzh-phase-detector)

- [Changing the question changes the statistics](#changing-the-question-changes-the-statistics)

- [A one-qubit calculation protocol](#a-one-qubit-calculation-protocol)

- [One-qubit calculation notebook](#one-qubit-calculation-notebook)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 3 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=orientation-02-amplitudes-measurement-and-gates#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/orientation-02-amplitudes-measurement-and-gates/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/orientation-03-multi-qubit-circuits-entanglement-and-no-hype/ -->

# Multi-Qubit Circuits, Entanglement, and No-Hype Protocols

Add a second qubit and the state space stops being a collection of independent parts: gates become conditional, correlations appear that no local description can reproduce, and the word entanglement earns its keep. This guide builds the smallest entangling circuit by hand and strips the hype from the three protocols everyone name-drops.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. What changes mathematically and operationally when a second qubit joins a circuit?

The state space becomes a tensor product with one amplitude per joint basis state; controlled gates can create states that do not factor into independent qubits, producing correlations that require joint comparison but cannot carry a chosen faster-than-light message.

Scope and non-goals.

- Stronger forms of Bell's theorem and multipartite entanglement classification belong to specialized treatments.

- Teleportation, superdense coding, and no-cloning establish protocol constraints and capabilities—not general computational speedup.

[Figure O3.1.](#fig-orientation-03-multi-qubit-circuits-entanglement-and-no-hype-1) Notice what the meters cannot show you: each wire alone is a coin flip, yet the two flips always agree. The correlation lives in the pair, not in either qubit; and that is all entanglement means.

Prerequisites. orientation-02-amplitudes-measurement-and-gates, 13-tensor-products-and-state-space-growth

Notation used here. Basis order (|00>, |01>, |10>, |11>); left wire is the most-significant qubit; tensor-product and marginal notation declared.

## Four joint outcomes, one ordered basis

Build the two-qubit coordinate system and state the endianness convention.

Multi-qubit computing is where the state space grows exponentially, gates become conditional, and entanglement appears. It is also where bad explanations become tempting, so this guide keeps four disciplines in view throughout:

- Combine systems with tensor products, never with wishful notation.

- Use multi-qubit gates to create correlations that no collection of independent one-qubit states can represent.

- Use measurement to extract classical data; and expect it to destroy the rest.

- Respect no-signaling: entanglement never sends usable information faster than light.

For two qubits, this book uses a fixed ordering, and the fixedness matters:

\(\begin{aligned}\lvert00\rangle&=\begin{pmatrix}1\\0\\0\\0\end{pmatrix},&\lvert01\rangle&=\begin{pmatrix}0\\1\\0\\0\end{pmatrix},&\lvert10\rangle&=\begin{pmatrix}0\\0\\1\\0\end{pmatrix},&\lvert11\rangle&=\begin{pmatrix}0\\0\\0\\1\end{pmatrix}.\end{aligned}\)[(O3.1)](#eq-orientation-03-multi-qubit-circuits-entanglement-and-no-hype-1)

A general two-qubit pure state is \(\lvert\psi\rangle=a_{00}\lvert00\rangle+a_{01}\lvert01\rangle+a_{10}\lvert10\rangle+a_{11}\lvert11\rangle\), with the squared magnitudes of the four amplitudes summing to one. Most early mistakes in multi-qubit work are ordering mistakes; decide the convention once and never improvise it again.

Combining two one-qubit states multiplies every component of the first vector by every component of the second:

\(\begin{pmatrix}a\\b\end{pmatrix}\otimes\begin{pmatrix}c\\d\end{pmatrix}=\begin{pmatrix}ac\\ad\\bc\\bd\end{pmatrix}\)[(O3.2)](#eq-orientation-03-multi-qubit-circuits-entanglement-and-no-hype-2)

Worked through on basis states:

\(\lvert0\rangle\otimes\lvert1\rangle=\begin{pmatrix}1\\0\end{pmatrix}\otimes\begin{pmatrix}0\\1\end{pmatrix}=\begin{pmatrix}0\\1\\0\\0\end{pmatrix}=\lvert01\rangle\)[(O3.3)](#eq-orientation-03-multi-qubit-circuits-entanglement-and-no-hype-3)

Two qubits give a four-dimensional state space; ten give a thousand; three hundred give more amplitudes than there are atoms in the observable universe. That growth is the source of both the excitement and the simulation cost.

Evidence boundary. Composite quantum systems are represented by tensor-product state spaces. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## CNOT as a branch-dependent permutation

Trace all basis inputs before applying it to a superposition.

CNOT uses the first qubit as control and the second as target, flipping the target exactly when the control is `1`:

\(\begin{aligned}\lvert00\rangle&\mapsto\lvert00\rangle,&\lvert01\rangle&\mapsto\lvert01\rangle,\\\lvert10\rangle&\mapsto\lvert11\rangle,&\lvert11\rangle&\mapsto\lvert10\rangle.\end{aligned}\)[(O3.4)](#eq-orientation-03-multi-qubit-circuits-entanglement-and-no-hype-4)

As a matrix in the fixed basis ordering:

\(\operatorname{CNOT}=\begin{pmatrix}1&0&0&0\\0&1&0&0\\0&0&0&1\\0&0&1&0\end{pmatrix}\)[(O3.5)](#eq-orientation-03-multi-qubit-circuits-entanglement-and-no-hype-5)

It is the quantum version of an if-statement, and because it is linear it acts on superpositions branch by branch; which is exactly how the next example manufactures entanglement.

A two-qubit product state factors into independent one-qubit states, \((a\lvert0\rangle+b\lvert1\rangle)\otimes(c\lvert0\rangle+d\lvert1\rangle)\), which expands to \(ac\lvert00\rangle+ad\lvert01\rangle+bc\lvert10\rangle+bd\lvert11\rangle\). Compare the coefficients and you get a test: a two-qubit pure state is separable only if its amplitudes satisfy

\(a_{00}a_{11}=a_{01}a_{10}\)[(O3.6)](#eq-orientation-03-multi-qubit-circuits-entanglement-and-no-hype-6)

For \(\Phi^+\), the left side is \((1/\sqrt2)(1/\sqrt2)=1/2\) and the right side is \(0\cdot0=0\). The test fails, so no choice of local one-qubit states can reproduce the joint state. That is the whole definition: entangled means not factorable. No distance, no drama, just algebra.

A classical random process can also produce correlated bits; `00` half the time, `11` half the time; and in one measurement basis that looks exactly like the Bell state. The difference shows up when you measure in other bases: Bell states produce structured correlations there too, and no classical local hidden-variable model can reproduce the full set of statistics observed in Bell-type experiments.

For computation the practical point is simpler still: entanglement means the joint state cannot be represented as independent local states. It is a state-space and correlation-structure resource; not a communication loophole, and not evidence that the universe is whispering between particles.

Evidence boundary. A Hadamard followed by CNOT creates a Bell state that cannot be factored into independent one-qubit states. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## The factorization test on a Bell pair

Show algebraically why the output cannot be written as two independent states.

The correlations are real, but they carry no controllable message. Three facts close every loophole:

- Each local measurement outcome is individually random.

- The correlation becomes visible only when the two parties compare classical records.

- Comparing records requires ordinary, slower-than-light classical communication.

Teleportation respects the same rule. It transfers an unknown quantum state using a shared entangled pair plus two classical bits, and the receiver cannot reconstruct anything until the classical bits arrive. Relativity survives quantum mechanics intact.

Suppose a universal cloning operation \(U\) existed, with \(U\lvert\psi\rangle\lvert0\rangle=\lvert\psi\rangle\lvert\psi\rangle\) for any state \(\lvert\psi\rangle\). Applied to two different inputs it would give \(U\lvert a\rangle\lvert0\rangle=\lvert a\rangle\lvert a\rangle\) and \(U\lvert b\rangle\lvert0\rangle=\lvert b\rangle\lvert b\rangle\).

Unitary operations preserve inner products. Before cloning, the inner product of the two input states is \(\langle a\vert b\rangle\), since the blank state contributes a factor of one. After cloning it is \((\langle a\vert b\rangle)^2\). Preservation demands \(\langle a\vert b\rangle=(\langle a\vert b\rangle)^2\), which holds only when the states are identical or perfectly distinguishable; never for arbitrary unknown states.

So universal cloning is impossible, and the proof is three lines of linear algebra. This is not an engineering limitation awaiting a clever fix; it is a theorem, and Part III shows how the field turns it from a constraint into a security resource.

Evidence boundary. Bell correlations do not allow controllable faster-than-light signaling. [John S. Bell](https://doi.org/10.1103/PhysicsPhysiqueFizika.1.195) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

\(B=(\lvert00\rangle,\lvert01\rangle,\lvert10\rangle,\lvert11\rangle)\)[(O3.7)](#eq-orientation-03-multi-qubit-circuits-entanglement-and-no-hype-7)
Notation contract: Basis order (|00>, |01>, |10>, |11>); left wire is the most-significant qubit; tensor-product and marginal notation declared.

## Local randomness and joint structure

Separate marginal statistics from correlations observed after classical comparison.

### Superdense coding

Resource: one shared Bell pair, plus one qubit sent from Alice to Bob.

Outcome: Bob recovers two classical bits from Alice's single transmitted qubit.

Operational boundary:

- A physical qubit still makes the trip.

- Relativistic signaling limits remain intact.

- It spends pre-shared entanglement; the pair is consumed.

### Teleportation

Resource: one shared Bell pair, plus two classical bits sent from Alice to Bob.

Outcome: Bob reconstructs Alice's unknown qubit state.

Operational boundary:

- The protocol moves a qubit state rather than an object.

- Alice's original is destroyed, as no-cloning requires.

- Completion waits for the classical bits to arrive.

### BB84 and quantum key distribution

Resource: quantum states prepared in non-commuting bases, plus an authenticated classical channel.

Outcome: a shared key with eavesdropping detection, under clearly stated assumptions about the devices and the channel.

What it does not replace: the migration to post-quantum cryptography across ordinary internet infrastructure, which solves a different problem for a fraction of the operational cost. Part VIII weighs both honestly.

Entangling gates are usually the hard part of a machine. One-qubit rotations are comparatively easy; making two qubits interact strongly enough to entangle, while keeping cross-talk, leakage, calibration drift, and measurement error under control, is where modalities differ. The questions that matter:

- What is the native entangling gate?

- What is its measured fidelity?

- How does that fidelity change as the system grows?

- How connected are the qubits?

- Does routing force long chains of swap gates?

- Can error-correction cycles run fast enough to keep up?

Entanglement is necessary for many quantum advantages, but it is never sufficient by itself. The weak version of an application claim runs: "this uses entanglement, so it will beat classical computing." The strong version names the problem structure being exploited, the algorithm that exploits it, the hardware that can run the circuit within error limits, and the classical baseline that loses under stated assumptions. Anything between those two poles is marketing.

## Protocol contracts without supernatural payloads

List the resources and outputs of cloning, dense coding, and teleportation claims.

Continue with the artifact that uses the correlation you can now calculate.

- [Register traces](/playground/quantum/book/19-multi-qubit-circuits/) when basis indexing is still the failure.

- [Bell and GHZ states](/playground/quantum/book/20-bell-states-and-ghz-states/) for preparation and joint statistics.

- [Teleportation](/playground/quantum/book/25-teleportation/) for a branch-conditioned protocol trace.

- [QKD](/playground/quantum/book/26-quantum-key-distribution/) for a sampled security protocol.

- [Algorithmic speedups](/playground/quantum/book/orientation-04-quantum-algorithms-and-speedups/) after factorization and marginals pass.

- Compute \(\lvert1\rangle\otimes\lvert0\rangle\) in the fixed basis ordering.

- Write CNOT's action on all four two-qubit basis states from memory.

- Derive the Bell state from \(\lvert00\rangle\) using \(H\) on the first qubit and then CNOT.

- Test whether \((\lvert00\rangle+\lvert01\rangle)/\sqrt2\) is entangled.

- Test whether \((\lvert00\rangle+\lvert11\rangle)/\sqrt2\) is entangled.

- Explain why no-cloning does not prevent copying classical bits.

- Explain teleportation to a technical audience without science-fiction language.

- Pick a hardware company and identify its main entangling operation or error-correction route.

Part III of the book gives each of these ideas a full chapter:

- [Multi-Qubit Circuits](/playground/quantum/book/19-multi-qubit-circuits/); the circuit model at full size.

- [Bell States and GHZ States](/playground/quantum/book/20-bell-states-and-ghz-states/); the entangled states worth knowing by name.

- [Teleportation](/playground/quantum/book/25-teleportation/); the protocol, gate by gate.

- [Quantum Key Distribution](/playground/quantum/book/26-quantum-key-distribution/); BB84 and what it actually secures.

Then continue to [Quantum Algorithms and Speedups](/playground/quantum/book/orientation-04-quantum-algorithms-and-speedups/), where entanglement and interference are put to work.

## Two-qubit state inspector

Acceptance contract for Two-qubit state inspector
 | Field | Reader-visible record

 | Format | Interactive tensor/factorization tool with a deterministic test suite
 | Verification | Fixtures verify basis ordering, Bell-state amplitudes, reduced local probabilities, and failed rank-one factorization.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Two-qubit state inspector",
  "format": "Interactive tensor/factorization tool with a deterministic test suite",
  "acceptance_test": "Fixtures verify basis ordering, Bell-state amplitudes, reduced local probabilities, and failed rank-one factorization.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Scope boundary

- Stronger forms of Bell's theorem and multipartite entanglement classification belong to specialized treatments.

- Teleportation, superdense coding, and no-cloning establish protocol constraints and capabilities—not general computational speedup.

Depth commitment. One Bell trace, one factorization proof, one marginal calculation, and three protocol contracts.

Practice problem

Given three two-qubit statevectors, determine which factor, construct factors when they exist, and compute each qubit's marginal probabilities.

```
u = (1,0,0,0)
v = (1,0,0,1)/sqrt(2)
w = (0,1,1,0)/sqrt(2)
basis order = |00>, |01>, |10>, |11>
```

** Deliverable** : A factorization worksheet with coefficient equations, factors, and local marginals.

** Pass condition** : A rank-one coefficient-matrix check independently classifies all three states and matches the worksheet.

Verification record

Expected solution form. Algebraic solution plus a four-line matrix-rank verification.

Model answer. u factors as |0> tensor |0> and its reshaped matrix has rank one. v and w have rank two, hence do not factor; each has uniform one-qubit marginals even though its joint outcomes are perfectly correlated or anticorrelated in Z.

Model result and check. The verifier reshapes each vector to \(2\times2\) and checks determinant/rank and marginal distributions.

Acceptance test. A rank-one coefficient-matrix check independently classifies all three states and matches the worksheet.

External review. Open.

Expertise still needed. Quantum information theorist specializing in entanglement and no-signaling; Quantum networking researcher able to review resource contracts for named protocols.

Provenance

## Sources and review

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [John S. Bell. On the Einstein Podolsky Rosen paradox. Physics Physique Fizika. 1964](https://doi.org/10.1103/PhysicsPhysiqueFizika.1.195) primary paper

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=orientation-03-multi-qubit-circuits-entanglement-and-no-hype#report)

Dependency graph

## Prerequisites for this chapter

- [Amplitudes, Measurement, and Gates Orientation guide](/playground/quantum/book/orientation-02-amplitudes-measurement-and-gates/)

- [Tensor Products and State-Space Growth Part II. Mathematical Core · Chapter 13](/playground/quantum/book/13-tensor-products-and-state-space-growth/)

Continue the thread

## Next concepts from this chapter

- [Quantum Algorithms and Speedups Orientation guide](/playground/quantum/book/orientation-04-quantum-algorithms-and-speedups/)

- [Noise, Error Correction, and Fault Tolerance Orientation guide](/playground/quantum/book/orientation-05-noise-error-correction-and-fault-tolerance/)

- [Computation, Information, and Qubits Orientation guide](/playground/quantum/book/orientation-01-computation-information-and-qubits/)

[Previous Amplitudes, Measurement, and Gates](/playground/quantum/book/orientation-02-amplitudes-measurement-and-gates/)[Next Quantum Algorithms and Speedups](/playground/quantum/book/orientation-04-quantum-algorithms-and-speedups/)

In this chapter

- [Four joint outcomes, one ordered basis](#four-joint-outcomes-one-ordered-basis)

- [CNOT as a branch-dependent permutation](#cnot-as-a-branch-dependent-permutation)

- [The factorization test on a Bell pair](#the-factorization-test-on-a-bell-pair)

- [Local randomness and joint structure](#local-randomness-and-joint-structure)

- [Superdense coding](#superdense-coding)

- [Teleportation](#teleportation)

- [BB84 and quantum key distribution](#bb84-and-qkd)

- [Protocol contracts without supernatural payloads](#protocol-contracts-without-supernatural-payloads)

- [Two-qubit state inspector](#two-qubit-state-inspector)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=orientation-03-multi-qubit-circuits-entanglement-and-no-hype#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/orientation-03-multi-qubit-circuits-entanglement-and-no-hype/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/orientation-04-quantum-algorithms-and-speedups/ -->

# Quantum Algorithms and Speedups

A quantum algorithm is a bet that a problem's hidden structure can be turned into interference. This guide shows the bet being placed — phase kickback, Bernstein-Vazirani, Grover computed amplitude by amplitude, Shor as period finding — and then asks the question that decides whether any of it matters: what does the best classical method do?

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. What must be proved before a quantum algorithm's mathematical speedup becomes a credible performance claim?

A credible claim identifies the problem promise, shows how phase and interference expose its structure, separates query complexity from gate and data costs, gives success probability and classical post-processing, and compares the total workflow with the best relevant classical method.

Scope and non-goals.

- This guide does not teach full proofs of every named algorithm or forecast commercial advantage.

- It does not treat oracle access, state preparation, or error correction as free.

[Figure O4.1.](#fig-orientation-04-quantum-algorithms-and-speedups-1) Notice the shape of the quantum curve, not just its position: a quadratic speedup bends, while an exponential one would fall away. Notice also what the plot omits; constant factors, error correction, and loading; which is where real speedup claims live or die.

Prerequisites. orientation-03-multi-qubit-circuits-entanglement-and-no-hype, 27-oracles-and-query-complexity

Notation used here. Use N for search-space size, M for marked items, Q for oracle queries, G for compiled gate cost, and p_success for success probability.

## The contract hidden inside a speedup

Identify input promises, oracle access, output, and success probability.

Superposition alone does not make a quantum algorithm powerful. Power comes when a problem has structure that a circuit can expose through interference, phase, and measurement. Superposition is the stage; interference is the actor; the problem's structure is the script.

So the serious question is always the same pair: what structure is being exploited, and what is the best classical baseline? A speedup claim that cannot answer both is not yet a claim; it is a mood.

Most introductory quantum algorithms follow one pattern:

- Prepare a simple initial state.

- Create superposition over candidate inputs.

- Query an oracle or simulate a structured operation.

- Use interference to push amplitude toward useful outcomes.

- Measure.

- Interpret the result classically.

The circuit is only half the story. The other half is the promise: what you are allowed to assume about the problem. Algorithms that look identical on paper diverge completely once you ask what the oracle costs to build.

Many textbook results are stated in query complexity; how many times the algorithm calls a black-box oracle. That is a clean way to prove separation between models. It is not the same as time on hardware.

End-to-end runtime also includes:

- state preparation

- oracle construction

- compilation to a native gate set

- circuit depth against coherence time

- error correction overhead

- measurement shots and repetitions

- classical pre- and post-processing

- data loading

- verification of the answer

The rule for builders and investors: a query speedup is not a product until the full workflow beats the best classical alternative. Part V's resource-estimation chapters exist to put numbers on every line of this list.

Evidence boundary. Quantum query complexity can differ from total runtime because an oracle call hides implementation cost. [Ethan Bernstein](https://doi.org/10.1137/S0097539796300921) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Phase kickback as information routing

Trace a one-bit oracle into relative phase.

Phase kickback is the first idea that makes quantum algorithms feel genuinely different from classical ones. An oracle computes \(U_f\lvert x\rangle\lvert y\rangle=\lvert x\rangle\lvert y\oplus f(x)\rangle\); it writes the function value into a target qubit. Prepare that target in \(\lvert-\rangle=(\lvert0\rangle-\lvert1\rangle)/\sqrt2\) and something subtle happens:

\(U_f\lvert x\rangle\lvert-\rangle=(-1)^{f(x)}\lvert x\rangle\lvert-\rangle\)[(O4.1)](#eq-orientation-04-quantum-algorithms-and-speedups-1)

The target comes out unchanged, and the function value lands in the phase of the input register instead. The information you asked for has been kicked back into a sign; and a sign can interfere, which a classical bit sitting in a register never does. Nearly every algorithm in this guide is phase kickback plus a clever way to read the sign.

Grover's algorithm searches an unstructured space of \(N\) items with \(M\) marked ones using about \(O(\sqrt{N/M})\) oracle queries, against \(O(N/M)\) for the best classical worst case. It is one of the most robust results in the field; and it is quadratic, not exponential. It also assumes an oracle that recognizes a marked item efficiently, and building that oracle is often where practical advantage goes to die.

Evidence boundary. Amplitude amplification gives a quadratic query improvement for unstructured search under its oracle model. [Lov K. Grover](https://doi.org/10.1145/237814.237866) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## A quadratic rotation and an exponential separation

Contrast Grover's geometry with period/hidden-structure algorithms.

The QFT is the discrete Fourier transform applied to amplitudes rather than to a classical data vector. Its importance is not that it "does Fourier faster"; you cannot read out the coefficients. Its importance is that it exposes periodic structure encoded in a quantum state, converting hidden periodicity into measurable peaks.

It sits at the center of phase estimation, period finding, Shor's factoring algorithm, and the hidden-subgroup family. When a quantum algorithm seems to pull structure out of nowhere, the QFT is usually the mechanism doing the pulling.

Given a unitary with \(U\lvert u\rangle=e^{2\pi i\phi}\lvert u\rangle\), phase estimation extracts the eigenphase \(\phi\) as classical bits. It converts phase; the thing measurement normally hides; into output you can keep.

It is a foundation of Shor's algorithm and of most fault-tolerant simulation methods. The caveat is cost: useful phase estimation typically needs deep, coherent circuits, which pushes it firmly toward fault-tolerant hardware rather than today's devices.

Shor's algorithm (1994) factors an integer by reducing factoring to finding a period:

- Choose an integer \(a\) with \(1<a<N\).

- Consider the periodic function \(f(x)=a^x\bmod N\).

- Use quantum period finding; phase estimation plus the QFT; to estimate the period \(r\).

- Use classical number theory to recover factors from \(r\) when conditions are favorable.

The quantum part never tries factors. It extracts periodic structure that no known classical algorithm can extract efficiently. The strategic consequences are real: a large fault-tolerant quantum computer running Shor breaks RSA and elliptic-curve cryptography, which is why post-quantum cryptography migration is already prudent; while the hardware to threaten production keys remains far beyond current general-purpose systems. Both halves of that sentence deserve equal emphasis.

Evidence boundary. Period-finding and hidden-structure algorithms derive stronger separations from problem promises and Fourier sampling. [Peter W. Shor](https://doi.org/10.1137/S0097539795293172) [Daniel R. Simon](https://doi.org/10.1137/S0097539796298637) [John Preskill](https://www.preskill.caltech.edu/ph219/)

\(N,M,Q,G\in\mathbb N,\qquad p_{\mathrm{success}}\in[0,1]\)[(O4.2)](#eq-orientation-04-quantum-algorithms-and-speedups-2)
Notation contract: Use N for search-space size, M for marked items, Q for oracle queries, G for compiled gate cost, and p_success for success probability.

## Four ledgers behind one asymptotic symbol

Separate queries, gates, data movement, and classical work.

Hamiltonian simulation asks how a quantum system evolves over time; and since nature is quantum, this is the most native workload a quantum computer can have. The application areas are chemistry, materials, catalysis, superconductivity, magnetic systems, and energy-related materials.

The serious questions are concrete: which Hamiltonian, at what precision, in what encoding, needing how many logical qubits and how many reliable operations; and what classical approximation method is the baseline? That last question is the one most often skipped, because classical simulation methods are formidable competitors.

Variational algorithms pair a parameterized quantum circuit with a classical optimizer: choose parameters, run the circuit, measure an objective, update, repeat. VQE targets chemistry-style objectives, QAOA targets optimization-style ones, and quantum machine-learning circuits follow the same loop.

The appeal is real: these algorithms tolerate shallow circuits, which makes them the friendliest option for noisy near-term hardware, and they slot naturally into hybrid workflows. The caution is equally real:

- The optimization surface can be hard to train; barren plateaus flatten gradients.

- Noise can dominate the measured objective.

- Classical heuristics are strong and constantly improving.

- Data loading can erase any advantage.

- A good demo does not automatically become product value.

Part IV and Part VIII return to these algorithms with the benchmark discipline they require.

## From theorem to workload claim

Apply a baseline and evidence checklist to one proposed use.

Route by the missing line in the cost ledger.

- [Oracle and query contracts](/playground/quantum/book/27-oracles-and-query-complexity/) when access cost is hidden.

- [Promise-problem traces](/playground/quantum/book/28-deutsch-deutsch-jozsa-and-bernstein-vazirani/) for exact small separations.

- [Hidden-structure sampling](/playground/quantum/book/29-simon-and-hidden-structure/) for rank and classical post-processing.

- [Amplitude amplification](/playground/quantum/book/30-grover-and-amplitude-amplification/) for quadratic search accounting.

- [QFT](/playground/quantum/book/31-quantum-fourier-transform/), [phase estimation](/playground/quantum/book/32-phase-estimation/), and [period finding](/playground/quantum/book/33-shor-as-period-finding/) for phase-based algorithms.

- [Noise and fault tolerance](/playground/quantum/book/orientation-05-noise-error-correction-and-fault-tolerance/) when the logical trace passes but physical feasibility does not.

For any algorithm claim, nine questions:

- What is the exact problem statement?

- What promise or structure does it exploit?

- What is the quantum subroutine?

- What is the classical baseline?

- Is the speedup in query complexity or in full runtime?

- What data must be loaded, and at what cost?

- How is the answer verified?

- What hardware assumptions are required?

- How many logical qubits and reliable operations does it need?

A claim that answers all nine is rare; and instantly more credible than a headline.

- Explain phase kickback in your own words, without the word "spooky".

- Derive the Bernstein-Vazirani result for \(s=10\).

- Redo the four-item Grover calculation with marked item \(\lvert01\rangle\).

- Explain why Grover is quadratic rather than exponential, in one paragraph.

- Explain Shor's algorithm as period finding to a colleague who knows RSA but no quantum mechanics.

- Pick one application paper and identify whether it relies on phase estimation, Hamiltonian simulation, variational circuits, or another primitive.

- Write a one-page diligence note on a claimed quantum optimization application, using the nine-question checklist.

## Speedup claim ledger

Acceptance contract for Speedup claim ledger
 | Field | Reader-visible record

 | Format | Machine-readable worksheet plus two populated algorithm cases
 | Verification | Schema test rejects claims missing promise, oracle cost, success probability, end-to-end resources, or named classical baseline.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Speedup claim ledger",
  "format": "Machine-readable worksheet plus two populated algorithm cases",
  "acceptance_test": "Schema test rejects claims missing promise, oracle cost, success probability, end-to-end resources, or named classical baseline.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Scope boundary

- This guide does not teach full proofs of every named algorithm or forecast commercial advantage.

- It does not treat oracle access, state preparation, or error correction as free.

Depth commitment. One oracle trace, one Grover resource case, one hidden-structure comparison, and a reusable ledger.

Practice problem

Audit a claim that Grover provides a quadratic application speedup when state preparation costs Θ(N) and verification costs vary.

```
Classical search: C(N)=N/2 expected oracle calls.
Claimed Grover component: Q(N)=ceil(pi*sqrt(N)/4).
State preparation: P(N)=N operations per prepared instance.
Regime A: one search per preparation. Regime B: R searches amortize one preparation.
Verification: V=1 for a direct predicate; V=N for a full output audit.
```

** Deliverable** : A completed four-ledger worksheet and a conditional conclusion.

** Pass condition** : The model answer computes at least two end-to-end regimes and changes its conclusion when preparation is or is not amortized.

Verification record

Expected solution form. Two-case resource table with algebraic break-even conditions.

Model answer. With one preparation, \(P(N)+Q(N)+V=\Theta(N)\) even when verification is constant, so the application has no asymptotic quadratic advantage. With \(R\) reused searches, preparation contributes \(N/R\) per search; it falls below the Grover term only when \(R\) grows faster than \(\sqrt{N}\). An \(O(N)\) verification removes the advantage in either regime.

Model result and check. A symbolic fixture evaluates the stated cost functions and verifies the conclusion in both regimes.

Acceptance test. The model answer computes at least two end-to-end regimes and changes its conclusion when preparation is or is not amortized.

External review. Open.

Expertise still needed. Quantum algorithms researcher with query-complexity expertise; Performance engineer experienced in end-to-end cost models and classical baselines.

Provenance

## Sources and review

- [Ethan Bernstein and Umesh Vazirani. Quantum complexity theory. SIAM Journal on Computing. 1997](https://doi.org/10.1137/S0097539796300921) primary paper

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [Lov K. Grover. A fast quantum mechanical algorithm for database search. Proceedings of STOC. 1996](https://doi.org/10.1145/237814.237866) primary paper

- [Peter W. Shor. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Journal on Computing. 1997](https://doi.org/10.1137/S0097539795293172) primary paper

- [Daniel R. Simon. On the power of quantum computation. SIAM Journal on Computing. 1997](https://doi.org/10.1137/S0097539796298637) primary paper

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=orientation-04-quantum-algorithms-and-speedups#report)

Dependency graph

## Prerequisites for this chapter

- [Multi-Qubit Circuits, Entanglement, and No-Hype Protocols Orientation guide](/playground/quantum/book/orientation-03-multi-qubit-circuits-entanglement-and-no-hype/)

- [Oracles and Query Complexity Part IV. Protocols and Algorithms · Chapter 27](/playground/quantum/book/27-oracles-and-query-complexity/)

Continue the thread

## Next concepts from this chapter

- [Hardware Architecture and the Full Stack Orientation guide](/playground/quantum/book/orientation-06-hardware-architecture-and-the-full-stack/)

- [Applications, Evidence, and Strategy Orientation guide](/playground/quantum/book/orientation-07-applications-evidence-and-strategy/)

- [Noise, Error Correction, and Fault Tolerance Orientation guide](/playground/quantum/book/orientation-05-noise-error-correction-and-fault-tolerance/)

[Previous Multi-Qubit Circuits, Entanglement, and No-Hype Protocols](/playground/quantum/book/orientation-03-multi-qubit-circuits-entanglement-and-no-hype/)[Next Noise, Error Correction, and Fault Tolerance](/playground/quantum/book/orientation-05-noise-error-correction-and-fault-tolerance/)

In this chapter

- [The contract hidden inside a speedup](#the-contract-hidden-inside-a-speedup)

- [Phase kickback as information routing](#phase-kickback-as-information-routing)

- [A quadratic rotation and an exponential separation](#a-quadratic-rotation-and-an-exponential-separation)

- [Four ledgers behind one asymptotic symbol](#four-ledgers-behind-one-asymptotic-symbol)

- [From theorem to workload claim](#from-theorem-to-workload-claim)

- [Speedup claim ledger](#speedup-claim-ledger)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 6 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=orientation-04-quantum-algorithms-and-speedups#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/orientation-04-quantum-algorithms-and-speedups/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/orientation-05-noise-error-correction-and-fault-tolerance/ -->

# Noise, Error Correction, and Fault Tolerance

Every qubit ever built is leaking information into its environment right now. This guide explains why that leak is the central fact of the field, how quantum error correction works around no-cloning and measurement collapse, and which proof gates tell you whether a fault-tolerance roadmap is real.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How does quantum error correction turn noisy physical operations into a defensible logical reliability claim?

It repeatedly extracts syndromes without reading the encoded logical state, decodes those records under an explicit noise model, and applies or tracks corrections; fault tolerance is demonstrated only when logical error decreases with stronger encoding under realistic cycles and resources.

Scope and non-goals.

- This guide does not derive a complete surface-code threshold theorem or compare every code family.

- It does not equate error mitigation, a single encoded qubit, or a below-threshold component metric with fault-tolerant computation.

[Figure O5.1.](#fig-orientation-05-noise-error-correction-and-fault-tolerance-1) Notice that the syndrome node measures the error, not the state; that indirection is the entire trick. And notice the loop: correction must outrun the noise for as long as the computation runs, which is why decoder speed is a first-class engineering constraint.

Prerequisites. orientation-03-multi-qubit-circuits-entanglement-and-no-hype, 45-decoherence-and-error-channels

Notation used here. Use p_phys and p_L for physical and logical error probabilities; d for code distance; state whether cycles and measurements are perfect or noisy.

## Three ways quantum information is lost

Distinguish relaxation, dephasing, and operation/readout errors.

A quantum computer is useful only if quantum information survives long enough, and accurately enough, to compute. Noise is not an implementation detail to be mopped up later; it is the central engineering constraint, and the path from today's machines to useful ones runs through six stages:

- Physical qubits with measurable error rates.

- Error detection; noticing that something went wrong.

- Error correction; encoding information so errors can be undone.

- Logical qubits whose error rate beats any of their physical parts.

- Fault-tolerant operations that keep errors from spreading.

- Useful workloads priced in reliable logical operations.

Every serious hardware roadmap is a plan for walking these six steps. When you read one, find the step the company is actually on.

Classical bits can be copied, checked, and refreshed at will. Quantum states enjoy none of those luxuries: an unknown state cannot be copied, measurement can destroy the information you were protecting, and errors are continuous; an amplitude can drift by any amount, not just flip.

Quantum error correction works anyway, and it works indirectly:

- Encode one logical qubit into an entangled state of many physical qubits.

- Measure error syndromes; chosen so they reveal nothing about the encoded state itself.

- Infer the most likely error from the syndrome pattern.

- Correct it, or track the correction classically.

### T1: energy relaxation

\(T_1\) measures how quickly an excited state decays; in the simplest picture, how long before \(\lvert1\rangle\) relaxes toward \(\lvert0\rangle\). It sets a hard clock on everything you might compute.

### T2: dephasing

\(T_2\) measures how long phase coherence survives. Phase coherence is what makes interference possible, so dephasing quietly turns quantum behavior into classical-looking uncertainty; often before \(T_1\) decay ever arrives.

### Gate error

The operation the hardware performs differs from the operation you asked for. Per-gate error rates are the single most quoted number in the field, and the most easily gamed; always ask how they were measured.

### Readout error

The measurement reports the wrong classical result. Readout error poisons the final answer even when everything upstream went well.

### Leakage

Population escapes the two-level computational subspace into states your model pretends do not exist. Leakage is insidious because standard benchmarks can miss it entirely.

Evidence boundary. Quantum error correction uses syndrome measurements to learn error information without directly measuring the logical state. [Peter W. Shor](https://doi.org/10.1103/PhysRevA.52.R2493) [Andrew M. Steane](https://doi.org/10.1103/PhysRevLett.77.793) [Daniel Gottesman](https://arxiv.org/abs/quant-ph/9705052)

## Redundancy without copying the unknown state

Build the syndrome idea from parity checks.

 | Idea  | What it does  | What it does not do

 | Error mitigation  | Estimates or reduces bias in noisy results  | Does not protect a computation indefinitely
 | Error detection  | Notices that an error likely happened  | May only let you discard the run
 | Error correction  | Encodes information and actively reverses errors  | Costs overhead: many qubits, constant syndrome extraction
 | Fault tolerance  | Keeps operations from spreading errors uncontrollably  | Requires the full system stack, working together

Mitigation buys signal in near-term experiments. Correction is the only known route to deep, reliable algorithms. Confusing the two; on purpose or otherwise; is the most common way near-term results get oversold.

The simplest quantum code uses logical basis states \(\lvert0_L\rangle=\lvert000\rangle\) and \(\lvert1_L\rangle=\lvert111\rangle\). An arbitrary logical qubit becomes an entangled state:

\(\alpha\lvert0_L\rangle+\beta\lvert1_L\rangle=\alpha\lvert000\rangle+\beta\lvert111\rangle\)[(O5.1)](#eq-orientation-05-noise-error-correction-and-fault-tolerance-1)

If a bit flip strikes the second physical qubit, the state becomes \(\alpha\lvert010\rangle+\beta\lvert101\rangle\). Syndrome measurements can identify which qubit flipped; without ever learning \(\alpha\) or \(\beta\). The information was never in any one qubit, so inspecting the relationships between qubits leaves the encoded state untouched.

This code defeats bit flips only. Arbitrary quantum errors need more, which is where phase errors enter.

A phase flip leaves \(\lvert0\rangle\) alone and turns \(\lvert1\rangle\) into \(-\lvert1\rangle\). Think only in computational-basis bit values and the error is invisible; run interference and it changes the answer. A code that handles only bit flips handles half the error model. Real codes; Shor's nine-qubit code was the first; correct bit-like and phase-like errors together, and Part VI builds them properly.

Evidence boundary. Surface-code threshold claims are conditional on a noise model, decoder, geometry, and repeated syndrome cycles. [Austin G. Fowler et al.](https://doi.org/10.1103/PhysRevA.86.032324) [Earl T. Campbell](https://doi.org/10.1038/nature23460)

## One correction cycle on a clock

Trace data, ancilla, measurement, decoding, and feedback latency.

Stabilizers are observables that define the code space: the encoded state is the state every stabilizer leaves alone. Measuring them yields the syndrome; an expected pattern when nothing is wrong, a changed pattern when an error has moved the state out of the code space.

The stabilizer formalism is the working language of practical error correction because it turns "protect the state" into "watch a fixed set of parity checks"; something hardware can actually do, repeatedly, at speed.

Surface codes lead the field for two reasons: they need only local interactions on a 2D lattice; which real chips can provide; and they have a threshold. Below a certain physical error rate, making the code bigger makes the logical qubit better:

- Physical qubits sit on a lattice, data and ancilla interleaved.

- Syndrome measurement cycles run continuously.

- Code distance sets how many simultaneous errors the code tolerates.

- Below threshold, the logical error rate falls as distance grows.

The surface code is the front-runner, not the only path:

 | Approach  | Why it matters  | Key question

 | qLDPC codes  | Potentially far lower overhead than surface codes  | Can hardware support the connectivity they require?
 | Cat and bosonic codes  | Bias or structure errors inside oscillator states  | Does protection survive gates and full logical operations?
 | GKP codes  | Continuous-variable encoding with strong theoretical appeal  | Can the states be prepared, stabilized, and measured at scale?
 | Topological qubits  | Protection promised at the hardware level itself  | Is the evidence strong, and independently validated?
 | Erasure-based approaches  | Errors flagged by location are easier to correct  | Can fidelity and cycle time meet the requirements?

Evidence boundary. Fault-tolerance evidence requires logical error suppression as code strength increases, not only improved physical components. [Earl T. Campbell](https://doi.org/10.1038/nature23460) [National Academies of Sciences](https://doi.org/10.17226/25196)

\(p_{\mathrm{phys}},p_L\in[0,1],\qquad d\in\{1,3,5,\ldots\}\)[(O5.2)](#eq-orientation-05-noise-error-correction-and-fault-tolerance-2)
Notation contract: Use p_phys and p_L for physical and logical error probabilities; d for code distance; state whether cycles and measurements are perfect or noisy.

## Distance, threshold, and the suppression experiment

Define the evidence required for scaling protection.

Error correction produces a firehose of syndrome data, and a decoder; classical computation, running beside the quantum device; must infer likely errors fast enough to keep up. A decoder that falls behind is a correction scheme that fails in slow motion. The questions:

- How much syndrome data arrives per second?

- What is the latency budget per cycle?

- Does decoding actually run in real time?

- Does the decoder scale as code distance grows?

- Is it integrated with the hardware control stack?

Decoding is why error correction is a computer-science problem as much as a physics one.

Physical qubit count is a vanity metric. The meaningful question: how many reliable logical operations can the system execute? Useful algorithms need long sequences of logical gates with bounded failure probability, and every roadmap number; qubits, distances, cycle times; is ultimately in service of that one count.

Fault tolerance means the computation stays reliable even though every component fails at some bounded rate. It demands all of the following, working at once:

- encoded logical qubits

- fault-tolerant gate constructions

- continuous syndrome extraction

- real-time decoding

- magic-state preparation or another non-Clifford resource

- control systems, scheduling, and verification

No single chip result delivers it. A fault-tolerant computer is an engineered system, which is why Part VI ends with a chapter on systems engineering rather than on codes.

## The overhead ledger behind a logical operation

Connect physical error, cycles, decoder, and resources.

Choose the layer that first breaks the correction cycle.

- [Error channels](/playground/quantum/book/45-decoherence-and-error-channels/) when the physical noise model is missing.

- [Syndrome measurement](/playground/quantum/book/47-stabilizers-and-syndrome-measurement/) when parity information is unclear.

- [Small codes](/playground/quantum/book/48-repetition-bit-flip-phase-flip-and-shor-codes/) for a complete correction trace.

- [Surface-code scaling](/playground/quantum/book/49-surface-codes-and-threshold-intuition/) for distance and threshold claims.

- [Decoder latency](/playground/quantum/book/51-decoders-and-real-time-classical-control/) for control-loop budgets.

- [Hardware and the full stack](/playground/quantum/book/orientation-06-hardware-architecture-and-the-full-stack/) after the logical-cycle ledger closes.

For any application claim, the accounting includes:

- logical qubits required

- logical circuit depth

- non-Clifford gate count

- target logical error rate

- code distance that implies

- physical qubits per logical qubit

- runtime, decoder requirements, and classical compute

An application claim without resource estimates is, at best, early-stage. Part V teaches you to produce these numbers rather than merely demand them.

- Explain the difference between \(T_1\) and \(T_2\), and which one usually binds first.

- Explain why quantum error correction cannot simply copy a qubit three times.

- Work out the effect of a bit flip on each position of the three-qubit code.

- Explain why phase errors matter for interference.

- Compare mitigation and correction in a one-page table of your own.

- Pick one company with a public error-correction roadmap and identify its QEC strategy.

- Write proof gates for that company's fault-tolerance roadmap, in the style of the list above.

## Error-correction cycle explorer

Acceptance contract for Error-correction cycle explorer
 | Field | Reader-visible record

 | Format | Interactive syndrome timeline plus reproducible suppression plot
 | Verification | Tests inject each single error, assert syndrome discrimination, enforce a decoder deadline, and regenerate logical-versus-physical curves from declared assumptions.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Error-correction cycle explorer",
  "format": "Interactive syndrome timeline plus reproducible suppression plot",
  "acceptance_test": "Tests inject each single error, assert syndrome discrimination, enforce a decoder deadline, and regenerate logical-versus-physical curves from declared assumptions.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Scope boundary

- This guide does not derive a complete surface-code threshold theorem or compare every code family.

- It does not equate error mitigation, a single encoded qubit, or a below-threshold component metric with fault-tolerant computation.

Depth commitment. One explicit syndrome table, one timing diagram, and one sourced suppression model.

Practice problem

Decode all single bit-flip errors in the three-qubit repetition code, then identify which phase error the code cannot diagnose.

** Deliverable** : A syndrome table, correction rule, and one explicit counterexample.

** Pass condition** : The executable fixture injects I, X0, X1, X2, and Z1; it verifies the four bit-flip cases and demonstrates indistinguishable phase behavior.

Verification record

Expected solution form. Complete syndrome/correction table plus failing phase-error trace.

Model answer. For checks Z1Z2 and Z2Z3, no error gives syndrome 00; X1, X2, and X3 give 10, 11, and 01. A Z error commutes with both checks and is therefore invisible to this bit-flip code.

Model result and check. A stabilizer simulator reproduces each syndrome and the stated failure.

Acceptance test. The executable fixture injects I, X0, X1, X2, and Z1; it verifies the four bit-flip cases and demonstrates indistinguishable phase behavior.

External review. Open.

Expertise still needed. Quantum error-correction researcher familiar with stabilizer and surface-code assumptions; Real-time control/decoder engineer able to review latency and cycle budgets.

Provenance

## Sources and review

- [Peter W. Shor. Scheme for reducing decoherence in quantum computer memory. Physical Review A. 1995](https://doi.org/10.1103/PhysRevA.52.R2493) primary paper

- [Andrew M. Steane. Error correcting quantum code. Physical Review Letters. 1996](https://doi.org/10.1103/PhysRevLett.77.793) primary paper

- [Daniel Gottesman. Stabilizer codes and quantum error correction. California Institute of Technology / arXiv. 1997](https://arxiv.org/abs/quant-ph/9705052) doctoral thesis

- [Austin G. Fowler et al.. Surface codes: Towards practical large-scale quantum computation. Physical Review A. 2012](https://doi.org/10.1103/PhysRevA.86.032324) peer-reviewed review

- [Earl T. Campbell, Barbara M. Terhal, and Christophe Vuillot. Roads towards fault-tolerant universal quantum computation. Nature. 2017](https://doi.org/10.1038/nature23460) peer-reviewed review

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=orientation-05-noise-error-correction-and-fault-tolerance#report)

Dependency graph

## Prerequisites for this chapter

- [Multi-Qubit Circuits, Entanglement, and No-Hype Protocols Orientation guide](/playground/quantum/book/orientation-03-multi-qubit-circuits-entanglement-and-no-hype/)

- [Decoherence and Error Channels Part VI. Reliability and Fault Tolerance · Chapter 45](/playground/quantum/book/45-decoherence-and-error-channels/)

Continue the thread

## Next concepts from this chapter

- [Quantum Algorithms and Speedups Orientation guide](/playground/quantum/book/orientation-04-quantum-algorithms-and-speedups/)

- [Hardware Architecture and the Full Stack Orientation guide](/playground/quantum/book/orientation-06-hardware-architecture-and-the-full-stack/)

- [Applications, Evidence, and Strategy Orientation guide](/playground/quantum/book/orientation-07-applications-evidence-and-strategy/)

[Previous Quantum Algorithms and Speedups](/playground/quantum/book/orientation-04-quantum-algorithms-and-speedups/)[Next Hardware Architecture and the Full Stack](/playground/quantum/book/orientation-06-hardware-architecture-and-the-full-stack/)

In this chapter

- [Three ways quantum information is lost](#three-ways-quantum-information-is-lost)

- [T1: energy relaxation](#t1)

- [T2: dephasing](#t2)

- [Gate error](#gate-error)

- [Readout error](#readout-error)

- [Leakage](#leakage)

- [Redundancy without copying the unknown state](#redundancy-without-copying-the-unknown-state)

- [One correction cycle on a clock](#one-correction-cycle-on-a-clock)

- [Distance, threshold, and the suppression experiment](#distance-threshold-and-the-suppression-experiment)

- [The overhead ledger behind a logical operation](#the-overhead-ledger-behind-a-logical-operation)

- [Error-correction cycle explorer](#error-correction-cycle-explorer)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 6 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=orientation-05-noise-error-correction-and-fault-tolerance#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/orientation-05-noise-error-correction-and-fault-tolerance/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/orientation-06-hardware-architecture-and-the-full-stack/ -->

# Hardware Architecture and the Full Stack

A quantum computer is six systems stacked on top of each other, and the qubits are only one of them. This guide walks the stack from application down to device and back up through measurement and decoding, then tours the major hardware modalities with their real strengths and bottlenecks.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. Which layers must cooperate for an abstract quantum circuit to become a reliable measured result?

The circuit must pass through algorithm, compilation, logical control, physical instruction, analog control, device, readout, decoding, and classical post-processing layers; the slowest or least reliable translation can dominate regardless of raw qubit count.

Scope and non-goals.

- This guide does not crown a hardware modality or publish a current vendor leaderboard.

- It does not imply that metrics measured under different protocols are directly comparable.

[Figure O6.1.](#fig-orientation-06-hardware-architecture-and-the-full-stack-1) Notice the feedback path on the right: measurement and decoding climb back up the stack in real time, so the computer includes classical hardware most diagrams omit. And notice the qubits are one layer of six; a qubit count says nothing about the other five.

Prerequisites. orientation-04-quantum-algorithms-and-speedups, 22-circuit-cost-depth-width-gate-set-connectivity

Notation used here. Logical qubits q_i are distinct from physical device elements; use D_abstract and D_mapped; state native gate set and topology.

## A round trip, not a chip

Trace intent down to pulses and records back to an answer.

A quantum computer is the whole path from problem statement to classical answer; application, algorithm, circuit, compiler, control system, physical qubits, measurement, decoder, and classical post-processing. Every layer transforms the one above it, and every layer can independently kill the workload.

 | Layer  | The question it answers

 | Application  | What useful problem is being solved?
 | Algorithm  | What quantum structure gives an advantage?
 | Circuit  | How many qubits, gates, depth, and measurements?
 | Compiler  | How does the circuit map to native gates and connectivity?
 | Runtime  | How are jobs scheduled, batched, and measured?
 | Control  | Which pulses, lasers, voltages, or optical operations implement the gates?
 | QPU  | What physical system stores the quantum information?
 | Measurement  | How is quantum information converted to classical bits?
 | Decoder  | How are errors inferred and corrected?
 | Classical HPC and AI  | What classical compute supports simulation, optimization, decoding, and workflow integration?

Evidence boundary. A useful quantum computer is a full system whose layers include control, compilation, error correction, and classical processing. [Full-stack architecture review](https://doi.org/10.1038/s42254-021-00301-w) [National Academies systems assessment](https://doi.org/10.17226/25196)

## The contracts between adjacent layers

Name what each layer consumes, emits, and can invalidate.

Raw qubit count is one metric among many, and rarely the binding one. The numbers that actually predict whether a workload runs:

- one-qubit and two-qubit gate fidelity

- measurement fidelity

- reset fidelity and speed

- coherence times

- gate times

- connectivity

- crosstalk

- leakage

- calibration stability

- uptime and queue time

- compiled circuit depth

- logical error rate

- reliable logical operations

- cost per useful result

Notice the ordering of this list as you read vendor materials: the metrics near the top are measured per device; the ones near the bottom are measured per system. Serious roadmaps migrate downward over time.

### Superconducting qubits

Strengths: fast gates, a mature fabrication and control ecosystem borrowed from semiconductor engineering, and broad cloud availability.

Bottlenecks: coherence, crosstalk, wiring and cryogenics, fabrication yield, and scaling the qubit count while preserving fidelity.

### Trapped ions

Strengths: high gate fidelities, long coherence, and flexible connectivity within a trap.

Bottlenecks: gate speed, scaling across modules, photonic interconnects between traps, and system cost per unit of throughput.

### Neutral atoms

Strengths: large arrays, reconfigurable geometry, natural analog simulation, and promising parallelism for error-correction cycles.

Bottlenecks: high-fidelity digital gates, atom loss and movement errors, continuous operation, and the depth of error-correction cycles.

### Photonics

Strengths: networking comes naturally, some components run at room temperature, and there is a credible semiconductor-style manufacturing path with a long-term fault-tolerance vision.

Bottlenecks: photon loss, source and detector performance, switching, resource overhead, and integrating enormous component counts.

### Silicon spin qubits

Strengths: compatibility with semiconductor manufacturing, a tiny physical footprint, and the prospect of genuine density.

Bottlenecks: control complexity, device variability, coupling and readout, and scaling with high yield.

### Cat, bosonic, and topological routes

Strengths: the promise of cutting error-correction overhead by building protection or error bias into the hardware itself.

Bottlenecks: complete logical gate sets, high-quality two-qubit operations, independent validation of the underlying claims, and system integration.

Evidence boundary. Physical implementation criteria include controllable qubits, gates, measurement, and scalable interconnection. [David P. DiVincenzo](https://doi.org/10.1002/1521-3978(200009)48:9/11%3C771::AID-PROP771%3E3.0.CO;2-E) [T. D. Ladd et al.](https://doi.org/10.1038/nature08812)

## Depth becomes time on a topology

Compile one small circuit against limited connectivity.

Compilation maps an ideal circuit onto real hardware, and in doing so it can change gate count, depth, error exposure, measurement placement, routing, native gate usage, and schedule length. A circuit that looks short in a textbook can become unrunnable after compilation to a sparse topology. This is why Part V treats the transpiler as part of the algorithm, not as plumbing beneath it.

The control layer is where symbolic gates become physical actions: microwave pulses for superconducting qubits, laser pulses for ions and atoms, optical components for photonics, magnetic and electric fields for spins. It has to manage timing, amplitude, phase, calibration, feedback, synchronization, and low-latency correction; continuously, and at scale.

Once error correction enters the picture, the control stack and decoder stop being accessories and become part of the computer. Their throughput and latency bound how fast correction cycles can run, which bounds everything else.

Evidence boundary. Connectivity and native operations can increase compiled circuit depth relative to the abstract circuit. [openqasm3](https://openqasm.com/) [Lieven M. K. Vandersypen et al.](https://doi.org/10.1038/s42254-021-00301-w)

\(q_i^{(L)}\neq q_j^{(P)},\qquad D_{\mathrm{abstract}}\neq D_{\mathrm{mapped}}\)[(O6.1)](#eq-orientation-06-hardware-architecture-and-the-full-stack-1)
Notation contract: Logical qubits q_i are distinct from physical device elements; use D_abstract and D_mapped; state native gate set and topology.

## Control and readout share the reliability budget

Expose calibration, reset, measurement, and decoder dependencies.

Quantum output is classical data, so readout quality caps everything the machine can report. The questions: How accurate is readout? How fast? Is mid-circuit measurement supported? Can qubits be reset quickly for reuse? Does measuring one qubit disturb its neighbors? Can the data feed real-time control?

Mid-circuit measurement and fast reset deserve special attention: without them, the correction cycles from the previous guide cannot run at all.

Quantum hardware reaches users through public cloud platforms, private deployments, on-premise systems, national lab and HPC centers, and hybrid data centers. The access model is not a commercial footnote; it changes the engineering:

- Cloud favors access, ecosystem, and queue-based throughput.

- On-prem favors sovereignty and deep integration with a customer's own systems.

- HPC integration favors scientific workflows with classical pre- and post-processing.

- Data-center integration favors enterprise operations and scheduling discipline.

## A modality map organized by bottleneck

Route readers to detailed hardware dossiers without ranking slogans.

Follow the first interface whose units or owner cannot be named.

- [Systems engineering](/playground/quantum/book/53-useful-quantum-computers-are-systems-engineering-projects/) for cross-layer ownership.

- [The full stack](/playground/quantum/book/54-full-quantum-computer-stack/) for interface contracts.

- [Superconducting](/playground/quantum/book/55-superconducting-qubits/), [ion](/playground/quantum/book/56-trapped-ions/), [neutral-atom](/playground/quantum/book/57-neutral-atoms/), [photonic](/playground/quantum/book/58-photonics/), and [silicon-spin](/playground/quantum/book/59-silicon-spin-qubits/) dossiers for modality-specific budgets.

- [Control, packaging, and manufacturing](/playground/quantum/book/62-cryogenics-control-packaging-and-manufacturing/) for infrastructure constraints.

- [Applications and evidence](/playground/quantum/book/orientation-07-applications-evidence-and-strategy/) after the compiled workload has a physical path.

- Pick one modality and write its top three strengths and top three bottlenecks from memory.

- Explain why two-qubit gate fidelity matters more than one-qubit fidelity for most circuits.

- Take a CNOT-heavy circuit and show how limited connectivity inflates its depth.

- Explain why mid-circuit measurement matters for error correction.

- Compare cloud access and on-premise deployment from a customer-adoption perspective.

- Write a one-page hardware diligence memo for one company, using the checklist above.

## Full-stack trace dossier

Acceptance contract for Full-stack trace dossier
 | Field | Reader-visible record

 | Format | Layered machine-readable trace plus topology-aware compiled circuit
 | Verification | Validator accounts for every operation before and after routing, maps each stage to an owner, and reconciles final counts with the declared circuit.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Full-stack trace dossier",
  "format": "Layered machine-readable trace plus topology-aware compiled circuit",
  "acceptance_test": "Validator accounts for every operation before and after routing, maps each stage to an owner, and reconciles final counts with the declared circuit.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Scope boundary

- This guide does not crown a hardware modality or publish a current vendor leaderboard.

- It does not imply that metrics measured under different protocols are directly comparable.

Depth commitment. Nine layer contracts, one topology mapping, and a bottleneck-oriented modality map.

Practice problem

Map a four-qubit circuit onto a line topology, inserting necessary swaps and assigning every compiled operation to a stack layer.

```
Logical circuit: H q0; CNOT q0,q3; CNOT q3,q2; measure q0,q2.
Hardware graph: q0--q1--q2--q3.
Count every SWAP as three native CNOTs; restore the initial logical layout before measurement.
```

** Deliverable** : An abstract circuit, mapped circuit, depth comparison, and layer ownership table.

** Pass condition** : A reference mapper verifies connectivity legality and recomputes both operation count and depth.

Verification record

Expected solution form. Annotated mapped circuit plus a machine-generated resource diff.

Model answer. One valid restored-layout trace moves logical q0 along the line with SWAP(0,1), SWAP(1,2), applies CX(2,3), and reverses the two SWAPs before the requested measurements. Every compiled two-qubit edge is adjacent; four SWAPs contribute twelve native CNOTs in addition to the logical entanglers.

Model result and check. The validation script rejects nonadjacent two-qubit gates and matches the submitted depth.

Acceptance test. A reference mapper verifies connectivity legality and recomputes both operation count and depth.

External review. Open.

Expertise still needed. Quantum computer systems architect spanning compiler, control, and device layers; Hardware-aware compiler engineer able to verify mapping and resource accounting.

Provenance

## Sources and review

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

- [David P. DiVincenzo. The physical implementation of quantum computation. Fortschritte der Physik. 2000](https://doi.org/10.1002/1521-3978(200009)48:9/11%3C771::AID-PROP771%3E3.0.CO;2-E) primary peer-reviewed perspective

- [T. D. Ladd et al.. Quantum computers. Nature. 2010](https://doi.org/10.1038/nature08812) peer-reviewed review

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=orientation-06-hardware-architecture-and-the-full-stack#report)

Dependency graph

## Prerequisites for this chapter

- [Quantum Algorithms and Speedups Orientation guide](/playground/quantum/book/orientation-04-quantum-algorithms-and-speedups/)

- [Circuit Cost: Depth, Width, Gate Set, Connectivity Part III. Circuit Model · Chapter 22](/playground/quantum/book/22-circuit-cost-depth-width-gate-set-connectivity/)

Continue the thread

## Next concepts from this chapter

- [Noise, Error Correction, and Fault Tolerance Orientation guide](/playground/quantum/book/orientation-05-noise-error-correction-and-fault-tolerance/)

- [Applications, Evidence, and Strategy Orientation guide](/playground/quantum/book/orientation-07-applications-evidence-and-strategy/)

- [Multi-Qubit Circuits, Entanglement, and No-Hype Protocols Orientation guide](/playground/quantum/book/orientation-03-multi-qubit-circuits-entanglement-and-no-hype/)

[Previous Noise, Error Correction, and Fault Tolerance](/playground/quantum/book/orientation-05-noise-error-correction-and-fault-tolerance/)[Next Applications, Evidence, and Strategy](/playground/quantum/book/orientation-07-applications-evidence-and-strategy/)

In this chapter

- [A round trip, not a chip](#a-round-trip-not-a-chip)

- [The contracts between adjacent layers](#the-contracts-between-adjacent-layers)

- [Superconducting qubits](#superconducting-qubits)

- [Trapped ions](#trapped-ions)

- [Neutral atoms](#neutral-atoms)

- [Photonics](#photonics)

- [Silicon spin qubits](#silicon-spin-qubits)

- [Cat, bosonic, and topological routes](#cat-bosonic-and-topological-routes)

- [Depth becomes time on a topology](#depth-becomes-time-on-a-topology)

- [Control and readout share the reliability budget](#control-and-readout-share-the-reliability-budget)

- [A modality map organized by bottleneck](#a-modality-map-organized-by-bottleneck)

- [Full-stack trace dossier](#full-stack-trace-dossier)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=orientation-06-hardware-architecture-and-the-full-stack#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/orientation-06-hardware-architecture-and-the-full-stack/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/orientation-07-applications-evidence-and-strategy/ -->

# Applications, Evidence, and Strategy

Sooner or later every quantum conversation becomes a decision: build, partner, invest, wait, or walk away. This guide gives you the two tools that make that decision boring in the best way — an evidence ladder for application claims and a decision frame for acting on them — then applies both to chemistry, optimization, machine learning, cryptography, and sensing.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. What evidence is sufficient to build, partner, invest, wait, or avoid for a proposed quantum application?

The decision should follow the buyer's workflow, computational kernel, strongest classical baseline, integration cost, and dated evidence rung; action is justified only when the next proof step is cheaper and more informative than the uncertainty it resolves.

Scope and non-goals.

- This guide does not predict market size or treat adjacent quantum sensing as proof of quantum-computing value.

- It does not convert research novelty, small synthetic benchmarks, or vendor access into customer ROI.

[Figure O7.1.](#fig-orientation-07-applications-evidence-and-strategy-1) Notice how far the "most claims" band stops short of level 5, where a quantum workflow beats a strong classical baseline end to end. Only level 6; repeated customer use with real return; licenses treating an advantage as settled.

Prerequisites. orientation-04-quantum-algorithms-and-speedups, 64-what-makes-a-problem-quantum-suitable

Notation used here. Use E0–E5 only as ordinal evidence labels, never arithmetic quantities; dates use ISO 8601; distinguish quantum-computing and quantum-sensing categories.

## Begin at the buyer's blocked workflow

Identify owner, input, output, cost, and decision metric.

Quantum value is not "quantum applied to an industry." It appears when a specific problem has structure that a quantum method exploits better than the best classical workflow, under realistic hardware assumptions, at a cost someone will pay. Every clause of that sentence is a filter, and most claims fail at least one.

Once a claim survives the filters, the strategic question arrives: should we build, partner, invest, monitor, or avoid? Everything in this guide exists to make that answer defensible.

 | Level  | Evidence  | Meaning

 | 0  | Narrative only  | Interesting, but not decision-grade
 | 1  | Toy demo  | Educational, not commercial evidence
 | 2  | Simulation with assumptions  | Useful for research; needs resource realism
 | 3  | Hardware experiment  | Shows feasibility in a narrow setting
 | 4  | Resource-estimated fault-tolerant workflow  | Serious long-term application signal
 | 5  | Beats a strong classical baseline end to end  | The strongest technical signal
 | 6  | Repeated customer use with ROI  | Commercial validation

Most computing application claims today sit between levels 1 and 4; real work, honestly done, several rungs short of advantage. Some adjacent quantum technologies, sensing and security migration especially, have nearer-term commercial paths precisely because they do not need a fault-tolerant computer.

Evidence boundary. Quantum application value must be evaluated against end-to-end workflows and classical alternatives. [National Academies of Sciences](https://doi.org/10.17226/25196) [gao-quantum](https://www.gao.gov/products/gao-22-104422)

## Locate the quantum-shaped kernel

Separate a plausible computational mechanism from the surrounding pipeline.

The case for quantum help is structural: molecules and materials are quantum systems, exact classical simulation scales brutally, and better simulation would matter for catalysts, batteries, drugs, and industrial materials.

What to watch in any specific claim:

- the active-space choice,

- the Hamiltonian encoding,

- the target precision,

- logical qubit counts,

- T-gate or non-Clifford cost,

- the classical chemistry baseline,

- integration with HPC and AI workflows.

Strategic view: chemistry and materials are among the strongest long-term application areas, but broadly useful workloads likely require fault tolerance. Long-term strength and near-term revenue are different properties; do not let a pitch blur them.

People care because the money is real: routing, scheduling, portfolio construction, logistics, and design are economically enormous.

Caution is required because the competition is too:

- classical heuristics are extremely strong and improve constantly,

- real problem data and constraints are messy,

- quantum speedups for these problems are often unclear,

- annealing, QAOA, and hybrid methods must each be compared against production-grade baselines.

Strategic view: optimization is commercially attractive and technically dangerous; the area where overclaiming is easiest and baseline discipline matters most.

Evidence boundary. Quantum chemistry is a natural application area but useful results depend on algorithms, resources, and workflow integration. [Yudong Cao et al.](https://doi.org/10.1021/acs.chemrev.8b00803) [National Academies of Sciences](https://doi.org/10.17226/25196)

## Name the opponent before the experiment

Specify the strongest classical baseline and tuning budget.

People care because machine learning is economically central, quantum feature spaces and kernels are genuinely interesting, and hybrid models are easy to prototype.

Caution is required because:

- data loading can dominate the runtime,

- trainability can fail outright,

- classical models are powerful and improving,

- benchmark leakage and weak baselines are common in the literature.

Strategic view: treat quantum ML as research unless the claim names a task, a data-access model, a baseline, and a hardware assumption. Four specifics, or it is a demo.

Quantum computing touches cryptography in two very different ways, and keeping them separate is half the battle.

### The Shor risk

A large fault-tolerant quantum computer would break RSA and elliptic-curve cryptography. The near-term action is migration to post-quantum cryptography; a current enterprise and government security task, not something to schedule for when the hardware arrives. Data intercepted now can be decrypted later, which is what makes waiting expensive.

### QKD

Quantum key distribution uses quantum states plus an authenticated classical channel to detect eavesdropping, under specific assumptions about devices and links. It is infrastructure-specific; point-to-point links with dedicated hardware; and not a universal replacement for PQC, which runs in software everywhere.

Strategic view: PQC migration is the broad, near-term software and security market; QKD serves particular high-value links.

Evidence boundary. Near-term optimization and machine-learning claims require strong benchmark discipline and do not inherit advantage from quantum vocabulary. [John Preskill](https://doi.org/10.22331/q-2018-08-06-79) [Marco Cerezo et al.](https://doi.org/10.1038/s43588-022-00311-3) [Edward Farhi](https://arxiv.org/abs/1411.4028)

\(E\in\{E0,E1,E2,E3,E4,E5\},\qquad E\text{ is ordinal}\)[(O7.1)](#eq-orientation-07-applications-evidence-and-strategy-1)
Notation contract: Use E0–E5 only as ordinal evidence labels, never arithmetic quantities; dates use ISO 8601; distinguish quantum-computing and quantum-sensing categories.

## An evidence ladder with expiry dates

Grade narrative, theory, synthetic tests, realistic tests, pilots, and outcomes.

Quantum sensing can matter commercially before general quantum computing because it does not require universal fault-tolerant computation. Applications include inertial navigation, magnetic sensing, timing, gravity sensing, defense and aerospace, geophysics, and medical or materials measurement.

Strategic view: do not collapse quantum sensing into quantum computing. Different products, timelines, buyers, and proof standards; and conflating them is a common way to borrow credibility from one for the other.

 | Decision  | Use when

 | Build  | You have a specific wedge, proprietary distribution or data, and a credible technical path
 | Partner  | The value lives in your domain workflow and quantum is an enabling component
 | Invest  | The team has technical evidence, differentiated timing, and a plausible moat
 | Wait  | The opportunity is real but depends on hardware milestones outside your control
 | Avoid  | The claim lacks a baseline, evidence, or buyer urgency

"Wait" is the underrated row. Monitoring a real opportunity while its dependencies mature is a strategy; pretending the dependencies are already met is not.

## Five actions and their reversal conditions

Turn evidence and integration cost into an accountable decision.

Choose the next dossier from the evidence field that is still empty.

- [Problem suitability](/playground/quantum/book/64-what-makes-a-problem-quantum-suitable/) when the kernel or data boundary is unclear.

- [Chemistry](/playground/quantum/book/65-quantum-simulation-and-chemistry/), [optimization](/playground/quantum/book/67-optimization-where-caution-is-required/), [security migration](/playground/quantum/book/68-cryptography-pqc-qkd-and-security-migration/), or [QML](/playground/quantum/book/69-quantum-machine-learning-and-benchmark-discipline/) for domain-specific evidence.

- [Evidence levels](/playground/quantum/book/71-application-evidence-levels/) when claims lack a dated rung.

- [Action selection](/playground/quantum/book/72-when-to-build-partner-wait-or-avoid/) when evidence exists but ownership does not.

- [Capstone traces](/playground/quantum/book/83-full-stack-algorithm-trace/) after the dossier supports a testable decision.

Nearer-term company opportunities tend to cluster around the ecosystem rather than inside universal quantum advantage:

- developer education and labs

- resource-estimation tooling

- hardware-aware compilation

- error-correction tooling and visualization

- PQC migration and cryptographic inventory

- domain-specific simulation workflows

- benchmarking and diligence platforms

- quantum/HPC workflow orchestration

- sensing applications

- control and calibration tooling

Notice what these have in common: each sells something the field needs before fault tolerance arrives. Selling picks during a gold rush is a cliché because it keeps working.

- Rank chemistry, optimization, quantum ML, PQC, and sensing by near-term commercial readiness, and defend the ordering.

- Choose one company and classify its public claims by rung of the evidence ladder.

- Write a build-partner-invest-wait-avoid memo for one application.

- Identify a quantum-adjacent wedge that does not require fault-tolerant hardware.

- Compare QKD and PQC as answers to enterprise security migration.

- Write the strongest skeptical case against your favorite quantum application.

## Application evidence dossier template

Acceptance contract for Application evidence dossier template
 | Field | Reader-visible record

 | Format | Versioned JSON schema plus two fully sourced example dossiers
 | Verification | Schema validation requires workflow owner, baseline, dates, evidence level, integration boundary, decision, and reversal condition; examples reproduce their scores.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Application evidence dossier template",
  "format": "Versioned JSON schema plus two fully sourced example dossiers",
  "acceptance_test": "Schema validation requires workflow owner, baseline, dates, evidence level, integration boundary, decision, and reversal condition; examples reproduce their scores.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Scope boundary

- This guide does not predict market size or treat adjacent quantum sensing as proof of quantum-computing value.

- It does not convert research novelty, small synthetic benchmarks, or vendor access into customer ROI.

Depth commitment. One workflow decomposition, one evidence ladder, two dossiers, and five action definitions.

Practice problem

Grade two application claims—one chemistry workflow and one routing optimizer—using the evidence ladder and choose an action for each.

Claims for the evidence ladder
 | Claim | Record supplied

 | Chemistry: lower ground-state energy for a four-orbital active space | Instance, code, exact-diagonalization baseline, five seeds, and complete energy table.
 | Routing: 12% lower cost on customer data | Vendor summary with no dataset, integration cost, or named classical optimizer.

** Deliverable** : Two source-backed dossier records with explicit reversal conditions.

** Pass condition** : The model solution shows why similar evidence labels can yield different actions when integration cost and baselines differ.

Verification record

Expected solution form. Completed dossiers plus a rubric that separates evidence strength from decision readiness.

Model answer. The chemistry record reaches reproducible small-instance evidence but still needs scale and workflow evidence; a bounded experiment is warranted. The routing statement remains an unsupported comparative claim because neither the instance nor baseline can be inspected; the action is wait or request evidence, not build.

Model result and check. A schema checker validates required fields; a sensitivity worksheet reproduces each action under stated weights.

Acceptance test. The model solution shows why similar evidence labels can yield different actions when integration cost and baselines differ.

External review. Open.

Expertise still needed. Applied quantum algorithms reviewer experienced with classical benchmarking; Technology diligence reviewer able to audit evidence provenance, workflow economics, and decision reversibility.

Provenance

## Sources and review

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [Yudong Cao et al.. Quantum Chemistry in the Age of Quantum Computing. Chemical Reviews. 2019](https://doi.org/10.1021/acs.chemrev.8b00803) peer-reviewed review

- [John Preskill. Quantum Computing in the NISQ era and beyond. Quantum. 2018](https://doi.org/10.22331/q-2018-08-06-79) peer-reviewed perspective

- [Marco Cerezo et al.. Challenges and opportunities in quantum machine learning. Nature Computational Science. 2022](https://doi.org/10.1038/s43588-022-00311-3) peer-reviewed perspective

- [Edward Farhi, Jeffrey Goldstone, and Sam Gutmann. A Quantum Approximate Optimization Algorithm. arXiv. 2014](https://arxiv.org/abs/1411.4028) primary preprint

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=orientation-07-applications-evidence-and-strategy#report)

Dependency graph

## Prerequisites for this chapter

- [Quantum Algorithms and Speedups Orientation guide](/playground/quantum/book/orientation-04-quantum-algorithms-and-speedups/)

- [What Makes a Problem Quantum-Suitable? Part VIII. Applications and Strategy · Chapter 64](/playground/quantum/book/64-what-makes-a-problem-quantum-suitable/)

Continue the thread

## Next concepts from this chapter

- [Hardware Architecture and the Full Stack Orientation guide](/playground/quantum/book/orientation-06-hardware-architecture-and-the-full-stack/)

- [Noise, Error Correction, and Fault Tolerance Orientation guide](/playground/quantum/book/orientation-05-noise-error-correction-and-fault-tolerance/)

- [Multi-Qubit Circuits, Entanglement, and No-Hype Protocols Orientation guide](/playground/quantum/book/orientation-03-multi-qubit-circuits-entanglement-and-no-hype/)

[Previous Hardware Architecture and the Full Stack](/playground/quantum/book/orientation-06-hardware-architecture-and-the-full-stack/)[Next Computation Is Physical](/playground/quantum/book/01-computation-is-physical/)

In this chapter

- [Begin at the buyer's blocked workflow](#begin-at-the-buyer-s-blocked-workflow)

- [Locate the quantum-shaped kernel](#locate-the-quantum-shaped-kernel)

- [Name the opponent before the experiment](#name-the-opponent-before-the-experiment)

- [The Shor risk](#shor-risk)

- [QKD](#qkd)

- [An evidence ladder with expiry dates](#an-evidence-ladder-with-expiry-dates)

- [Five actions and their reversal conditions](#five-actions-and-their-reversal-conditions)

- [Application evidence dossier template](#application-evidence-dossier-template)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 6 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=orientation-07-applications-evidence-and-strategy#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/orientation-07-applications-evidence-and-strategy/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/01-computation-is-physical/ -->

# Computation Is Physical

A computer is a physical object before it is a mathematical one. This chapter builds the reflex the rest of the book depends on: whenever you hear a quantum claim, ask what stores the information, what transforms it, and what you are allowed to read at the end.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. What concrete questions turn an abstract quantum-computing claim into an engineering claim?

Ask what physical system stores the state, which controlled transformations implement the computation, how noise acts during their duration, what measurement returns, and which classical baseline the entire process must beat.

Scope and non-goals.

- Current-vendor comparisons and commercial-advantage claims are outside this chapter.

- The scope is the operational contract shared by quantum theory and hardware implementation.

[Figure 1.1.](#fig-01-computation-is-physical-1) Information enters as a prepared physical state, is transformed by controlled physical operations while noise acts on the same system, and exits as a classical measurement record. Nothing else happens in between.

Prerequisites. 00-how-to-use-the-book-layer

Notation used here. Use state space S, transformation T, measurement record y, runtime t, and error model E only after defining each operationally.

## A bit occupies hardware

Ground symbolic information in distinguishable physical states.

Computation is a controlled physical process that represents and transforms information. A bit is a physical state—charge in a circuit, a magnetic domain, a voltage level—that we agree to read as `0` or `1`. The symbols are conventional; the physics carrying them is not.

Classical engineering spent fifty years making the physics disappear. A modern laptop's bits are so stable that programmers can forget they are physical at all. Quantum computing offers no such luxury. The state is fragile, the control signals are analog, and the act of measurement changes what is left to measure. The physics is present from the first line of every quantum program, which is why this book starts here rather than with notation.

A useful first sentence about quantum computing is that it uses a different physical state space, and different allowed transformations, than an ordinary digital machine. “Strange” supplies no prediction; the state space does.

Evidence boundary. Computation is implemented by physical systems and constrained by physical law. [Richard P. Feynman](https://doi.org/10.1007/BF02650179) [National Academies of Sciences](https://doi.org/10.17226/25196)

## Four contracts define any computer

Specify state, transformations, I/O, and cost/error.

Every computational model, classical or quantum, answers the same four questions:

- State space. What configurations can the system be in?

- Allowed transformations. What operations can be applied to those configurations?

- Input and output rule. How does a problem get in, and how does an answer come out?

- Cost and error model. What does each operation cost, and what goes wrong?

For one classical bit, the state space is the set \({ 0 , 1 }\). For a register of \(n\) bits it is the \(2^n\) basis states, and a deterministic gate maps each basis state to another. Add randomness and you get probability distributions over basis states; still a classical model.

A quantum register keeps the same basis states but describes its condition with amplitudes over them. That is a richer description, and it is the source of everything quantum computing can do; but it comes with a catch that no amount of enthusiasm removes: you cannot read the amplitudes out. Measurement produces one classical record, drawn according to rules the amplitudes determine. The computation lives in the transformation; the answer you keep is classical.

So the physical version of the four questions becomes: What stores the state? Which transformations can you actually apply, at what error rate? What does the environment do to the state while you work? And what classical data does measurement produce? A claim that cannot answer these is not yet an engineering claim; it is a hope.

Evidence boundary. A viable quantum computer requires preparation/control, low enough error, measurement, and scalable system interfaces. [David P. DiVincenzo](https://doi.org/10.1002/1521-3978(200009)48:9/11%3C771::AID-PROP771%3E3.0.CO;2-E) [National Academies of Sciences](https://doi.org/10.17226/25196)

## Disassemble a qubit-count claim

Trace a concrete claim through storage, control, coupling, time, and readout.

Evidence boundary. Quantum state space and measurement rules differ from classical bits while outputs remain classical records. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

\(Use state space S, transformation T, measurement record y, runtime t, and error model E only after defining each operationally.\)[(1.1)](#eq-01-computation-is-physical-1)
Notation contract: Use state space S, transformation T, measurement record y, runtime t, and error model E only after defining each operationally.

## Where abstraction has not yet been earned

Explain why unstable interfaces leak device constraints upward.

If you come from software, read this chapter as a reminder that abstraction is earned. Classical computing gave you stable layers; transistor, gate, instruction set, language, service; each hiding the one below. Quantum computing is still fighting to stabilize the bottom layers, so the hiding does not work yet.

A useful mental model: a qubit is an API with unusually harsh implementation constraints. It exposes operations, but those operations come with latency, noise, topology restrictions, calibration drift, and readout limits. A quantum algorithm is not pseudocode; it is a request for a physical process that may or may not survive compilation and noise. And every serious quantum claim must end where it began; classical input, classical output, and a classical baseline to beat.

## The claim worksheet

Turn the contracts into a reusable review artifact.

## Physical-computation claim worksheet

Acceptance contract for Physical-computation claim worksheet
 | Field | Reader-visible record

 | Format | Fillable one-page ledger plus a completed device-claim example
 | Verification | Automated schema requires state carrier, controls, timing/noise, measurement record, algorithmic use, and named classical baseline.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Physical-computation claim worksheet",
  "format": "Fillable one-page ledger plus a completed device-claim example",
  "acceptance_test": "Automated schema requires state carrier, controls, timing/noise, measurement record, algorithmic use, and named classical baseline.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Scope boundary

- Current-vendor comparisons and commercial-advantage claims are outside this chapter.

- The scope is the operational contract shared by quantum theory and hardware implementation.

Depth commitment. Four computational contracts, one claim trace, and one completed worksheet.

Practice problem

Deconstruct a published or supplied quantum-device claim into the six physical contracts and identify the first missing measurement.

** Deliverable** : A claim worksheet with quoted source text and one evidence request per contract.

** Pass condition** : A rubric awards credit only when every assertion maps to a physical operation or record and the baseline is named.

Verification record

Expected solution form. Annotated exemplar plus contract-by-contract scoring rubric.

Model answer. A passing worksheet names a physical state carrier, preparation and control operations, interaction graph, duration and noise record, measurement output, algorithmic use, and classical baseline. The first blank or slogan-only field is the first missing measurement; qubit count alone fills none of the performance fields.

Model result and check. A schema validator rejects empty contracts; human verification checks each evidence request against the quoted claim.

Acceptance test. A rubric awards credit only when every assertion maps to a physical operation or record and the baseline is named.

External review. Open.

Expertise still needed. Quantum computing systems researcher able to bridge physical implementation and computation models; Computer architecture reviewer experienced in abstraction boundaries and error/cost models.

Provenance

## Sources and review

- [Richard P. Feynman. Simulating physics with computers. International Journal of Theoretical Physics. 1982](https://doi.org/10.1007/BF02650179) primary paper

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

- [David P. DiVincenzo. The physical implementation of quantum computation. Fortschritte der Physik. 2000](https://doi.org/10.1002/1521-3978(200009)48:9/11%3C771::AID-PROP771%3E3.0.CO;2-E) primary peer-reviewed perspective

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=01-computation-is-physical#report)

Dependency graph

## Prerequisites for this chapter

- [How to Use This Book Orientation · Guide 00](/playground/quantum/book/00-how-to-use-the-book-layer/)

Continue the thread

## Next concepts from this chapter

- [Classical Information, Gates, Circuits, and Reversibility Part I. Mental Model · Chapter 2](/playground/quantum/book/02-classical-information-gates-circuits-reversibility/)

- [Probability vs Amplitude Part I. Mental Model · Chapter 3](/playground/quantum/book/03-probability-vs-amplitude/)

- [Qubits Without Mysticism Part I. Mental Model · Chapter 4](/playground/quantum/book/04-qubits-without-mysticism/)

[Previous Applications, Evidence, and Strategy](/playground/quantum/book/orientation-07-applications-evidence-and-strategy/)[Next Classical Information, Gates, Circuits, and Reversibility](/playground/quantum/book/02-classical-information-gates-circuits-reversibility/)

In this chapter

- [A bit occupies hardware](#a-bit-occupies-hardware)

- [Four contracts define any computer](#four-contracts-define-any-computer)

- [Disassemble a qubit-count claim](#disassemble-a-qubit-count-claim)

- [Where abstraction has not yet been earned](#where-abstraction-has-not-yet-been-earned)

- [The claim worksheet](#the-claim-worksheet)

- [Physical-computation claim worksheet](#physical-computation-claim-worksheet)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=01-computation-is-physical#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/01-computation-is-physical/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/02-classical-information-gates-circuits-reversibility/ -->

# Classical Information, Gates, Circuits, and Reversibility

Every gate you will ever draw in a quantum circuit is reversible, and that rule was learned from classical computing first. This chapter rebuilds the classical baseline — bits, gates, truth tables, circuits — and shows exactly what it costs to make an ordinary operation like AND invertible.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How can an irreversible classical function be embedded in a reversible circuit without losing the result or corrupting later interference?

Keep the input, write the function into an ancilla with an XOR-style reversible map, use the result, and uncompute temporary workspace; reversibility preserves distinguishable basis states and makes garbage management part of the algorithm.

Scope and non-goals.

- This chapter does not claim that classical computers must be programmed reversibly in ordinary use.

- It does not yet prove unitarity for arbitrary quantum states; Chapter 12 supplies that formalism.

[Figure 2.1.](#fig-02-classical-information-gates-circuits-reversibility-1) Notice what leaves the circuit: the inputs a and b pass through untouched, and only the target wire carries the AND result. Nothing is erased, so the whole transformation can be run backward; set c to 0 on the way in and the target comes out holding exactly a AND b.

Prerequisites. 01-computation-is-physical

Notation used here. Classical bits x,y,z∈{0,1}; ⊕ denotes XOR; circuit wire order must be declared; Toffoli controls precede target.

## Information erased by AND

Use a truth table to show why the naive map is many-to-one.

Classical digital computing is built from stable states and transformations. A bit stores one of two values. A register stores a tuple of bits. A logic gate maps input bits to output bits, and a circuit composes gates into a larger transformation. None of this is exotic, and that is the point: quantum computing keeps this skeleton and changes what the wires and gates are allowed to do.

The bridge to quantum computing is reversibility. Many ordinary classical gates discard information. An AND gate maps three different input pairs to the output `0`, so once you see a `0` on the output wire you cannot say which input produced it. Information that is discarded cannot be recovered from the output alone.

Closed-system quantum operations are reversible; full stop, no exceptions for convenience. That does not prevent a quantum computer from evaluating ordinary functions. It means irreversible functions must be embedded into reversible transformations that preserve enough structure to be inverted, and the embedding is a design decision you make consciously, not a detail the compiler hides.

Evidence boundary. Irreversible logical operations can be embedded into reversible computations by retaining inputs and workspace. [Charles H. Bennett](https://doi.org/10.1147/rd.176.0525) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## An embedding that keeps every branch distinct

Construct (x,y,z)→(x,y,z⊕xy) with Toffoli.

A classical Boolean gate computes a function \(f : { 0 , 1 } n → { 0 , 1 } m\). The gate is reversible when the function is one-to-one over the relevant state space: every output corresponds to exactly one input. Equal numbers of input and output wires are a necessary start, and a one-to-one map finishes the job.

NOT is the trivial example. It sends `0` to `1` and `1` to `0`; applying it a second time recovers the input. AND fails the test:

\(\begin{array}{c|cccc}xy&00&01&10&11\\\hline x\land y&0&0&0&1\end{array}\)[(2.1)](#eq-02-classical-information-gates-circuits-reversibility-1)

Three inputs collapse into one output, so no inverse exists. The standard repair keeps the inputs and writes the result into an extra target bit:

\(( a , b , c ) ↦ ( a , b , c XOR ( a AND b ))\)[(2.2)](#eq-02-classical-information-gates-circuits-reversibility-2)

When \(c\) starts at `0`, the final bit comes out holding \(a AND b\), while \(a\) and \(b\) remain available on their own wires. Nothing was thrown away, so the map can be inverted; apply it again and the target returns to its original value.

Evidence boundary. Quantum gates act reversibly on closed-system pure-state evolution. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## Compute, use, reverse

Trace workspace creation and uncomputation.

Evidence boundary. Uncomputation removes temporary information that would otherwise remain correlated with the result. [Charles H. Bennett](https://doi.org/10.1147/rd.176.0525) [John Preskill](https://www.preskill.caltech.edu/ph219/)

\(x,y,z\in\{0,1\},\qquad \oplus\;\text{denotes XOR}\)[(2.3)](#eq-02-classical-information-gates-circuits-reversibility-3)
Notation contract: Classical bits x,y,z∈{0,1}; ⊕ denotes XOR; circuit wire order must be declared; Toffoli controls precede target.

## Garbage becomes quantum dependency

Show how leftover workspace can block interference.

If you write software, reversibility is close to lossless state transformation: a reversible gate behaves like a pure function whose output carries enough information to reconstruct its input. Everyday code works nothing like this. We overwrite variables, branch, allocate, log, and discard; all irreversible, all invisible because the hardware absorbs the cost.

Quantum programming removes the hiding place. You track which information persists, which wires are temporary workspace, and which transformation is invertible at every step. The discipline shows up again in oracles, phase kickback, error correction, and circuit cost estimates, which is why the book places it here, before any quantum notation. A quantum gate is a matrix that preserves valid state length; a reversible classical gate is the same instinct wearing older clothes.

## A reversible-circuit design checklist

Specify ancillas, outputs, cleanup, and gate cost.

## Reversible AND circuit and truth-table verifier

Acceptance contract for Reversible AND circuit and truth-table verifier
 | Field | Reader-visible record

 | Format | OpenQASM-compatible circuit, eight-row truth table, and simulator test
 | Verification | Verifier proves the mapping is bijective, checks every basis input, and asserts all workspace returns to zero after uncomputation.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Reversible AND circuit and truth-table verifier",
  "format": "OpenQASM-compatible circuit, eight-row truth table, and simulator test",
  "acceptance_test": "Verifier proves the mapping is bijective, checks every basis input, and asserts all workspace returns to zero after uncomputation.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Scope boundary

- This chapter does not claim that classical computers must be programmed reversibly in ordinary use.

- It does not yet prove unitarity for arbitrary quantum states; Chapter 12 supplies that formalism.

Depth commitment. One irreversible counterexample, one Toffoli embedding, one cleanup trace, and an executable exercise.

Practice problem

Design a reversible circuit for OR using ancillas, then uncompute every temporary bit after copying the answer to an output wire.

** Deliverable** : A circuit, complete truth table, and final-wire state for all inputs.

** Pass condition** : The test executes all basis inputs, confirms OR on the output, preserves inputs, and returns all scratch wires to zero.

Verification record

Expected solution form. Gate-by-gate construction plus exhaustive truth-table test.

Model answer. Initialize ancilla t and output y to zero. Apply CNOT(a,y), CNOT(b,y), Toffoli(a,b,t), and CNOT(t,y); y now equals a xor b xor ab, which is OR. Apply Toffoli(a,b,t) again to return t to zero. The full mapping is bijective because every gate is self-inverse.

Model result and check. A classical reversible simulator independently asserts bijection, correctness, and clean ancillas.

Acceptance test. The test executes all basis inputs, confirms OR on the output, preserves inputs, and returns all scratch wires to zero.

External review. Open.

Expertise still needed. Reversible-computing or quantum-circuit specialist; Formal methods reviewer able to verify bijection and exhaustive circuit tests.

Provenance

## Sources and review

- [Charles H. Bennett. Logical reversibility of computation. IBM Journal of Research and Development. 1973](https://doi.org/10.1147/rd.176.0525) primary paper

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=02-classical-information-gates-circuits-reversibility#report)

Dependency graph

## Prerequisites for this chapter

- [Computation Is Physical Part I. Mental Model · Chapter 1](/playground/quantum/book/01-computation-is-physical/)

Continue the thread

## Next concepts from this chapter

- [Shor as Period Finding Part IV. Protocols and Algorithms · Chapter 33](/playground/quantum/book/33-shor-as-period-finding/)

- [Probability vs Amplitude Part I. Mental Model · Chapter 3](/playground/quantum/book/03-probability-vs-amplitude/)

- [Qubits Without Mysticism Part I. Mental Model · Chapter 4](/playground/quantum/book/04-qubits-without-mysticism/)

[Previous Computation Is Physical](/playground/quantum/book/01-computation-is-physical/)[Next Probability vs Amplitude](/playground/quantum/book/03-probability-vs-amplitude/)

In this chapter

- [Information erased by AND](#information-erased-by-and)

- [An embedding that keeps every branch distinct](#an-embedding-that-keeps-every-branch-distinct)

- [Compute, use, reverse](#compute-use-reverse)

- [Garbage becomes quantum dependency](#garbage-becomes-quantum-dependency)

- [A reversible-circuit design checklist](#a-reversible-circuit-design-checklist)

- [Reversible AND circuit and truth-table verifier](#reversible-and-circuit-and-truth-table-verifier)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 3 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=02-classical-information-gates-circuits-reversibility#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/02-classical-information-gates-circuits-reversibility/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/03-probability-vs-amplitude/ -->

# Probability vs Amplitude

A quantum state is not a list of probabilities, and treating it as one is the fastest way to misread every algorithm in this book. This chapter draws the exact line between amplitude and probability, then shows with a single gate what information you destroy when you cross that line too early.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. What information do amplitudes contain that a probability distribution discards?

Amplitudes carry sign and complex phase as well as magnitude; probabilities retain only squared magnitudes, so states with identical immediate statistics can interfere differently after a later unitary.

Scope and non-goals.

- Amplitudes are treated as model variables rather than directly observable or stored classical answers.

- Density matrices and the full taxonomy of classical and quantum uncertainty are deferred.

[Figure 3.1.](#fig-03-probability-vs-amplitude-1) Notice that the two distinct states on the left produce identical bars on the right. An immediate measurement cannot tell |+> from |->; yet the sign difference survives inside the state and decides what the next gate does.

Prerequisites. 01-computation-is-physical, 08-complex-numbers-for-quantum-computing

Notation used here. Basis order (|0>,|1>); amplitudes α,β∈ℂ; probabilities p_i=|α_i|²; phase angles modulo 2π.

## Two columns that look identical to a meter

Compare |+> and |-> in the computational basis.

A probability is a nonnegative number that directly says how likely an outcome is. An amplitude is a number; often complex; that contributes to a probability only after you take its squared magnitude. Amplitudes can be positive, negative, or complex, which means they can cancel each other or reinforce each other before measurement enters the story.

That cancellation and reinforcement is the heart of every quantum algorithm. A randomized classical algorithm can spread probability mass across many outcomes, but probabilities only ever add. A quantum algorithm can arrange amplitudes so that paths leading to wrong answers cancel and paths leading to right answers survive. Measurement then samples from a distribution that interference has already shaped.

One sentence is worth memorizing: amplitudes are the quantities quantum operations transform; probabilities are what measurement produces from them. Most confused claims about quantum computing violate this sentence somewhere.

Evidence boundary. Measurement probabilities are squared magnitudes of amplitudes. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/)

## Squaring discards direction

Map complex amplitudes to nonnegative probabilities and identify lost phase.

A one-qubit state is written \(\lvert\psi\rangle=\alpha\lvert0\rangle+\beta\lvert1\rangle\), where \(\alpha\) and \(\beta\) are complex amplitudes. The state is normalized when \(\lvert\alpha\rvert^2+\lvert\beta\rvert^2=1\); total probability must come to one, because measurement always returns something.

Measurement in the computational basis follows the Born rule: the outcome `0` appears with probability \(\lvert\alpha\rvert^2\), and `1` with probability \(\lvert\beta\rvert^2\). Square first, then interpret; never the other order.

Here is the subtlety the rest of the book exploits. Take \(\alpha=1/\sqrt2\) with \(\beta=1/\sqrt2\), and both outcomes have probability \(1/2\). Now flip the sign so \(\beta=-1/\sqrt2\): the probabilities are still \(1/2\) each. The relative sign is invisible to an immediate measurement; but it is real, it is stored in the state, and later gates respond to it.

Evidence boundary. Relative phase affects later interference even when immediate basis probabilities agree. [John Preskill](https://www.preskill.caltech.edu/ph219/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Hadamard recovers a relative sign

Calculate deterministic opposite outputs from equal initial probabilities.

Evidence boundary. Global phase does not change measurement predictions, whereas relative phase can. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

\(B=(\lvert0\rangle,\lvert1\rangle),\quad \alpha,\beta\in\mathbb C,\quad p_i=\lvert\alpha_i\rvert^2,\quad \phi\bmod 2\pi\)[(3.1)](#eq-03-probability-vs-amplitude-1)
Notation contract: Basis order (|0>,|1>); amplitudes α,β∈ℂ; probabilities p_i=|α_i|²; phase angles modulo 2π.

## Combine first, square last

Generalize the interference order of operations.

Amplitudes behave like internal representation, not output. They are hidden state that affects later behavior but is never returned by the API; the API is measurement, and it returns samples. You would not judge a service by dumping its heap; do not judge a quantum algorithm by staring at its statevector.

This is also why simulators mislead. A statevector simulator will happily print every amplitude, because your classical machine is expensively simulating the quantum state. Real hardware hands you no such thing: it returns measurement outcomes from the bases you chose, at the shot count you paid for. Designs that depend on "reading the statevector" are designs that only work on simulators, and the distinction decides what scales.

## A diagnostic for probability-only explanations

Test whether a proposed description predicts the second experiment.

## Amplitude-versus-probability phase lab

Acceptance contract for Amplitude-versus-probability phase lab
 | Field | Reader-visible record

 | Format | Interactive Argand/statevector panel plus exact two-state calculation
 | Verification | Fixture confirms equal input probability vectors and opposite post-H distributions; UI never exposes amplitude as a measurement result.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Amplitude-versus-probability phase lab",
  "format": "Interactive Argand/statevector panel plus exact two-state calculation",
  "acceptance_test": "Fixture confirms equal input probability vectors and opposite post-H distributions; UI never exposes amplitude as a measurement result.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Scope boundary

- Amplitudes are treated as model variables rather than directly observable or stored classical answers.

- Density matrices and the full taxonomy of classical and quantum uncertainty are deferred.

Depth commitment. One exact counterexample, one Argand explanation, and one transfer exercise.

Practice problem

Construct two normalized one-qubit states with identical Z-basis probabilities and maximally different outcomes after a chosen gate.

** Deliverable** : Two statevectors, gate choice, and exact before/after probability tables.

** Pass condition** : A reference calculation verifies normalization, equality of initial distributions, and total variation distance one after the gate.

Verification record

Expected solution form. Symbolic derivation plus a numerical statevector fixture.

Model answer. Choose |+> and |->. Both give (1/2,1/2) in Z. Applying H maps them to |0> and |1>, whose outcome distributions have total-variation distance one, the maximum possible separation.

Model result and check. The fixture compares distributions before and after the submitted unitary and checks the stated maximum separation.

Acceptance test. A reference calculation verifies normalization, equality of initial distributions, and total variation distance one after the gate.

External review. Open.

Expertise still needed. Quantum information theorist specializing in measurement and phase; Mathematics editor able to review complex-number notation and probability claims.

Provenance

## Sources and review

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=03-probability-vs-amplitude#report)

Dependency graph

## Prerequisites for this chapter

- [Computation Is Physical Part I. Mental Model · Chapter 1](/playground/quantum/book/01-computation-is-physical/)

Continue the thread

## Next concepts from this chapter

- [Qubits Without Mysticism Part I. Mental Model · Chapter 4](/playground/quantum/book/04-qubits-without-mysticism/)

- [Interference as the Engine of Quantum Algorithms Part I. Mental Model · Chapter 6](/playground/quantum/book/06-interference-as-engine-of-quantum-algorithms/)

- [Complex Numbers for Quantum Computing Part II. Mathematical Core · Chapter 8](/playground/quantum/book/08-complex-numbers-for-quantum-computing/)

[Previous Classical Information, Gates, Circuits, and Reversibility](/playground/quantum/book/02-classical-information-gates-circuits-reversibility/)[Next Qubits Without Mysticism](/playground/quantum/book/04-qubits-without-mysticism/)

In this chapter

- [Two columns that look identical to a meter](#two-columns-that-look-identical-to-a-meter)

- [Squaring discards direction](#squaring-discards-direction)

- [Hadamard recovers a relative sign](#hadamard-recovers-a-relative-sign)

- [Combine first, square last](#combine-first-square-last)

- [A diagnostic for probability-only explanations](#a-diagnostic-for-probability-only-explanations)

- [Amplitude-versus-probability phase lab](#amplitude-versus-probability-phase-lab)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 3 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=03-probability-vs-amplitude#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/03-probability-vs-amplitude/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/04-qubits-without-mysticism/ -->

# Qubits Without Mysticism

You can explain a qubit completely with one line of notation and one measurement rule — no parallel universes, no "0 and 1 at the same time." This chapter gives you that explanation, and the operational test that tells you whether any other explanation is honest.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. What is a qubit in an operational model that predicts preparation, gates, and measurement without metaphor?

A pure qubit is a normalized ray in a two-dimensional complex state space: preparation fixes amplitudes up to global phase, unitary gates transform them, and a selected measurement returns one classical outcome with Born-rule probabilities.

Scope and non-goals.

- Interpretations of quantum mechanics and metaphors about consciousness, parallel worlds, or wave-particle duality are outside scope.

- Mixed states, tomography, and physical qubit modalities are deferred to their working chapters.

[Figure 4.1.](#fig-04-qubits-without-mysticism-1) Notice how little happens: one preparation, one gate, one measurement, one classical bit out. The superposition in the middle is real and it steers the outcome statistics; but it is never itself the output.

Prerequisites. 03-probability-vs-amplitude

Notation used here. State |ψ>=α|0>+β|1>, |α|²+|β|²=1; states differing by e^{iφ} are physically equivalent; basis always named.

## The smallest predictive definition

Introduce the state, normalization, and global-phase equivalence.

A qubit is a two-level quantum system used for computation. Relative to a chosen basis, its state is written as a superposition: \(\lvert\psi\rangle=\alpha\lvert0\rangle+\beta\lvert1\rangle\). The notation does not mean the qubit is a classical bit secretly holding two readable values. It means the state is carried by amplitudes over the basis states, and those amplitudes determine both measurement probabilities and future interference.

The popular phrase "both 0 and 1 at the same time" is too blunt to be useful. It hides the basis, the amplitudes, the normalization, the phase, and the measurement rule; which is to say, it hides everything that lets you calculate. When someone gives you that phrase, the charitable reading is that they know the sentence below and are saving time; the uncharitable reading is that they don't.

The sentence worth keeping is the one from this chapter's opening: a qubit is a normalized two-dimensional quantum state whose amplitudes are transformed by gates and sampled by measurement. It is plain, operational, and testable; and no experiment has ever demanded more poetry than that.

Evidence boundary. A pure qubit is represented by a normalized vector up to global phase in a two-dimensional complex Hilbert space. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Preparation is a procedure, not a label

Tie |0>, |1>, and |+> to reproducible operations.

The computational basis consists of two column vectors, \(\lvert0\rangle=\begin{pmatrix}1\\0\end{pmatrix}\) and \(\lvert1\rangle=\begin{pmatrix}0\\1\end{pmatrix}\). A general one-qubit pure state is a combination \(\alpha\lvert0\rangle+\beta\lvert1\rangle\) with complex amplitudes satisfying \(\lvert\alpha\rvert^2+\lvert\beta\rvert^2=1\). Measurement in the computational basis returns `0` with probability \(\lvert\alpha\rvert^2\) and `1` with probability \(\lvert\beta\rvert^2\).

The basis is not a footnote. A state that looks spread out in one basis can be sharp in another; \((\lvert0\rangle+\lvert1\rangle)/\sqrt2\) is a perfect 50-50 split in the computational basis and a single definite outcome in the Hadamard basis. Any explanation of a qubit that never names its measurement basis has left the most important variable unstated.

Evidence boundary. Unitary gates transform the state and projective measurement produces classical outcomes according to the Born rule. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## A gate changes future statistics

Trace H and Z without claiming both answers are readable.

Evidence boundary. A single qubit measurement produces one classical outcome rather than revealing its amplitudes. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [National Academies of Sciences](https://doi.org/10.17226/25196)

\(\lvert\psi\rangle=\alpha\lvert0\rangle+\beta\lvert1\rangle,\quad \lvert\alpha\rvert^2+\lvert\beta\rvert^2=1,\quad \lvert\psi\rangle\sim e^{i\phi}\lvert\psi\rangle\)[(4.1)](#eq-04-qubits-without-mysticism-1)
Notation contract: State |ψ>=α|0>+β|1>, |α|²+|β|²=1; states differing by e^{iφ} are physically equivalent; basis always named.

## One shot, one classical record

State exactly what measurement provides and removes.

A qubit resembles none of the familiar escapes; not a nullable Boolean, not a fuzzy Boolean, not a hidden pair of values. It is a state object with strict transformation and observation rules: gates transform the state, measurement samples from it and changes what information remains available afterward.

The closest lesson from ordinary practice is interface discipline. Know which operations are legal, which data can be observed, which data stays internal, and what failure modes exist. Quantum software that ignores these boundaries produces explanations that sound plausible in a meeting and fail under calculation; and the calculation always arrives eventually, because someone has to compile the circuit.

## Metaphors tested against an experiment

Reject only descriptions that fail the phase-sensitive test.

## Operational qubit card

Acceptance contract for Operational qubit card
 | Field | Reader-visible record

 | Format | Interactive prepare-transform-measure card plus downloadable state trace
 | Verification | Tests assert normalization, global-phase equivalence, one-bit shot outputs, and phase-sensitive repeated statistics.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Operational qubit card",
  "format": "Interactive prepare-transform-measure card plus downloadable state trace",
  "acceptance_test": "Tests assert normalization, global-phase equivalence, one-bit shot outputs, and phase-sensitive repeated statistics.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Scope boundary

- Interpretations of quantum mechanics and metaphors about consciousness, parallel worlds, or wave-particle duality are outside scope.

- Mixed states, tomography, and physical qubit modalities are deferred to their working chapters.

Depth commitment. One definition, three operations, one falsification circuit, and a scored explanation exercise.

Practice problem

Evaluate three popular qubit explanations by deriving one experimental prediction from each and rejecting those that cannot distinguish |+> from |->.

** Deliverable** : A three-row explanation/prediction/verdict table with one explicit circuit.

** Pass condition** : The solution applies H then Z-basis measurement and requires opposite deterministic predictions for |+> and |->.

Verification record

Expected solution form. Operational prediction table plus exact circuit trace.

Model answer. The normalized-vector explanation predicts that |+> and |-> differ after H; a hidden pre-existing Z bit does not. A Bloch-vector explanation makes the same single-qubit prediction but does not generalize as a list of independent arrows for entangled registers.

Model result and check. A statevector fixture validates the predictions; the rubric rejects explanations with no falsifiable output.

Acceptance test. The solution applies H then Z-basis measurement and requires opposite deterministic predictions for |+> and |->.

External review. Open.

Expertise still needed. Quantum foundations or quantum information reviewer comfortable separating operational formalism from interpretation; Science communication reviewer experienced in detecting misleading quantum metaphors.

Provenance

## Sources and review

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=04-qubits-without-mysticism#report)

Dependency graph

## Prerequisites for this chapter

- [Probability vs Amplitude Part I. Mental Model · Chapter 3](/playground/quantum/book/03-probability-vs-amplitude/)

Continue the thread

## Next concepts from this chapter

- [Measurement and What It Does Not Mean Part I. Mental Model · Chapter 5](/playground/quantum/book/05-measurement-and-what-it-does-not-mean/)

- [Classical Information, Gates, Circuits, and Reversibility Part I. Mental Model · Chapter 2](/playground/quantum/book/02-classical-information-gates-circuits-reversibility/)

- [Interference as the Engine of Quantum Algorithms Part I. Mental Model · Chapter 6](/playground/quantum/book/06-interference-as-engine-of-quantum-algorithms/)

[Previous Probability vs Amplitude](/playground/quantum/book/03-probability-vs-amplitude/)[Next Measurement and What It Does Not Mean](/playground/quantum/book/05-measurement-and-what-it-does-not-mean/)

In this chapter

- [The smallest predictive definition](#the-smallest-predictive-definition)

- [Preparation is a procedure, not a label](#preparation-is-a-procedure-not-a-label)

- [A gate changes future statistics](#a-gate-changes-future-statistics)

- [One shot, one classical record](#one-shot-one-classical-record)

- [Metaphors tested against an experiment](#metaphors-tested-against-an-experiment)

- [Operational qubit card](#operational-qubit-card)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=04-qubits-without-mysticism#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/04-qubits-without-mysticism/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/05-measurement-and-what-it-does-not-mean/ -->

# Measurement and What It Does Not Mean

Measurement is where a quantum computation hands classical data back to you — and where most popular explanations go wrong. This chapter pins down what the operation actually does, what it costs the state, and which three myths about it to retire on sight.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How does the choice of measurement determine both the outcome distribution and the state available afterward?

A measurement asks a basis- or observable-specific question, samples an outcome by the Born rule, and conditions the post-measurement state on that outcome; repeated shots estimate that experiment's distribution but cannot repair a wrong basis, circuit, or noise model.

Scope and non-goals.

- Interpretive claims about collapse or consciousness are outside the operational model used here.

- Generalized measurements, tomography, and continuous measurement are deferred.

[Figure 5.1.](#fig-05-measurement-and-what-it-does-not-mean-1) Notice that nothing about the state changes between the two rows; only the basis does. A measurement answers the question you actually asked, not the one you meant to ask.

Prerequisites. 04-qubits-without-mysticism, 10-inner-products-orthogonality-and-projection

Notation used here. Projectors P_i, outcome probability Tr(P_iρ) or |<i|ψ>|², normalized conditional state; basis stated before every result.

## A measurement is a specified question

Define basis, projectors, outcomes, and repeated preparation.

Measurement is a physical interaction that produces classical data, governed by two inputs: the quantum state and the measurement basis you chose. For a qubit state \(\lvert\psi\rangle=\alpha\lvert0\rangle+\beta\lvert1\rangle\) measured in the computational basis, the outcome is `0` with probability \(\lvert\alpha\rvert^2\) and `1` with probability \(\lvert\beta\rvert^2\). That is the whole rule, and it is simple.

The implications are where people stumble. Measurement does not print the state. It does not reveal the amplitudes. It returns one outcome from the one measurement you chose to perform, and the unchosen questions stay unanswered; there is no second read.

Measurement is also not bookkeeping you can postpone. Quantum algorithms are designed around what will be measured and when; the measurement plan is part of the algorithm, the way a return type is part of a function signature. Chapter 3's interference machinery only matters because it shapes what this step produces.

Evidence boundary. Projective measurement probabilities and post-measurement states follow from projectors and the Born rule. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## One state interrogated two ways

Calculate Z- and X-basis statistics for the same input.

For a normalized qubit state, computational-basis measurement produces \(P(0)=\lvert\alpha\rvert^2\) and \(P(1)=\lvert\beta\rvert^2\). Afterward, the state available for any future computation is the one the outcome implies: measure `0` and the state is \(\lvert0\rangle\) in that basis; measure `1` and it is \(\lvert1\rangle\). The pre-measurement amplitudes are gone; spent to produce the outcome.

Change the basis and you change the question. The same prepared state can yield sharply different outcome distributions under different measurement setups, not because the state is ambiguous but because the questions are different. Choosing a basis is choosing an observable, and no single run answers for the observables you did not pick.

Repeated shots turn probabilities into observed frequencies, and frequencies estimate probabilities with sampling error. More shots shrink that error. They do not repair a wrong circuit, a wrong basis, bad calibration, or a flawed model; they estimate the experiment you actually ran, faithfully and at length.

Evidence boundary. Measurement statistics depend on the chosen basis or observable. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## Conditioning changes the next experiment

Trace post-measurement states and a second measurement.

The deepest trap is the hidden-value story: measurement reveals what the qubit "really was" all along, as an ordinary bit we simply hadn't read. That story fails on the worked example. If the qubit were secretly a definite `0` or `1`, the X-basis certainty would have no explanation; and neither would the interference effects from Chapter 3 that let gates convert phase into outcome. Basis-dependent statistics are not a puzzle for the computational model; they are a prediction of it.

Evidence boundary. Repeated shots estimate an output distribution but do not remove systematic circuit, basis, or device error. [John Preskill](https://www.preskill.caltech.edu/ph219/) [National Academies of Sciences](https://doi.org/10.17226/25196)

\(P_i^2=P_i,\quad \Pr(i)=\operatorname{Tr}(P_i\rho)=\lvert\langle i\vert\psi\rangle\rvert^2\)[(5.1)](#eq-05-measurement-and-what-it-does-not-mean-1)
Notation contract: Projectors P_i, outcome probability Tr(P_iρ) or |<i|ψ>|², normalized conditional state; basis stated before every result.

## Shot count buys precision, not validity

Separate sampling error from bias and model error.

Measurement is a constrained read operation on a stateful system; one where the read itself changes the available state. You cannot inspect arbitrary private state without consequence. You select an observable, run the experiment, and collect classical samples. Designing those three choices is engineering, not philosophy.

This shapes debugging practice. A simulator exposes amplitudes; hardware exposes measurement records. Treat simulation output, analytical checks, and hardware shots as three different evidence types with different failure modes, not as interchangeable printouts. The bug in many quantum programs lives in the gap between what the simulator showed and what the chosen measurements could ever reveal.

## Design the measurement backward from the quantity

Turn observable choice into an experimental design step.

## Basis-dependent measurement experiment

Acceptance contract for Basis-dependent measurement experiment
 | Field | Reader-visible record

 | Format | Runnable notebook producing sequential-measurement records and confidence intervals
 | Verification | Seeded tests verify analytic distributions, conditional second-shot outcomes, and convergence without conflating precision and accuracy.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Basis-dependent measurement experiment",
  "format": "Runnable notebook producing sequential-measurement records and confidence intervals",
  "acceptance_test": "Seeded tests verify analytic distributions, conditional second-shot outcomes, and convergence without conflating precision and accuracy.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Scope boundary

- Interpretive claims about collapse or consciousness are outside the operational model used here.

- Generalized measurements, tomography, and continuous measurement are deferred.

Depth commitment. Two-basis calculation, conditional state trace, sampling experiment, and design rule.

Practice problem

For |+>, compute and simulate Z→Z, X→X, and Z→X sequential measurements, including conditional second outcomes.

** Deliverable** : Analytic probability tree and a seeded 10,000-shot comparison.

** Pass condition** : The reference notebook checks every conditional probability within a declared confidence band and explains discrepancies.

Verification record

Expected solution form. Probability-tree solution plus reproducible simulation report.

Model answer. Z then Z on |+> produces first result 0 or 1 with probability one half and repeats that result with certainty. X then X produces + twice with certainty. Z then X produces a fair Z result and, conditioned on either branch, a fair X result.

Model result and check. CI runs the seeded experiment and applies binomial tolerance bands to each branch.

Acceptance test. The reference notebook checks every conditional probability within a declared confidence band and explains discrepancies.

External review. Open.

Expertise still needed. Quantum measurement theorist or experimental quantum physicist; Statistical reviewer able to assess sampling, confidence intervals, and systematic-error language.

Provenance

## Sources and review

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=05-measurement-and-what-it-does-not-mean#report)

Dependency graph

## Prerequisites for this chapter

- [Qubits Without Mysticism Part I. Mental Model · Chapter 4](/playground/quantum/book/04-qubits-without-mysticism/)

- [Inner Products, Orthogonality, and Projection Part II. Mathematical Core · Chapter 10](/playground/quantum/book/10-inner-products-orthogonality-and-projection/)

Continue the thread

## Next concepts from this chapter

- [Entanglement Without Faster-Than-Light Myths Part I. Mental Model · Chapter 7](/playground/quantum/book/07-entanglement-without-faster-than-light-myths/)

- [Quantum Key Distribution Part IV. Protocols and Algorithms · Chapter 26](/playground/quantum/book/26-quantum-key-distribution/)

- [Interference as the Engine of Quantum Algorithms Part I. Mental Model · Chapter 6](/playground/quantum/book/06-interference-as-engine-of-quantum-algorithms/)

[Previous Qubits Without Mysticism](/playground/quantum/book/04-qubits-without-mysticism/)[Next Interference as the Engine of Quantum Algorithms](/playground/quantum/book/06-interference-as-engine-of-quantum-algorithms/)

In this chapter

- [A measurement is a specified question](#a-measurement-is-a-specified-question)

- [One state interrogated two ways](#one-state-interrogated-two-ways)

- [Conditioning changes the next experiment](#conditioning-changes-the-next-experiment)

- [Shot count buys precision, not validity](#shot-count-buys-precision-not-validity)

- [Design the measurement backward from the quantity](#design-the-measurement-backward-from-the-quantity)

- [Basis-dependent measurement experiment](#basis-dependent-measurement-experiment)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=05-measurement-and-what-it-does-not-mean#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/05-measurement-and-what-it-does-not-mean/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/06-interference-as-engine-of-quantum-algorithms/ -->

# Interference as the Engine of Quantum Algorithms

Every quantum speedup reduces to one maneuver done well: arrange for the amplitudes of wrong answers to cancel and the amplitudes of right answers to reinforce, then measure. This chapter shows that maneuver at its smallest working size — three gates — and names exactly what it can never do for you.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How does a quantum circuit convert otherwise hidden relative phase into a useful measurement bias?

Unitary operations route amplitude contributions to the same output basis states, where complex addition can reinforce or cancel them before probabilities are computed; algorithms are useful only when problem structure lets that interference favor informative outcomes.

Scope and non-goals.

- This chapter does not imply that interference alone guarantees a speedup or that a statevector exposes parallel answers.

- It does not derive Grover, Fourier sampling, or phase estimation in full.

[Figure 6.1.](#fig-06-interference-as-engine-of-quantum-algorithms-1) Notice where the information travels: the Z gate changes only a sign, no measurement could catch it mid-circuit, and yet the second Hadamard converts that sign into a different final bit. That conversion is the entire trick, shown at minimum size.

Prerequisites. 03-probability-vs-amplitude, 11-matrices-as-gates

Notation used here. Amplitude contributions are complex numbers; combine before |·|²; phases φ modulo 2π; gate order declared.

## Two paths meet at one amplitude

Write the sum that precedes squaring.

Quantum algorithms do not derive their power from merely writing many terms into a state vector; a random classical bit string has many terms too. The power appears when an algorithm transforms amplitudes so that unwanted outcomes cancel and useful outcomes grow likely enough to sample. Everything else is scaffolding around that single mechanism.

Interference is the rule that amplitudes combine before probabilities are produced. Two contributions to the same outcome with the same phase reinforce; with opposite phase, they cancel. Phase estimation, Grover's search, and the core simulation procedures are all built from this one material, shaped different ways.

The working pipeline of nearly every quantum algorithm is five steps long:

- Prepare amplitudes over the basis states you need.

- Transform phases so the problem's structure is encoded in them.

- Arrange for amplitudes on bad outcomes to cancel.

- Arrange for amplitudes on useful outcomes to reinforce.

- Measure, and collect a sample from the distribution you shaped.

Hold a new algorithm against this list and it stops being magic. If you cannot find each step in the paper, the algorithm is not done being explained.

Evidence boundary. Quantum probabilities are computed after complex amplitudes for indistinguishable alternatives combine. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/)

## A three-gate phase experiment

Trace H-Z-H on |0> contribution by contribution.

Suppose two computational paths contribute amplitudes to the same final outcome. With contributions of \(1/2\) and \(1/2\), the sum is `1`, and the probability is \(\lvert1\rvert^2=1\); perfect reinforcement. With contributions of \(1/2\) and \(-1/2\), the sum is `0`, and the probability is \(\lvert0\rvert^2=0\); the outcome never happens, even though each path individually carried substantial amplitude.

The ordering is the engine: combine amplitudes, then square. Square first and you get \(1/4+1/4=1/2\) in both cases, and the cancellation; the phenomenon the whole field is built on; vanishes from your arithmetic. Classical probability has no operation that can do this, which is why no randomized classical algorithm imitates it.

Evidence boundary. Relative phase can be converted into measurement probability by later gates. [John Preskill](https://www.preskill.caltech.edu/ph219/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Cancellation as an invariant you can debug

Use normalization and sign checks to catch arithmetic errors.

The standing trap is the claim that interference means the computer inspects all answers and returns the best. It inspects nothing. Interference changes amplitudes; measurement still returns samples, and a poorly shaped distribution samples wrong answers forever, at any qubit count. The state vector holding \(2^n\) amplitudes is the starting condition, not the achievement.

Evidence boundary. Algorithmic interference requires problem structure and does not make all populated basis states readable. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [National Academies of Sciences](https://doi.org/10.17226/25196)

\(P(x)=\left\lvert\sum_j\alpha_{j\to x}\right\rvert^2,\qquad \phi\bmod 2\pi\)[(6.1)](#eq-06-interference-as-engine-of-quantum-algorithms-1)
Notation contract: Amplitude contributions are complex numbers; combine before |·|²; phases φ modulo 2π; gate order declared.

## Problem structure supplies the phases

Connect oracles and periodicity to controlled interference.

Interference is an information-processing primitive, not a metaphor. It transforms hidden phase structure into output probability, which makes a quantum algorithm closer to a carefully designed signal-processing pipeline than to brute-force parallel search. The design skill is shaping the transfer function, not widening the machine.

When you read an algorithm; or a pitch built on one; ask, in order:

- Where is phase introduced?

- What problem structure does it encode?

- Which operation causes the interference?

- What measurement extracts the useful signal?

- What classical baseline is the comparison against?

An algorithm that answers all five is a design. One that answers none is a hope with a circuit diagram attached.

## When interference produces no usable signal

Show a randomized-phase counterexample.

## Interference path-sum visualizer

Acceptance contract for Interference path-sum visualizer
 | Field | Reader-visible record

 | Format | Interactive two-path amplitude diagram plus tested statevector trace
 | Verification | Tests compare path-sum and matrix multiplication, verify HZH=X, and show randomized phases erase stable bias over trials.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Interference path-sum visualizer",
  "format": "Interactive two-path amplitude diagram plus tested statevector trace",
  "acceptance_test": "Tests compare path-sum and matrix multiplication, verify HZH=X, and show randomized phases erase stable bias over trials.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Scope boundary

- This chapter does not imply that interference alone guarantees a speedup or that a statevector exposes parallel answers.

- It does not derive Grover, Fourier sampling, or phase estimation in full.

Depth commitment. One contribution trace, one phase sweep, one randomized-phase boundary.

Practice problem

Design a one-qubit circuit that maps a relative phase of 0 to outcome 0 and phase π to outcome 1, then analyze phase π/2.

** Deliverable** : A gate sequence, path-sum derivation, and three exact output distributions.

** Pass condition** : The solution and fixture agree for all phases and preserve total probability one.

Verification record

Expected solution form. Path contribution table plus parameterized numerical test.

Model answer. Use H, phase diag(1,exp(i phi)), then H. The output probabilities are cos^2(phi/2) and sin^2(phi/2): phi=0 yields 0, phi=pi yields 1, and phi=pi/2 yields a uniform distribution.

Model result and check. The test sweeps φ∈{0,π/2,π} and verifies the analytic probabilities.

Acceptance test. The solution and fixture agree for all phases and preserve total probability one.

External review. Open.

Expertise still needed. Quantum algorithms theorist able to review interference mechanisms; Numerical methods reviewer able to compare path-sum and matrix implementations.

Provenance

## Sources and review

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=06-interference-as-engine-of-quantum-algorithms#report)

Dependency graph

## Prerequisites for this chapter

- [Probability vs Amplitude Part I. Mental Model · Chapter 3](/playground/quantum/book/03-probability-vs-amplitude/)

- [Matrices as Gates Part II. Mathematical Core · Chapter 11](/playground/quantum/book/11-matrices-as-gates/)

Continue the thread

## Next concepts from this chapter

- [Deutsch, Deutsch-Jozsa, and Bernstein-Vazirani Part IV. Protocols and Algorithms · Chapter 28](/playground/quantum/book/28-deutsch-deutsch-jozsa-and-bernstein-vazirani/)

- [Measurement and What It Does Not Mean Part I. Mental Model · Chapter 5](/playground/quantum/book/05-measurement-and-what-it-does-not-mean/)

- [Entanglement Without Faster-Than-Light Myths Part I. Mental Model · Chapter 7](/playground/quantum/book/07-entanglement-without-faster-than-light-myths/)

[Previous Measurement and What It Does Not Mean](/playground/quantum/book/05-measurement-and-what-it-does-not-mean/)[Next Entanglement Without Faster-Than-Light Myths](/playground/quantum/book/07-entanglement-without-faster-than-light-myths/)

In this chapter

- [Two paths meet at one amplitude](#two-paths-meet-at-one-amplitude)

- [A three-gate phase experiment](#a-three-gate-phase-experiment)

- [Cancellation as an invariant you can debug](#cancellation-as-an-invariant-you-can-debug)

- [Problem structure supplies the phases](#problem-structure-supplies-the-phases)

- [When interference produces no usable signal](#when-interference-produces-no-usable-signal)

- [Interference path-sum visualizer](#interference-path-sum-visualizer)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=06-interference-as-engine-of-quantum-algorithms#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/06-interference-as-engine-of-quantum-algorithms/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/07-entanglement-without-faster-than-light-myths/ -->

# Entanglement Without Faster-Than-Light Myths

Entanglement is the most abused word in quantum computing, and the abuse always follows the same script: correlation mistaken for communication. This chapter defines entanglement in one line, proves it with one circuit, and shows why the strongest correlation in physics still cannot carry a single chosen bit.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. What does it mean for a joint state to be entangled, and why do its correlations not enable controllable signaling?

A pure joint state is entangled when it cannot be factored into subsystem states; Bell-state measurements show correlations across chosen settings, but each party's local marginal remains independent of the other party's setting, so no chosen message is available locally.

Scope and non-goals.

- This chapter does not derive every Bell inequality or discuss loophole-free experimental engineering in depth.

- It does not claim all strong correlation is entanglement or that entanglement alone creates algorithmic advantage.

[Figure 7.1.](#fig-07-entanglement-without-faster-than-light-myths-1) Notice the two empty slots: 01 and 10 never occur. The outcomes are perfectly correlated, yet each side's own bit remains a coin flip; which is precisely why no message can ride on this state.

Prerequisites. 05-measurement-and-what-it-does-not-mean, 13-tensor-products-and-state-space-growth

Notation used here. Joint basis order (|00>,|01>,|10>,|11>); subsystem labels A/B; marginals p_A(a)=Σ_b p(a,b); measurement settings explicitly named.

## Factorability is the dividing line

Turn the definition into coefficient equations.

Entanglement means the state of a composite system cannot be written as a product of independent subsystem states. The information is in the joint state; the parts, considered separately, carry less than the whole. That is the complete definition, and everything else in this chapter is a consequence of it.

For two qubits, a product state has the form \(\lvert a\rangle\otimes\lvert b\rangle\); each qubit has its own state, and the pair is just the two descriptions stapled together. An entangled state permits no such stapling. The standard first example is the Bell state \((\lvert00\rangle+\lvert11\rangle)/\sqrt2\): measured in the computational basis, the pair comes out `00` or `11`, never `01` or `10`.

Here is the sentence the myths depend on your skipping: correlation is not controllable messaging. The two outcomes match when compared, but each local outcome is random on its own, and neither party can choose which shared result appears. A mailbox requires choosing what to send; entanglement offers no such knob.

Evidence boundary. Entangled pure states are joint states that cannot be expressed as tensor products of subsystem states. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Build the Bell pair gate by gate

Trace H and CNOT from |00>.

Two qubits live in a four-dimensional basis; \(\lvert00\rangle\), \(\lvert01\rangle\), \(\lvert10\rangle\), \(\lvert11\rangle\); and a general state is \(a\lvert00\rangle+b\lvert01\rangle+c\lvert10\rangle+d\lvert11\rangle\). If the Bell state were secretly a product, you could write it as \((x\lvert0\rangle+y\lvert1\rangle)\otimes(u\lvert0\rangle+v\lvert1\rangle)\), which expands to:

\(xu\lvert00\rangle+xv\lvert01\rangle+yu\lvert10\rangle+yv\lvert11\rangle\)[(7.1)](#eq-07-entanglement-without-faster-than-light-myths-1)

Matching the Bell state forces \(xv = 0\) and \(y u = 0\) while \(xu\) and \(y v\) stay nonzero. But \(xv = 0\) kills either \(x\) or \(v\): if \(x = 0\) then \(xu = 0\), and if \(v = 0\) then \(y v = 0\). Either way a term that must be nonzero vanishes. No choice of four numbers escapes, so the state is genuinely joint; not approximately, not usually, but always.

This is worth doing once by hand, because it converts entanglement from an aura into arithmetic. The "mystery" is a system of four equations with no solution.

Evidence boundary. Bell-state correlations violate constraints on local hidden-variable explanations under suitable measurement settings. [John S. Bell](https://doi.org/10.1103/PhysicsPhysiqueFizika.1.195) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Local marginals remain featureless

Compute each subsystem's distribution without access to the other record.

The headline trap is equating entanglement with faster-than-light messaging. The correlations are real and stronger than any classical shared-variable story can reproduce; Bell tests settle that; but strength of correlation is not control of outcome. Any product, pitch, or plot that routes a chosen message through an entangled pair alone has left the physics.

The quieter trap is treating entanglement as automatically good. Entanglement can be a resource, a symptom, a debugging challenge, or a source of unwanted coupling. When your qubits entangle with the environment instead of each other, the phenomenon has a different name; decoherence; and it is the enemy of everything Part VI of this book builds. The same mathematics, pointed the wrong way, is the main thing hardware teams fight.

Evidence boundary. Quantum theory preserves no-signaling because local marginal statistics do not depend on a spacelike-separated measurement choice. [John Preskill](https://www.preskill.caltech.edu/ph219/) [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/)

\(B_{AB}=(\lvert00\rangle,\lvert01\rangle,\lvert10\rangle,\lvert11\rangle),\qquad p_A(a)=\sum_b p(a,b)\)[(7.2)](#eq-07-entanglement-without-faster-than-light-myths-2)
Notation contract: joint basis order 00, 01, 10, 11; subsystem labels A/B; marginals sum over the other subsystem; measurement settings explicitly named.

## Correlations appear only in comparison

Show the role of basis choice and classical record matching.

That observation prices everything downstream. Product states are cheap to simulate; highly entangled states are expensive in a straightforward statevector representation, which is both why quantum hardware is hard to imitate classically and why tensor-network methods; classical algorithms that exploit limited entanglement structure; can simulate more than naive counting suggests. Entanglement structure, not qubit count, sets the difficulty.

It also sets the protocol menu. Teleportation, superdense coding, and error correction all spend carefully prepared entanglement alongside classical communication and measurement. In every case the classical leg is load-bearing: remove it and the protocol collapses back to unexplained coincidences.

## A signaling test any explanation must pass

Vary one side's setting and check the other marginal.

## No-signaling Bell-pair simulator

Acceptance contract for No-signaling Bell-pair simulator
 | Field | Reader-visible record

 | Format | Two-party interactive with exported joint and marginal tables
 | Verification | Automated sweep over both measurement settings verifies normalized joints, expected correlations, and invariant remote marginals.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "No-signaling Bell-pair simulator",
  "format": "Two-party interactive with exported joint and marginal tables",
  "acceptance_test": "Automated sweep over both measurement settings verifies normalized joints, expected correlations, and invariant remote marginals.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Scope boundary

- This chapter does not derive every Bell inequality or discuss loophole-free experimental engineering in depth.

- It does not claim all strong correlation is entanglement or that entanglement alone creates algorithmic advantage.

Depth commitment. One factorization proof, one circuit trace, two setting tables, and a marginal invariance test.

Practice problem

For a Bell pair, compute joint and marginal probabilities for Z/Z and Z/X settings and state which records reveal correlation.

** Deliverable** : Two probability tables, four marginals, and a one-paragraph signaling verdict.

** Pass condition** : The simulator regenerates all tables and asserts Alice's marginal is unchanged across Bob's settings.

Verification record

Expected solution form. Exact projector calculation plus automated marginal-invariance test.

Model answer. For |Phi+>, Z/Z gives 00 and 11 with probability one half each; both local marginals are uniform. Z/X gives each joint labeled result probability one quarter, again with uniform marginals. Correlation appears only after the two classical records and their settings are compared.

Model result and check. The test compares remote marginals elementwise and fails on any setting-dependent difference.

Acceptance test. The simulator regenerates all tables and asserts Alice's marginal is unchanged across Bob's settings.

External review. Open.

Expertise still needed. Quantum information theorist specializing in entanglement and Bell scenarios; Relativistic quantum information or foundations reviewer able to assess no-signaling claims.

Provenance

## Sources and review

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John S. Bell. On the Einstein Podolsky Rosen paradox. Physics Physique Fizika. 1964](https://doi.org/10.1103/PhysicsPhysiqueFizika.1.195) primary paper

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=07-entanglement-without-faster-than-light-myths#report)

Dependency graph

## Prerequisites for this chapter

- [Measurement and What It Does Not Mean Part I. Mental Model · Chapter 5](/playground/quantum/book/05-measurement-and-what-it-does-not-mean/)

- [Tensor Products and State-Space Growth Part II. Mathematical Core · Chapter 13](/playground/quantum/book/13-tensor-products-and-state-space-growth/)

Continue the thread

## Next concepts from this chapter

- [Bell Tests and Nonclassical Correlations Part IV. Protocols and Algorithms · Chapter 23](/playground/quantum/book/23-bell-tests-and-nonclassical-correlations/)

- [Interference as the Engine of Quantum Algorithms Part I. Mental Model · Chapter 6](/playground/quantum/book/06-interference-as-engine-of-quantum-algorithms/)

- [Qubits Without Mysticism Part I. Mental Model · Chapter 4](/playground/quantum/book/04-qubits-without-mysticism/)

[Previous Interference as the Engine of Quantum Algorithms](/playground/quantum/book/06-interference-as-engine-of-quantum-algorithms/)[Next Complex Numbers for Quantum Computing](/playground/quantum/book/08-complex-numbers-for-quantum-computing/)

In this chapter

- [Factorability is the dividing line](#factorability-is-the-dividing-line)

- [Build the Bell pair gate by gate](#build-the-bell-pair-gate-by-gate)

- [Local marginals remain featureless](#local-marginals-remain-featureless)

- [Correlations appear only in comparison](#correlations-appear-only-in-comparison)

- [A signaling test any explanation must pass](#a-signaling-test-any-explanation-must-pass)

- [No-signaling Bell-pair simulator](#no-signaling-bell-pair-simulator)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=07-entanglement-without-faster-than-light-myths#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/07-entanglement-without-faster-than-light-myths/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/08-complex-numbers-for-quantum-computing/ -->

# Complex Numbers for Quantum Computing

Quantum computing runs on complex numbers, and you need exactly three skills with them: conjugate, magnitude, phase. This chapter teaches those three, shows where each enters a calculation, and settles why the imaginary unit is load-bearing rather than decorative.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. Why are complex numbers necessary for tracking quantum phase, and how are probabilities recovered from them?

Complex amplitudes encode magnitude and direction in the complex plane; conjugation produces the nonnegative squared magnitude used by the Born rule, while relative angles survive to control interference.

Scope and non-goals.

- This chapter does not offer a general complex-analysis course or use Euler's formula without tying it to state evolution.

- It does not imply that complex amplitudes themselves are directly measurable.

[Figure 8.1.](#fig-08-complex-numbers-for-quantum-computing-1) Notice what the Born rule keeps and what it discards: the squared magnitude becomes a probability, while the angle; the phase; is invisible to an immediate measurement yet fully available to the next gate.

Prerequisites. 03-probability-vs-amplitude

Notation used here. i²=−1; z*=a−bi; |z|²=z*z; principal argument convention stated; radians used for phase.

## Coordinates on the complex plane

Define real part, imaginary part, conjugate, modulus, and argument.

Quantum amplitudes are complex numbers: quantities of the form \(z = a + bi\), where \(a\) and \(b\) are ordinary real numbers and \(i\) is defined by \(i^2=-1\). The magnitude \(\lvert z\rvert=\sqrt{a^2+b^2}\) is the point's distance from the origin, and the squared magnitude \(\lvert z\rvert^2=a^2+b^2\) is what measurement turns into probability.

The reason for dragging in a second dimension of number is interference. A probability table can only add; it has no way for two live possibilities to erase each other. Complex amplitudes carry both a size and an angle, and the angle lets two contributions to the same outcome cancel without either contribution ceasing to exist. Strip the theory down to real numbers and you lose exactly the phenomenon Part I identified as the engine of every algorithm.

So the deal is simple: amplitudes live on the complex plane, gates move them around that plane, and measurement reads out squared lengths. Every calculation in this part of the book is some variation on those three moves.

Evidence boundary. Complex inner-product spaces require conjugation to produce nonnegative norms. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Multiplication rotates and scales

Derive polar multiplication with Euler's formula.

The complex conjugate of \(z=a+bi\) is \(z^\ast=a-bi\); the same point, reflected across the real axis. Its job is to make magnitudes computable: \(z^\ast z=(a-bi)(a+bi)=a^2+b^2\), a plain nonnegative real number. For an amplitude \(\alpha\), the probability contribution is always \(\lvert\alpha\rvert^2=\alpha^\ast\alpha\). Never \(\alpha^2\); that is a different, generally complex, object, and using it is the most common arithmetic error in early quantum calculation.

Phase comes in two grades, and confusing them causes real bugs. Global phase; multiplying an entire state by the same factor like \(i\); changes nothing measurable: every amplitude picks up the same angle, every squared magnitude is untouched, and no experiment can detect the change. Relative phase; one branch's angle shifting against another's; is physically real. Later interference can convert it into different outcome probabilities, which is the whole trick behind the algorithms in Part IV.

Evidence boundary. Quantum probabilities use squared amplitude magnitudes rather than ordinary squares. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## Why z*z is not a probability

Contrast z² with z* z using a numerical counterexample.

For a complex amplitude z, probability uses z-bar times z, not z times z. The conjugate reverses the sign of the imaginary component, making |z| squared real and nonnegative. For z=(1+i)/2, z squared is i/2, which cannot be a probability; conjugate(z)z=1/2 is the valid Born weight. This distinction is an invariant worth checking in every hand calculation and implementation.

Evidence boundary. Relative complex phase affects interference while global phase leaves physical predictions unchanged. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

\(i^2=-1;\quad z^\ast=a-bi;\quad \lvert z\rvert^2=z^\ast z\)[(8.1)](#eq-08-complex-numbers-for-quantum-computing-1)
Notation contract: i²=−1; z*=a−bi; |z|²=z*z; principal argument convention stated; radians used for phase.

## Normalize a two-amplitude state

Carry exact radicals and verify the norm.

If you ever write a statevector simulator, this chapter is your data model. The state is an array of complex numbers; a gate is a matrix of complex numbers; applying a gate is matrix-vector multiplication over that arithmetic. There is no separate probability array to update; probabilities are derived on demand by squaring magnitudes, and only then.

This shapes debugging. A state can carry phases that no single measurement step reveals but that corrupt every later gate, and if your test harness inspects only probabilities at each step it will wave the bug through. Compare amplitudes, or at least compare in a second measurement basis; probability-only testing is blind to exactly the errors quantum code is most prone to.

## Relative angle survives a gate

Connect conjugation and phase to one interference calculation.

Global multiplication by exp(i gamma) rotates every amplitude together and cancels from all inner-product magnitudes. A relative phase rotates only one component against another. Hadamard exposes the difference: equal-magnitude amplitudes with relative phase zero reinforce in |0>, while a phase pi makes them reinforce in |1>. The gate has converted angular information into a measurable population difference.

## Complex-amplitude arithmetic checker

Acceptance contract for Complex-amplitude arithmetic checker
 | Field | Reader-visible record

 | Format | Tested notebook with Argand diagrams and exact/numeric modes
 | Verification | Fixtures verify conjugation, modulus, polar multiplication, normalization, and phase-equivalent probabilities.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Complex-amplitude arithmetic checker",
  "format": "Tested notebook with Argand diagrams and exact/numeric modes",
  "acceptance_test": "Fixtures verify conjugation, modulus, polar multiplication, normalization, and phase-equivalent probabilities.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import cmath
import math

def normalize(amplitudes):
    norm = math.sqrt(sum(abs(value) ** 2 for value in amplitudes))
    if norm < 1e-15:
        raise ValueError("the zero vector cannot be normalized")
    return tuple(value / norm for value in amplitudes)

def probabilities(amplitudes):
    return tuple(abs(value) ** 2 for value in amplitudes)

pairs = ((3 + 4j, -2 + 0.5j),
         (cmath.rect(2.5, 0.7), cmath.rect(0.4, -1.2)),
         (-1j, 1 + 1j))
max_polar_error = 0.0
for left, right in pairs:
    product = left * right
    polar_product = cmath.rect(abs(left) * abs(right), cmath.phase(left) + cmath.phase(right))
    max_polar_error = max(max_polar_error, abs(product - polar_product))
    assert abs(product.conjugate() - left.conjugate() * right.conjugate()) < 1e-12
    assert abs(abs(left) ** 2 - left.real ** 2 - left.imag ** 2) < 1e-12
assert max_polar_error < 1e-12

raw_states = ((3 + 4j, 0j), (1 + 2j, -2 + 1j), (0.25j, -3, 4 - 2j))
states = tuple(normalize(state) for state in raw_states)
for state in states:
    assert abs(sum(probabilities(state)) - 1.0) < 1e-12

phase = cmath.exp(1j * 1.234)
max_probability_shift = 0.0
for state in states:
    shifted = tuple(phase * value for value in state)
    shift = max(abs(a - b) for a, b in zip(probabilities(state), probabilities(shifted)))
    max_probability_shift = max(max_probability_shift, shift)
assert max_probability_shift < 1e-12

wrong_rule_total = sum(abs(value) for value in normalize((3, 4)))
assert abs(wrong_rule_total - 1.0) > 0.1
zero_rejected = False
try:
    normalize((0j, 0j))
except ValueError:
    zero_rejected = True
assert zero_rejected
print(f"PASS: 08 complex amplitudes verify {len(pairs)} polar products and {len(states)} normalized states; max polar error={max_polar_error:.2e}, global-phase probability shift={max_probability_shift:.2e}")
```

Scope boundary

- This chapter does not offer a general complex-analysis course or use Euler's formula without tying it to state evolution.

- It does not imply that complex amplitudes themselves are directly measurable.

Depth commitment. Four core operations, one normalization derivation, and one phase-invariance check.

Practice problem

Normalize (1+i, 1−i), express each amplitude in polar form, and predict whether a global phase changes its measurement distribution.

** Deliverable** : Exact normalized vector, polar angles, probability table, and global-phase argument.

** Pass condition** : The checker verifies norm one, probabilities one-half each, and invariant probabilities under three supplied global phases.

Verification record

Expected solution form. Symbolic calculation with an executable complex-arithmetic fixture.

Model answer. The normalized vector is ((1+i)/2,(1-i)/2). Both amplitudes have magnitude 1/sqrt(2), with phases pi/4 and -pi/4. Multiplying the entire vector by exp(i gamma) changes neither computational-basis probability.

Model result and check. The fixture compares exact values where possible and uses declared tolerance for polar angles.

Acceptance test. The checker verifies norm one, probabilities one-half each, and invariant probabilities under three supplied global phases.

External review. Open.

Expertise still needed. Mathematical physicist or quantum information theorist; Mathematics editor able to verify complex arithmetic and notation consistency.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

executable derivation

### [Complex-amplitude arithmetic checker](/playground/quantum/book/08-complex-numbers-for-quantum-computing/#artifact-08-complex-numbers-for-quantum-computing)

[Download fixture (.py)](/playground/quantum/artifacts/08-complex-numbers-for-quantum-computing/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/08-complex-numbers-for-quantum-computing/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=08-complex-numbers-for-quantum-computing#report)

Dependency graph

## Prerequisites for this chapter

- [Probability vs Amplitude Part I. Mental Model · Chapter 3](/playground/quantum/book/03-probability-vs-amplitude/)

Continue the thread

## Next concepts from this chapter

- [Amplitudes, Measurement, and Gates Orientation guide](/playground/quantum/book/orientation-02-amplitudes-measurement-and-gates/)

- [Vectors, Bases, and Amplitudes Part II. Mathematical Core · Chapter 9](/playground/quantum/book/09-vectors-bases-and-amplitudes/)

- [Inner Products, Orthogonality, and Projection Part II. Mathematical Core · Chapter 10](/playground/quantum/book/10-inner-products-orthogonality-and-projection/)

[Previous Entanglement Without Faster-Than-Light Myths](/playground/quantum/book/07-entanglement-without-faster-than-light-myths/)[Next Vectors, Bases, and Amplitudes](/playground/quantum/book/09-vectors-bases-and-amplitudes/)

In this chapter

- [Coordinates on the complex plane](#coordinates-on-the-complex-plane)

- [Multiplication rotates and scales](#multiplication-rotates-and-scales)

- [Why z*z is not a probability](#why-z-z-is-not-a-probability)

- [Normalize a two-amplitude state](#normalize-a-two-amplitude-state)

- [Relative angle survives a gate](#relative-angle-survives-a-gate)

- [Complex-amplitude arithmetic checker](#complex-amplitude-arithmetic-checker)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 3 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=08-complex-numbers-for-quantum-computing#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/08-complex-numbers-for-quantum-computing/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/09-vectors-bases-and-amplitudes/ -->

# Vectors, Bases, and Amplitudes

A statevector is not the state — it is the state's coordinates in a basis somebody chose, and half of all beginner quantum bugs live in the gap between those two things. This chapter closes that gap for good, with one state written two ways as the proof.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How can the same quantum state have different coordinate vectors without becoming a different physical state?

A state is an abstract vector; a basis supplies coordinates. Changing basis transforms the coordinate list while preserving normalization and inner-product predictions, so basis order and convention are part of every serialized statevector.

Scope and non-goals.

- This chapter does not cover arbitrary spectral decompositions or infinite-dimensional spaces.

- It does not treat an SDK's printed coordinate order as universal.

[Figure 9.1.](#fig-09-vectors-bases-and-amplitudes-1) Notice that the arrow never moves; only the ruler does. In the Z basis the state spreads across both outcomes; in the X basis it sits exactly on one axis. The basis decides what the coordinates say, never what the state is.

Prerequisites. 08-complex-numbers-for-quantum-computing

Notation used here. Ordered basis B=(|0>,|1>); coordinate column [ψ]_B; basis-change matrix columns declared; multi-qubit order explicit.

## A vector before its coordinates

Separate the abstract state from a chosen ordered basis.

A quantum state vector is not merely a list of numbers. It is a list of coordinates relative to a basis; a chosen set of reference states; and changing the basis changes every number in the list while the physical state stays exactly what it was. Confusing the coordinates with the state is the root error this chapter exists to prevent.

The computational basis for one qubit is \(\lvert0\rangle=\begin{pmatrix}1\\0\end{pmatrix}\) and \(\lvert1\rangle=\begin{pmatrix}0\\1\end{pmatrix}\). A state \(\lvert\psi\rangle=\alpha\lvert0\rangle+\beta\lvert1\rangle\) then has the coordinate vector \(\begin{pmatrix}\alpha\\\beta\end{pmatrix}\): the amplitudes are the coordinates, one per basis state. Probabilities arrive only later, through the Born rule, after someone names a measurement basis.

This is why Part I could speak loosely and stay correct: every time a chapter said "the amplitude of \(\lvert1\rangle\)," it was naming a coordinate against the computational basis. From here on, the naming becomes your job.

Evidence boundary. Vectors are abstract elements and coordinate lists depend on an ordered basis. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Two rules for a usable basis

Establish spanning and linear independence in two dimensions.

First, normalization: \(\lvert\alpha\rvert^2+\lvert\beta\rvert^2=1\). A coordinate list that fails this is not a quantum state, no matter how suggestive it looks; it is a scaling error waiting to contaminate a calculation. Check it before using a state, and again after constructing one.

Second, the Born rule, applied per basis: the probability of outcome \(k\) is the squared magnitude of the amplitude on basis state \(k\). The rule is identical in every basis; what changes is the coordinate list you feed it. To measure in a different basis, re-express the state in that basis first, then square. Chapter 5's two-basis experiment is exactly this procedure, run twice on one state.

Evidence boundary. Orthonormal basis changes preserve norms and inner products. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## Change coordinates without changing predictions

Derive computational-to-Hadamard basis coefficients.

A basis change alters coordinates and operators together. If columns of B are the new orthonormal basis vectors, the new coordinate vector is B-dagger psi and an operator becomes B-dagger A B. Computing a probability in mixed conventions is a category error: it describes neither representation consistently. Round-tripping B(B-dagger psi)=psi and preserving the norm are the two cheap checks.

Evidence boundary. Multi-qubit statevector interpretation depends on a declared basis ordering convention. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [openqasm3](https://openqasm.com/)

\(B=(\lvert0\rangle,\lvert1\rangle);\quad [\psi]_B;\quad \dim(\mathcal H_n)=2^n\)[(9.1)](#eq-09-vectors-bases-and-amplitudes-1)
Notation contract: Ordered basis B=(|0>,|1>); coordinate column [ψ]_B; basis-change matrix columns declared; multi-qubit order explicit.

## Ordering is a data contract

Show how |01> and |10> swaps create plausible but wrong output.

A basis is a serialization scheme for state. Two systems with different ordering conventions encode the same abstract object differently, and quantum SDKs make concrete choices; basis ordering, qubit endianness, memory layout; that you cannot debug around without knowing. Reading another framework's statevector dump without checking its convention is parsing a file without its spec.

Statevector simulation itself is direct: store a complex array indexed by basis states, apply gates as matrix multiplications. What is not direct is readout; measurement samples according to squared magnitudes, and printing the array is a simulator privilege real hardware never grants. Keep the two mental APIs separate: the array for computation, the samples for answers.

The professional habit is three labels written before every calculation: basis, ordering, normalization status. It looks slow for one qubit. At eight qubits, with someone else's SDK and a deadline, it is the difference between a bug you find in a minute and one you find in a review.

## Serialize a state safely

Define labels, endianness, and normalization checks.

A serialized statevector needs an explicit qubit order, basis order, numeric type, and tolerance. This book lists |q0 q1 ...> with q0 as the most significant displayed bit. A consumer may store a different index order, but conversion must be tested on asymmetric states such as |01>, not only |00> or symmetric Bell states that conceal a reversal.

## Basis conversion and endianness harness

Acceptance contract for Basis conversion and endianness harness
 | Field | Reader-visible record

 | Format | Small library plus fixtures for one- and two-qubit basis/order changes
 | Verification | Round-trip tests recover the original abstract vector, preserve norms/inner products, and detect a deliberately swapped basis.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Basis conversion and endianness harness",
  "format": "Small library plus fixtures for one- and two-qubit basis/order changes",
  "acceptance_test": "Round-trip tests recover the original abstract vector, preserve norms/inner products, and detect a deliberately swapped basis.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import math

def inner(left, right):
    if len(left) != len(right):
        raise ValueError("vectors must have equal dimension")
    return sum(a.conjugate() * b for a, b in zip(left, right))

def coordinates(vector, basis):
    if len(basis) != len(vector) or any(len(column) != len(vector) for column in basis):
        raise ValueError("basis dimension mismatch")
    return tuple(inner(column, vector) for column in basis)

def reconstruct(values, basis):
    return tuple(sum(values[column] * basis[column][row] for column in range(len(values)))
                 for row in range(len(values)))

def reverse_bits(index, qubits):
    output = 0
    for _ in range(qubits):
        output = (output << 1) | (index & 1)
        index >>= 1
    return output

def change_endianness(vector):
    size = len(vector)
    qubits = size.bit_length() - 1
    if 1 << qubits != size:
        raise ValueError("state dimension must be a power of two")
    output = [0j] * size
    for index, amplitude in enumerate(vector):
        output[reverse_bits(index, qubits)] = amplitude
    return tuple(output)

scale = math.sqrt(0.5)
x_basis = ((scale, scale), (scale, -scale))
states = ((1, 0), (0, 1), (scale, 1j * scale), (0.6, -0.8j))
max_roundtrip_error = 0.0
for state in states:
    values = coordinates(state, x_basis)
    recovered = reconstruct(values, x_basis)
    max_roundtrip_error = max(max_roundtrip_error, *(abs(a - b) for a, b in zip(state, recovered)))
    assert abs(inner(state, state) - inner(values, values)) < 1e-12
assert max_roundtrip_error < 1e-12

for left, right in zip(states, reversed(states)):
    converted_left = coordinates(left, x_basis)
    converted_right = coordinates(right, x_basis)
    assert abs(inner(left, right) - inner(converted_left, converted_right)) < 1e-12

ordered_states = ((0, 1, 0, 0),
                  (0, 0, scale, 1j * scale),
                  tuple(complex(index, -index) for index in range(8)))
for state in ordered_states:
    assert change_endianness(change_endianness(state)) == state
    changed = change_endianness(state)
    assert abs(inner(state, state) - inner(changed, changed)) < 1e-12

ket_01_msb = (0, 1, 0, 0)
ket_01_lsb = change_endianness(ket_01_msb)
assert ket_01_msb != ket_01_lsb and ket_01_lsb == (0, 0, 1, 0)
bad_dimension_rejected = False
try:
    change_endianness((1, 0, 0))
except ValueError:
    bad_dimension_rejected = True
assert bad_dimension_rejected
print(f"PASS: 09 basis/endianness harness round-trips {len(states) + len(ordered_states)} states; max coordinate error={max_roundtrip_error:.2e}, swapped |01> coordinate vector={ket_01_lsb}")
```

Scope boundary

- This chapter does not cover arbitrary spectral decompositions or infinite-dimensional spaces.

- It does not treat an SDK's printed coordinate order as universal.

Depth commitment. One abstract/coordinate distinction, one basis transform, and one endianness fixture.

Practice problem

Express \((\lvert0\rangle+i\lvert1\rangle)/\sqrt{2}\) in the \(\{\lvert+\rangle,\lvert-\rangle\}\) basis and round-trip it to computational coordinates.

** Deliverable** : Both coordinate vectors, the change-of-basis matrix, and norm checks.

** Pass condition** : A fixture applies the basis matrix and its adjoint and recovers the original vector within tolerance.

Verification record

Expected solution form. Stepwise coordinate derivation plus round-trip test.

Model answer. The coefficients are c+=(1+i)/2 and c-=(1-i)/2. Substituting |+>=(|0>+|1>)/sqrt(2) and |->=(|0>-|1>)/sqrt(2) recovers (|0>+i|1>)/sqrt(2), and both coordinate vectors have norm one.

Model result and check. CI checks both directions, norm preservation, and the submitted basis labels.

Acceptance test. A fixture applies the basis matrix and its adjoint and recovers the original vector within tolerance.

External review. Open.

Expertise still needed. Linear algebraist familiar with finite-dimensional complex vector spaces; Quantum SDK engineer able to review statevector ordering conventions.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

executable derivation

### [Basis conversion and endianness harness](/playground/quantum/book/09-vectors-bases-and-amplitudes/#artifact-09-vectors-bases-and-amplitudes)

[Download fixture (.py)](/playground/quantum/artifacts/09-vectors-bases-and-amplitudes/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/09-vectors-bases-and-amplitudes/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=09-vectors-bases-and-amplitudes#report)

Dependency graph

## Prerequisites for this chapter

- [Complex Numbers for Quantum Computing Part II. Mathematical Core · Chapter 8](/playground/quantum/book/08-complex-numbers-for-quantum-computing/)

Continue the thread

## Next concepts from this chapter

- [Inner Products, Orthogonality, and Projection Part II. Mathematical Core · Chapter 10](/playground/quantum/book/10-inner-products-orthogonality-and-projection/)

- [Matrices as Gates Part II. Mathematical Core · Chapter 11](/playground/quantum/book/11-matrices-as-gates/)

- [Tensor Products and State-Space Growth Part II. Mathematical Core · Chapter 13](/playground/quantum/book/13-tensor-products-and-state-space-growth/)

[Previous Complex Numbers for Quantum Computing](/playground/quantum/book/08-complex-numbers-for-quantum-computing/)[Next Inner Products, Orthogonality, and Projection](/playground/quantum/book/10-inner-products-orthogonality-and-projection/)

In this chapter

- [A vector before its coordinates](#a-vector-before-its-coordinates)

- [Two rules for a usable basis](#two-rules-for-a-usable-basis)

- [Change coordinates without changing predictions](#change-coordinates-without-changing-predictions)

- [Ordering is a data contract](#ordering-is-a-data-contract)

- [Serialize a state safely](#serialize-a-state-safely)

- [Basis conversion and endianness harness](#basis-conversion-and-endianness-harness)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=09-vectors-bases-and-amplitudes#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/09-vectors-bases-and-amplitudes/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/10-inner-products-orthogonality-and-projection/ -->

# Inner Products, Orthogonality, and Projection

One number — the inner product — tells you how much two quantum states overlap, whether any measurement can tell them apart, and what is left of a state after you measure it. This chapter turns that number into something you can compute, not just recognize.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How does the inner product quantify overlap and determine the probability of projecting onto a measurement outcome?

The complex inner product uses conjugation to measure overlap; orthogonal states have zero overlap, normalized projection magnitude squared gives an outcome probability, and nonorthogonal states cannot be perfectly separated by a single projective test.

Scope and non-goals.

- This chapter does not derive optimal state discrimination or generalized POVMs.

- It does not treat geometric similarity as a metaphor detached from the Born rule.

[Figure 10.1.](#fig-10-inner-products-orthogonality-and-projection-1) Notice that the same geometry settles three different questions: how much the states overlap, what probability a measurement returns, and whether any measurement can distinguish the states at all.

Prerequisites. 08-complex-numbers-for-quantum-computing, 09-vectors-bases-and-amplitudes

Notation used here. <a|b>=a†b; first argument conjugated; normalized projectors P_v=|v><v|; distinguish scalar probability from vector state.

## Conjugation makes overlap physical

Derive conjugate symmetry and nonnegative self-overlap.

The inner product answers a single question: how much does one state lean in the direction of another? For real vectors it is the dot product you already know. Quantum states carry complex amplitudes, so the first vector must be conjugated before anything is multiplied:

\(\lvert a\rangle=\begin{pmatrix}a_0\\a_1\end{pmatrix},\quad \lvert b\rangle=\begin{pmatrix}b_0\\b_1\end{pmatrix}\)[(10.1)](#eq-10-inner-products-orthogonality-and-projection-1)

\(\langle a\vert b\rangle=a_0^\ast b_0+a_1^\ast b_1\)[(10.2)](#eq-10-inner-products-orthogonality-and-projection-2)

Skip the conjugation and you get answers that are wrong in a specific way: phases that should cancel do not, and probabilities come out complex or negative. With the conjugate in place, the result is always a complex number whose magnitude never exceeds the product of the two lengths.

When that number is zero, the states are orthogonal; they share no direction at all. Orthogonal states can be distinguished perfectly by a single measurement in the right basis. Non-orthogonal states cannot be, no matter how clever the instrument. That is a theorem, not an engineering limitation.

Evidence boundary. Complex inner products are conjugate-linear in one argument and define norms and orthogonality. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Zero overlap means distinguishable directions

Calculate orthogonal and nonorthogonal pairs.

Projection onto a normalized vector \(\lvert v\rangle\) is itself an operator, built from the outer product:

\(P_v=\lvert v\rangle\!\langle v\rvert\)[(10.3)](#eq-10-inner-products-orthogonality-and-projection-3)

Apply \(P_v\) to \(\lvert\psi\rangle\) and you get the component of the state that lies along \(\lvert v\rangle\). Three different objects then follow, and keeping them straight is most of this chapter:

- The amplitude \(\langle v\vert\psi\rangle\); a complex number, the overlap itself.

- The probability \(\lvert\langle v\vert\psi\rangle\rvert^2\); the Born rule; a real number between 0 and 1.

- The post-measurement state; the projected vector \(P_v\lvert\psi\rangle\), renormalized to unit length.

Measurement returns the outcome \(v\) with the Born-rule probability, and afterward the system is described by the renormalized projection. A probability is a number; the post-measurement state is a vector. Confusing the two is the classic beginner error, and it poisons every calculation downstream of it.

Evidence boundary. A rank-one projector |v><v| is Hermitian and idempotent for normalized |v>. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## A projector asks one yes-or-no question

Construct |v><v| and apply it to a state.

A stronger error is overstating distinguishability. If two states are not orthogonal, no measurement; on one copy, in any basis, with any cleverness; identifies them perfectly. A claim that quietly assumes perfect discrimination of non-orthogonal states is a claim that violates the Born rule.

Evidence boundary. Projection probabilities follow from squared overlaps under projective measurement. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/)

\(\langle a\vert b\rangle=a^\dagger b;\quad P_v=\lvert v\rangle\!\langle v\rvert\)[(10.4)](#eq-10-inner-products-orthogonality-and-projection-4)
Notation contract: <a|b>=a†b; first argument conjugated; normalized projectors P_v=|v><v|; distinguish scalar probability from vector state.

## Probability and surviving component

Separate projection norm from normalized post-measurement state.

An inner product is a similarity query with strict physical semantics. Overlaps appear everywhere: state-preparation checks, amplitude amplification, quantum kernels, error-correction syndromes, and verification protocols all reduce, at some point, to computing \(\langle a\vert b\rangle\) and deciding what it means.

What it means depends on the task. In an algorithm an overlap may be a success amplitude; in verification it may compare a prepared state against a target; in communication it may bound how well two signals can be told apart. The evidence type differs too: a simulator can report state fidelity directly, while hardware gives you sampled outcomes. Related, but not interchangeable; a test plan that mixes them will lie to you.

## A discrimination limit visible in two dimensions

Use nonzero overlap to rule out a perfect projective separator.

Perfect one-shot discrimination requires orthogonal supports. For |0> and |+>, the overlap magnitude is 1/sqrt(2), so no measurement can assign a unique outcome to both states without error. More elaborate measurements can optimize the error probability or admit an inconclusive result, but cannot manufacture orthogonality. Any protocol that assumes otherwise has hidden impossible information in its readout contract.

## Inner-product and projector verifier

Acceptance contract for Inner-product and projector verifier
 | Field | Reader-visible record

 | Format | Symbolic/numerical notebook with geometric visualization
 | Verification | Tests conjugate symmetry, idempotent projectors, probability bounds, and normalized conditional states.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Inner-product and projector verifier",
  "format": "Symbolic/numerical notebook with geometric visualization",
  "acceptance_test": "Tests conjugate symmetry, idempotent projectors, probability bounds, and normalized conditional states.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import math

def inner(left, right):
    return sum(a.conjugate() * b for a, b in zip(left, right))

def matvec(matrix, vector):
    return tuple(sum(value * vector[column] for column, value in enumerate(row)) for row in matrix)

def matmul(left, right):
    return tuple(tuple(sum(left[row][k] * right[k][column] for k in range(len(right)))
                       for column in range(len(right[0]))) for row in range(len(left)))

def projector(ket):
    norm = inner(ket, ket).real
    if abs(norm - 1.0) > 1e-12:
        raise ValueError("projector ket must be normalized")
    return tuple(tuple(ket[row] * ket[column].conjugate() for column in range(len(ket)))
                 for row in range(len(ket)))

def condition(matrix, state):
    projected = matvec(matrix, state)
    probability = inner(projected, projected).real
    if probability < 1e-15:
        raise ValueError("cannot normalize a zero-probability branch")
    return probability, tuple(value / math.sqrt(probability) for value in projected)

scale = math.sqrt(0.5)
kets = ((1 + 0j, 0j), (scale, 1j * scale))
states = ((0.6, 0.8), (scale, scale), (scale, -1j * scale))
max_idempotence_error = 0.0
probabilities = []
for ket in kets:
    matrix = projector(ket)
    squared = matmul(matrix, matrix)
    max_idempotence_error = max(max_idempotence_error,
                                *(abs(squared[row][column] - matrix[row][column])
                                  for row in range(2) for column in range(2)))
    for state in states:
        probability = inner(state, matvec(matrix, state)).real
        assert -1e-12 <= probability <= 1.0 + 1e-12
        probabilities.append(probability)
        if probability > 1e-12:
            branch_probability, conditional = condition(matrix, state)
            assert abs(branch_probability - probability) < 1e-12
            assert abs(inner(conditional, conditional) - 1.0) < 1e-12
assert max_idempotence_error < 1e-12

for left in states:
    for right in states:
        assert abs(inner(left, right) - inner(right, left).conjugate()) < 1e-12
assert abs(inner(kets[0], kets[1])) == scale

zero_branch_rejected = False
try:
    condition(projector((1, 0)), (0, 1))
except ValueError:
    zero_branch_rejected = True
assert zero_branch_rejected
bad_projector_rejected = False
try:
    projector((2, 0))
except ValueError:
    bad_projector_rejected = True
assert bad_projector_rejected
naive = lambda left, right: sum(a * b for a, b in zip(left, right))
assert abs(naive((1j, 0), (1j, 0)) - inner((1j, 0), (1j, 0))) > 1.0
print(f"PASS: 10 projector verifier checks {len(probabilities)} Born probabilities; range=[{min(probabilities):.3f},{max(probabilities):.3f}], last derived probability={probability:.3f}, max P^2-P error={max_idempotence_error:.2e}")
```

Scope boundary

- This chapter does not derive optimal state discrimination or generalized POVMs.

- It does not treat geometric similarity as a metaphor detached from the Born rule.

Depth commitment. One inner-product derivation, one projector proof, one nonorthogonal limit, and one verified exercise.

Practice problem

For \(\lvert\psi\rangle=(\lvert0\rangle+i\lvert1\rangle)/\sqrt{2}\) and \(\lvert v\rangle=(\lvert0\rangle+\lvert1\rangle)/\sqrt{2}\), compute overlap, projection probability, and normalized post-measurement state.

** Deliverable** : Exact complex overlap, probability, projected vector, and invariant checks.

** Pass condition** : The notebook asserts P²=P, 0≤p≤1, and unit norm after conditioning.

Verification record

Expected solution form. Aligned derivation plus independent matrix calculation.

Model answer. The overlap <v|psi> is (1+i)/2 and the projection probability is its squared magnitude, 1/2. The normalized projected state is |v> up to the global phase exp(i pi/4).

Model result and check. A test constructs P numerically and compares direct projection with overlap-based probability.

Acceptance test. The notebook asserts P²=P, 0≤p≤1, and unit norm after conditioning.

External review. Open.

Expertise still needed. Quantum information theorist or functional analyst; Mathematics reviewer able to audit conjugation conventions and projection derivations.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

executable derivation

### [Inner-product and projector verifier](/playground/quantum/book/10-inner-products-orthogonality-and-projection/#artifact-10-inner-products-orthogonality-and-projection)

[Download fixture (.py)](/playground/quantum/artifacts/10-inner-products-orthogonality-and-projection/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/10-inner-products-orthogonality-and-projection/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=10-inner-products-orthogonality-and-projection#report)

Dependency graph

## Prerequisites for this chapter

- [Complex Numbers for Quantum Computing Part II. Mathematical Core · Chapter 8](/playground/quantum/book/08-complex-numbers-for-quantum-computing/)

- [Vectors, Bases, and Amplitudes Part II. Mathematical Core · Chapter 9](/playground/quantum/book/09-vectors-bases-and-amplitudes/)

Continue the thread

## Next concepts from this chapter

- [Measurement and What It Does Not Mean Part I. Mental Model · Chapter 5](/playground/quantum/book/05-measurement-and-what-it-does-not-mean/)

- [Matrices as Gates Part II. Mathematical Core · Chapter 11](/playground/quantum/book/11-matrices-as-gates/)

- [Unitary Operations and Reversibility Part II. Mathematical Core · Chapter 12](/playground/quantum/book/12-unitary-operations-and-reversibility/)

[Previous Vectors, Bases, and Amplitudes](/playground/quantum/book/09-vectors-bases-and-amplitudes/)[Next Matrices as Gates](/playground/quantum/book/11-matrices-as-gates/)

In this chapter

- [Conjugation makes overlap physical](#conjugation-makes-overlap-physical)

- [Zero overlap means distinguishable directions](#zero-overlap-means-distinguishable-directions)

- [A projector asks one yes-or-no question](#a-projector-asks-one-yes-or-no-question)

- [Probability and surviving component](#probability-and-surviving-component)

- [A discrimination limit visible in two dimensions](#a-discrimination-limit-visible-in-two-dimensions)

- [Inner-product and projector verifier](#inner-product-and-projector-verifier)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 3 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=10-inner-products-orthogonality-and-projection#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/10-inner-products-orthogonality-and-projection/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/11-matrices-as-gates/ -->

# Matrices as Gates

Every gate in a quantum program is a matrix, and every matrix is a multiplication you can do by hand in under a minute. This chapter gets you multiplying — X, Z, and H against real state vectors — until gate notation becomes arithmetic instead of vocabulary.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How does matrix multiplication predict a quantum gate's action on every possible input state?

A gate matrix is a linear operator whose columns are its outputs on the ordered basis; multiplying it by a statevector combines those basis actions, making linearity, ordering, and matrix composition sufficient to predict the circuit.

Scope and non-goals.

- This chapter does not prove the full spectral theorem or classify all one-qubit unitaries.

- It does not encourage memorizing gate names without verifying their matrices.

[Figure 11.1.](#fig-11-matrices-as-gates-1) Notice the minus sign after Z: no measurement of \(-\lvert1\rangle\) can see it, yet the H that follows turns it into a state you can tell apart from the no-minus version. Phase is invisible until a basis change makes it visible.

Prerequisites. 09-vectors-bases-and-amplitudes, 10-inner-products-orthogonality-and-projection

Notation used here. Column-vector convention; basis order (|0>,|1>); circuit G1 then G2 corresponds to G2G1; equality up to global phase labeled.

## Read a gate by its columns

Interpret each column as a transformed basis vector.

A one-qubit gate is a \(2\times2\) matrix, and applying it means multiplying that matrix by the state vector. One hard constraint rides along: a closed-system gate must preserve total probability, which forces the matrix to be unitary; the next chapter makes that condition precise.

The three workhorses, defined by their action:

\(\begin{aligned}X\lvert0\rangle&=\lvert1\rangle,&X\lvert1\rangle&=\lvert0\rangle,\\Z\lvert0\rangle&=\lvert0\rangle,&Z\lvert1\rangle&=-\lvert1\rangle,\\H\lvert0\rangle&=(\lvert0\rangle+\lvert1\rangle)/\sqrt2,&H\lvert1\rangle&=(\lvert0\rangle-\lvert1\rangle)/\sqrt2.\end{aligned}\)[(11.1)](#eq-11-matrices-as-gates-1)

Each line is a matrix-vector product, not a slogan. X swaps the amplitudes. Z flips the sign of the \(\lvert1\rangle\) component. H reshapes each basis state into an equal superposition with a specific sign pattern; and that sign pattern is the whole point, as the worked example shows.

Evidence boundary. Linear operators are represented by matrices once an ordered basis is fixed. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Multiply one state by X, Z, H, and S

Carry exact complex arithmetic through the standard set.

\(X=\begin{pmatrix}0&1\\1&0\end{pmatrix},\quad Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix},\quad H=\frac1{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}\)[(11.2)](#eq-11-matrices-as-gates-2)

A candidate gate is checked with the unitarity condition:

\(U^\dagger U=I\)[(11.3)](#eq-11-matrices-as-gates-3)

Which guarantees the matrix preserves the norm of every input state. The Hadamard carries one more identity worth memorizing: \(H^2=I\). H is its own inverse, and because it turns computational-basis information into phase-sensitive superpositions, it opens an enormous fraction of the algorithms in this book.

Evidence boundary. A gate's columns specify its action on basis vectors and linearity extends that action to every state. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## Composition order is execution order reversed

Relate circuit time to matrix products.

Evidence boundary. Matrix products compose gates in an order that must be reconciled with circuit chronology. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

\(G_1\text{ then }G_2\Longleftrightarrow G_2G_1\)[(11.4)](#eq-11-matrices-as-gates-4)
Notation contract: Column-vector convention; basis order (|0>,|1>); circuit G1 then G2 corresponds to G2G1; equality up to global phase labeled.

## The HZH identity exposes phase

Derive HZH=X entry by entry.

Gate matrices are the instruction semantics of the circuit model, and they get interpreted at three distinct layers:

- Ideal matrix; what the mathematics says the operation does.

- Compiled circuit; what the transpiler emits for a specific device's native gate set and topology.

- Physical operation; what calibrated pulses actually execute, with noise.

Debugging means locating the broken layer. If the ideal matrix result is wrong, no transpiler will save the program. If the ideal result is right but the compiled circuit is too deep, you have a resource-cost problem. If both are right but hardware counts are wrong, suspect noise, calibration, or connectivity. This is also why hand calculation keeps its value in the SDK era: it is the only layer you can check with a pencil.

## Three matrix checks before trust

Verify shape, norm preservation on tests, and expected basis action.

Check dimensions first: an n-qubit gate is 2^n by 2^n in the declared basis order. Check columns next: each column is the output of one basis input, so column norms and pairwise inner products expose normalization or reversibility errors. Finally apply the matrix to at least one asymmetric superposition; basis-only tests can miss wrong phases even when the truth table looks correct.

## Gate matrix test bench

Acceptance contract for Gate matrix test bench
 | Field | Reader-visible record

 | Format | Tested Python module with exact reference matrices and composition checks
 | Verification | Tests every basis action, H²=I, HZH=X, and agreement between sequential and composed execution.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Gate matrix test bench",
  "format": "Tested Python module with exact reference matrices and composition checks",
  "acceptance_test": "Tests every basis action, H²=I, HZH=X, and agreement between sequential and composed execution.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import math

def shape(matrix):
    if not matrix or not matrix[0] or any(len(row) != len(matrix[0]) for row in matrix):
        raise ValueError("matrix must be nonempty and rectangular")
    return len(matrix), len(matrix[0])

def matvec(matrix, vector):
    rows, columns = shape(matrix)
    if columns != len(vector):
        raise ValueError("matrix/vector dimension mismatch")
    return tuple(sum(matrix[row][column] * vector[column] for column in range(columns))
                 for row in range(rows))

def matmul(left, right):
    left_rows, shared = shape(left)
    right_rows, columns = shape(right)
    if shared != right_rows:
        raise ValueError("matrix product dimension mismatch")
    return tuple(tuple(sum(left[row][k] * right[k][column] for k in range(shared))
                       for column in range(columns)) for row in range(left_rows))

def max_error(left, right):
    return max(abs(a - b) for row_a, row_b in zip(left, right) for a, b in zip(row_a, row_b))

scale = math.sqrt(0.5)
I = ((1, 0), (0, 1))
X = ((0, 1), (1, 0))
Y = ((0, -1j), (1j, 0))
Z = ((1, 0), (0, -1))
H = ((scale, scale), (scale, -scale))
S = ((1, 0), (0, 1j))
gates = (X, Y, Z, H, S)

identities = (matmul(H, H), matmul(matmul(H, Z), H), matmul(matmul(H, X), H))
targets = (I, X, Z)
identity_error = max(max_error(actual, expected) for actual, expected in zip(identities, targets))
assert identity_error < 1e-12

basis = ((1, 0), (0, 1))
assert matvec(X, basis[0]) == basis[1] and matvec(X, basis[1]) == basis[0]
assert matvec(Z, basis[0]) == basis[0] and matvec(Z, basis[1]) == (0, -1)
assert matvec(Y, basis[0]) == (0j, 1j)

states = ((1, 0), (0, 1), (scale, scale), (0.6, 0.8j))
composition_error = 0.0
for left, right in ((H, Z), (S, H), (X, S), (Y, H)):
    composed = matmul(left, right)
    for state in states:
        sequential = matvec(left, matvec(right, state))
        direct = matvec(composed, state)
        composition_error = max(composition_error, *(abs(a - b) for a, b in zip(sequential, direct)))
assert composition_error < 1e-12

witness = (scale, 1j * scale)
assert any(abs(a - b) > 1e-6 for a, b in zip(matvec(matmul(S, H), witness), matvec(matmul(H, S), witness)))
ragged_rejected = False
try:
    matvec(((1, 0), (0,)), (1, 0))
except ValueError:
    ragged_rejected = True
assert ragged_rejected
print(f"PASS: 11 gate bench verifies {len(gates)} reference matrices and {4 * len(states)} compositions; max identity error={identity_error:.2e}, sequential error={composition_error:.2e}")
```

Scope boundary

- This chapter does not prove the full spectral theorem or classify all one-qubit unitaries.

- It does not encourage memorizing gate names without verifying their matrices.

Depth commitment. Four gate multiplications, one composition identity, and a matrix-construction exercise.

Practice problem

Derive the matrix of a gate that maps \(\lvert0\rangle\mapsto\lvert+\rangle\) and \(\lvert1\rangle\mapsto\lvert-\rangle\), then apply it to \((\lvert0\rangle+i\lvert1\rangle)/\sqrt{2}\).

** Deliverable** : Derived matrix, output vector, and normalization/composition checks.

** Pass condition** : The solution identifies H, multiplies exactly, and the test verifies both columns and the submitted output.

Verification record

Expected solution form. Column-construction derivation plus executable matrix assertion.

Model answer. The columns are the declared images of |0> and |1>, so the matrix is H. Applied to (1,i)/sqrt(2), it yields ((1+i)/2,(1-i)/2), a normalized state.

Model result and check. CI compares the matrix and output to exact references up to global phase.

Acceptance test. The solution identifies H, multiplies exactly, and the test verifies both columns and the submitted output.

External review. Open.

Expertise still needed. Quantum information theorist comfortable with gate conventions; Numerical linear algebra reviewer able to verify matrix fixtures and ordering.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

executable derivation

### [Gate matrix test bench](/playground/quantum/book/11-matrices-as-gates/#artifact-11-matrices-as-gates)

[Download fixture (.py)](/playground/quantum/artifacts/11-matrices-as-gates/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/11-matrices-as-gates/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=11-matrices-as-gates#report)

Dependency graph

## Prerequisites for this chapter

- [Vectors, Bases, and Amplitudes Part II. Mathematical Core · Chapter 9](/playground/quantum/book/09-vectors-bases-and-amplitudes/)

- [Inner Products, Orthogonality, and Projection Part II. Mathematical Core · Chapter 10](/playground/quantum/book/10-inner-products-orthogonality-and-projection/)

Continue the thread

## Next concepts from this chapter

- [Interference as the Engine of Quantum Algorithms Part I. Mental Model · Chapter 6](/playground/quantum/book/06-interference-as-engine-of-quantum-algorithms/)

- [Unitary Operations and Reversibility Part II. Mathematical Core · Chapter 12](/playground/quantum/book/12-unitary-operations-and-reversibility/)

- [Circuit Notation as a Programming Language Part III. Circuit Model · Chapter 16](/playground/quantum/book/16-circuit-notation-as-programming-language/)

[Previous Inner Products, Orthogonality, and Projection](/playground/quantum/book/10-inner-products-orthogonality-and-projection/)[Next Unitary Operations and Reversibility](/playground/quantum/book/12-unitary-operations-and-reversibility/)

In this chapter

- [Read a gate by its columns](#read-a-gate-by-its-columns)

- [Multiply one state by X, Z, H, and S](#multiply-one-state-by-x-z-h-and-s)

- [Composition order is execution order reversed](#composition-order-is-execution-order-reversed)

- [The HZH identity exposes phase](#the-hzh-identity-exposes-phase)

- [Three matrix checks before trust](#three-matrix-checks-before-trust)

- [Gate matrix test bench](#gate-matrix-test-bench)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 3 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=11-matrices-as-gates#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/11-matrices-as-gates/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/12-unitary-operations-and-reversibility/ -->

# Unitary Operations and Reversibility

One short equation — U † U = I — decides whether a matrix is allowed to be a quantum gate, and it buys something classical computing spent decades throwing away: every legal gate can be run backwards.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. What mathematical test decides whether a matrix is a valid closed-system quantum operation?

A matrix is unitary when U†U=I; this preserves inner products, norms, orthogonality, and therefore total probability, while guaranteeing an inverse U†. Nonunitary projection, reset, and loss require measurement or environmental coupling.

Scope and non-goals.

- This chapter does not claim every physical process is unitary on the subsystem being modeled.

- It does not derive open-system channels or the thermodynamics of erasure.

[Figure 12.1.](#fig-12-unitary-operations-and-reversibility-1) Notice that the loop closes exactly. Because U preserves length, U† undoes it with no information lost, no ancilla, and no approximation; a property measurement can never offer.

Prerequisites. 10-inner-products-orthogonality-and-projection, 11-matrices-as-gates

Notation used here. Adjoint † means conjugate transpose; identity I_d dimension declared; numerical unitarity tolerance uses a specified matrix norm.

## The adjoint test

Compute U†U for valid and invalid candidates.

A unitary operation preserves the length of every state vector, and it preserves the inner product between any two of them. Valid states stay valid, and distinguishability relationships survive closed-system evolution intact.

The whole doctrine fits in one equation:

\(U^\dagger U=I\)[(12.1)](#eq-12-unitary-operations-and-reversibility-1)

Here \(U^\dagger\) is the conjugate transpose of \(U\) and \(I\) is the identity. When the equation holds, the inverse exists and is handed to you:

\(U^{-1}=U^\dagger\)[(12.2)](#eq-12-unitary-operations-and-reversibility-2)

That is the entire reason quantum gates are reversible. Undoing a gate never requires a search or a checkpoint; only the adjoint of the matrix you already used.

Evidence boundary. Unitary operators satisfy U†U=I and preserve inner products. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## What unitarity preserves

Derive norm and inner-product invariance.

Computing \(U^\dagger U\) and getting the identity certifies norm preservation for every input state, not just the one you tested. Unitarity also preserves overlaps:

\(\langle Ua\vert Ub\rangle=\langle a\vert b\rangle\)[(12.3)](#eq-12-unitary-operations-and-reversibility-3)

The consequence is profound: a closed-system gate can never merge two distinct states into one. If it could, the inner product between them would change from zero to one, and the equation above forbids it. Measurement and noise can destroy that kind of information; which is precisely why they are modeled as different processes, outside the unitary framework.

Evidence boundary. Unitary evolution is reversible with inverse U†. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## Invertibility follows for free

Show U^{-1}=U† and connect to reversible circuits.

Evidence boundary. Measurement and open-system noise are not represented as unitary evolution on the measured subsystem alone. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

\(U^\dagger U=I_d;\quad U^{-1}=U^\dagger\)[(12.4)](#eq-12-unitary-operations-and-reversibility-4)
Notation contract: Adjoint † means conjugate transpose; identity I_d dimension declared; numerical unitarity tolerance uses a specified matrix norm.

## Operations outside the closed-system gate set

Classify projection, reset, deletion, and noise.

Unitarity works like a type constraint on quantum operations. A function that is trivial in ordinary code; compare-and-overwrite, say; may be illegal as a direct gate, and implementing it in a circuit typically requires reversible logic, ancilla registers, and a final uncomputation pass to clean the ancillas up.

This has teeth for resource estimates. When a paper treats a complex classical subroutine as a free unitary oracle, the cost has not vanished; it is hiding in the reversible implementation. Ask for it.

Keep the boundary straight: measurement, reset, noise, and discarding information are legitimate parts of a full computation, but they are not unitary gates. A serious circuit description says which layer each operation belongs to, instead of hiding every physical effect inside one box.

## A validator for proposed gates

Turn algebraic conditions into a reusable test.

Compute the residual R=U-dagger U-I and report a matrix norm with a declared tolerance. A Boolean-looking truth table is insufficient because complex phases may break orthogonality. If a matrix is uniformly mis-scaled, normalize only after proving its columns are already mutually orthogonal; arbitrary column-by-column repair changes the proposed linear map rather than validating it.

## Unitary matrix validator

Acceptance contract for Unitary matrix validator
 | Field | Reader-visible record

 | Format | CLI and notebook accepting real or complex matrices
 | Verification | Tests exact standard gates, rejects projection/scaling matrices, reports tolerance and maximum deviation from identity.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Unitary matrix validator",
  "format": "CLI and notebook accepting real or complex matrices",
  "acceptance_test": "Tests exact standard gates, rejects projection/scaling matrices, reports tolerance and maximum deviation from identity.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import cmath
import math

def validate_square(matrix):
    if not matrix or any(len(row) != len(matrix) for row in matrix):
        raise ValueError("unitary candidate must be a nonempty square matrix")

def adjoint(matrix):
    validate_square(matrix)
    return tuple(tuple(matrix[column][row].conjugate() for column in range(len(matrix)))
                 for row in range(len(matrix)))

def matmul(left, right):
    validate_square(left)
    validate_square(right)
    if len(left) != len(right):
        raise ValueError("matrix dimensions must agree")
    size = len(left)
    return tuple(tuple(sum(left[row][k] * right[k][column] for k in range(size))
                       for column in range(size)) for row in range(size))

def unitary_deviation(matrix):
    product = matmul(adjoint(matrix), matrix)
    return max(abs(product[row][column] - (1 if row == column else 0))
               for row in range(len(matrix)) for column in range(len(matrix)))

def matvec(matrix, vector):
    validate_square(matrix)
    if len(matrix) != len(vector):
        raise ValueError("state dimension mismatch")
    return tuple(sum(matrix[row][column] * vector[column] for column in range(len(vector)))
                 for row in range(len(vector)))

scale = math.sqrt(0.5)
H = ((scale, scale), (scale, -scale))
X = ((0, 1), (1, 0))
S = ((1, 0), (0, 1j))
CNOT = ((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 0, 1), (0, 0, 1, 0))
phase_gates = tuple(((1, 0), (0, cmath.exp(1j * theta)))
                    for theta in (0.0, 0.2, -1.7, math.pi))
good_gates = (H, X, S, CNOT, *phase_gates)
deviations = [unitary_deviation(gate) for gate in good_gates]
assert max(deviations) < 1e-12

states = ((0.6, 0.8), (scale, 1j * scale), (1, 0))
for gate in (H, X, S, *phase_gates):
    for state in states:
        before = sum(abs(value) ** 2 for value in state)
        after = sum(abs(value) ** 2 for value in matvec(gate, state))
        assert abs(before - after) < 1e-12

bad_gates = (((1, 0), (0, 0)), ((2, 0), (0, 0.5)), ((1, 1), (0, 1)))
bad_deviations = [unitary_deviation(gate) for gate in bad_gates]
assert min(bad_deviations) > 0.5
near = ((1, 0), (0, 1 + 5e-10))
near_deviation = unitary_deviation(near)
assert near_deviation < 1e-8 and near_deviation > 1e-12
ragged_rejected = False
try:
    unitary_deviation(((1, 0), (0,)))
except ValueError:
    ragged_rejected = True
assert ragged_rejected
print(f"PASS: 12 unitary validator accepts {len(good_gates)} gates with max deviation={max(deviations):.2e}, rejects {len(bad_gates)} matrices with min deviation={min(bad_deviations):.2f}, tolerance boundary={near_deviation:.2e}")
```

Scope boundary

- This chapter does not claim every physical process is unitary on the subsystem being modeled.

- It does not derive open-system channels or the thermodynamics of erasure.

Depth commitment. One equivalence derivation, four candidates, one repair, and an executable validator.

Practice problem

Classify four supplied \(2\times2\) matrices as unitary or nonunitary, and repair one scaled candidate if possible.

```
A = (1/sqrt(2))*[[1,1],[1,-1]]
B = [[1,0],[0,2]]
C = (1/2)*[[1,1],[1,-1]]
D = [[1,0],[0,i]]
```

** Deliverable** : Adjoint products, verdicts, and a corrected matrix with proof.

** Pass condition** : The CLI independently computes ||U†U−I|| and matches all verdicts under the declared tolerance.

Verification record

Expected solution form. Exact algebra for two matrices plus numerical report for all four.

Model answer. A and D are unitary; B and C are not. C has orthogonal columns of norm 1/sqrt(2), so multiplying C by sqrt(2) repairs it and produces A; the identity residual is then zero up to floating-point tolerance.

Model result and check. Tests assert classifications and the corrected candidate's identity residual.

Acceptance test. The CLI independently computes ||U†U−I|| and matches all verdicts under the declared tolerance.

External review. Open.

Expertise still needed. Mathematical physicist specializing in quantum operations; Numerical linear algebra reviewer experienced with stable unitarity tests.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

executable derivation

### [Unitary matrix validator](/playground/quantum/book/12-unitary-operations-and-reversibility/#artifact-12-unitary-operations-and-reversibility)

[Download fixture (.py)](/playground/quantum/artifacts/12-unitary-operations-and-reversibility/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/12-unitary-operations-and-reversibility/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=12-unitary-operations-and-reversibility#report)

Dependency graph

## Prerequisites for this chapter

- [Inner Products, Orthogonality, and Projection Part II. Mathematical Core · Chapter 10](/playground/quantum/book/10-inner-products-orthogonality-and-projection/)

- [Matrices as Gates Part II. Mathematical Core · Chapter 11](/playground/quantum/book/11-matrices-as-gates/)

Continue the thread

## Next concepts from this chapter

- [Observables, Eigenvectors, and Measurement Part II. Mathematical Core · Chapter 14](/playground/quantum/book/14-observables-eigenvectors-and-measurement/)

- [Controlled Gates and Reversible Classical Computation Part III. Circuit Model · Chapter 18](/playground/quantum/book/18-controlled-gates-and-reversible-classical-computation/)

- [Hamiltonian Simulation Part IV. Protocols and Algorithms · Chapter 34](/playground/quantum/book/34-hamiltonian-simulation/)

[Previous Matrices as Gates](/playground/quantum/book/11-matrices-as-gates/)[Next Tensor Products and State-Space Growth](/playground/quantum/book/13-tensor-products-and-state-space-growth/)

In this chapter

- [The adjoint test](#the-adjoint-test)

- [What unitarity preserves](#what-unitarity-preserves)

- [Invertibility follows for free](#invertibility-follows-for-free)

- [Operations outside the closed-system gate set](#operations-outside-the-closed-system-gate-set)

- [A validator for proposed gates](#a-validator-for-proposed-gates)

- [Unitary matrix validator](#unitary-matrix-validator)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 3 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=12-unitary-operations-and-reversibility#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/12-unitary-operations-and-reversibility/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/13-tensor-products-and-state-space-growth/ -->

# Tensor Products and State-Space Growth

Three qubits need eight amplitudes; thirty need about a billion; fifty need more memory than your laptop has. The tensor product is the rule behind that growth — and the reason the growth cannot be cashed out as readable output.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How are independently described quantum systems combined, and why does their joint statevector grow exponentially?

The joint state space is the tensor product: subsystem dimensions multiply, product-state amplitudes are pairwise products in a declared basis order, and n qubits require 2^n complex coordinates even though a measurement returns only n classical bits.

Scope and non-goals.

- This chapter does not claim exponential statevector size automatically yields exponential computational speedup.

- It does not yet classify general entanglement or introduce tensor-network algorithms in depth.

[Figure 13.1.](#fig-13-tensor-products-and-state-space-growth-1) Notice where the curve crosses the dashed line; a few dozen qubits suffice to defeat straightforward classical simulation; and that nothing about the readout improves on the way: each shot still returns at most one classical bit per qubit.

Prerequisites. 09-vectors-bases-and-amplitudes

Notation used here. Subsystem order A⊗B; basis order (|00>,|01>,|10>,|11>); n qubits have 2^n coordinates; memory units distinguish GB/GiB.

## Dimensions multiply when systems combine

Derive \(\dim(\mathcal{H}_A\otimes\mathcal{H}_B)=\dim(\mathcal{H}_A)\dim(\mathcal{H}_B)\).

One qubit has two basis states. Two qubits have four. Three have eight, and \(n\) qubits have \(2^n\) computational basis states, each carrying its own complex amplitude in the statevector.

The growth is real, and it is easy to misread. The statevector has one amplitude per basis state, but measurement does not print amplitudes; it returns one basis state, sampled according to their squared magnitudes. The craft of quantum algorithms is shaping amplitudes so that this thin sampled sliver carries the answer. Tensor products supply the language for all of it: multi-qubit states, entanglement, and circuit simulation alike.

Evidence boundary. Composite finite-dimensional quantum systems use tensor-product state spaces whose dimensions multiply. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Kronecker products set the coordinates

Expand two symbolic qubits in an ordered joint basis.

If:

\(\begin{aligned}\lvert a\rangle&=a_0\lvert0\rangle+a_1\lvert1\rangle,\\\lvert b\rangle&=b_0\lvert0\rangle+b_1\lvert1\rangle.\end{aligned}\)[(13.1)](#eq-13-tensor-products-and-state-space-growth-1)

Then the combined state is the product, expanded term by term:

\(\lvert a\rangle\otimes\lvert b\rangle=a_0b_0\lvert00\rangle+a_0b_1\lvert01\rangle+a_1b_0\lvert10\rangle+a_1b_1\lvert11\rangle\)[(13.2)](#eq-13-tensor-products-and-state-space-growth-2)

Dimensions multiply:

\(\dim(A\otimes B)=\dim(A)\dim(B)\)[(13.3)](#eq-13-tensor-products-and-state-space-growth-3)

Two-dimensional systems composed \(n\) times give the familiar \(2^n\). Every amplitude in the big vector is a product of amplitudes from the small ones; when the state factors at all. Entangled states are precisely the ones that cannot be written this way.

Evidence boundary. Product-state coordinates are Kronecker products in a specified ordered basis. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## A four-amplitude example by hand

Compute |+>⊗|-> and verify normalization.

Evidence boundary. An n-qubit pure statevector has 2^n complex coordinates while computational-basis measurement returns an n-bit outcome. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [National Academies of Sciences](https://doi.org/10.17226/25196)

\(\dim(\mathcal H_n)=2^n;\quad (\lvert00\rangle,\lvert01\rangle,\lvert10\rangle,\lvert11\rangle)\)[(13.4)](#eq-13-tensor-products-and-state-space-growth-4)
Notation contract: Subsystem order A⊗B; basis order (|00>,|01>,|10>,|11>); n qubits have 2^n coordinates; memory units distinguish GB/GiB.

## Product structure versus arbitrary joint vectors

Identify the coefficient constraint for factorability.

Tensor products explain why naive simulation dies young: a statevector for \(n\) qubits holds \(2^n\) complex amplitudes, and memory follows. But the same growth implies no automatic application advantage; only that the physical state space is large and hard to represent classically in the straightforward way. Good simulators and compilers survive by exploiting what the naive representation ignores: sparsity, tensor-network structure, and limited entanglement.

A debugging habit worth keeping: write the basis index table before the vector. For two qubits, decide whether index \(1\) means \(\lvert01\rangle\) or \(\lvert10\rangle\) under your convention, and write it down. Many wrong circuit traces are not deep physics errors; they are indexing errors that stay invisible while the notation stays implicit.

## Memory doubles with every qubit

Quantify naive statevector storage and the thin classical readout.

A dense statevector has 2^n complex entries. With complex128 storage, its payload is 16 times 2^n bytes before allocator, checkpoint, and parallel-distribution overhead. Thirty qubits require 16 GiB; forty require 16 TiB. This is a statement about the naive representation, not a lower bound for every classical simulator: low entanglement, sparsity, stabilizer structure, or repeated tensor structure can permit compressed methods.

## Tensor-product growth calculator

Acceptance contract for Tensor-product growth calculator
 | Field | Reader-visible record

 | Format | Notebook and browser calculator for coordinates, memory, and factorability
 | Verification | Tests Kronecker products against fixtures, preserves norm, verifies 2^n sizing, and checks factorability for selected states.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Tensor-product growth calculator",
  "format": "Notebook and browser calculator for coordinates, memory, and factorability",
  "acceptance_test": "Tests Kronecker products against fixtures, preserves norm, verifies 2^n sizing, and checks factorability for selected states.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import math

def kron(left, right):
    if not left or not right:
        raise ValueError("tensor factors must be nonempty")
    return tuple(a * b for a in left for b in right)

def norm2(vector):
    return sum(abs(value) ** 2 for value in vector)

def factorability_gap(two_qubit_state):
    if len(two_qubit_state) != 4:
        raise ValueError("factorability fixture expects two qubits")
    a00, a01, a10, a11 = two_qubit_state
    return abs(a00 * a11 - a01 * a10)

def resources(qubits, bytes_per_amplitude=16):
    if qubits < 1 or bytes_per_amplitude < 1:
        raise ValueError("resource parameters must be positive")
    coordinates = 1 << qubits
    return coordinates, coordinates * bytes_per_amplitude

scale = math.sqrt(0.5)
zero, one, plus, plus_i = (1, 0), (0, 1), (scale, scale), (scale, 1j * scale)
product_pairs = ((zero, one), (plus, plus_i), ((0.6, 0.8j), (scale, -scale)))
product_gaps = []
for left, right in product_pairs:
    state = kron(left, right)
    assert abs(norm2(state) - norm2(left) * norm2(right)) < 1e-12
    product_gaps.append(factorability_gap(state))
assert max(product_gaps) < 1e-12

bell_states = ((scale, 0, 0, scale), (0, scale, scale, 0))
entangled_gaps = [factorability_gap(state) for state in bell_states]
assert min(entangled_gaps) > 0.49

ket_010 = kron(kron(zero, one), zero)
assert len(ket_010) == 8 and ket_010[2] == 1
assert kron(one, zero) != kron(zero, one)
for qubits in range(1, 16):
    coordinates, memory = resources(qubits)
    assert coordinates == 2 ** qubits and memory == 16 * coordinates
largest_coordinates, largest_memory = resources(30)
assert largest_coordinates == 1_073_741_824 and largest_memory == 17_179_869_184

empty_rejected = False
try:
    kron((), zero)
except ValueError:
    empty_rejected = True
assert empty_rejected
dimension_rejected = False
try:
    factorability_gap((1, 0, 0))
except ValueError:
    dimension_rejected = True
assert dimension_rejected
print(f"PASS: 13 tensor calculator verifies {len(product_pairs)} product and {len(bell_states)} entangled states; Bell determinant gap={min(entangled_gaps):.3f}, 30-qubit memory={largest_memory / 2**30:.1f} GiB")
```

Scope boundary

- This chapter does not claim exponential statevector size automatically yields exponential computational speedup.

- It does not yet classify general entanglement or introduce tensor-network algorithms in depth.

Depth commitment. One general expansion, one numerical state, one factorability condition, and one memory calculation.

Practice problem

Expand \((\sqrt{3}\lvert0\rangle+\lvert1\rangle)/2\otimes(\lvert0\rangle-i\lvert1\rangle)/\sqrt{2}\), verify normalization, and estimate memory for 30 complex128 qubits.

** Deliverable** : Exact four amplitudes, norm calculation, and byte/GiB conversion.

** Pass condition** : The calculator reproduces the vector and memory value using 16 bytes per complex128 entry.

Verification record

Expected solution form. Symbolic expansion plus executable memory/factorization report.

Model answer. The amplitudes in |00>,|01>,|10>,|11> order are sqrt(3)/(2sqrt(2)), -i sqrt(3)/(2sqrt(2)), 1/(2sqrt(2)), and -i/(2sqrt(2)). Their squared magnitudes sum to one. Thirty complex128 qubits require 2^30 times 16 bytes, exactly 16 GiB before overhead.

Model result and check. CI compares each amplitude, norm, entry count, and unit conversion.

Acceptance test. The calculator reproduces the vector and memory value using 16 bytes per complex128 entry.

External review. Open.

Expertise still needed. Quantum information theorist specializing in composite systems; High-performance computing reviewer able to validate memory and representation claims.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

executable derivation

### [Tensor-product growth calculator](/playground/quantum/book/13-tensor-products-and-state-space-growth/#artifact-13-tensor-products-and-state-space-growth)

[Download fixture (.py)](/playground/quantum/artifacts/13-tensor-products-and-state-space-growth/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/13-tensor-products-and-state-space-growth/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=13-tensor-products-and-state-space-growth#report)

Dependency graph

## Prerequisites for this chapter

- [Vectors, Bases, and Amplitudes Part II. Mathematical Core · Chapter 9](/playground/quantum/book/09-vectors-bases-and-amplitudes/)

Continue the thread

## Next concepts from this chapter

- [Multi-Qubit Circuits, Entanglement, and No-Hype Protocols Orientation guide](/playground/quantum/book/orientation-03-multi-qubit-circuits-entanglement-and-no-hype/)

- [Entanglement Without Faster-Than-Light Myths Part I. Mental Model · Chapter 7](/playground/quantum/book/07-entanglement-without-faster-than-light-myths/)

- [Density Matrices and Mixed States Part II. Mathematical Core · Chapter 15](/playground/quantum/book/15-density-matrices-and-mixed-states/)

[Previous Unitary Operations and Reversibility](/playground/quantum/book/12-unitary-operations-and-reversibility/)[Next Observables, Eigenvectors, and Measurement](/playground/quantum/book/14-observables-eigenvectors-and-measurement/)

In this chapter

- [Dimensions multiply when systems combine](#dimensions-multiply-when-systems-combine)

- [Kronecker products set the coordinates](#kronecker-products-set-the-coordinates)

- [A four-amplitude example by hand](#a-four-amplitude-example-by-hand)

- [Product structure versus arbitrary joint vectors](#product-structure-versus-arbitrary-joint-vectors)

- [Memory doubles with every qubit](#memory-doubles-with-every-qubit)

- [Tensor-product growth calculator](#tensor-product-growth-calculator)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=13-tensor-products-and-state-space-growth#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/13-tensor-products-and-state-space-growth/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/14-observables-eigenvectors-and-measurement/ -->

# Observables, Eigenvectors, and Measurement

An observable is a question you are permitted to ask a quantum state, and its eigenvalues are the only answers that can ever come back. This chapter connects that structure to the statistic everyone quotes: the expectation value.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How does a Hermitian observable connect possible measurement outcomes, their probabilities, and an expectation value?

A Hermitian observable has real eigenvalues and orthogonal eigenspaces; measuring it samples an eigenvalue with probability set by the state's projection, while the expectation value is the repeated-trial average <ψ|A|ψ>, not a guaranteed single-shot result.

Scope and non-goals.

- The full spectral theorem in arbitrary dimension and generalized measurements are outside scope.

- Expectation values are kept distinct from the eigenvalue returned by one run.

[Figure 14.1.](#fig-14-observables-eigenvectors-and-measurement-1) Notice that every shot lands on a bar while the dashed average falls where no shot can ever land. The expectation value summarizes the distribution; no single measurement equals it.

Prerequisites. 10-inner-products-orthogonality-and-projection, 12-unitary-operations-and-reversibility

Notation used here. A=A†; eigenpairs A|a_i>=a_i|a_i>; projectors P_i; expectation <A>_ψ; eigenvalue units named when physical.

## A measurable quantity as an operator

Define Hermiticity and the eigenvalue equation.

An observable represents a measurable quantity. In the finite-dimensional circuit setting, observables are Hermitian matrices; equal to their own conjugate transpose. That single property buys two guarantees: the eigenvalues are real numbers, so they can serve as physical readings, and the eigenvectors form an orthonormal basis, so they can serve as a measurement basis. The eigenvectors define the measurement directions, and the eigenvalues are the only values a measurement of that observable can return.

For a state \(\lvert\psi\rangle\) and an observable \(A\), the expectation value is:

\(\langle A\rangle=\langle\psi\rvert A\lvert\psi\rangle\)[(14.1)](#eq-14-observables-eigenvectors-and-measurement-1)

Read that formula carefully. It is not the result of one shot. It is the average you would estimate by preparing the same state many times, measuring each copy, and averaging the outcomes. One number, three ideas; and the chapter hangs on keeping them separate.

Evidence boundary. Quantum observables are represented by Hermitian operators with real eigenvalues. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Pauli Z supplies the smallest spectrum

Identify eigenvectors, outcomes, and projectors.

The canonical example:

\(Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix}\)[(14.2)](#eq-14-observables-eigenvectors-and-measurement-2)

Its eigenstructure answers the measurement question completely:

\(Z\lvert0\rangle=+\lvert0\rangle,\quad Z\lvert1\rangle=-\lvert1\rangle\)[(14.3)](#eq-14-observables-eigenvectors-and-measurement-3)

Measure Z and you can only ever get \(+1\) or \(-1\), landing the qubit on \(\lvert0\rangle\) or \(\lvert1\rangle\) respectively. So the three objects are: the expectation value (an average, possibly any real number in between), the individual outcome (always an eigenvalue), and the post-measurement state (the eigenvector you landed on). Merge any two and measurement talk turns to mush.

Evidence boundary. Projective measurement probabilities are projections onto an observable's eigenspaces. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## From state decomposition to outcome probabilities

Expand |+> in the observable's eigenbasis.

For the spectral decomposition \(A=\sum_a aP_a\), the probability of outcome \(a\) is \(\langle\psi\rvert P_a\lvert\psi\rangle\), and the expectation is \(\sum_a a\langle\psi\rvert P_a\lvert\psi\rangle\). In a nondegenerate basis P_a is an outer product; under degeneracy it projects onto the whole eigenspace. This projector form avoids assigning physical meaning to an arbitrary eigenvector chosen inside a degenerate subspace.

Evidence boundary. The expectation value <ψ|A|ψ> is an ensemble average and need not equal any single outcome. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

\(A=A^\dagger;\quad A\lvert a_i\rangle=a_i\lvert a_i\rangle;\quad \langle A\rangle_\psi=\langle\psi\rvert A\lvert\psi\rangle\)[(14.4)](#eq-14-observables-eigenvectors-and-measurement-4)
Notation contract: A=A†; eigenpairs A|a_i>=a_i|a_i>; projectors P_i; expectation <A>_ψ; eigenvalue units named when physical.

## Expectation is an ensemble statistic

Compute <Z> and compare with finite-shot averages.

An observable is a query interface over a quantum state; one with physical rules. You never get the whole object back. You choose a measurement, collect samples, and estimate a statistic, and the statistic you get is tied to the observable you chose.

The working loop is: define the observable, prepare the state, measure many times in the appropriate basis (or a transformed one), then estimate. Everything in applied quantum computing runs this loop. A reported energy is usually a sum over many observable terms, each estimated separately. A device calibration metric may measure a convenient proxy rather than the final application target. When a number arrives, the professional reflex is: which quantity was actually estimated, and how many shots bought it?

The shot count is not a detail. Every estimate carries sampling noise that shrinks only like the inverse square root of the number of shots, so a claim of high precision is implicitly a claim about a large shot budget; which on real hardware means time, queue priority, and money. When two results look different, the first question is often not physics but statistics: were they estimated to the same precision?

## Degeneracy and basis choice at the boundary

State what changes when eigenspaces have dimension greater than one.

Degenerate eigenvalues identify an outcome without identifying a unique post-measurement vector inside its eigenspace. The measurement instrument determines what additional disturbance occurs there. A bare Hermitian observable specifies outcome probabilities and ideal projectors, not every laboratory implementation. Claims about the final state therefore need the instrument or circuit, not only the observable's matrix.

## Observable sampling notebook

Acceptance contract for Observable sampling notebook
 | Field | Reader-visible record

 | Format | Exact eigendecomposition plus seeded finite-shot estimator
 | Verification | Tests Hermiticity, real eigenvalues, projector completeness, analytic probabilities, and estimator convergence.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Observable sampling notebook",
  "format": "Exact eigendecomposition plus seeded finite-shot estimator",
  "acceptance_test": "Tests Hermiticity, real eigenvalues, projector completeness, analytic probabilities, and estimator convergence.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import math
import random

def inner(left, right):
    return sum(a.conjugate() * b for a, b in zip(left, right))

def matvec(matrix, vector):
    return tuple(sum(matrix[row][column] * vector[column] for column in range(2)) for row in range(2))

def normalize(vector):
    norm = math.sqrt(inner(vector, vector).real)
    return tuple(value / norm for value in vector)

def eigh2(matrix):
    if abs(matrix[0][0].imag) > 1e-12 or abs(matrix[1][1].imag) > 1e-12 or abs(matrix[1][0] - matrix[0][1].conjugate()) > 1e-12:
        raise ValueError("observable must be Hermitian")
    a, d, off = matrix[0][0].real, matrix[1][1].real, matrix[0][1]
    center = (a + d) / 2
    radius = math.sqrt(((a - d) / 2) ** 2 + abs(off) ** 2)
    values = (center + radius, center - radius)
    if radius < 1e-15:
        vectors = ((1 + 0j, 0j), (0j, 1 + 0j))
    else:
        vectors = tuple(normalize((off, value - a)) if abs(off) > 1e-15
                        else ((1 + 0j, 0j) if abs(value - a) < 1e-12 else (0j, 1 + 0j))
                        for value in values)
    return values, vectors

def born_probabilities(state, eigenvectors):
    return tuple(abs(inner(vector, state)) ** 2 for vector in eigenvectors)

def seeded_estimate(values, probabilities, shots, seed):
    if shots < 1:
        raise ValueError("shots must be positive")
    rng = random.Random(seed)
    samples = [values[0] if rng.random() < probabilities[0] else values[1] for _ in range(shots)]
    mean = sum(samples) / shots
    variance = sum((sample - mean) ** 2 for sample in samples) / shots
    return mean, math.sqrt(variance / shots)

scale = math.sqrt(0.5)
observables = (
    ((1 + 0j, 0j), (0j, -1 + 0j)),
    ((0j, 1 + 0j), (1 + 0j, 0j)),
    ((1 + 0j, 1j), (-1j, -1 + 0j)),
    ((2 + 0j, 0j), (0j, 2 + 0j)),
)
states = ((1, 0), (scale, scale), (scale, 1j * scale), (0.6, 0.8j))
max_residual = 0.0
max_sampling_z = 0.0
measurement_cases = 0
for observable_index, observable in enumerate(observables):
    values, eigenvectors = eigh2(observable)
    assert all(isinstance(value, float) for value in values)
    assert abs(inner(eigenvectors[0], eigenvectors[1])) < 1e-12 or abs(values[0] - values[1]) < 1e-12
    for value, vector in zip(values, eigenvectors):
        residual = max(abs(actual - value * expected) for actual, expected in zip(matvec(observable, vector), vector))
        max_residual = max(max_residual, residual)
    for state_index, state in enumerate(states):
        probabilities = born_probabilities(state, eigenvectors)
        assert abs(sum(probabilities) - 1.0) < 1e-12
        analytic = inner(state, matvec(observable, state)).real
        spectral = sum(value * probability for value, probability in zip(values, probabilities))
        assert abs(analytic - spectral) < 1e-12
        estimate, stderr = seeded_estimate(values, probabilities, 30000, 1400 + 10 * observable_index + state_index)
        allowance = 6 * stderr + 1e-12
        assert abs(estimate - analytic) <= allowance
        max_sampling_z = max(max_sampling_z, abs(estimate - analytic) / max(stderr, 1e-12))
        measurement_cases += 1
assert max_residual < 1e-12

nonhermitian_rejected = False
try:
    eigh2(((0j, 1j), (1j, 0j)))
except ValueError:
    nonhermitian_rejected = True
assert nonhermitian_rejected
zero_shots_rejected = False
try:
    seeded_estimate((1, -1), (0.5, 0.5), 0, 1)
except ValueError:
    zero_shots_rejected = True
assert zero_shots_rejected
print(f"PASS: 14 observable notebook solves {len(observables)} Hermitian spectra and {measurement_cases} seeded estimates; last estimate={estimate:.4f}, max eigen-residual={max_residual:.2e}, max sampling z={max_sampling_z:.2f}")
```

Scope boundary

- The full spectral theorem in arbitrary dimension and generalized measurements are outside scope.

- Expectation values are kept distinct from the eigenvalue returned by one run.

Depth commitment. One Pauli example, one rotated observable, one estimator, and one boundary note.

Practice problem

For \(A=(X+Z)/\sqrt{2}\) and state \(\lvert0\rangle\), find eigenvalues numerically, compute <A>, and compare with a seeded 20,000-shot estimate.

** Deliverable** : Operator matrix, eigenvalue/probability table, exact expectation, and sampled estimate.

** Pass condition** : The notebook checks Hermiticity, probabilities sum to one, exact expectation equals the probability-weighted eigenvalue sum, and the estimate lies within tolerance.

Verification record

Expected solution form. Spectral calculation plus reproducible sampling table.

Model answer. A has eigenvalues +1 and -1. In |0>, <A>=1/sqrt(2); outcome probabilities are (1+1/sqrt(2))/2 and (1-1/sqrt(2))/2. A 20,000-shot estimate should lie inside the published seeded sampling interval around 0.7071.

Model result and check. CI recomputes the eigensystem and estimator with the published seed.

Acceptance test. The notebook checks Hermiticity, probabilities sum to one, exact expectation equals the probability-weighted eigenvalue sum, and the estimate lies within tolerance.

External review. Open.

Expertise still needed. Quantum measurement theorist or mathematical physicist; Statistical computing reviewer able to verify finite-shot estimators.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

executable derivation

### [Observable sampling notebook](/playground/quantum/book/14-observables-eigenvectors-and-measurement/#artifact-14-observables-eigenvectors-and-measurement)

[Download fixture (.py)](/playground/quantum/artifacts/14-observables-eigenvectors-and-measurement/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/14-observables-eigenvectors-and-measurement/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=14-observables-eigenvectors-and-measurement#report)

Dependency graph

## Prerequisites for this chapter

- [Inner Products, Orthogonality, and Projection Part II. Mathematical Core · Chapter 10](/playground/quantum/book/10-inner-products-orthogonality-and-projection/)

- [Unitary Operations and Reversibility Part II. Mathematical Core · Chapter 12](/playground/quantum/book/12-unitary-operations-and-reversibility/)

Continue the thread

## Next concepts from this chapter

- [Density Matrices and Mixed States Part II. Mathematical Core · Chapter 15](/playground/quantum/book/15-density-matrices-and-mixed-states/)

- [One-Qubit Gates and the Bloch Sphere Part III. Circuit Model · Chapter 17](/playground/quantum/book/17-one-qubit-gates-and-bloch-sphere/)

- [Bell Tests and Nonclassical Correlations Part IV. Protocols and Algorithms · Chapter 23](/playground/quantum/book/23-bell-tests-and-nonclassical-correlations/)

[Previous Tensor Products and State-Space Growth](/playground/quantum/book/13-tensor-products-and-state-space-growth/)[Next Density Matrices and Mixed States](/playground/quantum/book/15-density-matrices-and-mixed-states/)

In this chapter

- [A measurable quantity as an operator](#a-measurable-quantity-as-an-operator)

- [Pauli Z supplies the smallest spectrum](#pauli-z-supplies-the-smallest-spectrum)

- [From state decomposition to outcome probabilities](#from-state-decomposition-to-outcome-probabilities)

- [Expectation is an ensemble statistic](#expectation-is-an-ensemble-statistic)

- [Degeneracy and basis choice at the boundary](#degeneracy-and-basis-choice-at-the-boundary)

- [Observable sampling notebook](#observable-sampling-notebook)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 3 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=14-observables-eigenvectors-and-measurement#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/14-observables-eigenvectors-and-measurement/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/15-density-matrices-and-mixed-states/ -->

# Density Matrices and Mixed States

The state ∣ + ⟩ and an honest coin flip between ∣0 ⟩ and ∣1 ⟩ give identical measurement statistics — and behave completely differently from then on. The density matrix is the notation that can tell them apart, and the one real hardware makes unavoidable.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. When is a statevector insufficient, and what can a density operator predict that a classical mixture description makes explicit?

A density operator represents both pure states and statistical mixtures, remains positive semidefinite with unit trace, predicts measurements by Tr(ρP), and distinguishes coherent superposition from an incoherent mixture through off-diagonal terms and purity.

Scope and non-goals.

- This chapter does not cover complete-positive maps, master equations, or full tomography.

- It does not claim every reduced mixed state reflects classical ignorance; entanglement can produce mixed subsystems.

[Figure 15.1.](#fig-15-density-matrices-and-mixed-states-1) Notice that only the pure state sits on the surface. Both ρ's return identical Z-basis counts, but the off-diagonal entries of the left one let it interfere later; the right one's never can.

Prerequisites. 10-inner-products-orthogonality-and-projection, 13-tensor-products-and-state-space-growth, 14-observables-eigenvectors-and-measurement

Notation used here. ρ=Σ_i p_i|ψ_i><ψ_i|; Tr ρ=1; ρ⪰0; purity γ=Tr(ρ²); subsystem labels explicit in Tr_B.

## Two preparations with identical Z counts

Contrast |+><+| with a 50/50 mixture of |0> and |1>.

A pure statevector represents maximal knowledge of an ideal, isolated quantum state. A density matrix represents pure states and everything short of them. It is the right language whenever you face uncertainty, noise, entanglement with an environment, or partial access to a larger system; which is to say, whenever you face hardware.

For a pure state \(\lvert\psi\rangle\), the density matrix is the outer product:

\(\rho=\lvert\psi\rangle\!\langle\psi\rvert\)[(15.1)](#eq-15-density-matrices-and-mixed-states-1)

A mixed state is a classical weighted combination of such projectors:

\(\rho=\sum_i p_i\lvert\psi_i\rangle\!\langle\psi_i\rvert,\quad \sum_i p_i=1\)[(15.2)](#eq-15-density-matrices-and-mixed-states-2)

Read the mixture as a recipe: with probability \(p_i\), the device actually holds \(\lvert\psi_i\rangle\), and you do not know which.

Evidence boundary. Density operators are positive semidefinite, Hermitian, and have trace one. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Three conditions for a physical density operator

Derive Hermiticity, positivity, and trace one.

Three conditions certify any candidate density matrix:

- Hermitian: \(\rho=\rho^\dagger\).

- Unit trace: \(\operatorname{Tr}(\rho)=1\); total probability is conserved.

- Nonnegative eigenvalues; no outcome gets negative weight.

Two examples to hold in your head. For \(\lvert0\rangle\):

\(\rho_0=\lvert0\rangle\!\langle0\rvert=\begin{pmatrix}1&0\\0&0\end{pmatrix}\)[(15.3)](#eq-15-density-matrices-and-mixed-states-3)

And for \(\lvert+\rangle=(\lvert0\rangle+\lvert1\rangle)/\sqrt2\):

\(\rho_+=\frac12\begin{pmatrix}1&1\\1&1\end{pmatrix}\)[(15.4)](#eq-15-density-matrices-and-mixed-states-4)

The off-diagonal entries carry coherence; the memory that the amplitudes had a definite phase relationship. Noise typically shrinks or scrambles exactly those entries, which is why experimentalists watch them.

Evidence boundary. Pure states satisfy Tr(ρ²)=1 while nontrivial mixtures have lower purity. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## Off-diagonal terms carry coherence

Calculate the two example matrices explicitly.

In the Z basis, diagonal entries give Z outcome probabilities and off-diagonal entries preserve relative-phase information. Dephasing can erase those off-diagonal terms while leaving the Z populations unchanged. Comparing rho_plus with I/2 demonstrates why one measurement basis is incomplete: both are uniform in Z, yet X measurement is deterministic for rho_plus and uniform for I/2.

Evidence boundary. A subsystem of an entangled pure state can have a mixed reduced density operator obtained by partial trace. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

\(\rho=\sum_i p_i\lvert\psi_i\rangle\!\langle\psi_i\rvert;\quad \operatorname{Tr}\rho=1;\quad \rho\succeq0;\quad \gamma=\operatorname{Tr}(\rho^2)\)[(15.5)](#eq-15-density-matrices-and-mixed-states-5)
Notation contract: ρ=Σ_i p_i|ψ_i><ψ_i|; Tr ρ=1; ρ⪰0; purity γ=Tr(ρ²); subsystem labels explicit in Tr_B.

## Purity separates vector states from mixtures

Compute Tr(ρ²) and its limits.

The density matrix is a richer state representation for systems with uncertainty and environment interaction. It costs more; an \(n\) -qubit \(\rho\) holds \(4^n\) entries against the statevector's \(2^n\); and it buys realism: noise processes act on \(\rho\) in ways a statevector cannot express. The depolarizing channel, for instance, steadily pushes any state toward the less informative mixture at the center of the sphere, erasing off-diagonal coherence as it goes.

This is load-bearing for simulator design, error mitigation, quantum error correction, and hardware diligence alike. It also separates two stories that look identical in one measurement basis: a coherent superposition can interfere later, while a classical mixture with the same immediate probabilities cannot. A model that cannot represent that difference will overstate what an ideal statevector demonstration says about hardware.

## Subsystem states by partial trace

Obtain a mixed qubit from a Bell pair and state the interpretive boundary.

The reduced state \(\rho_A=\operatorname{Tr}_B(\rho_{AB})\) is the unique operator that reproduces every local expectation \(\operatorname{Tr}[(A\otimes I)\rho_{AB}]\). For a Bell pair it is I/2 even though the joint state is pure. Local mixedness therefore does not identify ignorance about a locally prepared pure state; it can be the exact signature of entanglement with an inaccessible subsystem.

## Density-matrix coherence laboratory

Acceptance contract for Density-matrix coherence laboratory
 | Field | Reader-visible record

 | Format | Notebook with preparation, measurement, purity, and partial-trace functions
 | Verification | Fixtures compare coherent/mixed preparations in X and Z bases, verify PSD/trace, and recover maximally mixed marginals from a Bell state.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Density-matrix coherence laboratory",
  "format": "Notebook with preparation, measurement, purity, and partial-trace functions",
  "acceptance_test": "Fixtures compare coherent/mixed preparations in X and Z bases, verify PSD/trace, and recover maximally mixed marginals from a Bell state.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import math

def outer(state):
    return tuple(tuple(state[row] * state[column].conjugate() for column in range(len(state)))
                 for row in range(len(state)))

def mixture(weighted_states):
    if abs(sum(weight for weight, _ in weighted_states) - 1.0) > 1e-12:
        raise ValueError("mixture weights must sum to one")
    size = len(weighted_states[0][1])
    return tuple(tuple(sum(weight * state[row] * state[column].conjugate()
                           for weight, state in weighted_states)
                       for column in range(size)) for row in range(size))

def trace(matrix):
    return sum(matrix[index][index] for index in range(len(matrix)))

def purity(matrix):
    return sum(abs(value) ** 2 for row in matrix for value in row).real

def validate_qubit_density(matrix):
    if len(matrix) != 2 or any(len(row) != 2 for row in matrix):
        raise ValueError("fixture expects a qubit density matrix")
    if abs(trace(matrix) - 1.0) > 1e-12 or abs(matrix[1][0] - matrix[0][1].conjugate()) > 1e-12:
        raise ValueError("density matrix must be Hermitian with trace one")
    determinant = (matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0]).real
    if matrix[0][0].real < -1e-12 or matrix[1][1].real < -1e-12 or determinant < -1e-12:
        raise ValueError("density matrix must be positive semidefinite")
    return determinant

def probability(matrix, ket):
    return sum(ket[row].conjugate() * matrix[row][column] * ket[column]
               for row in range(2) for column in range(2)).real

def phase_flip_channel(matrix, probability_z):
    if not 0 <= probability_z <= 1:
        raise ValueError("channel probability must lie in [0,1]")
    factor = 1 - 2 * probability_z
    return ((matrix[0][0], factor * matrix[0][1]),
            (factor * matrix[1][0], matrix[1][1]))

def trace_out_second(matrix):
    if len(matrix) != 4 or any(len(row) != 4 for row in matrix):
        raise ValueError("partial trace fixture expects two qubits")
    return tuple(tuple(sum(matrix[2 * left + bit][2 * right + bit] for bit in (0, 1))
                       for right in (0, 1)) for left in (0, 1))

scale = math.sqrt(0.5)
zero, one, plus, plus_i = (1, 0), (0, 1), (scale, scale), (scale, 1j * scale)
rho_plus = outer(plus)
rho_plus_i = outer(plus_i)
rho_mixed = mixture(((0.5, zero), (0.5, one)))
for matrix in (rho_plus, rho_plus_i, rho_mixed):
    validate_qubit_density(matrix)
assert abs(purity(rho_plus) - 1.0) < 1e-12
assert abs(purity(rho_plus_i) - 1.0) < 1e-12
assert abs(purity(rho_mixed) - 0.5) < 1e-12
assert abs(probability(rho_plus, zero) - probability(rho_mixed, zero)) < 1e-12
x_contrast = probability(rho_plus, plus) - probability(rho_mixed, plus)
assert abs(x_contrast - 0.5) < 1e-12

channel_purities = []
for probability_z in (0.0, 0.25, 0.5):
    evolved = phase_flip_channel(rho_plus, probability_z)
    validate_qubit_density(evolved)
    channel_purities.append(purity(evolved))
assert all(abs(actual - expected) < 1e-12 for actual, expected in zip(channel_purities, (1.0, 0.625, 0.5)))

bell = (scale, 0, 0, scale)
marginal = trace_out_second(outer(bell))
assert all(abs(marginal[row][column] - (0.5 if row == column else 0.0)) < 1e-12
           for row in range(2) for column in range(2))

non_psd_rejected = False
try:
    validate_qubit_density(((0.5, 0.6), (0.6, 0.5)))
except ValueError:
    non_psd_rejected = True
assert non_psd_rejected
bad_weights_rejected = False
try:
    mixture(((0.4, zero), (0.4, one)))
except ValueError:
    bad_weights_rejected = True
assert bad_weights_rejected
print(f"PASS: 15 density laboratory separates coherent/mixed X statistics by {x_contrast:.3f}, tracks dephasing purities={channel_purities}, and recovers Bell marginal purity={purity(marginal):.3f}")
```

Scope boundary

- This chapter does not cover complete-positive maps, master equations, or full tomography.

- It does not claim every reduced mixed state reflects classical ignorance; entanglement can produce mixed subsystems.

Depth commitment. Two indistinguishable-in-Z states, one X-basis separation, one Bell marginal, and a complete validator.

Practice problem

Build density matrices for |+>, a 50/50 Z mixture, and one Bell-pair marginal; compute X/Z statistics and purity for each.

** Deliverable** : Three matrices, two measurement tables, three purity values, and one equivalence/distinction statement.

** Pass condition** : The notebook verifies physicality, reproduces all statistics, and shows which preparations are operationally distinguishable in X.

Verification record

Expected solution form. Matrix-by-matrix solution plus tested density-operator report.

Model answer. rho_plus=[[1/2,1/2],[1/2,1/2]] has purity one, deterministic X+, and uniform Z. The 50/50 Z mixture is I/2 with purity one half and uniform X and Z. Tracing either half of a Bell pair also gives I/2, so local statistics cannot distinguish those last two preparations.

Model result and check. CI checks eigenvalues, traces, purities, measurement probabilities, and the partial trace.

Acceptance test. The notebook verifies physicality, reproduces all statistics, and shows which preparations are operationally distinguishable in X.

External review. Open.

Expertise still needed. Quantum information theorist specializing in density operators and open systems; Numerical linear algebra reviewer able to assess PSD and partial-trace implementations.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

executable derivation

### [Density-matrix coherence laboratory](/playground/quantum/book/15-density-matrices-and-mixed-states/#artifact-15-density-matrices-and-mixed-states)

[Download fixture (.py)](/playground/quantum/artifacts/15-density-matrices-and-mixed-states/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/15-density-matrices-and-mixed-states/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=15-density-matrices-and-mixed-states#report)

Dependency graph

## Prerequisites for this chapter

- [Inner Products, Orthogonality, and Projection Part II. Mathematical Core · Chapter 10](/playground/quantum/book/10-inner-products-orthogonality-and-projection/)

- [Tensor Products and State-Space Growth Part II. Mathematical Core · Chapter 13](/playground/quantum/book/13-tensor-products-and-state-space-growth/)

- [Observables, Eigenvectors, and Measurement Part II. Mathematical Core · Chapter 14](/playground/quantum/book/14-observables-eigenvectors-and-measurement/)

Continue the thread

## Next concepts from this chapter

- [Bell States and GHZ States Part III. Circuit Model · Chapter 20](/playground/quantum/book/20-bell-states-and-ghz-states/)

- [Noise Models and Noisy Simulation Part V. Practical Software · Chapter 41](/playground/quantum/book/41-noise-models-and-noisy-simulation/)

- [Decoherence and Error Channels Part VI. Reliability and Fault Tolerance · Chapter 45](/playground/quantum/book/45-decoherence-and-error-channels/)

[Previous Observables, Eigenvectors, and Measurement](/playground/quantum/book/14-observables-eigenvectors-and-measurement/)[Next Circuit Notation as a Programming Language](/playground/quantum/book/16-circuit-notation-as-programming-language/)

In this chapter

- [Two preparations with identical Z counts](#two-preparations-with-identical-z-counts)

- [Three conditions for a physical density operator](#three-conditions-for-a-physical-density-operator)

- [Off-diagonal terms carry coherence](#off-diagonal-terms-carry-coherence)

- [Purity separates vector states from mixtures](#purity-separates-vector-states-from-mixtures)

- [Subsystem states by partial trace](#subsystem-states-by-partial-trace)

- [Density-matrix coherence laboratory](#density-matrix-coherence-laboratory)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 3 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=15-density-matrices-and-mixed-states#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/15-density-matrices-and-mixed-states/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/16-circuit-notation-as-programming-language/ -->

# Circuit Notation as a Programming Language

A circuit diagram is a program: wires are registers, boxes are instructions, and time flows left to right. Read it as ordered operations and you can trace any small circuit by hand before a simulator finishes warming up.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How should a quantum circuit diagram be read as an executable program with explicit time, scope, and measurement semantics?

Read wires as ordered state carriers, columns as operations that may run concurrently, multi-wire symbols as one joint gate, and measurements as classical-output boundaries; then translate the diagram into an ordered instruction sequence with declared qubit and bit mappings.

Scope and non-goals.

- This chapter does not define every vendor's circuit syntax or imply visual left-to-right spacing is physical duration.

- It does not treat equivalent drawings as equal-cost compiled programs.

[Figure 16.1.](#fig-16-circuit-notation-as-programming-language-1) Notice that the dot and the circle-plus are a single instruction; one CNOT; and that the classical bits c0 and c1 exist only after the meters, never before.

Prerequisites. 11-matrices-as-gates, 13-tensor-products-and-state-space-growth

Notation used here. Wires q[0..n−1], classical bits c[...]; diagram time left-to-right; matrix composition convention cross-referenced; measurement basis labeled.

## The grammar carried by a wire

Define wire identity, state flow, and qubit order.

A circuit diagram is a compact syntax for state evolution. Time runs left to right. Each horizontal wire is a qubit register. A box on one wire applies a one-qubit unitary there while the identity acts on every other wire. A vertical controlled operation applies one joint multi-qubit unitary whose action depends on the control's basis value.

The habit that makes circuits readable is to expand them into a sequence:

- Initialize every wire, usually to \(\lvert0\rangle\).

- Apply each one-qubit gate in left-to-right order.

- Apply each controlled gate as one joint operation on the full state.

- Measure the selected wires.

- Record the classical bits.

That sequence can be traced by hand, simulated with a statevector, or compiled through an SDK; three executions of the same program at three levels of fidelity.

Evidence boundary. Circuit diagrams encode ordered quantum operations and measurements on named wires. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## Columns express dependencies, not typography

Recover a partial execution order from gate placement.

Every closed-system gate in the diagram must satisfy \(U^{\dagger}U=I\). A drawn box whose matrix fails that test is not a valid isolated quantum gate, whatever the documentation says. Measurement plays by different rules: it emits a classical outcome and changes the state description, so it is not a unitary box and cannot be undone by drawing another box.

Two numbers belong to every circuit reading. Width is the number of wires the program needs. Depth is the number of sequential gate layers once dependencies are respected. A clean diagram may have modest abstract depth while compilation raises the physical depth sharply; a device with a different native gate set or sparse connectivity forces decompositions and swaps. Depth and width are part of what the diagram says, not merely part of the performance postmortem.

Evidence boundary. OpenQASM 3 provides an explicit textual representation for quantum/classical instructions and timing/control constructs. [openqasm3](https://openqasm.com/)

## One symbol may own several wires

Translate controls, targets, swaps, and measurement.

Evidence boundary. Circuit semantics and physical execution cost are distinct because compilation can alter gates and schedule. [Lieven M. K. Vandersypen et al.](https://doi.org/10.1038/s42254-021-00301-w) [openqasm3](https://openqasm.com/)

\(Wires q[0..n−1], classical bits c[...]; diagram time left-to-right; matrix composition convention cross-referenced; measurement basis labeled.\)[(16.1)](#eq-16-circuit-notation-as-programming-language-1)
Notation contract: Wires q[0..n−1], classical bits c[...]; diagram time left-to-right; matrix composition convention cross-referenced; measurement basis labeled.

## A Bell diagram becomes instructions

Produce an exact instruction list and state trace.

The closest classical analog is a typed intermediate representation with unusual semantics. Registers have width. Instructions have arity. Some instructions commute; others must stay ordered. Measurement writes classical bits, and later operations may be classically controlled on those bits.

When a circuit gives the wrong answer, debug by layer:

- Diagram syntax; did you draw what you meant?

- Gate sequence; does the expansion match the drawing, with control and target in the right places?

- Ideal statevector trace; does the math produce the intended state?

- Compiled circuit; did transpilation blow up the depth or reorder what must stay ordered?

- Hardware result; do the counts match the compiled circuit within sampling noise?

A syntax mistake is a different failure from a swapped control-target convention; a correct ideal trace can still fail after transpilation if depth grows too large; a correct compiled circuit can still produce poor counts on noisy hardware. Naming the layer is half the fix.

## Ambiguities a serializer must reject

Expose missing basis, reversed order, and unlabeled classical bits.

Reject an instruction when a control is unlabeled, a measurement lacks a classical destination, a multi-qubit gate repeats a wire, a parameter lacks units or expression grammar, or two operations claim the same wire in one scheduled moment without defined ordering. A parser should not guess from geometry. The source diagram, intermediate representation, and hardware schedule are distinct objects with explicit conversion rules.

## Circuit diagram parser fixture

Acceptance contract for Circuit diagram parser fixture
 | Field | Reader-visible record

 | Format | OpenQASM 3 snippet, canonical instruction JSON, and state trace
 | Verification | Round-trip test parses/serializes without changing operations, qubit mapping, dependencies, or expected Bell counts.
 | Availability | Published companion and deterministic command

[Reference state-vector simulator](/playground/quantum/labs/#state-vector-simulator) is the executable companion used by this page.

```
cd labs && python -m unittest tests.test_simulator -v
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import json
import math

SOURCE = """OPENQASM 3;
qubit[2] q;
bit[2] c;
h q[0];
cx q[0], q[1];
c[0] = measure q[0];
c[1] = measure q[1];
"""

def indexed(token, register, size):
    prefix = register + "["
    if not token.startswith(prefix) or not token.endswith("]"):
        raise ValueError("wire must name a declared register")
    index = int(token[len(prefix):-1])
    if not 0 <= index < size:
        raise ValueError("wire index out of range")
    return index

def parse(source):
    qubits = classical = None
    operations = []
    classical_writes = set()
    for raw in source.splitlines():
        line = raw.strip()
        if not line:
            continue
        if not line.endswith(";"):
            raise ValueError("every statement must end with a semicolon")
        line = line[:-1].strip()
        if line == "OPENQASM 3":
            continue
        if line.startswith("qubit["):
            left, name = line.split()
            qubits = int(left[6:-1])
            if name != "q" or qubits < 1:
                raise ValueError("unsupported qubit declaration")
        elif line.startswith("bit["):
            left, name = line.split()
            classical = int(left[4:-1])
            if name != "c" or classical < 1:
                raise ValueError("unsupported bit declaration")
        elif line.startswith("h "):
            if qubits is None:
                raise ValueError("qubits must be declared before gates")
            operations.append(("H", indexed(line[2:].strip(), "q", qubits)))
        elif line.startswith("cx "):
            if qubits is None:
                raise ValueError("qubits must be declared before gates")
            operands = [part.strip() for part in line[3:].split(",")]
            if len(operands) != 2:
                raise ValueError("cx needs a control and target")
            control = indexed(operands[0], "q", qubits)
            target = indexed(operands[1], "q", qubits)
            if control == target:
                raise ValueError("control and target must differ")
            operations.append(("CNOT", control, target))
        elif "= measure " in line:
            if qubits is None or classical is None:
                raise ValueError("measurement registers must be declared")
            destination, source_wire = [part.strip() for part in line.split("= measure ")]
            cbit = indexed(destination, "c", classical)
            qubit = indexed(source_wire, "q", qubits)
            if cbit in classical_writes:
                raise ValueError("classical destination written twice")
            classical_writes.add(cbit)
            operations.append(("MEASURE", qubit, cbit))
        else:
            raise ValueError("unknown or ambiguous instruction")
    if qubits is None or classical is None or not operations:
        raise ValueError("incomplete circuit")
    return {"qubits": qubits, "bits": classical, "operations": operations}

def serialize(ir):
    lines = ["OPENQASM 3;", f"qubit[{ir['qubits']}] q;", f"bit[{ir['bits']}] c;"]
    for operation in ir["operations"]:
        if operation[0] == "H":
            lines.append(f"h q[{operation[1]}];")
        elif operation[0] == "CNOT":
            lines.append(f"cx q[{operation[1]}], q[{operation[2]}];")
        else:
            lines.append(f"c[{operation[2]}] = measure q[{operation[1]}];")
    return "\n".join(lines) + "\n"

def dependency_edges(operations):
    last_on_wire = {}
    edges = set()
    for index, operation in enumerate(operations):
        wires = operation[1:3] if operation[0] == "CNOT" else operation[1:2]
        for wire in wires:
            if wire in last_on_wire:
                edges.add((last_on_wire[wire], index))
            last_on_wire[wire] = index
    return edges

def apply_h(state, qubit, count):
    mask = 1 << (count - 1 - qubit)
    output = state[:]
    scale = math.sqrt(0.5)
    for basis in range(len(state)):
        if basis & mask == 0:
            paired = basis | mask
            output[basis] = (state[basis] + state[paired]) * scale
            output[paired] = (state[basis] - state[paired]) * scale
    return output

def apply_cnot(state, control, target, count):
    control_mask = 1 << (count - 1 - control)
    target_mask = 1 << (count - 1 - target)
    output = [0j] * len(state)
    for basis, amplitude in enumerate(state):
        destination = basis ^ target_mask if basis & control_mask else basis
        output[destination] += amplitude
    return output

def execute(ir):
    state = [0j] * (1 << ir["qubits"])
    state[0] = 1.0
    measurement_map = {}
    for operation in ir["operations"]:
        if operation[0] == "H":
            state = apply_h(state, operation[1], ir["qubits"])
        elif operation[0] == "CNOT":
            state = apply_cnot(state, operation[1], operation[2], ir["qubits"])
        else:
            measurement_map[operation[2]] = operation[1]
    if set(measurement_map) != set(range(ir["bits"])):
        raise ValueError("fixture requires every classical bit to be assigned")
    probabilities = {}
    for basis, amplitude in enumerate(state):
        bits = []
        for cbit in range(ir["bits"]):
            qubit = measurement_map[cbit]
            bits.append(str((basis >> (ir["qubits"] - 1 - qubit)) & 1))
        outcome = "".join(bits)
        probabilities[outcome] = probabilities.get(outcome, 0.0) + abs(amplitude) ** 2
    return state, {key: value for key, value in probabilities.items() if value > 1e-12}

ir = parse(SOURCE)
assert parse(serialize(ir)) == ir
assert dependency_edges(ir["operations"]) == {(0, 1), (1, 2), (1, 3)}
canonical_json = json.dumps(ir, sort_keys=True)
assert '"operations": [["H", 0], ["CNOT", 0, 1]' in canonical_json
state, counts = execute(ir)
assert all(abs(actual - expected) < 1e-12 for actual, expected in zip(state, [math.sqrt(0.5), 0, 0, math.sqrt(0.5)]))
assert set(counts) == {"00", "11"} and all(abs(value - 0.5) < 1e-12 for value in counts.values())

mutated = {**ir, "operations": [ir["operations"][1], ir["operations"][0], *ir["operations"][2:]]}
mutated_counts = execute(mutated)[1]
assert set(mutated_counts) == {"00", "10"} and all(abs(value - 0.5) < 1e-12 for value in mutated_counts.values())

def with_line(index, replacement):
    lines = SOURCE.splitlines()
    lines[index] = replacement
    return "\n".join(lines) + "\n"

for invalid in (
    with_line(4, "cx q[0], q[0];"),
    with_line(6, "measure q[1];"),
    with_line(6, "c[0] = measure q[1];"),
):
    rejected = False
    try:
        parse(invalid)
    except ValueError:
        rejected = True
    assert rejected
print(f"PASS: 16 circuit parser round-trips {len(ir['operations'])} operations with {len(dependency_edges(ir['operations']))} dependencies; Bell support={sorted(counts)}, mutation support={sorted(mutated_counts)}")
```

Scope boundary

- This chapter does not define every vendor's circuit syntax or imply visual left-to-right spacing is physical duration.

- It does not treat equivalent drawings as equal-cost compiled programs.

Depth commitment. One grammar, one Bell translation, one ambiguity set, and one parser exercise.

Practice problem

Translate a supplied three-wire diagram with one control, one swap, and two measurements into canonical instruction JSON.

```
Wire order top-to-bottom: q0,q1,q2. Classical bits: c0,c1.
At moment 1 apply a controlled-X q0 -> q2.
At moment 2 swap q1 and q2.
At moment 3 measure q0 -> c0 and q2 -> c1.
```

** Deliverable** : Instruction list, dependency edges, qubit/classical-bit map, and predicted basis output.

** Pass condition** : The parser ingests the reference OpenQASM and produces the same canonical JSON and output.

Verification record

Expected solution form. Annotated translation plus parser-generated diff.

Model answer. The canonical operation list is CX(control=q0,target=q2), SWAP(q1,q2), MEASURE(q0,c0), MEASURE(q2,c1), retaining the two simultaneous measurements in declared wire order. The JSON must preserve qubit and classical-bit identities rather than infer them from drawing position later.

Model result and check. CI compares normalized instruction sequences and simulates the deterministic test input.

Acceptance test. The parser ingests the reference OpenQASM and produces the same canonical JSON and output.

External review. Open.

Expertise still needed. Quantum programming-language or OpenQASM specialist; Compiler front-end reviewer able to verify parsing, dependencies, and round-trip semantics.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

source code

### [Circuit diagram parser fixture](/playground/quantum/labs/#state-vector-simulator)

[Download fixture (.py)](/playground/quantum/artifacts/16-circuit-notation-as-programming-language/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/16-circuit-notation-as-programming-language/artifact.json)

Reproduce or test
`cd labs && python -m unittest tests.test_simulator -v`

Provenance

## Sources and review

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=16-circuit-notation-as-programming-language#report)

Dependency graph

## Prerequisites for this chapter

- [Matrices as Gates Part II. Mathematical Core · Chapter 11](/playground/quantum/book/11-matrices-as-gates/)

- [Tensor Products and State-Space Growth Part II. Mathematical Core · Chapter 13](/playground/quantum/book/13-tensor-products-and-state-space-growth/)

Continue the thread

## Next concepts from this chapter

- [Multi-Qubit Circuits Part III. Circuit Model · Chapter 19](/playground/quantum/book/19-multi-qubit-circuits/)

- [Circuit Cost: Depth, Width, Gate Set, Connectivity Part III. Circuit Model · Chapter 22](/playground/quantum/book/22-circuit-cost-depth-width-gate-set-connectivity/)

- [Superdense Coding Part IV. Protocols and Algorithms · Chapter 24](/playground/quantum/book/24-superdense-coding/)

[Previous Density Matrices and Mixed States](/playground/quantum/book/15-density-matrices-and-mixed-states/)[Next One-Qubit Gates and the Bloch Sphere](/playground/quantum/book/17-one-qubit-gates-and-bloch-sphere/)

In this chapter

- [The grammar carried by a wire](#the-grammar-carried-by-a-wire)

- [Columns express dependencies, not typography](#columns-express-dependencies-not-typography)

- [One symbol may own several wires](#one-symbol-may-own-several-wires)

- [A Bell diagram becomes instructions](#a-bell-diagram-becomes-instructions)

- [Ambiguities a serializer must reject](#ambiguities-a-serializer-must-reject)

- [Circuit diagram parser fixture](#circuit-diagram-parser-fixture)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=16-circuit-notation-as-programming-language#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/16-circuit-notation-as-programming-language/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/17-one-qubit-gates-and-bloch-sphere/ -->

# One-Qubit Gates and the Bloch Sphere

Every one-qubit pure state is a point on a sphere, and every one-qubit gate is a rotation of that sphere — but the sphere is the illustration and the matrices are the authority. This chapter teaches you to move between the two without mistaking one for the other.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How do one-qubit gates transform both a statevector and its Bloch-sphere representation?

Up to global phase, a pure qubit maps to a point on the Bloch sphere, and one-qubit unitaries act as rotations; matrix multiplication remains the computational authority while the sphere exposes axes, relative phase, and composition geometry.

Scope and non-goals.

- This chapter does not use the Bloch sphere for mixed states beyond naming the interior boundary.

- It does not imply that spatial axes are literal device orientation or replace matrix calculation.

[Figure 17.1.](#fig-17-one-qubit-gates-and-bloch-sphere-1) Notice that \(\lvert + \rangle\) and \(\lvert - \rangle\) sit at opposite ends of the equator: identical Z-basis statistics, opposite relative phases. The sphere keeps phase visible in a way a probability table never can.

Prerequisites. 11-matrices-as-gates, 14-observables-eigenvectors-and-measurement

Notation used here. |ψ>=cos(θ/2)|0>+e^{iφ}sin(θ/2)|1>; Bloch vector r=(<X>,<Y>,<Z>); rotation angles use radians.

## From amplitudes to three real coordinates

Derive x, y, z from θ and φ or Pauli expectations.

A one-qubit state is:

\(\alpha\lvert0\rangle+\beta\lvert1\rangle,\qquad \lvert\alpha\rvert^2+\lvert\beta\rvert^2=1\)[(17.1)](#eq-17-one-qubit-gates-and-bloch-sphere-1)

A one-qubit gate is a \(2\times2\) unitary that rewrites those amplitudes while preserving the normalization. The Bloch sphere visualizes pure one-qubit states up to global phase: the poles are the basis states, the equator holds the equal superpositions, and every gate is a rotation. It is excellent intuition for rotations, basis changes, and phase; but the calculations still come from matrix-vector multiplication. The sphere summarizes; it does not compute.

The distinction that runs the chapter is global versus relative phase. Multiply the whole state by \(e^{i\theta}\) and nothing measurable changes. Change the phase between \(\lvert0\rangle\) and \(\lvert1\rangle\) and you have changed what later gates will produce; a relative phase is a physical fact waiting for a basis change to expose it.

Evidence boundary. Pure one-qubit states modulo global phase correspond to points on the Bloch sphere. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/) [T. D. Ladd et al.](https://doi.org/10.1038/nature08812)

## X, Y, and Z as half-turns

Match matrices to rotations and basis-state movement.

Three gates cover most of the territory:

 | state | \(X\) | \(Z\) | \(H\)

 | \(\lvert0\rangle\) | \(\lvert1\rangle\) | \(\lvert0\rangle\) | \((\lvert0\rangle+\lvert1\rangle)/\sqrt2\)
 | \(\lvert1\rangle\) | \(\lvert0\rangle\) | \(-\lvert1\rangle\) | \((\lvert0\rangle-\lvert1\rangle)/\sqrt2\)

Two Hadamard identities earn their keep constantly: \(H^2=I\); Hadamard is its own inverse; and \(H Z H = X\); conjugating by H swaps the X and Z bases.

And the global-phase rule sets the boundary of what matters:

\(\lvert\psi\rangle\sim e^{i\theta}\lvert\psi\rangle\)[(17.2)](#eq-17-one-qubit-gates-and-bloch-sphere-2)

That rule does not make all phase irrelevant. A sign change on one component is relative phase, and a later gate can convert it into a different measurement distribution; as the worked example shows with three gates you already own.

Evidence boundary. Pauli and phase gates act as rotations on Bloch vectors while matrices act on statevectors. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## H is not a coordinate-axis flip

Decompose its geometric action carefully.

Conjugation shows the geometry: H X H=Z, H Z H=X, and H Y H=-Y. Thus H exchanges the x and z axes and reverses y; it is a pi rotation about the (x+z)/sqrt(2) axis, not a reflection that an arbitrary vector can undergo under unitary evolution. Testing the three Pauli axes catches a misleading two-dimensional sketch.

Evidence boundary. Global phase is absent from the Bloch vector, but relative phase changes its azimuth. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

\(\lvert\psi\rangle=\cos(\theta/2)\lvert0\rangle+e^{i\phi}\sin(\theta/2)\lvert1\rangle,\quad \mathbf r=(\langle X\rangle,\langle Y\rangle,\langle Z\rangle)\)[(17.3)](#eq-17-one-qubit-gates-and-bloch-sphere-3)
Notation contract: |ψ>=cos(θ/2)|0>+e^{iφ}sin(θ/2)|1>; Bloch vector r=(<X>,<Y>,<Z>); rotation angles use radians.

## S and phase around the equator

Track relative phase without changing Z populations.

For a software engineer, one-qubit gates are primitive instructions with exact semantics. The simulator implements them as matrix-vector multiplication. The compiler may replace a requested gate with native rotations the device prefers. The hardware implements those rotations with pulses, each carrying fidelity and calibration limits.

You should be able to move freely among four representations of the same operation:

- Gate name; the symbol on the diagram.

- Matrix action; the authoritative semantics.

- Statevector update; the concrete effect on α and β.

- Bloch-sphere movement; the geometric summary.

If the four ever disagree, trust the algebra. The diagram and the sphere are interface views over the same mathematical operation, and views can lie in ways matrices cannot.

## Matrix answer, sphere diagnostic

Use both representations to catch a sign or global-phase mistake.

The statevector or matrix supplies the calculation; the Bloch sphere supplies a diagnostic. Convert a normalized state to (x,y,z)=(2 Re(alpha-bar beta),2 Im(alpha-bar beta),|alpha|^2-|beta|^2) and require x^2+y^2+z^2=1 for a pure state. Agreement of matrix evolution and rotated coordinates is a strong independent check, but it does not extend as independent arrows for entangled qubits.

## Bloch/statevector round-trip viewer

Acceptance contract for Bloch/statevector round-trip viewer
 | Field | Reader-visible record

 | Format | Interactive sphere plus tested conversion and gate library
 | Verification | Property tests round-trip states up to global phase and match matrix gates to expected SO(3) rotations.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Bloch/statevector round-trip viewer",
  "format": "Interactive sphere plus tested conversion and gate library",
  "acceptance_test": "Property tests round-trip states up to global phase and match matrix gates to expected SO(3) rotations.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import cmath
import math

def normalize(state):
    norm = math.sqrt(sum(abs(value) ** 2 for value in state))
    if norm < 1e-15:
        raise ValueError("the zero vector is not a state")
    return tuple(value / norm for value in state)

def state_to_bloch(state):
    alpha, beta = normalize(state)
    coherence = alpha.conjugate() * beta
    return 2 * coherence.real, 2 * coherence.imag, abs(alpha) ** 2 - abs(beta) ** 2

def bloch_to_state(point):
    x, y, z = point
    radius = math.sqrt(x * x + y * y + z * z)
    if abs(radius - 1.0) > 1e-12:
        raise ValueError("pure-state Bloch vectors must have unit radius")
    if z < -1 + 1e-12:
        return 0j, 1 + 0j
    alpha = math.sqrt((1 + z) / 2)
    return alpha, complex(x, y) / (2 * alpha)

def matvec(matrix, state):
    return tuple(sum(matrix[row][column] * state[column] for column in range(2)) for row in range(2))

def fidelity(left, right):
    left, right = normalize(left), normalize(right)
    overlap = sum(a.conjugate() * b for a, b in zip(left, right))
    return abs(overlap) ** 2

scale = math.sqrt(0.5)
states = []
for theta, phi in ((0, 0), (math.pi, 0), (math.pi / 3, 0.7), (math.pi / 2, -1.2), (2.2, 2.6)):
    states.append((math.cos(theta / 2), cmath.exp(1j * phi) * math.sin(theta / 2)))
states.append(tuple(cmath.exp(0.91j) * value for value in states[2]))

max_roundtrip_infidelity = 0.0
for state in states:
    point = state_to_bloch(state)
    assert abs(sum(axis * axis for axis in point) - 1.0) < 1e-12
    recovered = bloch_to_state(point)
    infidelity = 1.0 - fidelity(state, recovered)
    max_roundtrip_infidelity = max(max_roundtrip_infidelity, abs(infidelity))
assert max_roundtrip_infidelity < 1e-12
assert all(abs(a - b) < 1e-12 for a, b in zip(state_to_bloch(states[2]), state_to_bloch(states[-1])))

I = ((1, 0), (0, 1))
X = ((0, 1), (1, 0))
Y = ((0, -1j), (1j, 0))
Z = ((1, 0), (0, -1))
H = ((scale, scale), (scale, -scale))
S = ((1, 0), (0, 1j))
rotations = {
    "I": (I, lambda x, y, z: (x, y, z)),
    "X": (X, lambda x, y, z: (x, -y, -z)),
    "Y": (Y, lambda x, y, z: (-x, y, -z)),
    "Z": (Z, lambda x, y, z: (-x, -y, z)),
    "H": (H, lambda x, y, z: (z, -y, x)),
    "S": (S, lambda x, y, z: (-y, x, z)),
}
max_rotation_error = 0.0
for matrix, rotation in rotations.values():
    for state in states:
        actual = state_to_bloch(matvec(matrix, state))
        expected = rotation(*state_to_bloch(state))
        max_rotation_error = max(max_rotation_error, *(abs(a - b) for a, b in zip(actual, expected)))
assert max_rotation_error < 1e-12

mixed_point_rejected = False
try:
    bloch_to_state((0.2, 0.0, 0.0))
except ValueError:
    mixed_point_rejected = True
assert mixed_point_rejected
wrong_y = lambda state: -2 * (state[0].conjugate() * state[1]).imag
assert abs(wrong_y(states[3]) - state_to_bloch(states[3])[1]) > 0.5
print(f"PASS: 17 Bloch viewer round-trips {len(states)} states through {len(rotations)} gate rotations; last |infidelity|={abs(infidelity):.2e}, max infidelity={max_roundtrip_infidelity:.2e}, max SO(3) error={max_rotation_error:.2e}")
```

Scope boundary

- This chapter does not use the Bloch sphere for mixed states beyond naming the interior boundary.

- It does not imply that spatial axes are literal device orientation or replace matrix calculation.

Depth commitment. One coordinate derivation, five gate movements, one composition trace, and property tests.

Practice problem

Starting at |0>, apply H, S, and X; give the statevector and Bloch coordinates after every gate.

** Deliverable** : Three statevector rows, three coordinate triples, and one global-phase equivalence check.

** Pass condition** : The viewer regenerates every point and checks unit Bloch radius plus matrix/sphere agreement.

Verification record

Expected solution form. Exact state trace with generated sphere coordinates.

Model answer. After H the state is |+> with Bloch coordinates (1,0,0). After S it is (|0>+i|1>)/sqrt(2) with (0,1,0). After X it is (i|0>+|1>)/sqrt(2), equivalent up to global phase to a state with coordinates (0,-1,0).

Model result and check. Tests compare Pauli-expectation coordinates to the visualizer's output.

Acceptance test. The viewer regenerates every point and checks unit Bloch radius plus matrix/sphere agreement.

External review. Open.

Expertise still needed. Quantum information theorist familiar with SU(2)/SO(3) mapping; 3D visualization engineer able to verify coordinate and accessibility behavior.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

protocol fixture

### [Bloch/statevector round-trip viewer](/playground/quantum/book/17-one-qubit-gates-and-bloch-sphere/#artifact-17-one-qubit-gates-and-bloch-sphere)

[Download fixture (.py)](/playground/quantum/artifacts/17-one-qubit-gates-and-bloch-sphere/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/17-one-qubit-gates-and-bloch-sphere/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [T. D. Ladd et al.. Quantum computers. Nature. 2010](https://doi.org/10.1038/nature08812) peer-reviewed review

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=17-one-qubit-gates-and-bloch-sphere#report)

Dependency graph

## Prerequisites for this chapter

- [Matrices as Gates Part II. Mathematical Core · Chapter 11](/playground/quantum/book/11-matrices-as-gates/)

- [Observables, Eigenvectors, and Measurement Part II. Mathematical Core · Chapter 14](/playground/quantum/book/14-observables-eigenvectors-and-measurement/)

Continue the thread

## Next concepts from this chapter

- [Grover and Amplitude Amplification Part IV. Protocols and Algorithms · Chapter 30](/playground/quantum/book/30-grover-and-amplitude-amplification/)

- [Circuit Notation as a Programming Language Part III. Circuit Model · Chapter 16](/playground/quantum/book/16-circuit-notation-as-programming-language/)

- [Controlled Gates and Reversible Classical Computation Part III. Circuit Model · Chapter 18](/playground/quantum/book/18-controlled-gates-and-reversible-classical-computation/)

[Previous Circuit Notation as a Programming Language](/playground/quantum/book/16-circuit-notation-as-programming-language/)[Next Controlled Gates and Reversible Classical Computation](/playground/quantum/book/18-controlled-gates-and-reversible-classical-computation/)

In this chapter

- [From amplitudes to three real coordinates](#from-amplitudes-to-three-real-coordinates)

- [X, Y, and Z as half-turns](#x-y-and-z-as-half-turns)

- [H is not a coordinate-axis flip](#h-is-not-a-coordinate-axis-flip)

- [S and phase around the equator](#s-and-phase-around-the-equator)

- [Matrix answer, sphere diagnostic](#matrix-answer-sphere-diagnostic)

- [Bloch/statevector round-trip viewer](#bloch-statevector-round-trip-viewer)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=17-one-qubit-gates-and-bloch-sphere#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/17-one-qubit-gates-and-bloch-sphere/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/18-controlled-gates-and-reversible-classical-computation/ -->

# Controlled Gates and Reversible Classical Computation

Every classical program throws information away, and a quantum circuit is not allowed to. This chapter shows how controlled gates make classical logic reversible — CNOT and Toffoli, traced branch by branch — and why "the gate copies the control" is the first sentence to unlearn.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How does a controlled quantum gate apply different operations coherently without measuring its control?

A controlled-U is a block-diagonal unitary that applies identity on the control-0 subspace and U on the control-1 subspace; linearity applies both branches to a superposition, which can create entanglement while preserving reversibility.

Scope and non-goals.

- This chapter does not describe control wires as classical if their states may be superposed.

- It does not equate CNOT's basis-state copying behavior with cloning arbitrary states.

[Figure 18.1.](#fig-18-controlled-gates-and-reversible-classical-computation-1) Watch what does not move: the control wire exits exactly as it entered. All the action is on the target, and the flip rule is applied independently to every branch of the input state.

Prerequisites. 12-unitary-operations-and-reversibility, 13-tensor-products-and-state-space-growth

Notation used here. Control is the first qubit; basis order declared; C(U)=|0><0|⊗I+|1><1|⊗U; no implicit measurement.

## A branch rule encoded in one unitary

Write controlled-U as projectors on the control.

An AND gate takes four possible input pairs to two possible outputs, and three of the four inputs collapse to output 0. Which input you started with is gone. Ordinary hardware gets away with this because the erased bit is dumped as heat and nobody looks back.

A closed quantum system has no such option. Its evolution is unitary, and every unitary has an inverse, so a gate that merged two different inputs into the same output would break the mathematics the whole circuit model stands on. If you want classical logic inside a coherent quantum computation, you have to embed it in a transformation that keeps enough information to run backward.

Controlled gates are the tool for that embedding. CNOT leaves its control qubit untouched and flips the target only when the control is 1. Toffoli extends the pattern to two controls, flipping its target only when both are 1. Add one spare output wire; an ancilla; and Toffoli gives you a reversible AND: the inputs survive, and the answer lands on the spare.

Evidence boundary. Controlled unitary gates condition coherent evolution without measuring the control. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## CNOT on all four basis states

Establish the exact permutation and inverse.

Everything about CNOT is in one line:

\(\operatorname{CNOT}\lvert c,t\rangle=\lvert c,t\oplus c\rangle\)[(18.1)](#eq-18-controlled-gates-and-reversible-classical-computation-1)

Read out over the computational basis, that rule is:

\(\begin{aligned}\lvert00\rangle&\mapsto\lvert00\rangle,&\lvert01\rangle&\mapsto\lvert01\rangle,\\\lvert10\rangle&\mapsto\lvert11\rangle,&\lvert11\rangle&\mapsto\lvert10\rangle.\end{aligned}\)[(18.2)](#eq-18-controlled-gates-and-reversible-classical-computation-2)

Every input pair maps to a distinct output pair, which is exactly what makes the gate reversible: given the output, you can reconstruct the input. Notice also what the line does not say; the control is never read or measured. The gate applies a branch-dependent rule to the amplitudes.

Toffoli is the same idea one level up:

\(\lvert a,b,z\rangle\mapsto\lvert a,b,z\oplus(a\land b)\rangle\)[(18.3)](#eq-18-controlled-gates-and-reversible-classical-computation-3)

The inputs \(a\) and \(b\) pass through unchanged; their AND is XORed into \(z\). Start \(z\) at 0 and the target ends up holding exactly \(a ∧ b\), with nothing erased.

Evidence boundary. CNOT is a reversible basis-state permutation and can entangle superposed inputs. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## A superposed control changes the joint state

Trace |+0> into a Bell pair without measurement.

The most common misstatement about CNOT is that it copies the control onto the target. That sentence survives only in one narrow case: a known computational-basis input with the target initialized to 0. For an unknown qubit it fails outright; Chapter 21 shows why no gate can do that job; and even for superpositions it describes the wrong thing, because what the gate produces is entanglement, not a duplicate.

Evidence boundary. Toffoli supports reversible embeddings of classical logic. [Charles H. Bennett](https://doi.org/10.1147/rd.176.0525) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

\(C(U)=\lvert0\rangle\!\langle0\rvert\otimes I+\lvert1\rangle\!\langle1\rvert\otimes U\)[(18.4)](#eq-18-controlled-gates-and-reversible-classical-computation-4)
Notation contract: Control is the first qubit; basis order declared; C(U)=|0><0|⊗I+|1><1|⊗U; no implicit measurement.

## Toffoli embeds a classical condition

Connect reversible Boolean logic to multi-control gates.

If you write software, think of reversibility as a compiler restriction: every function you emit must be invertible from its outputs. No overwriting variables you still owe, no dropping temporaries on the floor. The standard pattern for classical logic inside a quantum algorithm has three steps:

- Compute the function into ancilla registers, leaving the inputs intact.

- Use the result; as a phase, as a control, or as output.

- Uncompute the scratch, returning the ancillas to their initial state.

The last step is not hygiene for its own sake. If scratch registers stay entangled with the answer, the later interference; the mechanism every quantum speedup depends on; comes out wrong. Oracles, arithmetic, phase estimation, and error-correction circuits all lean on this pattern, which is why serious resource estimates count ancillas and cleanup gates, not just the headline logic.

## Uncompute the condition

Use controlled operations without leaving branch information behind.

When you evaluate a quantum SDK or compiler, ask how it handles reversible arithmetic, ancilla allocation, and uncomputation. A demo that counts only high-level logical functions can hide most of its real cost in controls, temporary registers, and cleanup; and the hidden part is often what blows the error budget on hardware.

A credible toolchain shows you the compiled circuit, not just the source-level sketch. If you cannot audit reversibility and gate counts at the level the device will execute, you are reviewing a brochure.

## Controlled-gate branch tracer

Acceptance contract for Controlled-gate branch tracer
 | Field | Reader-visible record

 | Format | Two-qubit simulator with block-matrix and basis-permutation views
 | Verification | Tests all basis inputs, a superposed input, inverse behavior, entanglement detection, and clean uncomputation.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Controlled-gate branch tracer",
  "format": "Two-qubit simulator with block-matrix and basis-permutation views",
  "acceptance_test": "Tests all basis inputs, a superposed input, inverse behavior, entanglement detection, and clean uncomputation.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import math

def controlled_x(state, controls, target, qubits):
    if target in controls or len(set(controls)) != len(controls) or any(not 0 <= wire < qubits for wire in (*controls, target)):
        raise ValueError("controls and target must be distinct valid wires")
    control_masks = tuple(1 << (qubits - 1 - wire) for wire in controls)
    target_mask = 1 << (qubits - 1 - target)
    output = [0j] * len(state)
    for basis, amplitude in enumerate(state):
        enabled = all(basis & mask for mask in control_masks)
        output[basis ^ target_mask if enabled else basis] += amplitude
    return output

def basis_state(bits):
    state = [0j] * (1 << len(bits))
    state[int(bits, 2)] = 1.0
    return state

def purity_of_wire(state, wire, qubits):
    mask = 1 << (qubits - 1 - wire)
    rho = [[0j, 0j], [0j, 0j]]
    for left, amplitude_left in enumerate(state):
        for right, amplitude_right in enumerate(state):
            if (left & ~mask) == (right & ~mask):
                bit_left = 1 if left & mask else 0
                bit_right = 1 if right & mask else 0
                rho[bit_left][bit_right] += amplitude_left * amplitude_right.conjugate()
    return sum(abs(value) ** 2 for row in rho for value in row).real

cnot_outputs = set()
for control in (0, 1):
    for target in (0, 1):
        bits = f"{control}{target}"
        output = controlled_x(basis_state(bits), (0,), 1, 2)
        observed = next(index for index, amplitude in enumerate(output) if abs(amplitude) > 0.9)
        expected = 2 * control + (target ^ control)
        assert observed == expected
        cnot_outputs.add(observed)
assert len(cnot_outputs) == 4

toffoli_outputs = set()
for basis in range(8):
    output = controlled_x(basis_state(format(basis, "03b")), (0, 1), 2, 3)
    observed = next(index for index, amplitude in enumerate(output) if abs(amplitude) > 0.9)
    a, b, target = (basis >> 2) & 1, (basis >> 1) & 1, basis & 1
    assert observed == (basis & 0b110) | (target ^ (a & b))
    toffoli_outputs.add(observed)
assert len(toffoli_outputs) == 8

scale = math.sqrt(0.5)
plus_zero = [scale, 0, scale, 0]
bell = controlled_x(plus_zero, (0,), 1, 2)
bell_purity = purity_of_wire(bell, 0, 2)
assert abs(bell_purity - 0.5) < 1e-12

controls_plus_target_zero = [0j] * 8
for index in (0b000, 0b010, 0b100, 0b110):
    controls_plus_target_zero[index] = 0.5
computed = controlled_x(controls_plus_target_zero, (0, 1), 2, 3)
computed_purity = purity_of_wire(computed, 2, 3)
uncomputed = controlled_x(computed, (0, 1), 2, 3)
assert computed_purity < 1.0 and all(abs(a - b) < 1e-12 for a, b in zip(uncomputed, controls_plus_target_zero))
assert abs(purity_of_wire(uncomputed, 2, 3) - 1.0) < 1e-12

invalid_rejected = False
try:
    controlled_x(basis_state("00"), (0,), 0, 2)
except ValueError:
    invalid_rejected = True
assert invalid_rejected
unconditional = controlled_x(plus_zero, (), 1, 2)
assert abs(purity_of_wire(unconditional, 0, 2) - 1.0) < 1e-12 and unconditional != bell
print(f"PASS: 18 controlled-gate tracer verifies {len(cnot_outputs)} CNOT and {len(toffoli_outputs)} Toffoli branches; Bell purity={bell_purity:.3f}, computed-ancilla purity={computed_purity:.3f}, uncompute purity={purity_of_wire(uncomputed, 2, 3):.3f}")
```

Scope boundary

- This chapter does not describe control wires as classical if their states may be superposed.

- It does not equate CNOT's basis-state copying behavior with cloning arbitrary states.

Depth commitment. One block derivation, one four-row table, one entangling trace, and one uncomputation sequence.

Practice problem

Trace (α|0>+β|1>)|0> through CNOT and determine exactly when the output is separable.

** Deliverable** : Symbolic output, coefficient factorization test, and conditions on α and β.

** Pass condition** : The solution proves separability only when one branch amplitude vanishes (up to edge cases) and the simulator samples test values.

Verification record

Expected solution form. Symbolic factorization argument plus parameterized numerical checks.

Model answer. CNOT produces alpha|00>+beta|11>. Its 2 by 2 coefficient matrix has determinant alpha beta, so the state is separable exactly when alpha=0 or beta=0; otherwise its Schmidt rank is two.

Model result and check. A rank test evaluates representative α,β pairs and agrees with the derived condition.

Acceptance test. The solution proves separability only when one branch amplitude vanishes (up to edge cases) and the simulator samples test values.

External review. Open.

Expertise still needed. Quantum circuit theorist familiar with controlled operations; Reversible-computing reviewer able to assess Toffoli and uncomputation claims.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

protocol fixture

### [Controlled-gate branch tracer](/playground/quantum/book/18-controlled-gates-and-reversible-classical-computation/#artifact-18-controlled-gates-and-reversible-classical-computation)

[Download fixture (.py)](/playground/quantum/artifacts/18-controlled-gates-and-reversible-classical-computation/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/18-controlled-gates-and-reversible-classical-computation/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Charles H. Bennett. Logical reversibility of computation. IBM Journal of Research and Development. 1973](https://doi.org/10.1147/rd.176.0525) primary paper

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=18-controlled-gates-and-reversible-classical-computation#report)

Dependency graph

## Prerequisites for this chapter

- [Unitary Operations and Reversibility Part II. Mathematical Core · Chapter 12](/playground/quantum/book/12-unitary-operations-and-reversibility/)

- [Tensor Products and State-Space Growth Part II. Mathematical Core · Chapter 13](/playground/quantum/book/13-tensor-products-and-state-space-growth/)

Continue the thread

## Next concepts from this chapter

- [Bell States and GHZ States Part III. Circuit Model · Chapter 20](/playground/quantum/book/20-bell-states-and-ghz-states/)

- [No-Cloning and Why Copying Breaks Quantum Logic Part III. Circuit Model · Chapter 21](/playground/quantum/book/21-no-cloning-and-why-copying-breaks-quantum-logic/)

- [Oracles and Query Complexity Part IV. Protocols and Algorithms · Chapter 27](/playground/quantum/book/27-oracles-and-query-complexity/)

[Previous One-Qubit Gates and the Bloch Sphere](/playground/quantum/book/17-one-qubit-gates-and-bloch-sphere/)[Next Multi-Qubit Circuits](/playground/quantum/book/19-multi-qubit-circuits/)

In this chapter

- [A branch rule encoded in one unitary](#a-branch-rule-encoded-in-one-unitary)

- [CNOT on all four basis states](#cnot-on-all-four-basis-states)

- [A superposed control changes the joint state](#a-superposed-control-changes-the-joint-state)

- [Toffoli embeds a classical condition](#toffoli-embeds-a-classical-condition)

- [Uncompute the condition](#uncompute-the-condition)

- [Controlled-gate branch tracer](#controlled-gate-branch-tracer)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=18-controlled-gates-and-reversible-classical-computation#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/18-controlled-gates-and-reversible-classical-computation/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/19-multi-qubit-circuits/ -->

# Multi-Qubit Circuits

Two qubits share one four-dimensional state space, and every gate in the circuit acts on a specific piece of it. This chapter drills the discipline that keeps multi-qubit work honest: fix a basis order, expand the tensor products, and check entanglement by factoring, not by counting wires.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How can a reader apply gates to selected wires while preserving the declared joint-basis ordering?

Lift a local gate into the full state space with tensor products and permutations, apply multi-qubit gates to the correct indices, and track the complete joint vector; wire diagrams are syntax, while basis order defines the actual coordinate operation.

Scope and non-goals.

- This chapter does not optimize arbitrary tensor contractions or introduce tensor-network simulation.

- It does not assume every SDK uses the same endianness or wire-index convention.

[Figure 19.1.](#fig-19-multi-qubit-circuits-1) Notice that the drawing underspecifies the operator: the same H symbol means H ⊗ I here and I ⊗ H one wire down. The declared basis order on the right is what makes any of it checkable.

Prerequisites. 13-tensor-products-and-state-space-growth, 16-circuit-notation-as-programming-language

Notation used here. Three-qubit basis order and endianness declared; G_on_q uses explicit tensor/permutation construction; wire labels remain stable.

## Gate scope becomes a full-space operator

Construct I⊗H and H⊗I explicitly.

A two-qubit circuit is not two one-qubit circuits sharing a page. The joint state lives in a four-dimensional space with one amplitude per computational-basis string:

\(\lvert00\rangle,\lvert01\rangle,\lvert10\rangle,\lvert11\rangle\)[(19.1)](#eq-19-multi-qubit-circuits-1)

Gates then have scope. A one-qubit gate drawn on one wire acts as that gate on one factor and as the identity on the other; a two-qubit gate mixes the branches according to its own rule. Entanglement appears when the result can no longer be written as one state per wire.

The working discipline is boring and absolute: choose a basis order once, write it at the top of the page, and never let it drift.

Evidence boundary. Local operations on composite systems are represented by tensoring with identity operators. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Nonadjacent wires require an index map

Show how a three-qubit target is located.

A product of two one-qubit states expands by distribution:

\((a\lvert0\rangle+b\lvert1\rangle)\otimes(c\lvert0\rangle+d\lvert1\rangle)=ac\lvert00\rangle+ad\lvert01\rangle+bc\lvert10\rangle+bd\lvert11\rangle\)[(19.2)](#eq-19-multi-qubit-circuits-2)

Four amplitudes, but built from only four numbers with heavy structure; that is what separable means. A general two-qubit state has four free amplitudes and no such factorization. Wire count tells you the dimension of the space; by itself it says nothing about entanglement.

Scope is the other half of the discipline. H on the first qubit is the matrix \(H\otimes I\); on the second it is \(I\otimes H\). CNOT with the first qubit controlling is a different permutation from CNOT with the second controlling. Same gate symbols, different operators.

Evidence boundary. Multi-qubit gate application depends on wire indices and a declared basis ordering. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [openqasm3](https://openqasm.com/)

## A two-gate circuit by two methods

Compare full matrices with index-wise amplitude updates.

The second is quieter and more expensive: basis-order drift. Write your amplitudes in the order \(\lvert00\rangle,\lvert01\rangle,\lvert10\rangle,\lvert11\rangle\), then silently switch to \(\lvert00\rangle,\lvert10\rangle,\lvert01\rangle,\lvert11\rangle\) halfway through, and every subsequent trace can look plausible while being wrong. This is the multi-qubit version of a sign error, and code review rarely catches it because each line is consistent with some convention.

Evidence boundary. Equivalent abstract circuits may serialize statevectors differently across conventions. [openqasm3](https://openqasm.com/) [John Preskill](https://www.preskill.caltech.edu/ph219/)

\(Three-qubit basis order and endianness declared; G_on_q uses explicit tensor/permutation construction; wire labels remain stable.\)[(19.3)](#eq-19-multi-qubit-circuits-3)
Notation contract: Three-qubit basis order and endianness declared; G_on_q uses explicit tensor/permutation construction; wire labels remain stable.

## Factor after every stage when possible

Use separability as a debugging aid.

Tensor products are why exact simulation is exponential. A statevector simulator stores \(2^n\) complex amplitudes for \(n\) qubits; a one-qubit gate becomes a strided pass that updates pairs of amplitudes; a controlled gate permutes or mixes the branches whose control bits are set. Thirty qubits is a billion amplitudes; the math from this chapter, running out of RAM.

Depth and width are software concerns too. Two circuits with the same unitary can schedule completely differently after decomposition, so treat the abstract circuit as the semantic object and the compiled circuit as the execution object. Chapter 22 prices the difference.

## Endianness bugs that still normalize

Demonstrate a wrong but plausible result.

When you review a simulator, SDK, or compiler pass, look for the conventions page: qubit ordering, endianness of basis strings, gate scope, and measurement bit order. Most integration bugs in this space are convention mismatches between two components that are each internally correct.

A serious platform states these conventions in its API documentation and tests them with small hand-checkable traces; exactly the traces you just did. If the conventions are undocumented, expect to discover them during a debugging session instead.

## Wire-scope conformance suite

Acceptance contract for Wire-scope conformance suite
 | Field | Reader-visible record

 | Format | Reference simulator fixtures for three basis-order conventions
 | Verification | Tests local gates on every wire, nonadjacent CNOT, norm preservation, and detection of swapped |01>/|10> coordinates.
 | Availability | Published companion and deterministic command

[The state-vector laboratory](/playground/quantum/labs/#state-vector-simulator) checks this chapter's two-qubit ordering and joint-gate trace.

```
cd labs && python -m unittest tests.test_simulator -v
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import math

def validate_layout(qubits, layout):
    if tuple(sorted(layout)) != tuple(range(qubits)):
        raise ValueError("layout must map each logical wire exactly once")

def wire_mask(wire, qubits, layout):
    validate_layout(qubits, layout)
    if not 0 <= wire < qubits:
        raise ValueError("wire out of range")
    return 1 << (qubits - 1 - layout[wire])

def encode_bits(bits, layout):
    qubits = len(bits)
    index = 0
    for wire, bit in enumerate(bits):
        if bit:
            index |= wire_mask(wire, qubits, layout)
    return index

def decode_bits(index, qubits, layout):
    return tuple(1 if index & wire_mask(wire, qubits, layout) else 0 for wire in range(qubits))

def apply_x(state, wire, qubits, layout):
    mask = wire_mask(wire, qubits, layout)
    output = [0j] * len(state)
    for basis, amplitude in enumerate(state):
        output[basis ^ mask] += amplitude
    return output

def apply_h(state, wire, qubits, layout):
    mask = wire_mask(wire, qubits, layout)
    output = state[:]
    scale = math.sqrt(0.5)
    for basis in range(len(state)):
        if basis & mask == 0:
            paired = basis | mask
            output[basis] = (state[basis] + state[paired]) * scale
            output[paired] = (state[basis] - state[paired]) * scale
    return output

def apply_cnot(state, control, target, qubits, layout):
    if control == target:
        raise ValueError("control and target must differ")
    control_mask = wire_mask(control, qubits, layout)
    target_mask = wire_mask(target, qubits, layout)
    output = [0j] * len(state)
    for basis, amplitude in enumerate(state):
        output[basis ^ target_mask if basis & control_mask else basis] += amplitude
    return output

layouts = ((0, 1, 2), (2, 1, 0), (1, 2, 0))
local_gate_cases = 0
for layout in layouts:
    for wire in range(3):
        state = [0j] * 8
        state[encode_bits((0, 0, 0), layout)] = 1.0
        output = apply_x(state, wire, 3, layout)
        observed_index = next(index for index, amplitude in enumerate(output) if abs(amplitude) > 0.9)
        expected = tuple(1 if index == wire else 0 for index in range(3))
        assert decode_bits(observed_index, 3, layout) == expected
        local_gate_cases += 1

bell_supports = []
for layout in layouts:
    state = [0j] * 8
    state[encode_bits((0, 0, 0), layout)] = 1.0
    state = apply_cnot(apply_h(state, 0, 3, layout), 0, 2, 3, layout)
    support = {decode_bits(index, 3, layout): round(abs(amplitude) ** 2, 12)
               for index, amplitude in enumerate(state) if abs(amplitude) > 1e-12}
    assert support == {(0, 0, 0): 0.5, (1, 0, 1): 0.5}
    bell_supports.append(support)

for layout in ((0, 1, 2, 3), (3, 2, 1, 0)):
    state = [0j] * 16
    state[encode_bits((1, 0, 0, 0), layout)] = 1.0
    output = apply_cnot(state, 0, 3, 4, layout)
    observed = next(index for index, amplitude in enumerate(output) if abs(amplitude) > 0.9)
    assert decode_bits(observed, 4, layout) == (1, 0, 0, 1)

ket_01_msb = encode_bits((0, 1), (0, 1))
ket_01_lsb = encode_bits((0, 1), (1, 0))
assert (ket_01_msb, ket_01_lsb) == (1, 2)
bad_layout_rejected = False
try:
    encode_bits((0, 1, 0), (0, 0, 2))
except ValueError:
    bad_layout_rejected = True
assert bad_layout_rejected
print(f"PASS: 19 wire-scope suite checks {local_gate_cases} local gates, {len(bell_supports)} layout-stable Bell traces, and 2 nonadjacent CNOTs; |01> indices={ket_01_msb}/{ket_01_lsb}")
```

Scope boundary

- This chapter does not optimize arbitrary tensor contractions or introduce tensor-network simulation.

- It does not assume every SDK uses the same endianness or wire-index convention.

Depth commitment. Two lifted operators, one nonadjacent gate, one convention bug, and conformance fixtures.

Practice problem

Apply H to q2 and CNOT(q2,q0) on |001> under a stated big-endian convention, then repeat under little-endian serialization.

** Deliverable** : Two coordinate traces and one convention-conversion map.

** Pass condition** : Reference fixtures verify both traces represent the same abstract labeled-qubit evolution.

Verification record

Expected solution form. Side-by-side index trace with permutation-matrix verification.

Model answer. Under q0-q1-q2 big-endian labels, H on q2 maps |001> to (|000>-|001>)/sqrt(2), and CNOT(q2,q0) gives (|000>-|101>)/sqrt(2). A little-endian serializer changes array indices, not labeled kets; conversion back to canonical labels must yield the same state.

Model result and check. CI converts both outputs to a canonical labeled basis and asserts equality.

Acceptance test. Reference fixtures verify both traces represent the same abstract labeled-qubit evolution.

External review. Open.

Expertise still needed. Quantum simulator implementer experienced with indexing and endianness; Linear algebra reviewer able to verify lifted operators and permutations.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

source code

### [Wire-scope conformance suite](/playground/quantum/labs/#state-vector-simulator)

[Download fixture (.py)](/playground/quantum/artifacts/19-multi-qubit-circuits/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/19-multi-qubit-circuits/artifact.json)

Reproduce or test
`cd labs && python -m unittest tests.test_simulator -v`

Provenance

## Sources and review

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=19-multi-qubit-circuits#report)

Dependency graph

## Prerequisites for this chapter

- [Tensor Products and State-Space Growth Part II. Mathematical Core · Chapter 13](/playground/quantum/book/13-tensor-products-and-state-space-growth/)

- [Circuit Notation as a Programming Language Part III. Circuit Model · Chapter 16](/playground/quantum/book/16-circuit-notation-as-programming-language/)

Continue the thread

## Next concepts from this chapter

- [Circuit Cost: Depth, Width, Gate Set, Connectivity Part III. Circuit Model · Chapter 22](/playground/quantum/book/22-circuit-cost-depth-width-gate-set-connectivity/)

- [Quantum Fourier Transform Part IV. Protocols and Algorithms · Chapter 31](/playground/quantum/book/31-quantum-fourier-transform/)

- [Building a Small Simulator From Scratch Part V. Practical Software · Chapter 37](/playground/quantum/book/37-building-a-small-simulator-from-scratch/)

[Previous Controlled Gates and Reversible Classical Computation](/playground/quantum/book/18-controlled-gates-and-reversible-classical-computation/)[Next Bell States and GHZ States](/playground/quantum/book/20-bell-states-and-ghz-states/)

In this chapter

- [Gate scope becomes a full-space operator](#gate-scope-becomes-a-full-space-operator)

- [Nonadjacent wires require an index map](#nonadjacent-wires-require-an-index-map)

- [A two-gate circuit by two methods](#a-two-gate-circuit-by-two-methods)

- [Factor after every stage when possible](#factor-after-every-stage-when-possible)

- [Endianness bugs that still normalize](#endianness-bugs-that-still-normalize)

- [Wire-scope conformance suite](#wire-scope-conformance-suite)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=19-multi-qubit-circuits#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/19-multi-qubit-circuits/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/20-bell-states-and-ghz-states/ -->

# Bell States and GHZ States

One Hadamard and one CNOT turn ∣ 00 ⟩ into the most reused object in quantum information. This chapter builds Bell and GHZ states gate by gate, predicts their measurement statistics, and draws the line between correlation and control.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How are Bell and GHZ states prepared, verified, and distinguished from ordinary correlated mixtures?

Bell and GHZ states arise from a superposition followed by controlled gates, cannot factor into independent pure states, and retain basis-dependent coherence that a classically correlated mixture lacks; verification therefore needs more than matching computational-basis counts.

Scope and non-goals.

- This chapter does not certify entanglement from a single measurement setting or survey all multipartite entanglement classes.

- It does not claim GHZ states are robust memories or direct evidence of useful computation.

[Figure 20.1.](#fig-20-bell-states-and-ghz-states-1) Notice the fan-out: one control wire, a new target for each added qubit. Two gates entangle two qubits; one more CNOT extends the same correlation to three.

Prerequisites. 15-density-matrices-and-mixed-states, 18-controlled-gates-and-reversible-classical-computation

Notation used here. Bell states labeled \(\Phi^\pm,\Psi^\pm\); \(\mathrm{GHZ}_n=(\lvert0^n\rangle+\lvert1^n\rangle)/\sqrt{2}\); density matrices used for mixture comparison; parity convention stated.

## Four Bell states from one circuit family

Derive preparation operations and basis labels.

Bell states are the simplest entangled states, and the recipe fits on an index card: put one qubit into superposition with a Hadamard, then let it control a CNOT onto a second qubit. GHZ states repeat the trick, fanning the same control out to more targets; the three-qubit version is:

\((\lvert000\rangle+\lvert111\rangle)/\sqrt2\)[(20.1)](#eq-20-bell-states-and-ghz-states-1)

These states earn their keep as resources: their joint measurement statistics cannot be reproduced by qubits that are merely correlated the classical way. What they do not do, by themselves, is send controllable messages. The usable pattern is always joint state, chosen measurement bases, and a classical comparison afterwards.

Evidence boundary. Bell states form an entangled orthonormal basis of two qubits. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [John S. Bell](https://doi.org/10.1103/PhysicsPhysiqueFizika.1.195)

## Extend one control into a GHZ chain

Trace \(\lvert000\rangle\) to \((\lvert000\rangle+\lvert111\rangle)/\sqrt{2}\).

The canonical Bell state is:

\(\lvert\Phi^+\rangle=(\lvert00\rangle+\lvert11\rangle)/\sqrt2\)[(20.2)](#eq-20-bell-states-and-ghz-states-2)

Ideal computational-basis measurements return 00 or 11 with equal probability, and never 01 or 10; perfect correlation from a state neither party controls alone. The preparation follows directly from the CNOT basis action:

\(\operatorname{CNOT}\lvert c,t\rangle=\lvert c,t\oplus c\rangle\)[(20.3)](#eq-20-bell-states-and-ghz-states-3)

Traced from |00>:

\(\lvert00\rangle\xrightarrow{H\otimes I}(\lvert00\rangle+\lvert10\rangle)/\sqrt2\xrightarrow{\mathrm{CNOT}}(\lvert00\rangle+\lvert11\rangle)/\sqrt2\)[(20.4)](#eq-20-bell-states-and-ghz-states-4)

GHZ preparation continues the same pattern: from \(\lvert000\rangle\), apply H to the first qubit, then CNOT from the first qubit to the second, and from the first to the third.

There are actually four Bell states, reached by flipping phases or bits on the pattern above, and together they form an orthonormal basis for two qubits; the Bell basis. That basis is the standard currency of quantum protocols: Chapters 24 and 25 spend exactly this currency, in opposite directions.

Evidence boundary. GHZ states are multipartite entangled states prepared by a Hadamard and controlled-gate chain. [John Preskill](https://www.preskill.caltech.edu/ph219/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Matching Z counts are insufficient

Construct the classically correlated density matrix.

The seductive mistake is to think entanglement lets one party choose the other's result. It does not. In a Bell state, each local measurement is individually random; Alice cannot steer Bob's outcome toward 0 or 1 by anything she does to her half. The correlation becomes visible only when the two compare notes over an ordinary classical channel; Chapter 7 (Entanglement Without Faster-Than-Light Myths) spends a full chapter on why the no-signaling theorem closes every workaround.

The quieter mistake is filing Bell and GHZ states under big superpositions. Product states can have just as many terms after expansion, as \(\lvert+\rangle\otimes\lvert-\rangle\) showed in Chapter 19. What makes these states special is that no per-wire description exists at all.

Evidence boundary. Computational-basis correlation alone cannot distinguish coherent entanglement from an incoherent correlated mixture. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

\(\lvert\operatorname{GHZ}_n\rangle=(\lvert0^n\rangle+\lvert1^n\rangle)/\sqrt2\)[(20.5)](#eq-20-bell-states-and-ghz-states-5)
Notation contract: Bell states labeled \(\Phi^\pm,\Psi^\pm\); \(\mathrm{GHZ}_n=(\lvert0^n\rangle+\lvert1^n\rangle)/\sqrt{2}\); density matrices used for mixture comparison; parity convention stated.

## An X-basis coherence check

Predict parity that separates coherent and incoherent preparations.

For builders, Bell and GHZ circuits are the hello-world of correctness. A simulator should produce exactly the ideal outcome distribution. A real device will leak into 01 and 10 through gate error, readout error, decoherence, and crosstalk; and the size of that leakage is a quick, honest health metric.

The discipline is to keep four things separate when you look at output:

- the ideal state;

- the measurement distribution it implies;

- the finite-shot sample you actually collected;

- the device's error pattern.

Conflating the sample with the state, or the diagram with the device, is how small experiments get oversold.

## Verification as a test suite

Specify state preparation, multiple settings, and tolerances.

When a team demonstrates entanglement, ask five questions. Which state were they aiming for? Which basis did they measure? What fidelity or correlation metric did they report? What controls ran alongside? And how did they separate device error from ideal behavior? Those answers tell you whether you are looking at physics or at a rendering of physics.

Keep the ceiling in view as well: one small entangled state proves entanglement. It does not prove scalable computation, network utility, or application advantage; each of those needs its own evidence.

## Bell/GHZ verification harness

Acceptance contract for Bell/GHZ verification harness
 | Field | Reader-visible record

 | Format | Circuit fixtures, density-matrix simulator, and multi-basis test report
 | Verification | Tests all four Bell preparations, GHZ parity in X/Z settings, and rejection of a matched-count classical mixture.
 | Availability | Published companion and deterministic command

[Bell-state run record](/playground/quantum/labs/#bell-state-run) is the executable companion used by this page.

```
cd labs && PYTHONPATH=src python -m quantum_end_to_end bell --shots 10000 --seed 7
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import math

def h(state, wire, qubits):
    mask = 1 << (qubits - 1 - wire)
    output = state[:]
    scale = math.sqrt(0.5)
    for basis in range(len(state)):
        if basis & mask == 0:
            paired = basis | mask
            output[basis] = (state[basis] + state[paired]) * scale
            output[paired] = (state[basis] - state[paired]) * scale
    return output

def pauli(state, wire, qubits, gate):
    mask = 1 << (qubits - 1 - wire)
    output = [0j] * len(state)
    for basis, amplitude in enumerate(state):
        if gate == "X":
            output[basis ^ mask] += amplitude
        elif gate == "Z":
            output[basis] += -amplitude if basis & mask else amplitude
        else:
            raise ValueError("unsupported Pauli gate")
    return output

def cnot(state, control, target, qubits):
    if control == target:
        raise ValueError("control and target must differ")
    control_mask = 1 << (qubits - 1 - control)
    target_mask = 1 << (qubits - 1 - target)
    output = [0j] * len(state)
    for basis, amplitude in enumerate(state):
        output[basis ^ target_mask if basis & control_mask else basis] += amplitude
    return output

def distribution(state):
    qubits = len(state).bit_length() - 1
    return {format(index, f"0{qubits}b"): round(abs(amplitude) ** 2, 12)
            for index, amplitude in enumerate(state) if abs(amplitude) > 1e-12}

def in_x_basis(state, qubits):
    for wire in range(qubits):
        state = h(state, wire, qubits)
    return state

def inner(left, right):
    return sum(a.conjugate() * b for a, b in zip(left, right))

bell = [1.0, 0j, 0j, 0j]
bell = cnot(h(bell, 0, 2), 0, 1, 2)
messages = ((0, 0), (0, 1), (1, 0), (1, 1))
bell_states = []
for phase_bit, flip_bit in messages:
    state = bell[:]
    if flip_bit:
        state = pauli(state, 0, 2, "X")
    if phase_bit:
        state = pauli(state, 0, 2, "Z")
    bell_states.append(state)
max_overlap = 0.0
for left_index, left in enumerate(bell_states):
    for right_index, right in enumerate(bell_states):
        overlap = abs(inner(left, right))
        if left_index != right_index:
            max_overlap = max(max_overlap, overlap)
        assert abs(overlap - (1.0 if left_index == right_index else 0.0)) < 1e-12
assert distribution(bell_states[0]) == {"00": 0.5, "11": 0.5}
assert distribution(bell_states[1]) == {"01": 0.5, "10": 0.5}

ghz = [1.0] + [0j] * 7
ghz = cnot(cnot(h(ghz, 0, 3), 0, 1, 3), 0, 2, 3)
assert distribution(ghz) == {"000": 0.5, "111": 0.5}
ghz_x = distribution(in_x_basis(ghz, 3))
expected_even = {bits for bits in (format(index, "03b") for index in range(8)) if bits.count("1") % 2 == 0}
assert set(ghz_x) == expected_even and all(abs(value - 0.25) < 1e-12 for value in ghz_x.values())

zero_zero = [1.0, 0j, 0j, 0j]
one_one = [0j, 0j, 0j, 1.0]
mixture_x = {}
for component in (zero_zero, one_one):
    for outcome, probability in distribution(in_x_basis(component, 2)).items():
        mixture_x[outcome] = mixture_x.get(outcome, 0.0) + 0.5 * probability
bell_x = distribution(in_x_basis(bell, 2))
mixture_anticorrelation = mixture_x["01"] + mixture_x["10"]
assert bell_x == {"00": 0.5, "11": 0.5}
assert abs(mixture_anticorrelation - 0.5) < 1e-12
phase_mutation_x = distribution(in_x_basis(pauli(bell, 0, 2, "Z"), 2))
assert phase_mutation_x == {"01": 0.5, "10": 0.5}

invalid_control_rejected = False
try:
    cnot(bell, 0, 0, 2)
except ValueError:
    invalid_control_rejected = True
assert invalid_control_rejected
print(f"PASS: 20 Bell/GHZ harness verifies {len(bell_states)} orthogonal Bell states (max cross-overlap={max_overlap:.1e}), GHZ X-even support={len(ghz_x)}, classical-mixture X anticorrelation={mixture_anticorrelation:.3f}")
```

Scope boundary

- This chapter does not certify entanglement from a single measurement setting or survey all multipartite entanglement classes.

- It does not claim GHZ states are robust memories or direct evidence of useful computation.

Depth commitment. Four Bell states, one GHZ trace, one mixture counterexample, and a test harness.

Practice problem

Design the minimum X/Z measurement set that distinguishes a Bell state from the corresponding classical mixture.

** Deliverable** : Circuit settings, predicted distributions/parities, and a decision rule.

** Pass condition** : The density-matrix fixture generates both cases and demonstrates that Z statistics match while X parity differs.

Verification record

Expected solution form. Measurement-setting table plus executable discrimination test.

Model answer. A Z/Z test cannot distinguish |Phi+> from the 50/50 mixture of |00> and |11>. Measuring X on both qubits does: the Bell state has <X tensor X>=1 and only equal X outcomes, while the mixture has expectation zero and four uniform X outcomes.

Model result and check. CI evaluates both density matrices under the submitted settings and applies the decision rule.

Acceptance test. The density-matrix fixture generates both cases and demonstrates that Z statistics match while X parity differs.

External review. Open.

Expertise still needed. Experimental quantum information reviewer experienced in entanglement verification; Statistical testing reviewer able to assess multi-basis decision rules.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

reproducible run

### [Bell/GHZ verification harness](/playground/quantum/labs/#bell-state-run)

[Download fixture (.py)](/playground/quantum/artifacts/20-bell-states-and-ghz-states/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/20-bell-states-and-ghz-states/artifact.json)

Reproduce or test
`cd labs && PYTHONPATH=src python -m quantum_end_to_end bell --shots 10000 --seed 7`

Provenance

## Sources and review

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [John S. Bell. On the Einstein Podolsky Rosen paradox. Physics Physique Fizika. 1964](https://doi.org/10.1103/PhysicsPhysiqueFizika.1.195) primary paper

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=20-bell-states-and-ghz-states#report)

Dependency graph

## Prerequisites for this chapter

- [Density Matrices and Mixed States Part II. Mathematical Core · Chapter 15](/playground/quantum/book/15-density-matrices-and-mixed-states/)

- [Controlled Gates and Reversible Classical Computation Part III. Circuit Model · Chapter 18](/playground/quantum/book/18-controlled-gates-and-reversible-classical-computation/)

Continue the thread

## Next concepts from this chapter

- [No-Cloning and Why Copying Breaks Quantum Logic Part III. Circuit Model · Chapter 21](/playground/quantum/book/21-no-cloning-and-why-copying-breaks-quantum-logic/)

- [Superdense Coding Part IV. Protocols and Algorithms · Chapter 24](/playground/quantum/book/24-superdense-coding/)

- [Public Playground MVP Part X. Capstones · Chapter 87](/playground/quantum/book/87-public-playground-mvp/)

[Previous Multi-Qubit Circuits](/playground/quantum/book/19-multi-qubit-circuits/)[Next No-Cloning and Why Copying Breaks Quantum Logic](/playground/quantum/book/21-no-cloning-and-why-copying-breaks-quantum-logic/)

In this chapter

- [Four Bell states from one circuit family](#four-bell-states-from-one-circuit-family)

- [Extend one control into a GHZ chain](#extend-one-control-into-a-ghz-chain)

- [Matching Z counts are insufficient](#matching-z-counts-are-insufficient)

- [An X-basis coherence check](#an-x-basis-coherence-check)

- [Verification as a test suite](#verification-as-a-test-suite)

- [Bell/GHZ verification harness](#bell-ghz-verification-harness)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=20-bell-states-and-ghz-states#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/20-bell-states-and-ghz-states/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/21-no-cloning-and-why-copying-breaks-quantum-logic/ -->

# No-Cloning and Why Copying Breaks Quantum Logic

There is no quantum photocopier, and the proof takes about four lines of algebra. This chapter proves no-cloning from linearity alone, maps exactly which copying still works, and turns the theorem into design constraints you will meet in every later chapter.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. Why can no physical operation copy every unknown quantum state even though CNOT copies computational-basis labels?

Linearity forces a putative copier's action on a superposition to be the superposition of copied basis outputs, which differs from two independent copies because the cross terms are missing; known orthogonal basis states can be copied, but no single operation clones all unknown states.

Scope and non-goals.

- This chapter does not say classical data, known basis states, or measurement records cannot be copied.

- It does not use measurement disturbance as the proof or forbid state transfer by teleportation.

[Figure 21.1.](#fig-21-no-cloning-and-why-copying-breaks-quantum-logic-1) Notice where the machine fails: not on the basis states, where copying is legal, but on the superposition, where linearity forces entanglement instead of a duplicate.

Prerequisites. 18-controlled-gates-and-reversible-classical-computation, 20-bell-states-and-ghz-states

Notation used here. Unknown input |ψ>; blank |0>; linear map U; distinguish U(|ψ>|0>) from |ψ>|ψ>; equality up to global phase considered.

## Specify the copier's contract

Write the desired transformation with a blank target.

Classical software copies bits constantly; backups, logs, retries, fanout. Quantum information refuses the same treatment. No unitary operation takes an arbitrary unknown state \(\lvert\psi\rangle\) and a blank register and returns two copies:

\(\lvert\psi\rangle\lvert\mathrm{blank}\rangle\mapsto\lvert\psi\rangle\lvert\psi\rangle\)[(21.1)](#eq-21-no-cloning-and-why-copying-breaks-quantum-logic-1)

The claim is precise, and its boundaries matter. Known basis states can be duplicated; a CNOT does it. What cannot exist is a universal copier that works on every unknown qubit, because such a machine contradicts the linearity of quantum evolution.

Evidence boundary. The no-cloning theorem follows from linearity/unitarity and forbids a universal copier for arbitrary unknown states. [William K. Wootters](https://doi.org/10.1038/299802a0) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Basis success fixes the linear extension

Apply the assumed operation to |0>, |1>, and |+>.

Suppose a unitary copier U exists, and it handles the basis states as advertised:

\(\begin{aligned}U\lvert0\rangle\lvert b\rangle&=\lvert0\rangle\lvert0\rangle,\\U\lvert1\rangle\lvert b\rangle&=\lvert1\rangle\lvert1\rangle.\end{aligned}\)[(21.2)](#eq-21-no-cloning-and-why-copying-breaks-quantum-logic-2)

Linearity then fixes what U must do to \(\lvert+\rangle\lvert b\rangle\); it has no choice:

\(U\lvert+\rangle\lvert b\rangle=(\lvert00\rangle+\lvert11\rangle)/\sqrt2\)[(21.3)](#eq-21-no-cloning-and-why-copying-breaks-quantum-logic-3)

But a genuine clone of \(\lvert+\rangle\) would be:

\(\lvert+\rangle\lvert+\rangle=(\lvert00\rangle+\lvert01\rangle+\lvert10\rangle+\lvert11\rangle)/2\)[(21.4)](#eq-21-no-cloning-and-why-copying-breaks-quantum-logic-4)

The two right-hand sides are different states. The contradiction needs no measurement anywhere; it is arithmetic. A second proof route uses inner products: copying would map the overlap between two states to its square, and squaring preserves overlaps only for states that are identical or orthogonal. That is why a cloner restricted to a known orthogonal basis can exist, and a universal one cannot.

The theorem was proved in 1982 by Wootters and Zurek, and independently by Dieks; remarkably late for a result this elementary. Within a few years it had stopped being a limitation and started being a feature: quantum key distribution (Chapter 26) rests directly on the fact that an eavesdropper cannot copy the unknown states passing through the channel.

Evidence boundary. A CNOT can copy known computational-basis labels while producing entanglement for superposed input. [John Preskill](https://www.preskill.caltech.edu/ph219/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## The missing cross terms

Compare the actual Bell output with |+>|+>.

The first misreading explains no-cloning as "measuring the qubit disturbs it." Measurement disturbance is real, but it is not the theorem: the proof above never measures anything. Even a perfectly gentle, measurement-free copier is impossible. Resting the argument on measurement makes it weaker than the truth.

The second misreading overshoots and concludes that quantum information can never be replicated in any sense. Classical records copied from measurement outcomes replicate fine. Known orthogonal states replicate fine. Quantum error correction spreads one logical qubit's information across many physical qubits; but that is protection, not photocopying: no two of the physical qubits each hold the unknown state.

Evidence boundary. No-cloning does not prohibit teleportation, tomography from ensembles, or classical record copying. [Charles H. Bennett et al.](https://doi.org/10.1103/PhysRevLett.70.1895) [William K. Wootters](https://doi.org/10.1038/299802a0) [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/)

\(U(\lvert\psi\rangle\lvert0\rangle)\stackrel{?}{=}\lvert\psi\rangle\lvert\psi\rangle\)[(21.5)](#eq-21-no-cloning-and-why-copying-breaks-quantum-logic-5)
Notation contract: Unknown input |ψ>; blank |0>; linear map U; distinguish U(|ψ>|0>) from |ψ>|ψ>; equality up to global phase considered.

## What copying remains legal

Separate orthogonal-state copying, measurement/repreparation, and tomography.

For a developer, no-cloning deletes a reflex. You cannot snapshot an unknown intermediate state for backup, logging, retry, or fanout to parallel workers. Quantum programs route around this with reversible transformations, ancillas, uncomputation, and measurements placed only where a classical record is actually wanted.

Debugging changes character too. There is no print statement for an unknown hardware state: reading it changes the experiment. Simulators will happily show you a statevector, but that visibility belongs to the classical model of the computation; it is not an operation the computation itself can perform.

## Protocol consequences of no-cloning

Connect the theorem to QKD, teleportation, and error correction without overreach.

No-cloning is a diligence filter. Any architecture that quietly assumes backing up unknown qubits, broadcasting one quantum state to many processors, or reading a state without disturbing it is assuming a machine the theorem forbids.

Serious designs show their workaround instead: teleportation with its entanglement budget (Chapter 25), error-correcting codes with their overhead, classical summaries of quantum data, or tomography with its sampling cost. The workaround is usually where the real engineering expense sits, so its absence from a pitch is information too.

## No-cloning symbolic counterexample

Acceptance contract for No-cloning symbolic counterexample
 | Field | Reader-visible record

 | Format | Notebook comparing linear output and desired tensor-square for parameterized states
 | Verification | Tests basis copying, |+> failure, nonzero fidelity gap, and explicitly labels measurement/repreparation as a different channel.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "No-cloning symbolic counterexample",
  "format": "Notebook comparing linear output and desired tensor-square for parameterized states",
  "acceptance_test": "Tests basis copying, |+> failure, nonzero fidelity gap, and explicitly labels measurement/repreparation as a different channel.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import cmath
import math

def normalize(state):
    norm = math.sqrt(sum(abs(value) ** 2 for value in state))
    if norm < 1e-15:
        raise ValueError("the zero vector is not a state")
    return tuple(value / norm for value in state)

def inner(left, right):
    return sum(a.conjugate() * b for a, b in zip(left, right))

def kron(left, right):
    return tuple(a * b for a in left for b in right)

def cnot_copy(state):
    alpha, beta = normalize(state)
    return alpha, 0j, 0j, beta

def desired_two_copies(state):
    state = normalize(state)
    return kron(state, state)

def fidelity(left, right):
    return abs(inner(left, right)) ** 2

def outer(state):
    return tuple(tuple(state[row] * state[column].conjugate() for column in range(len(state)))
                 for row in range(len(state)))

def measurement_reprepare(state):
    alpha, beta = normalize(state)
    return tuple(tuple((abs(alpha) ** 2 if row == column == 0 else
                        abs(beta) ** 2 if row == column == 3 else 0j)
                       for column in range(4)) for row in range(4))

def matrix_purity(matrix):
    return sum(abs(value) ** 2 for row in matrix for value in row).real

scale = math.sqrt(0.5)
states = ((1, 0), (0, 1), (scale, scale), normalize((1, 2j)),
          (math.cos(0.37), cmath.exp(0.8j) * math.sin(0.37)))
copy_fidelities = [fidelity(cnot_copy(state), desired_two_copies(state)) for state in states]
assert all(abs(value - 1.0) < 1e-12 for value in copy_fidelities[:2])
assert all(value < 1.0 - 1e-6 for value in copy_fidelities[2:])

pair_cases = ((states[0], states[2]), (states[0], states[3]), (states[2], states[4]))
overlap_gaps = []
for left, right in pair_cases:
    input_overlap = abs(inner(normalize(left), normalize(right)))
    unitary_output_overlap = abs(inner(cnot_copy(left), cnot_copy(right)))
    desired_clone_overlap = abs(inner(desired_two_copies(left), desired_two_copies(right)))
    assert abs(unitary_output_overlap - input_overlap) < 1e-12
    assert abs(desired_clone_overlap - input_overlap ** 2) < 1e-12
    overlap_gaps.append(abs(input_overlap - desired_clone_overlap))
assert min(overlap_gaps) > 0.05

plus = states[2]
linear_superposition = tuple(scale * a + scale * b for a, b in zip(cnot_copy(states[0]), cnot_copy(states[1])))
nonlinear_target = desired_two_copies(plus)
linearity_gap = math.sqrt(sum(abs(a - b) ** 2 for a, b in zip(linear_superposition, nonlinear_target)))
assert linearity_gap > 0.7
coherent_purity = matrix_purity(outer(cnot_copy(plus)))
measure_reprepare_purity = matrix_purity(measurement_reprepare(plus))
assert abs(coherent_purity - 1.0) < 1e-12 and abs(measure_reprepare_purity - 0.5) < 1e-12

zero_rejected = False
try:
    cnot_copy((0, 0))
except ValueError:
    zero_rejected = True
assert zero_rejected
print(f"PASS: 21 no-cloning verifier copies 2 orthogonal basis states but gives nonbasis fidelities={copy_fidelities[2:]}; min overlap contradiction={min(overlap_gaps):.3f}, linearity gap={linearity_gap:.3f}, measure/reprepare purity={measure_reprepare_purity:.3f}")
```

Scope boundary

- This chapter does not say classical data, known basis states, or measurement records cannot be copied.

- It does not use measurement disturbance as the proof or forbid state transfer by teleportation.

Depth commitment. One universal contract, one contradiction, one exception analysis, and one protocol consequence map.

Practice problem

Assume a copier succeeds on |0> and |1>; derive its output on α|0>+β|1> and identify all α,β cases where it happens to equal two copies.

** Deliverable** : Symbolic coefficient comparison and the exceptional-state conditions.

** Pass condition** : A symbolic solver compares all four coefficients and a numerical sweep confirms the derived cases.

Verification record

Expected solution form. Two-line linearity proof expanded into coefficient equations plus parameter sweep.

Model answer. Linearity forces the copier output alpha|00>+beta|11>, while two copies contain alpha beta|01> and alpha beta|10> as well as squared endpoint coefficients. Equality occurs only for the copied basis cases alpha beta=0, not for an arbitrary superposition.

Model result and check. The notebook evaluates random normalized states and verifies failure except the derived basis cases.

Acceptance test. A symbolic solver compares all four coefficients and a numerical sweep confirms the derived cases.

External review. Open.

Expertise still needed. Quantum information theorist familiar with no-go theorems; Quantum communication reviewer able to assess protocol consequences and boundaries.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

protocol fixture

### [No-cloning symbolic counterexample](/playground/quantum/book/21-no-cloning-and-why-copying-breaks-quantum-logic/#artifact-21-no-cloning-and-why-copying-breaks-quantum-logic)

[Download fixture (.py)](/playground/quantum/artifacts/21-no-cloning-and-why-copying-breaks-quantum-logic/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/21-no-cloning-and-why-copying-breaks-quantum-logic/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [William K. Wootters and Wojciech H. Zurek. A single quantum cannot be cloned. Nature. 1982](https://doi.org/10.1038/299802a0) primary paper

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [Charles H. Bennett et al.. Teleporting an unknown quantum state via dual classical and Einstein-Podolsky-Rosen channels. Physical Review Letters. 1993](https://doi.org/10.1103/PhysRevLett.70.1895) primary paper

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=21-no-cloning-and-why-copying-breaks-quantum-logic#report)

Dependency graph

## Prerequisites for this chapter

- [Controlled Gates and Reversible Classical Computation Part III. Circuit Model · Chapter 18](/playground/quantum/book/18-controlled-gates-and-reversible-classical-computation/)

- [Bell States and GHZ States Part III. Circuit Model · Chapter 20](/playground/quantum/book/20-bell-states-and-ghz-states/)

Continue the thread

## Next concepts from this chapter

- [Teleportation Part IV. Protocols and Algorithms · Chapter 25](/playground/quantum/book/25-teleportation/)

- [Stabilizers and Syndrome Measurement Part VI. Reliability and Fault Tolerance · Chapter 47](/playground/quantum/book/47-stabilizers-and-syndrome-measurement/)

- [Repetition, Bit-Flip, Phase-Flip, and Shor Codes Part VI. Reliability and Fault Tolerance · Chapter 48](/playground/quantum/book/48-repetition-bit-flip-phase-flip-and-shor-codes/)

[Previous Bell States and GHZ States](/playground/quantum/book/20-bell-states-and-ghz-states/)[Next Circuit Cost: Depth, Width, Gate Set, Connectivity](/playground/quantum/book/22-circuit-cost-depth-width-gate-set-connectivity/)

In this chapter

- [Specify the copier's contract](#specify-the-copier-s-contract)

- [Basis success fixes the linear extension](#basis-success-fixes-the-linear-extension)

- [The missing cross terms](#the-missing-cross-terms)

- [What copying remains legal](#what-copying-remains-legal)

- [Protocol consequences of no-cloning](#protocol-consequences-of-no-cloning)

- [No-cloning symbolic counterexample](#no-cloning-symbolic-counterexample)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=21-no-cloning-and-why-copying-breaks-quantum-logic#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/21-no-cloning-and-why-copying-breaks-quantum-logic/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/22-circuit-cost-depth-width-gate-set-connectivity/ -->

# Circuit Cost: Depth, Width, Gate Set, Connectivity

A circuit diagram is a claim about a device, and the claim can die in compilation. This chapter replaces the diagram with a cost table — width, depth, gate set, connectivity, measurement — that survives contact with real hardware.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. Which resource quantities determine whether an abstract quantum circuit can run on a target machine?

Width, logical gate counts, dependency depth, native gate set, connectivity, measurement/reset, and error/time budgets jointly determine feasibility; routing and decomposition can make a shallow abstract circuit deeper and less reliable than a larger-looking alternative.

Scope and non-goals.

- This chapter does not compress all resource quality into one score or compare current vendor devices.

- It does not treat asymptotic gate count as a substitute for compiled and timed execution.

[Figure 22.1.](#fig-22-circuit-cost-depth-width-gate-set-connectivity-1) Notice that the winner flips: A looks cheaper before compilation and loses after it, because the routing cost belongs to the circuit, not to the drawing.

Prerequisites. 16-circuit-notation-as-programming-language, 19-multi-qubit-circuits

Notation used here. Width W, dependency depth D, gate counts G1/G2, topology graph E, duration τ, first-order success model assumptions stated.

## The seven-column circuit ledger

Define width, counts, depth, gate set, topology, measurement, and timing.

An abstract circuit states the intended computation. A runnable circuit has to fit a device or a simulator, and the distance between those two objects is where most overclaims live. Five quantities measure the distance:

- Width. How many qubits the circuit occupies.

- Depth. How many layers of gates must run sequentially.

- Gate set. Whether the operations are native to the hardware or must be decomposed.

- Connectivity. Whether qubits that need to interact are physically or logically adjacent.

- Measurement structure. When quantum state becomes classical evidence, and how often that readout is wrong.

Judging a circuit means pricing all five. Optimizing one in isolation usually just moves the cost to another.

Evidence boundary. Circuit width, depth, and gate counts are distinct computational resources. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## Dependency depth differs from line count

Schedule independent operations explicitly.

First, routing. When a circuit demands an interaction between qubits that are not adjacent, the compiler inserts swap chains or reroutes the logic, and the depth you drew is not the depth you get:

\(effective depth = abstract depth + routing depth\)[(22.1)](#eq-22-circuit-cost-depth-width-gate-set-connectivity-1)

Second, errors accumulate per gate. A rough teaching model:

\(P_{\mathrm{success}}\approx\prod_g(1-\epsilon_g)^{N_g}\)[(22.2)](#eq-22-circuit-cost-depth-width-gate-set-connectivity-2)

This is deliberately crude; real noise models are richer; but it makes the operative point: two circuits computing the same function can carry wildly different risk. Two-qubit gates, readout error, idle time, and crosstalk usually dominate the budget, so the cheaper circuit is the one with fewer expensive operations, not fewer boxes on the page.

Evidence boundary. Native gate sets and connectivity require compilation and routing that can increase depth and error exposure. [openqasm3](https://openqasm.com/) [Lieven M. K. Vandersypen et al.](https://doi.org/10.1038/s42254-021-00301-w)

## Routing prices a missing edge

Map a nonlocal CNOT onto a line and count swaps.

The classic failure is algorithm-name-as-evidence. "We ran Grover" or "the demo uses QFT" says nothing about qubits, depth, native gates, connectivity, shots, noise, or the classical baseline. The name is the one part of the claim that carries no cost information.

The subtler failure is treating transpilation as formatting; a reprint of the same circuit in a new notation. Transpilation changes depth, gate counts, scheduling, and measurement layout. It preserves meaning, but it can flip the practical verdict on a specific device, which is why resource claims should always quote the compiled circuit, not the source.

Evidence boundary. End-to-end hardware feasibility depends on timed operations and system-level constraints beyond abstract gate count. [Lieven M. K. Vandersypen et al.](https://doi.org/10.1038/s42254-021-00301-w) [National Academies of Sciences](https://doi.org/10.17226/25196)

\(Width W, dependency depth D, gate counts G1/G2, topology graph E, duration τ, first-order success model assumptions stated.\)[(22.3)](#eq-22-circuit-cost-depth-width-gate-set-connectivity-3)
Notation contract: Width W, dependency depth D, gate counts G1/G2, topology graph E, duration τ, first-order success model assumptions stated.

## Decomposition changes the error mix

Translate a logical gate into a native basis.

This is systems work. A high-level description lowers through an intermediate representation to target-specific instructions; each target produces a different compiled form; each optimization trades one cost against another. Anyone who has read a compiler's output assembly will find the situation familiar.

The deliverable that turns a drawing into an engineering artifact is a cost table:

- abstract qubits, and physical or logical qubits after mapping;

- abstract depth and transpiled depth;

- one-qubit and two-qubit gate counts;

- measurement count;

- connectivity assumption;

- error or fidelity assumption;

- classical baseline.

If a claim cannot fill in most of those rows, it is not yet a circuit claim; it is a schedule of intentions.

## Two circuits change rank after compilation

Compare abstract and mapped resource tables.

When a startup, research group, or internal team claims a circuit-level advantage, request the table before engaging with the narrative. Then stress it: does the advantage survive routing? Finite precision? The error budget? The classical baseline?

If the advantage evaporates under any of those, the honest recommendation is monitor or wait, whatever the demo looked like. If the table is transparent and survives sensitivity checks, the claim has earned deeper review; and the team has demonstrated they know what they are selling.

## Topology-aware circuit cost calculator

Acceptance contract for Topology-aware circuit cost calculator
 | Field | Reader-visible record

 | Format | Compiler fixture plus before/after resource ledger
 | Verification | Tests legal connectivity, dependency depth, swap insertion, native decomposition counts, and a first-order success estimate with declared assumptions.
 | Availability | Published companion and deterministic command

[Nearest-neighbor CNOT router](/playground/quantum/labs/#line-router) is the executable companion used by this page.

```
cd labs && python -m unittest tests.test_companion_models.CompanionModelTests.test_line_router_exposes_swap_cost_and_layout -v
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
def validate_circuit(qubits, circuit):
    if qubits < 2:
        raise ValueError("routing needs at least two physical qubits")
    for control, target in circuit:
        if control == target or not 0 <= control < qubits or not 0 <= target < qubits:
            raise ValueError("CNOT endpoints must be distinct valid logical wires")

def dependency_depth(circuit, qubits):
    ready = [0] * qubits
    depth = 0
    for left, right in circuit:
        layer = max(ready[left], ready[right]) + 1
        ready[left] = ready[right] = layer
        depth = max(depth, layer)
    return depth

def route_line(qubits, circuit):
    validate_circuit(qubits, circuit)
    placement = list(range(qubits))
    routed = []
    for logical_control, logical_target in circuit:
        control = placement.index(logical_control)
        target = placement.index(logical_target)
        while abs(control - target) > 1:
            step = 1 if target > control else -1
            neighbor = control + step
            routed.append(("SWAP", control, neighbor))
            placement[control], placement[neighbor] = placement[neighbor], placement[control]
            control = neighbor
        routed.append(("CX", control, target))
    return routed, tuple(placement)

def expand_native(routed):
    primitives = []
    for gate, left, right in routed:
        if gate == "SWAP":
            primitives.extend(((left, right), (right, left), (left, right)))
        else:
            primitives.append((left, right))
    return primitives

def report(qubits, circuit, two_qubit_error):
    if not 0 <= two_qubit_error < 1:
        raise ValueError("error probability must lie in [0,1)")
    routed, final_layout = route_line(qubits, circuit)
    assert all(abs(left - right) == 1 for _, left, right in routed)
    primitives = expand_native(routed)
    swaps = sum(gate == "SWAP" for gate, _, _ in routed)
    exact_success = (1 - two_qubit_error) ** len(primitives)
    first_order_success = 1 - len(primitives) * two_qubit_error
    return {
        "logical_depth": dependency_depth(circuit, qubits),
        "routed_depth": dependency_depth(primitives, qubits),
        "swaps": swaps,
        "native_two_qubit_gates": len(primitives),
        "final_layout": final_layout,
        "exact_success": exact_success,
        "first_order_success": first_order_success,
    }

scenarios = (
    (5, ((0, 4),), 0.002),
    (5, ((0, 3), (1, 4), (0, 2)), 0.005),
    (4, ((0, 1), (2, 3)), 0.01),
)
reports = [report(*scenario) for scenario in scenarios]
assert reports[0]["swaps"] == 3 and reports[0]["native_two_qubit_gates"] == 10
assert reports[2]["logical_depth"] == 1 and reports[2]["swaps"] == 0
for result in reports:
    assert result["native_two_qubit_gates"] == 3 * result["swaps"] + len(scenarios[reports.index(result)][1])
    assert 0 < result["exact_success"] <= 1
    assert abs(result["exact_success"] - result["first_order_success"]) < 0.02

naive_nonlocal = ((0, 4),)
assert any(abs(left - right) != 1 for left, right in naive_nonlocal)
assert reports[0]["native_two_qubit_gates"] > len(naive_nonlocal)
invalid_rejected = False
try:
    report(5, ((2, 2),), 0.001)
except ValueError:
    invalid_rejected = True
assert invalid_rejected
bad_rate_rejected = False
try:
    report(5, ((0, 1),), 1.0)
except ValueError:
    bad_rate_rejected = True
assert bad_rate_rejected
total_swaps = sum(result["swaps"] for result in reports)
print(f"PASS: 22 topology calculator routes {len(scenarios)} circuits with total SWAPs={total_swaps}, native two-qubit counts={[result['native_two_qubit_gates'] for result in reports]}, depths={[(result['logical_depth'], result['routed_depth']) for result in reports]}, success={[round(result['exact_success'], 4) for result in reports]}")
```

Scope boundary

- This chapter does not compress all resource quality into one score or compare current vendor devices.

- It does not treat asymptotic gate count as a substitute for compiled and timed execution.

Depth commitment. One seven-field ledger, two compiled circuits, and one sensitivity analysis.

Practice problem

Compile two logically equivalent four-qubit circuits to a line topology and decide which is preferable under supplied one- and two-qubit error rates.

```
Line topology: 0--1--2--3. Native 1q error=0.001; native 2q error=0.01.
Circuit A logical layers: CX(0,3); CX(1,2).
Circuit B logical layers: CX(0,1); CX(2,3); CX(1,2).
Restore initial layout and report logical gates, inserted SWAPs, native 2q count, and depth separately.
```

** Deliverable** : Mapped circuits, seven-column ledgers, success estimates, and a conditional choice.

** Pass condition** : The reference mapper and cost script reproduce counts/depth and recalculate the choice under a sensitivity sweep.

Verification record

Expected solution form. Before/after tables plus generated routing diff and sensitivity plot.

Model answer. On the declared line, Circuit B uses only legal adjacent edges. Circuit A's CX(0,3) requires routing and restoration, adding four SWAPs or twelve native CNOTs in the simple move-and-return schedule. Under the supplied error rates, Circuit B has the smaller two-qubit exposure and is preferred unless a different final layout is allowed.

Model result and check. CI rejects illegal edges and compares submitted ledger fields with compiler output.

Acceptance test. The reference mapper and cost script reproduce counts/depth and recalculate the choice under a sensitivity sweep.

External review. Open.

Expertise still needed. Quantum compiler researcher specializing in mapping and scheduling; Quantum hardware performance engineer able to review error/time approximations.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

source code

### [Topology-aware circuit cost calculator](/playground/quantum/labs/#line-router)

[Download fixture (.py)](/playground/quantum/artifacts/22-circuit-cost-depth-width-gate-set-connectivity/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/22-circuit-cost-depth-width-gate-set-connectivity/artifact.json)

Reproduce or test
`cd labs && python -m unittest tests.test_companion_models.CompanionModelTests.test_line_router_exposes_swap_cost_and_layout -v`

Provenance

## Sources and review

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=22-circuit-cost-depth-width-gate-set-connectivity#report)

Dependency graph

## Prerequisites for this chapter

- [Circuit Notation as a Programming Language Part III. Circuit Model · Chapter 16](/playground/quantum/book/16-circuit-notation-as-programming-language/)

- [Multi-Qubit Circuits Part III. Circuit Model · Chapter 19](/playground/quantum/book/19-multi-qubit-circuits/)

Continue the thread

## Next concepts from this chapter

- [Hardware Architecture and the Full Stack Orientation guide](/playground/quantum/book/orientation-06-hardware-architecture-and-the-full-stack/)

- [Oracles and Query Complexity Part IV. Protocols and Algorithms · Chapter 27](/playground/quantum/book/27-oracles-and-query-complexity/)

- [Transpilation and Hardware-Aware Compilation Part V. Practical Software · Chapter 40](/playground/quantum/book/40-transpilation-and-hardware-aware-compilation/)

[Previous No-Cloning and Why Copying Breaks Quantum Logic](/playground/quantum/book/21-no-cloning-and-why-copying-breaks-quantum-logic/)[Next Bell Tests and Nonclassical Correlations](/playground/quantum/book/23-bell-tests-and-nonclassical-correlations/)

In this chapter

- [The seven-column circuit ledger](#the-seven-column-circuit-ledger)

- [Dependency depth differs from line count](#dependency-depth-differs-from-line-count)

- [Routing prices a missing edge](#routing-prices-a-missing-edge)

- [Decomposition changes the error mix](#decomposition-changes-the-error-mix)

- [Two circuits change rank after compilation](#two-circuits-change-rank-after-compilation)

- [Topology-aware circuit cost calculator](#topology-aware-circuit-cost-calculator)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=22-circuit-cost-depth-width-gate-set-connectivity#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/22-circuit-cost-depth-width-gate-set-connectivity/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/23-bell-tests-and-nonclassical-correlations/ -->

# Bell Tests and Nonclassical Correlations

Matching random bits are cheap — any shared list can produce them. A Bell test is the experiment that excludes every local classical explanation of quantum correlations, and this chapter shows what that exclusion does and does not entitle you to build.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. What does a Bell test rule out that ordinary correlated data does not?

A Bell test combines correlations from multiple independently chosen measurement settings into an inequality that every local hidden-variable model must satisfy; quantum predictions and experiments can violate that bound, while local marginals still obey no-signaling.

Scope and non-goals.

- This chapter does not infer nonclassicality from matching bits in one basis or claim Bell violation sends information.

- It does not provide a full loophole-free experimental design or device-independent security proof.

[Figure 23.1.](#fig-23-bell-tests-and-nonclassical-correlations-1) Notice where the correlation shows up; not in either station's own record, but in the comparison, which travels over an ordinary classical channel.

Prerequisites. 07-entanglement-without-faster-than-light-myths, 14-observables-eigenvectors-and-measurement

Notation used here. Settings x,y∈{0,1}; outcomes a,b∈{−1,+1}; E_xy=<ab|x,y>; S sign convention declared before calculation.

## One setting admits a shared-list explanation

Construct the classical correlated baseline.

Two devices that always output matching random bits are not impressive; a shared list of coin flips, printed in advance, does exactly that. A Bell test earns its reputation by asking a harder question: can the correlations observed across several different measurement settings be explained by any model in which each side carries prewritten local answers? Under the test's assumptions, the quantum prediction exceeds what every such local model can deliver.

For builders, the operational lesson is narrower than the philosophy. Bell-type correlations are evidence of genuinely nonclassical joint structure; and they are still not a communication channel. Each side's own outcomes look random until the two compare records over a classical link.

Evidence boundary. Bell inequalities constrain correlations achievable by local hidden-variable theories. [John S. Bell](https://doi.org/10.1103/PhysicsPhysiqueFizika.1.195) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Four setting pairs create the constraint

Define CHSH inputs, outputs, and correlation signs.

The workhorse state is the familiar Bell pair:

\(\lvert\Phi^+\rangle=(\lvert00\rangle+\lvert11\rangle)/\sqrt2\)[(23.1)](#eq-23-bell-tests-and-nonclassical-correlations-1)

Probabilities come from the Born rule once a measurement basis is chosen:

\(\Pr(i)=\lvert\langle i\vert\psi\rangle\rvert^2\)[(23.2)](#eq-23-bell-tests-and-nonclassical-correlations-2)

In the computational basis that gives the now-familiar table:

\(\Pr(00)=\Pr(11)=1/2,\quad \Pr(01)=\Pr(10)=0\)[(23.3)](#eq-23-bell-tests-and-nonclassical-correlations-3)

Perfect correlation in one basis; but a shared list of 0s and 1s would produce the same table. Bell-test reasoning begins only when the parties vary their measurement settings and check whether any single local classical explanation can fit all the correlations at once. The quantum answer survives the comparison; the local classical answer does not.

Evidence boundary. Quantum measurements on entangled states can attain CHSH values above the local bound. [John S. Bell](https://doi.org/10.1103/PhysicsPhysiqueFizika.1.195) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## The local bound from predetermined answers

Derive |S|≤2 for deterministic assignments and mixtures.

The first distortion converts correlation into signaling: Alice chooses her outcome and Bob's changes to match. No. Outcomes are not messages, and no action of Alice's shifts Bob's local statistics. Whatever the interpretation debates, the engineering content is settled; you cannot transmit a controllable bit this way.

The second distortion files Bell tests under "quantum is just strange." That sentence builds nothing. The usable version names the state preparation, the measurement settings, the sample statistics, the loopholes and device assumptions, and exactly which inference the experiment supports. An engineer who can list those five items understands the experiment; one who reaches for "spooky" does not.

Evidence boundary. Bell-inequality violation and no-signaling are compatible; local marginals remain independent of remote settings. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

\(x,y\in\{0,1\},\quad a,b\in\{-1,+1\},\quad E_{xy}=\mathbb E[ab\mid x,y]\)[(23.4)](#eq-23-bell-tests-and-nonclassical-correlations-4)
Notation contract: Settings x,y∈{0,1}; outcomes a,b∈{−1,+1}; E_xy=<ab|x,y>; S sign convention declared before calculation.

## Quantum angles exceed the bound

Calculate the ideal Bell-state prediction.

Bell tests warn against modeling entangled systems as ordinary correlated random variables. The joint distribution depends on measurement choices in a way that; under the Bell assumptions; cannot be reduced to reading prewritten local bits.

The practical rule for evaluating data: keep four objects separate; the ideal state, the chosen measurement bases, the sampled distribution, and the claim being drawn. A simulator reproducing ideal Bell-state counts demonstrates the arithmetic; it is not a Bell experiment, which lives or dies on settings, statistics, and assumptions.

## Marginals audit the signaling claim

Check local distributions alongside S.

Nonclassical correlation is settled physics; generations of experiments have closed the loopholes identified along the way, and the 2022 Nobel Prize in Physics went to exactly this line of work. What it is not is a blank check. If a pitch claims entanglement enables instant messaging, reject it outright.

When a research claim reports Bell-type evidence, ask what was measured, which assumptions were needed, what statistical confidence was reported, and whether the result supports the product being sold. The honest answer is often real physics, wrong conclusion; correlation demonstrated, networking or sensing advantage not.

## CHSH data-analysis notebook

Acceptance contract for CHSH data-analysis notebook
 | Field | Reader-visible record

 | Format | Synthetic local/quantum datasets and reproducible S estimator
 | Verification | Tests local strategies never exceed the bound absent finite-sample fluctuation, reproduces \(2\sqrt{2}\) ideally, and reports uncertainty plus marginal checks.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "CHSH data-analysis notebook",
  "format": "Synthetic local/quantum datasets and reproducible S estimator",
  "acceptance_test": "Tests local strategies never exceed the bound absent finite-sample fluctuation, reproduces 2√2 ideally, and reports uncertainty plus marginal checks.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import math
import random

def chsh(correlations):
    if len(correlations) != 4:
        raise ValueError("CHSH needs four setting-pair correlations")
    return abs(correlations[0] + correlations[1] + correlations[2] - correlations[3])

def singlet_correlation(alice_angle, bob_angle):
    return -math.cos(alice_angle - bob_angle)

def sample_pair(correlation, shots, seed):
    if shots < 1 or not -1 <= correlation <= 1:
        raise ValueError("invalid sampling request")
    rng = random.Random(seed)
    products = []
    alice_total = bob_total = 0
    for _ in range(shots):
        alice = 1 if rng.randrange(2) else -1
        same = rng.random() < (1 + correlation) / 2
        bob = alice if same else -alice
        products.append(alice * bob)
        alice_total += alice
        bob_total += bob
    estimate = sum(products) / shots
    variance = max(0.0, 1.0 - estimate ** 2)
    return estimate, math.sqrt(variance / shots), alice_total / shots, bob_total / shots

local_values = []
for encoded in range(16):
    outputs = tuple(1 if encoded & (1 << bit) else -1 for bit in range(4))
    alice, alice_prime, bob, bob_prime = outputs
    value = abs(alice * bob + alice * bob_prime + alice_prime * bob - alice_prime * bob_prime)
    local_values.append(value)
assert max(local_values) == 2 and min(local_values) == 2

alice_angles = (0.0, math.pi / 2)
bob_angles = (math.pi / 4, -math.pi / 4)
setting_pairs = ((alice_angles[0], bob_angles[0]),
                 (alice_angles[0], bob_angles[1]),
                 (alice_angles[1], bob_angles[0]),
                 (alice_angles[1], bob_angles[1]))
ideal_correlations = tuple(singlet_correlation(*settings) for settings in setting_pairs)
ideal_s = chsh(ideal_correlations)
assert abs(ideal_s - 2 * math.sqrt(2)) < 1e-12

shots = 25000
sampled = [sample_pair(correlation, shots, 2300 + index)
           for index, correlation in enumerate(ideal_correlations)]
sampled_correlations = tuple(row[0] for row in sampled)
sampled_s = chsh(sampled_correlations)
sampled_sigma = math.sqrt(sum(row[1] ** 2 for row in sampled))
max_marginal = max(abs(value) for row in sampled for value in row[2:])
assert abs(sampled_s - ideal_s) < 6 * sampled_sigma
assert sampled_s - 2 > 8 * sampled_sigma
assert max_marginal < 0.03

local_sampled = [sample_pair(1.0, 4000, 2390 + index) for index in range(4)]
local_sampled_s = chsh(tuple(row[0] for row in local_sampled))
assert local_sampled_s == 2.0

wrong_sign_s = abs(sum(ideal_correlations))
assert wrong_sign_s <= 2 and abs(wrong_sign_s - ideal_s) > 1.0
biased_marginal = 1.0
assert biased_marginal > 5 / math.sqrt(shots)
zero_shots_rejected = False
try:
    sample_pair(0.0, 0, 1)
except ValueError:
    zero_shots_rejected = True
assert zero_shots_rejected
print(f"PASS: 23 CHSH notebook bounds all {len(local_values)} deterministic local strategies at 2, gives ideal S={ideal_s:.6f}, sampled S={sampled_s:.4f}±{sampled_sigma:.4f}, max marginal={max_marginal:.4f}")
```

Scope boundary

- This chapter does not infer nonclassicality from matching bits in one basis or claim Bell violation sends information.

- It does not provide a full loophole-free experimental design or device-independent security proof.

Depth commitment. One local strategy proof, one ideal calculation, one count dataset, and one no-signaling audit.

Practice problem

Compute CHSH S from a supplied count table, attach an uncertainty interval, and check both parties' setting-conditioned marginals.

```
setting,pp,pm,mp,mm
ab,73,427,427,73
abp,73,427,427,73
apb,73,427,427,73
apbp,427,73,73,427
```

** Deliverable** : Correlation calculations, S estimate, interval, marginal table, and qualified verdict.

** Pass condition** : The notebook recomputes S and uncertainty and flags any unsupported loophole-free or signaling claim.

Verification record

Expected solution form. Count-to-correlation derivation plus executable estimator report.

Model answer. Using E=(Npp+Nmm-Npm-Nmp)/N, the first three rows give -0.708 and the last +0.708. With the stated CHSH signs, |S|=2.832, above the local bound 2 and close to 2sqrt(2); both parties' setting-conditioned marginals remain one half in every row.

Model result and check. CI reads the supplied CSV and matches every correlation, marginal, and interval.

Acceptance test. The notebook recomputes S and uncertainty and flags any unsupported loophole-free or signaling claim.

External review. Open.

Expertise still needed. Quantum foundations researcher specializing in Bell tests; Experimental statistics reviewer familiar with finite-sample Bell analysis and loophole language.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

protocol fixture

### [CHSH data-analysis notebook](/playground/quantum/book/23-bell-tests-and-nonclassical-correlations/#artifact-23-bell-tests-and-nonclassical-correlations)

[Download fixture (.py)](/playground/quantum/artifacts/23-bell-tests-and-nonclassical-correlations/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/23-bell-tests-and-nonclassical-correlations/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [John S. Bell. On the Einstein Podolsky Rosen paradox. Physics Physique Fizika. 1964](https://doi.org/10.1103/PhysicsPhysiqueFizika.1.195) primary paper

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=23-bell-tests-and-nonclassical-correlations#report)

Dependency graph

## Prerequisites for this chapter

- [Entanglement Without Faster-Than-Light Myths Part I. Mental Model · Chapter 7](/playground/quantum/book/07-entanglement-without-faster-than-light-myths/)

- [Observables, Eigenvectors, and Measurement Part II. Mathematical Core · Chapter 14](/playground/quantum/book/14-observables-eigenvectors-and-measurement/)

Continue the thread

## Next concepts from this chapter

- [Quantum Key Distribution Part IV. Protocols and Algorithms · Chapter 26](/playground/quantum/book/26-quantum-key-distribution/)

- [Superdense Coding Part IV. Protocols and Algorithms · Chapter 24](/playground/quantum/book/24-superdense-coding/)

- [Teleportation Part IV. Protocols and Algorithms · Chapter 25](/playground/quantum/book/25-teleportation/)

[Previous Circuit Cost: Depth, Width, Gate Set, Connectivity](/playground/quantum/book/22-circuit-cost-depth-width-gate-set-connectivity/)[Next Superdense Coding](/playground/quantum/book/24-superdense-coding/)

In this chapter

- [One setting admits a shared-list explanation](#one-setting-admits-a-shared-list-explanation)

- [Four setting pairs create the constraint](#four-setting-pairs-create-the-constraint)

- [The local bound from predetermined answers](#the-local-bound-from-predetermined-answers)

- [Quantum angles exceed the bound](#quantum-angles-exceed-the-bound)

- [Marginals audit the signaling claim](#marginals-audit-the-signaling-claim)

- [CHSH data-analysis notebook](#chsh-data-analysis-notebook)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=23-bell-tests-and-nonclassical-correlations#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/23-bell-tests-and-nonclassical-correlations/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/24-superdense-coding/ -->

# Superdense Coding

One transmitted qubit, two classical bits delivered — but the Bell pair was spent in advance. This chapter traces superdense coding gate by gate and keeps the resource ledger visible the whole way through.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How can one transmitted qubit convey one of four classical messages when sender and receiver share entanglement beforehand?

The shared Bell pair supplies a two-qubit code space: the sender applies one of four local Pauli encodings, transmits her qubit, and the receiver performs a Bell-basis decode; the resource account is one transmitted qubit, one pre-shared ebit, and a classical two-bit output.

Scope and non-goals.

- This chapter does not claim one isolated qubit stores two readable classical bits.

- It does not ignore entanglement distribution, Bell measurement, channel noise, or resource accounting.

[Figure 24.1.](#fig-24-superdense-coding-1) Notice what crosses the channel: exactly one qubit. The second bit of capacity was spent earlier, when the Bell pair was distributed.

Prerequisites. 20-bell-states-and-ghz-states, 16-circuit-notation-as-programming-language

Notation used here. Message bits m1m0; initial Φ+; sender operation table fixed and declared; wire ownership and transmission boundary labeled.

## Write the communication contract first

List message, pre-shared state, transmitted system, and receiver output.

Superdense coding delivers two classical bits by transmitting one qubit; after sender and receiver have already shared an entangled pair. The setup: a Bell pair is prepared and split between Alice and Bob. The message: Alice applies one of four gates to her half and physically sends that qubit to Bob. The decoding: Bob runs the Bell preparation circuit in reverse and measures, recovering two bits.

The ledger is the whole story:

- shared before the message: one Bell pair;

- transmitted during the message: one qubit;

- recovered at the end: two classical bits.

Remove the pre-shared pair and the headline is simply false; a lone qubit's measurement does not hand over two freely chosen classical bits.

Evidence boundary. Superdense coding transmits two classical bits using one qubit sent after an entangled pair is shared. [Charles H. Bennett](https://doi.org/10.1103/PhysRevLett.69.2881) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Four local operations label four Bell states

Derive the encoding table.

Alice and Bob each hold one qubit of:

\(\lvert\Phi^+\rangle=(\lvert00\rangle+\lvert11\rangle)/\sqrt2\)[(24.1)](#eq-24-superdense-coding-1)

Alice encodes her two bits by applying one of four operations to her half alone:

- `00` → I (do nothing)

- `01` → X

- `10` → Z

- `11` → XZ

Each choice maps \(\lvert\Phi^+\rangle\) to a different Bell state, and the four Bell states are orthogonal; perfectly distinguishable in principle. Alice's qubit then travels to Bob, who now holds both qubits and decodes: CNOT with her qubit as control, then H on that same qubit, then measure. The CNOT basis action does the heavy lifting:

\(\operatorname{CNOT}\lvert c,t\rangle=\lvert c,t\oplus c\rangle\)[(24.2)](#eq-24-superdense-coding-2)

The decode step is exactly the Bell preparation circuit run backwards, converting Bell-basis information into computational-basis bits.

Evidence boundary. The four Pauli encodings map a Bell pair to four orthogonal Bell states. [Charles H. Bennett](https://doi.org/10.1103/PhysRevLett.69.2881) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## The inverse preparation circuit decodes

Trace CNOT and H to computational outcomes.

"One qubit carries two bits" is the sentence that launches a thousand bad slides. Without pre-shared entanglement it is wrong: one transmitted qubit yields at most one classical bit of accessible information, a limit known as Holevo's bound. Superdense coding does not break that bound; it pre-pays it, shifting half the communication cost into the earlier distribution of the Bell pair.

The second omission is the physical transmission. Alice's qubit must survive the trip to Bob; the protocol is not remote action, and the channel's loss and noise belong in any honest accounting.

Evidence boundary. Decoding requires a joint Bell-basis measurement and the entanglement resource must be counted. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/)

\((m_1,m_0)\in\{0,1\}^2,\qquad \lvert\Phi^+\rangle=(\lvert00\rangle+\lvert11\rangle)/\sqrt2\)[(24.3)](#eq-24-superdense-coding-3)
Notation contract: ordered message bits m1m0; initial Bell state Phi plus; sender operation table fixed and declared; wire ownership and transmission boundary labeled.

## A complete trace for message 10

Show state after every operation and transfer boundary.

Read superdense coding the way you would read any network protocol; phases, plus a resource ledger:

- Prepare a Bell pair.

- Distribute one half to Alice and one half to Bob; possibly long before the message exists.

- Alice applies one of four local gates.

- Alice's qubit travels the quantum channel.

- Bob applies the inverse Bell-preparation circuit.

- Bob measures and recovers two bits.

This style of accounting generalizes to every protocol in the book: name the setup cost before celebrating the per-message cost. A communication advantage that depends on resources prepared elsewhere is real, but it is a systems claim, not a magic trick.

## Count the ebit and the Bell measurement

Compare resources with a classical channel honestly.

If a pitch invokes superdense coding, walk the chain: where does the entanglement come from, how is it distributed and stored, how long does it survive, what do channel loss and gate errors do to decoding, and does the end-to-end system beat the classical alternative after all of that?

The protocol itself is valid, demonstrated physics. The product claim stands or falls on the resource chain around it; and on whether doubling classical capacity on an expensive quantum channel is worth anything against cheap classical bandwidth.

## Superdense coding protocol harness

Acceptance contract for Superdense coding protocol harness
 | Field | Reader-visible record

 | Format | Two-qubit circuit suite and four-message truth table
 | Verification | Tests every message maps to a unique decoded bit pair, rejects runs without the shared Bell pair, and reports transmitted-qubit plus ebit resources.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Superdense coding protocol harness",
  "format": "Two-qubit circuit suite and four-message truth table",
  "acceptance_test": "Tests every message maps to a unique decoded bit pair, rejects runs without the shared Bell pair, and reports transmitted-qubit plus ebit resources.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import math

def h(state, qubit):
    mask = 1 << (1 - qubit)
    output = state[:]
    scale = math.sqrt(0.5)
    for basis in range(4):
        if basis & mask == 0:
            paired = basis | mask
            output[basis] = (state[basis] + state[paired]) * scale
            output[paired] = (state[basis] - state[paired]) * scale
    return output

def pauli(state, qubit, name):
    mask = 1 << (1 - qubit)
    output = [0j] * 4
    for basis, amplitude in enumerate(state):
        if name == "X":
            output[basis ^ mask] += amplitude
        elif name == "Z":
            output[basis] += -amplitude if basis & mask else amplitude
        else:
            raise ValueError("only Pauli X and Z are supported")
    return output

def cnot(state, control, target):
    control_mask = 1 << (1 - control)
    target_mask = 1 << (1 - target)
    output = [0j] * 4
    for basis, amplitude in enumerate(state):
        output[basis ^ target_mask if basis & control_mask else basis] += amplitude
    return output

def prepare(shared_entanglement):
    state = [1.0, 0j, 0j, 0j]
    if shared_entanglement:
        state = cnot(h(state, 0), 0, 1)
    return state

def encode(state, message):
    first, second = message
    if second:
        state = pauli(state, 0, "X")
    if first:
        state = pauli(state, 0, "Z")
    return state

def decode(state, reversed_order=False):
    state = h(state, 0) if reversed_order else cnot(state, 0, 1)
    state = cnot(state, 0, 1) if reversed_order else h(state, 0)
    return state

def distribution(state):
    return {format(index, "02b"): round(abs(amplitude) ** 2, 12)
            for index, amplitude in enumerate(state) if abs(amplitude) > 1e-12}

def inner(left, right):
    return sum(a.conjugate() * b for a, b in zip(left, right))

messages = [(0, 0), (0, 1), (1, 0), (1, 1)]
bell = prepare(True)
assert all(abs(a - b) < 1e-12 for a, b in zip(bell, [math.sqrt(0.5), 0, 0, math.sqrt(0.5)]))
codewords = {message: encode(bell, message) for message in messages}
for left in messages:
    for right in messages:
        overlap = abs(inner(codewords[left], codewords[right]))
        assert abs(overlap - (1.0 if left == right else 0.0)) < 1e-12

traces = {}
for message in messages:
    encoded = codewords[message]
    decoded = decode(encoded)
    observed = distribution(decoded)
    expected = {"".join(str(bit) for bit in message): 1.0}
    assert observed == expected
    traces[message] = (bell, encoded, decoded, observed)
assert len({next(iter(trace[3])) for trace in traces.values()}) == 4

without_ebit = {message: distribution(decode(encode(prepare(False), message))) for message in messages}
assert without_ebit[(0, 0)] == without_ebit[(1, 0)]
assert without_ebit[(0, 1)] == without_ebit[(1, 1)]
assert len({tuple(sorted(value.items())) for value in without_ebit.values()}) == 2

wrong_decode = {message: distribution(decode(codewords[message], True)) for message in messages}
assert any(wrong_decode[message] != {"".join(str(bit) for bit in message): 1.0} for message in messages)
resources = {"transmitted_qubits": 1, "shared_ebits_consumed": 1, "decoded_classical_bits": 2}
assert resources == {"transmitted_qubits": 1, "shared_ebits_consumed": 1, "decoded_classical_bits": 2}
print(f"PASS: 24 superdense circuit codewords={len(codewords)} decoded={len(traces)} no_ebit_outputs={len({tuple(sorted(value.items())) for value in without_ebit.values()})}")
```

Scope boundary

- This chapter does not claim one isolated qubit stores two readable classical bits.

- It does not ignore entanglement distribution, Bell measurement, channel noise, or resource accounting.

Depth commitment. One contract, one encoding table, one full trace, and one negative control.

Practice problem

Trace all four messages through encoding and decoding, then repeat one message after replacing the Bell pair with |00>.

** Deliverable** : Five state traces, decoded outputs, and a resource/failure comparison.

** Pass condition** : The circuit tests verify the four-message bijection and demonstrate loss of two-bit capacity in the no-entanglement control.

Verification record

Expected solution form. Four-row symbolic protocol table plus negative-control simulation.

Model answer. With a shared |Phi+>, I, X, Z, and ZX on the sender's half decode bijectively to 00, 01, 10, and 11 under the stated bit convention. Replacing the pair by |00> removes the four orthogonal Bell codewords, so one transmitted qubit no longer carries two recoverable classical bits.

Model result and check. CI simulates every row and checks the declared communication resources.

Acceptance test. The circuit tests verify the four-message bijection and demonstrate loss of two-bit capacity in the no-entanglement control.

External review. Open.

Expertise still needed. Quantum communication theorist; Network-protocol reviewer able to audit pre-shared-resource and transmission accounting.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

protocol fixture

### [Superdense coding protocol harness](/playground/quantum/book/24-superdense-coding/#artifact-24-superdense-coding)

[Download fixture (.py)](/playground/quantum/artifacts/24-superdense-coding/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/24-superdense-coding/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Charles H. Bennett and Stephen J. Wiesner. Communication via one- and two-particle operators on Einstein-Podolsky-Rosen states. Physical Review Letters. 1992](https://doi.org/10.1103/PhysRevLett.69.2881) primary paper

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=24-superdense-coding#report)

Dependency graph

## Prerequisites for this chapter

- [Bell States and GHZ States Part III. Circuit Model · Chapter 20](/playground/quantum/book/20-bell-states-and-ghz-states/)

- [Circuit Notation as a Programming Language Part III. Circuit Model · Chapter 16](/playground/quantum/book/16-circuit-notation-as-programming-language/)

Continue the thread

## Next concepts from this chapter

- [Teleportation Part IV. Protocols and Algorithms · Chapter 25](/playground/quantum/book/25-teleportation/)

- [Photonics Part VII. Hardware Architecture · Chapter 58](/playground/quantum/book/58-photonics/)

- [Bell Tests and Nonclassical Correlations Part IV. Protocols and Algorithms · Chapter 23](/playground/quantum/book/23-bell-tests-and-nonclassical-correlations/)

[Previous Bell Tests and Nonclassical Correlations](/playground/quantum/book/23-bell-tests-and-nonclassical-correlations/)[Next Teleportation](/playground/quantum/book/25-teleportation/)

In this chapter

- [Write the communication contract first](#write-the-communication-contract-first)

- [Four local operations label four Bell states](#four-local-operations-label-four-bell-states)

- [The inverse preparation circuit decodes](#the-inverse-preparation-circuit-decodes)

- [A complete trace for message 10](#a-complete-trace-for-message-10)

- [Count the ebit and the Bell measurement](#count-the-ebit-and-the-bell-measurement)

- [Superdense coding protocol harness](#superdense-coding-protocol-harness)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=24-superdense-coding#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/24-superdense-coding/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/25-teleportation/ -->

# Teleportation

Teleportation moves a qubit's state without moving the qubit — and without copying it. The price is a Bell pair, two classical bits, and the destruction of the original; this chapter traces where every one of those goes.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How does quantum teleportation transfer an unknown qubit state using shared entanglement and two classical bits?

The sender entangles the input with her half of a Bell pair, measures two qubits, and sends the two-bit result; the receiver applies a corresponding Pauli correction, recovering the input state while the original is destroyed.

Scope and non-goals.

- This chapter does not transport matter, send information faster than light, or clone the input.

- It does not treat entanglement distribution and classical communication as free infrastructure.

[Figure 25.1.](#fig-25-teleportation-1) Notice the direction of dependency: the classical bits flow down to Bob's correction gate, and until they arrive his wire carries nothing usable.

Prerequisites. 21-no-cloning-and-why-copying-breaks-quantum-logic, 24-superdense-coding

Notation used here. Input |ψ>=α|0>+β|1>; party/wire labels fixed; measurement bits ordered; fidelity |<ψ|φ>|²; global phase ignored.

## Ownership and resources before gates

Label input, Bell pair, parties, and classical channel.

Teleportation moves the state of a qubit from Alice's hardware to Bob's without moving the qubit itself. Nothing material travels; nothing is copied; nothing arrives before the classical message does. The protocol consumes one shared Bell pair and two classical bits, and it destroys the original in the process.

The ledger, up front:

- input: one unknown qubit state at Alice's side;

- shared resource: one Bell pair, split between Alice and Bob;

- classical communication: two bits from Alice to Bob;

- output: Bob's qubit in the original state, after his correction;

- side effect: Alice's original is gone; her measurement consumed it.

Evidence boundary. Quantum teleportation transfers an unknown state using shared entanglement and two classical bits. [Charles H. Bennett et al.](https://doi.org/10.1103/PhysRevLett.70.1895) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Expand the state by measurement branch

Rewrite the three-qubit state in the Bell-measurement basis.

Write the unknown input as:

\(\lvert\psi\rangle=\alpha\lvert0\rangle+\beta\lvert1\rangle\)[(25.1)](#eq-25-teleportation-1)

Alice and Bob share a Bell pair:

\((\lvert00\rangle+\lvert11\rangle)/\sqrt2\)[(25.2)](#eq-25-teleportation-2)

Alice entangles the input with her half of the pair; CNOT from the input to her half, then H on the input; and measures both of her qubits. The measurement update rule describes what remains:

\(\lvert\psi_i\rangle=\frac{P_i\lvert\psi\rangle}{\sqrt{\langle\psi\rvert P_i\lvert\psi\rangle}}\)[(25.3)](#eq-25-teleportation-3)

Her two measurement bits identify which of four conditional states Bob's qubit now holds; each is \(\lvert\psi\rangle\) up to one known correction from \({ I , X , Z , X Z }\). Alice sends the bits; Bob applies the matching correction; his qubit is exactly \(\lvert\psi\rangle\). Until the bits arrive, Bob's qubit is; to him; a maximally mixed object carrying nothing.

Evidence boundary. The protocol destroys the sender's original state and is consistent with no-cloning. [Charles H. Bennett et al.](https://doi.org/10.1103/PhysRevLett.70.1895) [William K. Wootters](https://doi.org/10.1038/299802a0)

## Two classical bits select four corrections

Derive the correction table.

First: teleportation is instant. It is not. Bob's reconstruction is gated on two classical bits traveling no faster than light, and before they arrive his qubit tells him nothing. The protocol transfers quantum state at the speed of a phone call plus a Bell pair.

Second: teleportation copies the input. It cannot; Chapter 21's theorem forbids it, and the protocol respects the theorem by construction: Alice's measurement destroys the original as the price of the transfer. A fax machine that burns the original is closer to the truth than a photocopier at a distance.

Evidence boundary. Classical communication is required before the receiver can select the correction, preventing faster-than-light signaling. [John Preskill](https://www.preskill.caltech.edu/ph219/) [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/)

\(\lvert\psi\rangle=\alpha\lvert0\rangle+\beta\lvert1\rangle,\qquad F=\lvert\langle\psi\vert\phi\rangle\rvert^2\)[(25.4)](#eq-25-teleportation-4)
Notation contract: Input |ψ>=α|0>+β|1>; party/wire labels fixed; measurement bits ordered; fidelity |<ψ|φ>|²; global phase ignored.

## One branch traced from α,β to recovery

Follow measurement, message, and correction.

For a builder, teleportation is a distributed protocol with quantum and classical dependencies; not a gate. It earns its place as a primitive for quantum networking, modular architectures that move states between processors, and fault-tolerant circuit constructions, always with its costs attached.

The dependency graph every compiler, scheduler, or architecture memo must respect:

- shared entanglement, prepared and distributed earlier;

- a Bell measurement that consumes the input;

- two classical bits in transit;

- a conditional correction that finishes the reconstruction.

Delete any edge and the protocol fails: without fresh entanglement it degrades, without the classical bits it stalls, without the correction it outputs the wrong state confidently.

## Latency and fidelity enter the network contract

Account for distribution, feed-forward, and verification.

When a networking or modular-computing pitch leans on teleportation, ask how entanglement is generated and at what rate, how its fidelity is maintained across distance or time, what the classical latency does to throughput, how corrections are applied, and which workload actually benefits.

Teleportation is real, demonstrated, and genuinely useful as a building block. It is also never free: the interesting engineering is always in the entanglement supply chain the pitch may prefer not to discuss.

## Teleportation branch verifier

Acceptance contract for Teleportation branch verifier
 | Field | Reader-visible record

 | Format | Three-qubit symbolic/numerical circuit with branch-conditioned corrections
 | Verification | Tests random input states across all measurement branches, verifies receiver fidelity one ideally, and asserts no receiver recovery before classical bits arrive.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Teleportation branch verifier",
  "format": "Three-qubit symbolic/numerical circuit with branch-conditioned corrections",
  "acceptance_test": "Tests random input states across all measurement branches, verifies receiver fidelity one ideally, and asserts no receiver recovery before classical bits arrive.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import math
import random

def normalize(alpha, beta):
    norm = math.sqrt(abs(alpha) ** 2 + abs(beta) ** 2)
    if norm < 1e-15:
        raise ValueError("the zero vector is not a quantum state")
    return alpha / norm, beta / norm

def h(state, qubit):
    mask = 1 << (2 - qubit)
    output = state[:]
    scale = math.sqrt(0.5)
    for basis in range(8):
        if basis & mask == 0:
            paired = basis | mask
            output[basis] = (state[basis] + state[paired]) * scale
            output[paired] = (state[basis] - state[paired]) * scale
    return output

def cnot(state, control, target):
    control_mask = 1 << (2 - control)
    target_mask = 1 << (2 - target)
    output = [0j] * 8
    for basis, amplitude in enumerate(state):
        output[basis ^ target_mask if basis & control_mask else basis] += amplitude
    return output

def alice_circuit(alpha, beta):
    state = [0j] * 8
    state[0] = alpha
    state[4] = beta
    state = cnot(h(state, 1), 1, 2)
    state = h(cnot(state, 0, 1), 0)
    return state

def receiver_branch(state, first, second):
    amplitudes = [state[(first << 2) | (second << 1) | bob] for bob in (0, 1)]
    probability = sum(abs(value) ** 2 for value in amplitudes)
    if probability < 1e-15:
        raise ValueError("impossible measurement branch")
    return probability, tuple(value / math.sqrt(probability) for value in amplitudes)

def correct(receiver, first, second):
    zero, one = receiver
    if second:
        zero, one = one, zero
    if first:
        one = -one
    return zero, one

def fidelity(left, right):
    overlap = left[0].conjugate() * right[0] + left[1].conjugate() * right[1]
    return abs(overlap) ** 2

def reduced_receiver(branches):
    rho = [[0j, 0j], [0j, 0j]]
    for probability, receiver in branches:
        for row in (0, 1):
            for column in (0, 1):
                rho[row][column] += probability * receiver[row] * receiver[column].conjugate()
    return rho

rng = random.Random(2501)
states = [normalize(1, 0), normalize(0, 1), normalize(1, 1j), normalize(3 - 2j, -1 + 4j)]
for _ in range(12):
    states.append(normalize(complex(rng.uniform(-1, 1), rng.uniform(-1, 1)),
                            complex(rng.uniform(-1, 1), rng.uniform(-1, 1))))

minimum_fidelity = 1.0
for psi in states:
    state = alice_circuit(*psi)
    branches = []
    for first in (0, 1):
        for second in (0, 1):
            probability, receiver = receiver_branch(state, first, second)
            assert abs(probability - 0.25) < 1e-12
            corrected = correct(receiver, first, second)
            branch_fidelity = fidelity(psi, corrected)
            minimum_fidelity = min(minimum_fidelity, branch_fidelity)
            assert abs(branch_fidelity - 1.0) < 1e-12
            branches.append((probability, receiver))
    rho = reduced_receiver(branches)
    assert abs(rho[0][0] - 0.5) < 1e-12 and abs(rho[1][1] - 0.5) < 1e-12
    assert abs(rho[0][1]) < 1e-12 and abs(rho[1][0]) < 1e-12
    unavailable_fidelity = sum((psi[row].conjugate() * rho[row][column] * psi[column]).real
                               for row in (0, 1) for column in (0, 1))
    assert abs(unavailable_fidelity - 0.5) < 1e-12

witness = normalize(1, 2j)
witness_state = alice_circuit(*witness)
mutated_failures = 0
for first in (0, 1):
    for second in (0, 1):
        _, receiver = receiver_branch(witness_state, first, second)
        wrong = correct(receiver, second, first)
        mutated_failures += fidelity(witness, wrong) < 1.0 - 1e-9
assert mutated_failures > 0
rejected_zero = False
try:
    normalize(0, 0)
except ValueError:
    rejected_zero = True
assert rejected_zero
print(f"PASS: 25 teleportation states={len(states)} minimum_fidelity={minimum_fidelity:.12f} swapped_correction_failures={mutated_failures}")
```

Scope boundary

- This chapter does not transport matter, send information faster than light, or clone the input.

- It does not treat entanglement distribution and classical communication as free infrastructure.

Depth commitment. One general derivation, one explicit input, four branches, and randomized property tests.

Practice problem

Teleport \(\lvert\psi\rangle=(\lvert0\rangle+i\lvert1\rangle)/\sqrt{2}\) and calculate the receiver state and correction in each of four measurement branches.

** Deliverable** : Four branch rows with probabilities, pre-correction states, operations, and corrected fidelity.

** Pass condition** : The branch verifier samples or conditions every result and compares corrected states with |ψ> up to global phase.

Verification record

Expected solution form. Symbolic correction table plus randomized-state property test.

Model answer. Before correction, receiver branches are psi, X psi, Z psi, and XZ psi for measurement records 00, 01, 10, and 11 in the declared convention. Applying I, X, Z, and ZX respectively returns (|0>+i|1>)/sqrt(2) with fidelity one in every branch.

Model result and check. CI tests multiple random normalized inputs and all branches for fidelity one.

Acceptance test. The branch verifier samples or conditions every result and compares corrected states with |ψ> up to global phase.

External review. Open.

Expertise still needed. Quantum communication theorist specializing in teleportation; Distributed quantum systems engineer able to review feed-forward and latency claims.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

protocol fixture

### [Teleportation branch verifier](/playground/quantum/book/25-teleportation/#artifact-25-teleportation)

[Download fixture (.py)](/playground/quantum/artifacts/25-teleportation/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/25-teleportation/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Charles H. Bennett et al.. Teleporting an unknown quantum state via dual classical and Einstein-Podolsky-Rosen channels. Physical Review Letters. 1993](https://doi.org/10.1103/PhysRevLett.70.1895) primary paper

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [William K. Wootters and Wojciech H. Zurek. A single quantum cannot be cloned. Nature. 1982](https://doi.org/10.1038/299802a0) primary paper

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=25-teleportation#report)

Dependency graph

## Prerequisites for this chapter

- [No-Cloning and Why Copying Breaks Quantum Logic Part III. Circuit Model · Chapter 21](/playground/quantum/book/21-no-cloning-and-why-copying-breaks-quantum-logic/)

- [Superdense Coding Part IV. Protocols and Algorithms · Chapter 24](/playground/quantum/book/24-superdense-coding/)

Continue the thread

## Next concepts from this chapter

- [Photonics Part VII. Hardware Architecture · Chapter 58](/playground/quantum/book/58-photonics/)

- [Quantum Key Distribution Part IV. Protocols and Algorithms · Chapter 26](/playground/quantum/book/26-quantum-key-distribution/)

- [Bell Tests and Nonclassical Correlations Part IV. Protocols and Algorithms · Chapter 23](/playground/quantum/book/23-bell-tests-and-nonclassical-correlations/)

[Previous Superdense Coding](/playground/quantum/book/24-superdense-coding/)[Next Quantum Key Distribution](/playground/quantum/book/26-quantum-key-distribution/)

In this chapter

- [Ownership and resources before gates](#ownership-and-resources-before-gates)

- [Expand the state by measurement branch](#expand-the-state-by-measurement-branch)

- [Two classical bits select four corrections](#two-classical-bits-select-four-corrections)

- [One branch traced from α,β to recovery](#one-branch-traced-from-to-recovery)

- [Latency and fidelity enter the network contract](#latency-and-fidelity-enter-the-network-contract)

- [Teleportation branch verifier](#teleportation-branch-verifier)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=25-teleportation#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/25-teleportation/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/26-quantum-key-distribution/ -->

# Quantum Key Distribution

Two parties can use the physics of measurement itself to notice an eavesdropper while they build a shared key. This chapter separates what quantum key distribution genuinely guarantees from the much larger security stack it leaves untouched.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. What security property does BB84 provide, under which assumptions, and how does it differ from post-quantum cryptography?

BB84 lets parties establish correlated key material while estimating disturbance caused by interception under an authenticated classical channel and implementation assumptions; it addresses key distribution, whereas post-quantum cryptography uses classical algorithms for broader cryptographic functions.

Scope and non-goals.

- This chapter does not promise unconditional security for imperfect devices or replace authentication, signatures, certificates, and key management.

- It does not make current procurement recommendations without a dated standards and threat review.

[Figure 26.1.](#fig-26-quantum-key-distribution-1) Notice where the security enters: not in the key itself, but in the error rate. An observer who measures the qubits mid-flight changes some of them, and the sampled comparison makes that change visible.

Prerequisites. 05-measurement-and-what-it-does-not-mean, 23-bell-tests-and-nonclassical-correlations

Notation used here. Alice/Bob/Eve labels; Z/X bases; QBER defined on sifted bits; distinguish raw, sifted, reconciled, and final key lengths.

## Threat model before protocol steps

Name adversary capabilities, authentication, and device assumptions.

Quantum key distribution and post-quantum cryptography get mentioned in the same breath because they answer the same fear: an adversary with a future quantum computer. The similarity ends there.

QKD is a physical key-establishment scheme. Two parties exchange quantum states over a dedicated channel, coordinate over an authenticated classical channel, and end up with shared key material; plus a statistical bound on how much an eavesdropper could have learned. It needs specialized hardware at both ends and care about distance, topology, and trusted relays.

Post-quantum cryptography, or PQC, is a set of classical algorithms designed so that even a quantum attacker gets no useful shortcut. It ships as software. It runs on the machines and networks you already have. One of these is an infrastructure project; the other is a migration project. Treating them as interchangeable products is the first and most expensive mistake in this space.

Evidence boundary. BB84 uses nonorthogonal quantum states and basis comparison to detect interception statistically. [Charles H. Bennett](https://research.ibm.com/publications/quantum-cryptography-public-key-distribution-and-coin-tossing) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Four states across two bases

Build the prepare-and-measure table.

BB84 encodes a random bit in either Z using |0>,|1> or X using |+>,|->. The receiver chooses a basis independently. Matching-basis rounds produce the sender's bit in the ideal model; mismatched rounds are discarded because they are random. Security reasoning begins only after public basis reconciliation, parameter estimation, error correction, and privacy amplification are accounted for.

Evidence boundary. Practical QKD security depends on authentication, implementation, error estimation, reconciliation, and privacy amplification. [Charles H. Bennett](https://research.ibm.com/publications/quantum-cryptography-public-key-distribution-and-coin-tossing) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## Sifting produces candidate key bits

Trace basis disclosure without revealing bit values.

In the BB84-style pattern, Alice encodes each bit in a randomly chosen basis and Bob measures each arriving qubit in a randomly chosen basis. When their bases agree, their outcomes agree and the bit enters the candidate key. When the bases disagree, the outcome is discarded. The sifted bits that survive become the key; after one more step that carries the entire security argument.

That step exists because of the Born rule:

\(\Pr(i)=\lvert\langle i\vert\psi\rangle\rvert^2\)[(26.1)](#eq-26-quantum-key-distribution-1)

An eavesdropper who measures a qubit in the wrong basis does not just fail to learn the bit; she disturbs the state, and Bob's later measurement inherits that disturbance as an elevated error rate. Alice and Bob sacrifice a public sample of their sifted bits, estimate the error rate, and only keep the key if the rate is low enough to bound what Eve could know.

The estimate is statistics, not certainty. With \(S\) sampled bits, the sampling error of the measured rate is roughly:

\(\operatorname{SE}(\hat p)\approx\sqrt{p(1-p)/S}\)[(26.2)](#eq-26-quantum-key-distribution-2)

Small samples leave wide margins, and the security proof lives inside those margins. Note also what the scheme assumes rather than provides: the classical channel must be authenticated by ordinary cryptographic means. QKD distributes keys. It does not authenticate anyone.

Evidence boundary. Post-quantum cryptography is classical cryptography standardized for resistance to quantum attacks and is distinct from QKD. [National Institute of Standards](https://csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization) [Dustin Moody et al.](https://csrc.nist.gov/pubs/ir/8547/ipd)

\(Alice/Bob/Eve labels; Z/X bases; QBER defined on sifted bits; distinguish raw, sifted, reconciled, and final key lengths.\)[(26.3)](#eq-26-quantum-key-distribution-3)
Notation contract: Alice/Bob/Eve labels; Z/X bases; QBER defined on sifted bits; distinguish raw, sifted, reconciled, and final key lengths.

## Interception leaves a statistical signature

Calculate intercept-resend error probability on sifted bits.

An intercept-resend attacker guesses the sender's basis correctly half the time. On the other half, the attacker's measurement randomizes the state relative to the sender; among rounds later kept by legitimate basis agreement, that wrong-basis branch creates an error half the time. The expected sifted QBER is therefore one quarter, a statistical signature estimated from a disclosed sample rather than a per-bit alarm.

## From raw key to usable key

Locate parameter estimation, reconciliation, and privacy amplification.

For a builder, this chapter is about threat modeling and systems integration, not about a single primitive. A system is not made secure by one clever component. You have to ask where keys are generated, stored, rotated, authenticated, audited, and used; and what breaks when each of those steps fails.

Any serious QKD-versus-PQC comparison should score, at minimum:

- threat model and attacker capabilities

- asset lifetime; how long the data must stay secret

- network topology and link distances

- hardware requirements at each endpoint

- software migration path and interoperability

- authentication assumptions on the classical channel

- operational burden: key management, maintenance, staffing

- verification evidence: what has been demonstrated, under what conditions

The quantum layer changes one part of this stack. The rest of the stack does not notice, and neither do your attackers.

## QKD and PQC solve different systems problems

Compare scope, infrastructure, and migration boundaries.

QKD distributes fresh symmetric key material through a quantum channel and still needs authenticated classical communication, trusted endpoints, and operational key management. Post-quantum cryptography replaces vulnerable public-key primitives in ordinary networks. One does not migrate certificates, firmware, identity systems, or stored ciphertext merely by installing the other; threat model, distance, hardware, and integration determine which layer is relevant.

## BB84 intercept-resend laboratory

Acceptance contract for BB84 intercept-resend laboratory
 | Field | Reader-visible record

 | Format | Seeded protocol simulator with sifting and QBER report
 | Verification | Tests no-eavesdrop and intercept-resend regimes, checks basis sifting, estimates the expected disturbance, and requires an authenticated classical-channel assumption.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "BB84 intercept-resend laboratory",
  "format": "Seeded protocol simulator with sifting and QBER report",
  "acceptance_test": "Tests no-eavesdrop and intercept-resend regimes, checks basis sifting, estimates the expected disturbance, and requires an authenticated classical-channel assumption.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import math
import random

SCALE = math.sqrt(0.5)

def prepare(bit, basis):
    if basis == "Z":
        return (1.0, 0j) if bit == 0 else (0j, 1.0)
    if basis == "X":
        return (SCALE, SCALE if bit == 0 else -SCALE)
    raise ValueError("basis must be X or Z")

def measure(state, basis, rng):
    zero = prepare(0, basis)
    overlap = zero[0].conjugate() * state[0] + zero[1].conjugate() * state[1]
    probability_zero = abs(overlap) ** 2
    if probability_zero > 1.0 - 1e-12:
        return 0
    if probability_zero < 1e-12:
        return 1
    return 0 if rng.random() < probability_zero else 1

def qber(pairs):
    if not pairs:
        raise ValueError("QBER is undefined for an empty sifted key")
    return sum(alice != bob for alice, bob in pairs) / len(pairs)

def simulate(alice_bits, alice_bases, bob_bases, attacked, authenticated, seed):
    if not authenticated:
        raise ValueError("BB84 requires an authenticated classical discussion")
    rng = random.Random(seed)
    sifted = []
    evidence = {"eve_wrong_basis": 0, "eve_wrong_basis_errors": 0}
    for alice_bit, alice_basis, bob_basis in zip(alice_bits, alice_bases, bob_bases):
        state = prepare(alice_bit, alice_basis)
        eve_basis = None
        if attacked:
            eve_basis = "X" if rng.randrange(2) else "Z"
            eve_bit = measure(state, eve_basis, rng)
            state = prepare(eve_bit, eve_basis)
        bob_bit = measure(state, bob_basis, rng)
        if alice_basis == bob_basis:
            sifted.append((alice_bit, bob_bit))
            if attacked and eve_basis != alice_basis:
                evidence["eve_wrong_basis"] += 1
                evidence["eve_wrong_basis_errors"] += alice_bit != bob_bit
    return sifted, evidence

schedule = random.Random(84026)
signals = 20000
alice_bits = [schedule.randrange(2) for _ in range(signals)]
alice_bases = ["X" if schedule.randrange(2) else "Z" for _ in range(signals)]
bob_bases = ["X" if schedule.randrange(2) else "Z" for _ in range(signals)]

honest_key, honest_evidence = simulate(alice_bits, alice_bases, bob_bases, False, True, 2601)
attacked_key, attacked_evidence = simulate(alice_bits, alice_bases, bob_bases, True, True, 2602)
honest_qber = qber(honest_key)
attacked_qber = qber(attacked_key)
sift_rate = len(honest_key) / signals
wrong_basis_error_rate = attacked_evidence["eve_wrong_basis_errors"] / attacked_evidence["eve_wrong_basis"]
assert len(honest_key) == len(attacked_key)
assert 0.48 < sift_rate < 0.52
assert honest_qber == 0.0
assert 0.22 < attacked_qber < 0.28
assert 0.46 < wrong_basis_error_rate < 0.54

wrongly_sifted = [(alice, measure(prepare(alice, alice_basis), bob_basis, random.Random(index)),)
                  for index, (alice, alice_basis, bob_basis) in enumerate(zip(alice_bits, alice_bases, bob_bases))
                  if alice_basis != bob_basis]
assert 0.46 < qber(wrongly_sifted) < 0.54

authentication_rejected = False
try:
    simulate([0], ["Z"], ["Z"], False, False, 1)
except ValueError:
    authentication_rejected = True
assert authentication_rejected
empty_sift_rejected = False
try:
    qber([])
except ValueError:
    empty_sift_rejected = True
assert empty_sift_rejected
print(f"PASS: 26 BB84 honest_qber={honest_qber:.3f} attacked_qber={attacked_qber:.3f} sifted={len(honest_key)} wrong_basis_error={wrong_basis_error_rate:.3f}")
```

Scope boundary

- This chapter does not promise unconditional security for imperfect devices or replace authentication, signatures, certificates, and key management.

- It does not make current procurement recommendations without a dated standards and threat review.

Depth commitment. One full transcript, one attack calculation, one simulator, and one scope comparison.

Practice problem

Simulate 10,000 BB84 transmissions with no eavesdropper and with intercept-resend on every signal; compare sift rate and QBER.

** Deliverable** : Run record with seed, raw/sifted sizes, QBER confidence intervals, and threat-model conclusion.

** Pass condition** : The reference simulator reproduces the run and checks results against binomial bands around the idealized expectations.

Verification record

Expected solution form. Protocol transcript excerpt plus statistical comparison and security-boundary rubric.

Model answer. With random independent bases, both regimes retain about one half the signals after sifting. With no noise or eavesdropper the sifted QBER is zero; intercept-resend on every signal produces an expected sifted QBER of one quarter. This calculation says nothing about attacks outside the model.

Model result and check. CI reruns both regimes with the published seed; review rejects claims extending beyond the modeled attack.

Acceptance test. The reference simulator reproduces the run and checks results against binomial bands around the idealized expectations.

External review. Open.

Expertise still needed. Quantum cryptography researcher familiar with BB84 security assumptions; Applied cryptographer experienced in PQC migration and protocol threat modeling.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

protocol fixture

### [BB84 intercept-resend laboratory](/playground/quantum/book/26-quantum-key-distribution/#artifact-26-quantum-key-distribution)

[Download fixture (.py)](/playground/quantum/artifacts/26-quantum-key-distribution/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/26-quantum-key-distribution/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Charles H. Bennett and Gilles Brassard. Quantum cryptography: Public key distribution and coin tossing. Proceedings of the IEEE International Conference on Computers, Systems and Signal Processing / IBM Research. 1984](https://research.ibm.com/publications/quantum-cryptography-public-key-distribution-and-coin-tossing) primary conference paper

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [National Institute of Standards and Technology. Post-Quantum Cryptography Standards. NIST. 2024](https://csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization) official standardization project

- [Dustin Moody et al.. Transition to Post-Quantum Cryptography Standards. National Institute of Standards and Technology. 2024](https://csrc.nist.gov/pubs/ir/8547/ipd) official transition guidance (initial public draft)

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=26-quantum-key-distribution#report)

Dependency graph

## Prerequisites for this chapter

- [Measurement and What It Does Not Mean Part I. Mental Model · Chapter 5](/playground/quantum/book/05-measurement-and-what-it-does-not-mean/)

- [Bell Tests and Nonclassical Correlations Part IV. Protocols and Algorithms · Chapter 23](/playground/quantum/book/23-bell-tests-and-nonclassical-correlations/)

Continue the thread

## Next concepts from this chapter

- [Cryptography, PQC, QKD, and Security Migration Part VIII. Applications and Strategy · Chapter 68](/playground/quantum/book/68-cryptography-pqc-qkd-and-security-migration/)

- [Teleportation Part IV. Protocols and Algorithms · Chapter 25](/playground/quantum/book/25-teleportation/)

- [Oracles and Query Complexity Part IV. Protocols and Algorithms · Chapter 27](/playground/quantum/book/27-oracles-and-query-complexity/)

[Previous Teleportation](/playground/quantum/book/25-teleportation/)[Next Oracles and Query Complexity](/playground/quantum/book/27-oracles-and-query-complexity/)

In this chapter

- [Threat model before protocol steps](#threat-model-before-protocol-steps)

- [Four states across two bases](#four-states-across-two-bases)

- [Sifting produces candidate key bits](#sifting-produces-candidate-key-bits)

- [Interception leaves a statistical signature](#interception-leaves-a-statistical-signature)

- [From raw key to usable key](#from-raw-key-to-usable-key)

- [QKD and PQC solve different systems problems](#qkd-and-pqc-solve-different-systems-problems)

- [BB84 intercept-resend laboratory](#bb84-intercept-resend-laboratory)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=26-quantum-key-distribution#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/26-quantum-key-distribution/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/27-oracles-and-query-complexity/ -->

# Oracles and Query Complexity

Most famous quantum speedups are proven in a world where a black box answers structured questions and nobody itemizes its bill. This chapter teaches you to read that world honestly: count the queries, then price the box.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. What does a quantum query-complexity result count, and which costs does the oracle abstraction hide?

It counts uses of a specified black-box unitary under an input promise; it can expose a genuine information advantage while hiding oracle construction, data loading, gate decomposition, verification, and classical work, all of which must be restored before making a runtime claim.

Scope and non-goals.

- Query complexity is treated as a bounded cost model rather than a hardware-performance claim.

- Quantum and classical comparisons must use the same declared oracle contract.

[Figure 27.1.](#fig-27-oracles-and-query-complexity-1) Notice that the diagram hides the interesting number: you pay per call, but nothing in the picture says what one call costs to build. With the target prepared as \(\lvert-\rangle\), the answer comes back as a phase instead of a bit flip; the kickback trick this chapter develops.

Prerequisites. 18-controlled-gates-and-reversible-classical-computation, 22-circuit-cost-depth-width-gate-set-connectivity

Notation used here. Oracle U_f|x,y>=|x,y⊕f(x)>; phase oracle O_f|x>=(-1)^{f(x)}|x>; Q queries separated from G gates.

## The black-box contract

Define domain, range, unitary action, and input promise.

An oracle is an abstract operation that answers a structured question about the input: given \(x\), it makes \(f ( x )\) available to the algorithm in one step. Query complexity counts how many times the algorithm calls it. That counting discipline is what lets theorists prove clean separations; quantum needs one call where classical needs many; without committing to any hardware.

The discipline has five parts, and a speedup claim missing any of them is incomplete:

- State the oracle. What exactly does one call compute?

- State the input promise. What structure is guaranteed; a hidden string, a balanced function, a single marked item?

- Count oracle calls. Quantum and classical, under the same access model.

- State non-oracle costs. State preparation, gates between calls, measurement, post-processing.

- Compare against the best classical baseline given the same oracle access, not against a strawman that reads the input one bit at a time.

Run this checklist on a celebrated result and it holds up beautifully. Run it on a product pitch and you will often find the promise doing all the work.

Evidence boundary. Quantum query complexity studies the number of oracle calls required under a defined black-box model. [Ethan Bernstein](https://doi.org/10.1137/S0097539796300921) [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/)

## Two oracle encodings that are not interchangeable

Compare bit and phase oracles.

The standard bit oracle acts on two registers:

\(U_f\lvert x\rangle\lvert y\rangle=\lvert x\rangle\lvert y\oplus f(x)\rangle\)[(27.1)](#eq-27-oracles-and-query-complexity-1)

The input register passes through untouched; the answer lands on the target. Now prepare the target in the minus state, \(\lvert-\rangle=(\lvert0\rangle-\lvert1\rangle)/\sqrt2\). Because flipping \(\lvert-\rangle\) only multiplies it by −1, the function value comes back as a phase on the input branch:

\(U_f\lvert x\rangle\lvert-\rangle=(-1)^{f(x)}\lvert x\rangle\lvert-\rangle\)[(27.2)](#eq-27-oracles-and-query-complexity-2)

The target register is left exactly as it started; the information has "kicked back" onto the input. A phase is invisible to a direct measurement; but a later basis change can turn a phase pattern into interference, and interference into a measurable answer. The oracle never prints anything. It reshapes the state, and the rest of the circuit decides what that reshaping reveals.

Evidence boundary. A reversible bit oracle can induce a phase oracle through phase kickback. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## Kickback moves a value into phase

Derive the |-> target calculation.

Prepare the oracle target as |->=(|0>-|1>)/sqrt(2). Because X|->=-|->, mapping y to y xor f(x) multiplies the x branch by (-1)^f(x) while returning the target unchanged. This phase oracle equivalence costs one bit-oracle query plus explicit local state preparation. It does not reveal f(x) as a classical output.

Evidence boundary. Query complexity does not by itself include circuit synthesis, data access, or end-to-end runtime. [Ethan Bernstein](https://doi.org/10.1137/S0097539796300921) [National Academies of Sciences](https://doi.org/10.17226/25196)

\(Oracle U_f|x,y>=|x,y⊕f(x)>; phase oracle O_f|x>=(-1)^{f(x)}|x>; Q queries separated from G gates.\)[(27.3)](#eq-27-oracles-and-query-complexity-3)
Notation contract: Oracle U_f|x,y>=|x,y⊕f(x)>; phase oracle O_f|x>=(-1)^{f(x)}|x>; Q queries separated from G gates.

## What a query bound proves

Separate information access from implementation time.

An oracle is an interface with an unusually strong contract: the implementation is hidden, the call is atomic, and the promise is guaranteed. Production systems hide nothing forever, so the bridge from textbook to feasibility runs through six questions:

- What does the oracle actually compute?

- How is the input represented, and who loads it?

- What promise is assumed, and does the real workload keep it?

- What does one call cost in gates, depth, and ancillas?

- Can the computation be made reversible, as unitarity demands?

- What classical algorithm receives the same access; and how well does it do?

These questions are not pedantry. They are the difference between an algorithm and an application.

## Restore the hidden cost ledger

Price construction, invocation, data, and verification.

Record oracle queries, oracle implementation gates, non-oracle gates, depth after connectivity mapping, state preparation, measurements or shots, classical post-processing, and verification as separate rows. A query lower bound speaks only to the first row under the black-box promise. End-to-end advantage needs every remaining row and a relevant classical implementation under comparable input access.

## Oracle contract and cost-ledger schema

Acceptance contract for Oracle contract and cost-ledger schema
 | Field | Reader-visible record

 | Format | Reference bit/phase oracle circuits plus machine-readable cost model
 | Verification | Tests unitary action on every small input, verifies kickback equivalence, and rejects ledgers with unpriced construction or verification.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Oracle contract and cost-ledger schema",
  "format": "Reference bit/phase oracle circuits plus machine-readable cost model",
  "acceptance_test": "Tests unitary action on every small input, verifies kickback equivalence, and rejects ledgers with unpriced construction or verification.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
class Oracle:
    def __init__(self, fn): self.fn, self.queries = fn, 0
    def __call__(self, x):
        self.queries += 1
        return self.fn(x)
def linear_search(size, target):
    if type(size) is not int or size < 1 or target not in range(size):
        raise ValueError("target must index a nonempty domain")
    oracle = Oracle(lambda x: x == target)
    answer = next(x for x in range(size) if oracle(x))
    return {"answer": answer, "queries": oracle.queries, "domain": size}

middle = linear_search(16, 7)
boundary = linear_search(16, 0)
rejected = False
try:
    linear_search(16, 16)
except ValueError:
    rejected = True
assert middle == {"answer": 7, "queries": 8, "domain": 16}
assert boundary["answer"] == 0 and boundary["queries"] == 1
assert rejected and middle["queries"] > boundary["queries"]
print(f"PASS: 27 oracle ledger middle_queries={middle['queries']} boundary_queries={boundary['queries']} invalid_target={rejected}")
```

Scope boundary

- Query complexity is treated as a bounded cost model rather than a hardware-performance claim.

- Quantum and classical comparisons must use the same declared oracle contract.

Depth commitment. One contract, two implementations, one equivalence proof, and one cost schema.

Practice problem

For a two-bit Boolean function, construct bit and phase oracles, prove kickback equivalence, and assign separate query and gate costs.

** Deliverable** : Two unitary matrices/circuits, one state trace, and a completed cost ledger.

** Pass condition** : Fixtures exhaust all inputs, compare induced phases, and recalculate costs from gate lists.

Verification record

Expected solution form. Algebraic equivalence proof plus exhaustive circuit and ledger tests.

Model answer. The bit oracle maps |x,y> to |x,y xor f(x)>; with y=|->, it returns (-1)^f(x)|x>|->, which is the phase oracle action on x. Each use counts as one query; gates used to prepare |-> or change basis remain separate local circuit cost.

Model result and check. CI verifies unitarity, truth-table behavior, phase action, and ledger arithmetic.

Acceptance test. Fixtures exhaust all inputs, compare induced phases, and recalculate costs from gate lists.

External review. Open.

Expertise still needed. Quantum complexity theorist specializing in query models; Quantum compiler/performance reviewer able to price oracle implementations.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

algorithm fixture

### [Oracle contract and cost-ledger schema](/playground/quantum/book/27-oracles-and-query-complexity/#artifact-27-oracles-and-query-complexity)

[Download fixture (.py)](/playground/quantum/artifacts/27-oracles-and-query-complexity/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/27-oracles-and-query-complexity/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Ethan Bernstein and Umesh Vazirani. Quantum complexity theory. SIAM Journal on Computing. 1997](https://doi.org/10.1137/S0097539796300921) primary paper

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=27-oracles-and-query-complexity#report)

Dependency graph

## Prerequisites for this chapter

- [Controlled Gates and Reversible Classical Computation Part III. Circuit Model · Chapter 18](/playground/quantum/book/18-controlled-gates-and-reversible-classical-computation/)

- [Circuit Cost: Depth, Width, Gate Set, Connectivity Part III. Circuit Model · Chapter 22](/playground/quantum/book/22-circuit-cost-depth-width-gate-set-connectivity/)

Continue the thread

## Next concepts from this chapter

- [Quantum Algorithms and Speedups Orientation guide](/playground/quantum/book/orientation-04-quantum-algorithms-and-speedups/)

- [Deutsch, Deutsch-Jozsa, and Bernstein-Vazirani Part IV. Protocols and Algorithms · Chapter 28](/playground/quantum/book/28-deutsch-deutsch-jozsa-and-bernstein-vazirani/)

- [Grover and Amplitude Amplification Part IV. Protocols and Algorithms · Chapter 30](/playground/quantum/book/30-grover-and-amplitude-amplification/)

[Previous Quantum Key Distribution](/playground/quantum/book/26-quantum-key-distribution/)[Next Deutsch, Deutsch-Jozsa, and Bernstein-Vazirani](/playground/quantum/book/28-deutsch-deutsch-jozsa-and-bernstein-vazirani/)

In this chapter

- [The black-box contract](#the-black-box-contract)

- [Two oracle encodings that are not interchangeable](#two-oracle-encodings-that-are-not-interchangeable)

- [Kickback moves a value into phase](#kickback-moves-a-value-into-phase)

- [What a query bound proves](#what-a-query-bound-proves)

- [Restore the hidden cost ledger](#restore-the-hidden-cost-ledger)

- [Oracle contract and cost-ledger schema](#oracle-contract-and-cost-ledger-schema)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=27-oracles-and-query-complexity#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/27-oracles-and-query-complexity/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/28-deutsch-deutsch-jozsa-and-bernstein-vazirani/ -->

# Deutsch, Deutsch-Jozsa, and Bernstein-Vazirani

Three small algorithms from the field's first decade still teach the core move of quantum algorithm design: ask one structured question, hide the answer in phase, and let a basis change read it back.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. What common mechanism lets Deutsch-style and Bernstein–Vazirani circuits learn a promised property with few oracle queries?

Prepare superposition, use phase kickback to encode a promised Boolean structure, and apply Hadamards to Fourier-analyze that phase; the algorithms differ in the promise and decoded property, so their query advantage must be stated against matching classical models.

Scope and non-goals.

- This chapter does not present these algorithms as practical application speedups.

- It does not conflate deterministic and bounded-error classical query baselines or omit the promise.

[Figure 28.1.](#fig-28-deutsch-deutsch-jozsa-and-bernstein-vazirani-1) Notice that the oracle is queried once, yet both bits of the hidden string come out. The answer never travels through the target register; it lives in the phase pattern the final Hadamards decode.

Prerequisites. 27-oracles-and-query-complexity, 06-interference-as-engine-of-quantum-algorithms

Notation used here. x,s∈{0,1}^n; f_s(x)=s·x mod 2; Hadamard transform convention declared; query count excludes oracle synthesis but gate ledger includes it.

## Three promises, three questions

Write the exact task for Deutsch, Deutsch–Jozsa, and Bernstein–Vazirani.

Each of the three algorithms poses a question about a black-box function and answers it with fewer queries than any classical algorithm allowed the same access. Deutsch's problem asks whether a one-bit function is constant or balanced; one quantum query, two classical. Deutsch–Jozsa scales that to \(n\) bits, where a deterministic classical algorithm can need exponentially many queries in the worst case. Bernstein–Vazirani hides an \(n\) -bit string inside a linear function and recovers all of it in one query, where a classical learner needs \(n\).

The separations are real and the problems are contrived. Both facts matter. These algorithms exist to make a mechanism visible: a quantum circuit can interrogate a structured oracle, write the answer into relative phases, and use interference to expose a global property that no single classical query can see. Learn the mechanism here and you will recognize it inside every heavier algorithm that follows.

Evidence boundary. Deutsch's algorithm distinguishes constant from balanced one-bit functions under a promise. [David Deutsch](https://doi.org/10.1098/rspa.1985.0070) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## One phase-oracle circuit pattern

Derive the shared preparation and kickback.

For Bernstein–Vazirani, the hidden string \(s\) defines the function:

\(f_s(x)=s\cdot x\pmod2\)[(28.1)](#eq-28-deutsch-deutsch-jozsa-and-bernstein-vazirani-1)

With the target prepared as \(\lvert-\rangle\), the oracle acts through phase kickback:

\(U_f\lvert x\rangle\lvert-\rangle=(-1)^{f(x)}\lvert x\rangle\lvert-\rangle\)[(28.2)](#eq-28-deutsch-deutsch-jozsa-and-bernstein-vazirani-2)

Hadamards do the decoding, and they earn their keep here. \(H\) is a basis-change gate, not a randomness button:

\(\begin{aligned}H^2&=I,\\HZH&=X.\end{aligned}\)[(28.3)](#eq-28-deutsch-deutsch-jozsa-and-bernstein-vazirani-3)

The first identity says the encoding is exactly reversible; the second says \(H\) converts phase information (a \(Z\) -type sign) into bit information (an \(X\) -type flip). The final Hadamard layer in these circuits is that conversion, applied to every input qubit at once.

Evidence boundary. Bernstein–Vazirani recovers a hidden linear string with one quantum query in its oracle model. [Ethan Bernstein](https://doi.org/10.1137/S0097539796300921) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## Deutsch reads parity of two truth-table values

Trace the one-bit case fully.

Evidence boundary. Hadamard/Fourier analysis converts phase-encoded linear structure into a computational-basis result. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

\(x,s\in\{0,1\}^n,\qquad f_s(x)=s\cdot x\pmod2\)[(28.4)](#eq-28-deutsch-deutsch-jozsa-and-bernstein-vazirani-4)
Notation contract: x,s∈{0,1}^n; f_s(x)=s·x mod 2; Hadamard transform convention declared; query count excludes oracle synthesis but gate ledger includes it.

## Bernstein–Vazirani turns phase into a hidden string

Expand the n-bit transform.

These algorithms are unit tests for the standard quantum pattern:

- prepare registers, including the \(\lvert-\rangle\) target;

- create superposition over inputs;

- query the structured oracle once;

- let phase kickback encode the answer;

- apply interference; the final Hadamard layer;

- measure a compact answer.

Debugging an implementation means checking each step in isolation: target preparation, oracle convention, final Hadamards, measurement register. A useful test is to run more than one hidden string. If \(s = 00\), the phase pattern is flat and the output should read `00`; if \(s = 10\), branches with first bit 1 pick up a sign and the output should read `10`. If only one case works, your oracle is probably hard-coded rather than computing \(s ⋅ x mod 2\).

This is also the right place to feel the difference between a black box and a compiled circuit. A simulator can hand you the oracle as a function. Hardware needs it decomposed into gates, controls, and possibly ancillas; a decomposition whose depth belongs in any honest cost accounting, even though the query-complexity lesson survives it.

## Query tables before runtime stories

Compare exact classical and quantum information access.

Deutsch-Jozsa gives an exact one-query separation from deterministic classical black-box testing under its constant-or-balanced promise; randomized classical sampling changes the practical comparison when bounded error is allowed. Bernstein-Vazirani returns n hidden bits in one query where direct classical bit queries require n, but a physical phase oracle for an explicit linear function may itself cost O(n) gates. State the model before calling either result a runtime speedup.

## Promise-algorithm circuit suite

Acceptance contract for Promise-algorithm circuit suite
 | Field | Reader-visible record

 | Format | Parameterized oracle generator and exhaustive small-n tests
 | Verification | For every n≤5 hidden string and all one-bit Deutsch functions, tests promise classification, query count, output, and compiled gate count.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Promise-algorithm circuit suite",
  "format": "Parameterized oracle generator and exhaustive small-n tests",
  "acceptance_test": "For every n≤5 hidden string and all one-bit Deutsch functions, tests promise classification, query count, output, and compiled gate count.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import math

def h(state, qubit, count):
    mask = 1 << (count - 1 - qubit)
    output = state[:]
    scale = math.sqrt(0.5)
    for basis in range(len(state)):
        if basis & mask == 0:
            paired = basis | mask
            output[basis] = (state[basis] + state[paired]) * scale
            output[paired] = (state[basis] - state[paired]) * scale
    return output

def query_oracle(state, function, input_qubits):
    output = [0j] * len(state)
    for basis, amplitude in enumerate(state):
        x = basis >> 1
        y = basis & 1
        destination = (x << 1) | (y ^ function(x))
        output[destination] += amplitude
    return output

def one_query_state(function, input_qubits, target_one=True, query_count=1):
    total = input_qubits + 1
    state = [0j] * (1 << total)
    state[1 if target_one else 0] = 1.0
    for qubit in range(total):
        state = h(state, qubit, total)
    before_oracle = state[:]
    for _ in range(query_count):
        state = query_oracle(state, function, input_qubits)
    after_oracle = state[:]
    for qubit in range(input_qubits):
        state = h(state, qubit, total)
    probabilities = [0.0] * (1 << input_qubits)
    for basis, amplitude in enumerate(state):
        probabilities[basis >> 1] += abs(amplitude) ** 2
    return before_oracle, after_oracle, probabilities

def assert_kickback(after_oracle, function, input_qubits):
    expected_size = math.sqrt(1 / (1 << (input_qubits + 1)))
    for x in range(1 << input_qubits):
        phase = -1 if function(x) else 1
        assert abs(after_oracle[(x << 1)] - phase * expected_size) < 1e-12
        assert abs(after_oracle[(x << 1) | 1] + phase * expected_size) < 1e-12

def classify_dj(table):
    size = len(table)
    input_qubits = size.bit_length() - 1
    if 1 << input_qubits != size:
        raise ValueError("truth table length must be a power of two")
    ones = sum(table)
    if ones not in (0, size, size // 2):
        raise ValueError("Deutsch-Jozsa promise violated")
    function = lambda x: table[x]
    _, kicked, probabilities = one_query_state(function, input_qubits)
    assert_kickback(kicked, function, input_qubits)
    measured_zero = probabilities[0] > 1.0 - 1e-12
    return "constant" if measured_zero else "balanced", probabilities

deutsch_tables = 0
for encoded in range(4):
    table = tuple((encoded >> x) & 1 for x in range(2))
    classification, probabilities = classify_dj(table)
    assert classification == ("constant" if sum(table) in (0, 2) else "balanced")
    deutsch_tables += 1
assert deutsch_tables == 4

promised_tables = 0
for encoded in range(1 << 8):
    table = tuple((encoded >> x) & 1 for x in range(8))
    if sum(table) in (0, 4, 8):
        classification, probabilities = classify_dj(table)
        assert classification == ("constant" if sum(table) in (0, 8) else "balanced")
        if classification == "balanced":
            assert probabilities[0] < 1e-12
        promised_tables += 1
assert promised_tables == 72

promise_rejected = False
try:
    classify_dj((1, 0, 0, 0, 0, 0, 0, 0))
except ValueError:
    promise_rejected = True
assert promise_rejected

bv_cases = 0
for input_qubits in range(1, 6):
    for secret in range(1 << input_qubits):
        for offset in (0, 1):
            function = lambda x, secret=secret, offset=offset: ((x & secret).bit_count() & 1) ^ offset
            _, kicked, probabilities = one_query_state(function, input_qubits)
            assert_kickback(kicked, function, input_qubits)
            assert abs(probabilities[secret] - 1.0) < 1e-12
            assert sum(value > 1e-12 for value in probabilities) == 1
            ledger = {
                "oracle_queries": 1,
                "hadamards": 2 * input_qubits + 1,
                "compiled_oracle_cnot": secret.bit_count(),
                "compiled_oracle_x": offset,
            }
            assert ledger["oracle_queries"] == 1
            assert ledger["hadamards"] == 2 * input_qubits + 1
            assert ledger["compiled_oracle_cnot"] + ledger["compiled_oracle_x"] == secret.bit_count() + offset
            bv_cases += 1

witness_secret = 0b1011
witness = lambda x: (x & witness_secret).bit_count() & 1
_, _, correct = one_query_state(witness, 4)
_, _, target_mutation = one_query_state(witness, 4, target_one=False)
_, _, double_query_mutation = one_query_state(witness, 4, query_count=2)
assert correct[witness_secret] > 1.0 - 1e-12
assert target_mutation[0] > 1.0 - 1e-12 and target_mutation[witness_secret] < 1e-12
assert double_query_mutation[0] > 1.0 - 1e-12 and double_query_mutation[witness_secret] < 1e-12
print(f"PASS: 28 one-query algorithms Deutsch={deutsch_tables} DJ={promised_tables} BV={bv_cases} witness_success={correct[witness_secret]:.1f} target_mutant_success={target_mutation[witness_secret]:.1f}")
```

Scope boundary

- This chapter does not present these algorithms as practical application speedups.

- It does not conflate deterministic and bounded-error classical query baselines or omit the promise.

Depth commitment. Three contracts, one common circuit derivation, two complete traces, and exhaustive tests.

Practice problem

Derive and run Bernstein–Vazirani for secret 1011, showing the phase after the oracle and every final output amplitude.

** Deliverable** : Symbolic n-bit derivation specialized to 1011, circuit, and deterministic count result.

** Pass condition** : The suite generates the secret oracle, asserts one oracle call and output 1011, and matches the amplitude table.

Verification record

Expected solution form. Walsh-Hadamard derivation plus exhaustive n≤5 regression tests.

Model answer. For secret s=1011, phase kickback gives amplitude sign (-1)^(s dot x). The final Hadamards implement the character orthogonality sum, leaving amplitude one on |1011> and zero on every other output; one oracle query recovers the string in the promise model.

Model result and check. CI reruns every secret and checks the submitted trace for 1011.

Acceptance test. The suite generates the secret oracle, asserts one oracle call and output 1011, and matches the amplitude table.

External review. Open.

Expertise still needed. Quantum algorithms/complexity theorist; Formal verification reviewer able to assess promise coverage and exhaustive oracle tests.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

algorithm fixture

### [Promise-algorithm circuit suite](/playground/quantum/book/28-deutsch-deutsch-jozsa-and-bernstein-vazirani/#artifact-28-deutsch-deutsch-jozsa-and-bernstein-vazirani)

[Download fixture (.py)](/playground/quantum/artifacts/28-deutsch-deutsch-jozsa-and-bernstein-vazirani/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/28-deutsch-deutsch-jozsa-and-bernstein-vazirani/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [David Deutsch. Quantum theory, the Church-Turing principle and the universal quantum computer. Proceedings of the Royal Society A. 1985](https://doi.org/10.1098/rspa.1985.0070) primary paper

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [Ethan Bernstein and Umesh Vazirani. Quantum complexity theory. SIAM Journal on Computing. 1997](https://doi.org/10.1137/S0097539796300921) primary paper

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=28-deutsch-deutsch-jozsa-and-bernstein-vazirani#report)

Dependency graph

## Prerequisites for this chapter

- [Oracles and Query Complexity Part IV. Protocols and Algorithms · Chapter 27](/playground/quantum/book/27-oracles-and-query-complexity/)

- [Interference as the Engine of Quantum Algorithms Part I. Mental Model · Chapter 6](/playground/quantum/book/06-interference-as-engine-of-quantum-algorithms/)

Continue the thread

## Next concepts from this chapter

- [Simon and Hidden Structure Part IV. Protocols and Algorithms · Chapter 29](/playground/quantum/book/29-simon-and-hidden-structure/)

- [Quantum Key Distribution Part IV. Protocols and Algorithms · Chapter 26](/playground/quantum/book/26-quantum-key-distribution/)

- [Grover and Amplitude Amplification Part IV. Protocols and Algorithms · Chapter 30](/playground/quantum/book/30-grover-and-amplitude-amplification/)

[Previous Oracles and Query Complexity](/playground/quantum/book/27-oracles-and-query-complexity/)[Next Simon and Hidden Structure](/playground/quantum/book/29-simon-and-hidden-structure/)

In this chapter

- [Three promises, three questions](#three-promises-three-questions)

- [One phase-oracle circuit pattern](#one-phase-oracle-circuit-pattern)

- [Deutsch reads parity of two truth-table values](#deutsch-reads-parity-of-two-truth-table-values)

- [Bernstein–Vazirani turns phase into a hidden string](#bernstein-vazirani-turns-phase-into-a-hidden-string)

- [Query tables before runtime stories](#query-tables-before-runtime-stories)

- [Promise-algorithm circuit suite](#promise-algorithm-circuit-suite)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=28-deutsch-deutsch-jozsa-and-bernstein-vazirani#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/28-deutsch-deutsch-jozsa-and-bernstein-vazirani/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/29-simon-and-hidden-structure/ -->

# Simon and Hidden Structure

Simon's problem is the bridge between the toy oracles and Shor: a hidden string, a promise about collisions, and a quantum sampler that hands classical algebra exactly the equations it needs.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How does Simon's algorithm turn a two-to-one XOR-period promise into linear equations for a hidden string?

The oracle creates paired inputs x and x⊕s with equal outputs; after discarding or measuring the output register and applying Hadamards, samples y satisfy y·s=0 mod 2, so repeated independent samples and classical Gaussian elimination recover s.

Scope and non-goals.

- This chapter does not claim an advantage without Simon's exact promise or ignore oracle construction.

- It does not substitute one lucky sample for the rank required to recover the hidden string.

[Figure 29.1.](#fig-29-simon-and-hidden-structure-1) Notice the division of labor: every run returns one equation about the hidden string, never the string itself. The exponential gap comes from how cheap each equation is to sample; classically, finding even one useful collision costs about \(2^{n/2}\) queries.

Prerequisites. 28-deutsch-deutsch-jozsa-and-bernstein-vazirani, 13-tensor-products-and-state-space-growth

Notation used here. Bit vectors over GF(2); dot product and XOR explicitly mod 2; matrix rank over GF(2), not real numbers.

## The collision promise

State f(x)=f(x⊕s) and the two-to-one boundary.

Simon's problem hands you a black-box function on \(n\) -bit strings with a strict promise: there is a hidden nonzero string \(s\) such that

\(f ( x ) = f ( y ) exactly when y = x ⊕ s\)[(29.1)](#eq-29-simon-and-hidden-structure-1)

Every output value appears exactly twice, on input pairs separated by \(s\). The task is to recover \(s\). Classically, the only way in is to query inputs and hope for a collision, and the birthday bound says a collision costs on the order of \(2^{n/2}\) queries; exponential. Quantumly, about \(n\) runs suffice. That is the first clean exponential oracle separation in the standard story, and it is the conceptual ancestor of factoring.

Evidence boundary. Simon's problem has a hidden XOR-period promise yielding an exponential quantum query separation. [Daniel R. Simon](https://doi.org/10.1137/S0097539796298637) [Ethan Bernstein](https://doi.org/10.1137/S0097539796300921)

## One query creates paired branches

Trace registers through oracle and output measurement.

One run of Simon's circuit prepares a superposition over inputs, evaluates \(f\) into an output register, and interferes the inputs. Measuring then returns a uniformly random string \(y\) satisfying:

\(y ⋅ s = 0 ( mod 2 )\)[(29.2)](#eq-29-simon-and-hidden-structure-2)

Read that carefully: the measurement tells you one equation that \(s\) obeys, and nothing else directly. But each run is cheap, the equations are independent with good probability, and after roughly \(n − 1\) of them, classical linear algebra pins down \(s\) uniquely. Bernstein–Vazirani put the hidden string into phase and read it in one shot; Simon trades that single-shot elegance for a sampling loop plus a classical solver. The trade is the template.

Phase kickback remains the underlying habit; the oracle writes function structure into amplitudes; even though Simon is usually presented with an explicit output register rather than a \(\lvert-\rangle\) target. The moral generalizes: structure gets encoded in amplitudes, and interference plus measurement exposes constraints on it.

Evidence boundary. Fourier sampling produces bit strings orthogonal to the hidden period over GF(2). [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## Hadamards erase incompatible frequencies

Derive the condition y·s=0.

Evidence boundary. Classical post-processing uses linear algebra over GF(2) and needs enough independent samples. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Daniel R. Simon](https://doi.org/10.1137/S0097539796298637)

\(Bit vectors over GF(2); dot product and XOR explicitly mod 2; matrix rank over GF(2), not real numbers.\)[(29.3)](#eq-29-simon-and-hidden-structure-3)
Notation contract: Bit vectors over GF(2); dot product and XOR explicitly mod 2; matrix rank over GF(2), not real numbers.

## Resource account: rank, not shot count, ends sampling

Collect independent equations over GF(2).

Small-instance query, sample, and classical-solver account
 | Resource | Account | Stopping condition

 | Oracle queries | One per circuit run | Continue until the sampled equation matrix reaches rank `n-1`.
 | Measurements | `n` output bits per run | Discard dependent rows; do not count raw shots as information.
 | Quantum gates | `2n` Hadamards plus one promised oracle implementation per run | Oracle gates remain outside black-box query complexity.
 | Classical work | Incremental GF(2) elimination, polynomial in `n` | Verify the nonzero nullspace vector with fresh oracle pairs.

Simon's problem is a lesson in problem representation. The same function with no promise is a haystack; the promised collision structure turns it into a system of equations waiting to be sampled. When you audit any algorithm in this family, ask:

- What hidden structure is promised, and who guarantees it?

- What does one query produce, concretely?

- What distribution do the measurements sample from?

- What classical processing consumes the samples?

- What does the best classical algorithm do with the same oracle access?

These five questions transfer unchanged to period finding, to hidden-subgroup methods, and to a surprising number of application claims.

## Recover s and verify the promise

Perform binary elimination and an oracle check.

Each measurement supplies y with y dot s=0 over GF(2). Row-reduce until the sample matrix has rank n-1; its nonzero nullspace vector is the candidate s. Rank deficiency means collect another sample, not guess. Even full rank validates only the equations: query the supplied function on test pairs x and x xor s to confirm the collision promise before accepting the recovered mask.

## Simon sampler and GF(2) solver

Acceptance contract for Simon sampler and GF(2) solver
 | Field | Reader-visible record

 | Format | Small-n oracle simulator, sample log, and binary elimination library
 | Verification | Tests every nonzero s for n≤5, validates all sampled orthogonality equations, requires rank n−1, and verifies recovered collisions.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Simon sampler and GF(2) solver",
  "format": "Small-n oracle simulator, sample log, and binary elimination library",
  "acceptance_test": "Tests every nonzero s for n≤5, validates all sampled orthogonality equations, requires rank n−1, and verifies recovered collisions.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import math
import random

def dot2(left, right):
    return (left & right).bit_count() & 1

def promised_oracle(secret):
    return lambda x: min(x, x ^ secret)

def promise_holds(function, secret, input_qubits):
    outputs = {}
    for x in range(1 << input_qubits):
        value = function(x)
        if value in outputs and outputs[value] != (x ^ secret):
            return False
        outputs[value] = x
        if function(x ^ secret) != value:
            return False
    return len(outputs) == 1 << (input_qubits - 1)

def h(state, qubit, count):
    mask = 1 << (count - 1 - qubit)
    output = state[:]
    scale = math.sqrt(0.5)
    for basis in range(len(state)):
        if basis & mask == 0:
            paired = basis | mask
            output[basis] = (state[basis] + state[paired]) * scale
            output[paired] = (state[basis] - state[paired]) * scale
    return output

def simon_distribution(function, input_qubits):
    total = 2 * input_qubits
    state = [0j] * (1 << total)
    state[0] = 1.0
    for qubit in range(input_qubits):
        state = h(state, qubit, total)
    queried = [0j] * len(state)
    output_mask = (1 << input_qubits) - 1
    for basis, amplitude in enumerate(state):
        x = basis >> input_qubits
        output = basis & output_mask
        queried[(x << input_qubits) | (output ^ function(x))] += amplitude
    state = queried
    for qubit in range(input_qubits):
        state = h(state, qubit, total)
    probabilities = [0.0] * (1 << input_qubits)
    for basis, amplitude in enumerate(state):
        probabilities[basis >> input_qubits] += abs(amplitude) ** 2
    return probabilities

def rref(rows, input_qubits):
    reduced = [row for row in rows if row]
    pivots = []
    pivot_row = 0
    for column in range(input_qubits):
        bit = 1 << (input_qubits - 1 - column)
        found = next((index for index in range(pivot_row, len(reduced)) if reduced[index] & bit), None)
        if found is None:
            continue
        reduced[pivot_row], reduced[found] = reduced[found], reduced[pivot_row]
        for index in range(len(reduced)):
            if index != pivot_row and reduced[index] & bit:
                reduced[index] ^= reduced[pivot_row]
        pivots.append(column)
        pivot_row += 1
        if pivot_row == len(reduced):
            break
    return reduced[:pivot_row], pivots

def recover(rows, input_qubits):
    reduced, pivots = rref(rows, input_qubits)
    if len(pivots) != input_qubits - 1:
        raise ValueError("collect samples until GF(2) rank is n-1")
    free_columns = [column for column in range(input_qubits) if column not in pivots]
    if len(free_columns) != 1:
        raise ValueError("expected a one-dimensional nullspace")
    candidate = 1 << (input_qubits - 1 - free_columns[0])
    for row, column in reversed(list(zip(reduced, pivots))):
        pivot_bit = 1 << (input_qubits - 1 - column)
        if dot2(row ^ pivot_bit, candidate):
            candidate |= pivot_bit
    if candidate == 0 or any(dot2(row, candidate) for row in rows):
        raise ValueError("invalid nullspace recovery")
    return candidate

def validate_samples(rows, secret):
    if any(dot2(row, secret) for row in rows):
        raise ValueError("sample violates y dot s = 0")

tested = 0
largest_sample_log = 0
for input_qubits in range(1, 6):
    for secret in range(1, 1 << input_qubits):
        function = promised_oracle(secret)
        assert promise_holds(function, secret, input_qubits)
        probabilities = simon_distribution(function, input_qubits)
        support = [y for y, probability in enumerate(probabilities) if probability > 1e-12]
        expected_support = [y for y in range(1 << input_qubits) if dot2(y, secret) == 0]
        assert support == expected_support
        expected_probability = 1 / (1 << (input_qubits - 1))
        assert all(abs(probabilities[y] - expected_probability) < 1e-12 for y in support)
        assert all(probabilities[y] < 1e-12 for y in range(len(probabilities)) if y not in support)

        rng = random.Random(29000 + 101 * input_qubits + secret)
        rows = []
        while len(rref(rows, input_qubits)[1]) < input_qubits - 1:
            rows.append(rng.choice(support))
            if len(rows) > 200:
                raise AssertionError("seeded sampling failed to reach rank")
        validate_samples(rows, secret)
        recovered = recover(rows, input_qubits)
        assert recovered == secret
        assert all(function(x) == function(x ^ recovered) for x in range(1 << input_qubits))
        largest_sample_log = max(largest_sample_log, len(rows))
        tested += 1

insufficient_rejected = False
try:
    recover([0b0100], 4)
except ValueError:
    insufficient_rejected = True
assert insufficient_rejected

invalid_sample_rejected = False
try:
    validate_samples([0b0001], 0b1011)
except ValueError:
    invalid_sample_rejected = True
assert invalid_sample_rejected

good = promised_oracle(0b1011)
bad = lambda x: 0b1111 if x == 0 else good(x)
assert promise_holds(good, 0b1011, 4)
assert not promise_holds(bad, 0b1011, 4)
bad_probabilities = simon_distribution(bad, 4)
assert any(bad_probabilities[y] > 1e-12 and dot2(y, 0b1011) for y in range(16))
print(f"PASS: 29 Simon recovered={tested} max_samples={largest_sample_log} bad_forbidden_mass={sum(bad_probabilities[y] for y in range(16) if dot2(y, 0b1011)):.6f}")
```

Scope boundary

- This chapter does not claim an advantage without Simon's exact promise or ignore oracle construction.

- It does not substitute one lucky sample for the rank required to recover the hidden string.

Depth commitment. One promise, one quantum state derivation, one sample-rank analysis, and one solver.

Practice problem

For n=4 and hidden s=1010, reduce a supplied sample set over GF(2), identify whether rank is sufficient, and recover/verify s.

```
hidden candidate length n=4
sample rows y: 0100, 0001, 1010
Solve y dot s = 0 over GF(2), exclude s=0000, then verify f(x)=f(x xor s).
```

** Deliverable** : Row-reduction transcript, rank, nullspace vector, and two oracle collision checks.

** Pass condition** : The GF(2) solver reproduces the row operations and rejects any sample not orthogonal to 1010.

Verification record

Expected solution form. Binary Gaussian-elimination solution plus property-based oracle tests.

Model answer. The supplied rows have rank three. Their GF(2) nullspace is {0000,1010}; excluding zero yields s=1010. Every row has y dot s=0, and direct evaluation must still confirm f(x)=f(x xor 1010) on the supplied oracle fixture.

Model result and check. CI checks rank/nullspace, recovered period, and every supplied equation.

Acceptance test. The GF(2) solver reproduces the row operations and rejects any sample not orthogonal to 1010.

External review. Open.

Expertise still needed. Quantum algorithms theorist specializing in hidden-subgroup methods; Coding theory or algebra reviewer experienced with GF(2) elimination.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

algorithm fixture

### [Simon sampler and GF(2) solver](/playground/quantum/book/29-simon-and-hidden-structure/#artifact-29-simon-and-hidden-structure)

[Download fixture (.py)](/playground/quantum/artifacts/29-simon-and-hidden-structure/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/29-simon-and-hidden-structure/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Daniel R. Simon. On the power of quantum computation. SIAM Journal on Computing. 1997](https://doi.org/10.1137/S0097539796298637) primary paper

- [Ethan Bernstein and Umesh Vazirani. Quantum complexity theory. SIAM Journal on Computing. 1997](https://doi.org/10.1137/S0097539796300921) primary paper

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=29-simon-and-hidden-structure#report)

Dependency graph

## Prerequisites for this chapter

- [Deutsch, Deutsch-Jozsa, and Bernstein-Vazirani Part IV. Protocols and Algorithms · Chapter 28](/playground/quantum/book/28-deutsch-deutsch-jozsa-and-bernstein-vazirani/)

- [Tensor Products and State-Space Growth Part II. Mathematical Core · Chapter 13](/playground/quantum/book/13-tensor-products-and-state-space-growth/)

Continue the thread

## Next concepts from this chapter

- [Grover and Amplitude Amplification Part IV. Protocols and Algorithms · Chapter 30](/playground/quantum/book/30-grover-and-amplitude-amplification/)

- [Oracles and Query Complexity Part IV. Protocols and Algorithms · Chapter 27](/playground/quantum/book/27-oracles-and-query-complexity/)

- [Quantum Fourier Transform Part IV. Protocols and Algorithms · Chapter 31](/playground/quantum/book/31-quantum-fourier-transform/)

[Previous Deutsch, Deutsch-Jozsa, and Bernstein-Vazirani](/playground/quantum/book/28-deutsch-deutsch-jozsa-and-bernstein-vazirani/)[Next Grover and Amplitude Amplification](/playground/quantum/book/30-grover-and-amplitude-amplification/)

In this chapter

- [The collision promise](#the-collision-promise)

- [One query creates paired branches](#one-query-creates-paired-branches)

- [Hadamards erase incompatible frequencies](#hadamards-erase-incompatible-frequencies)

- [Resource account: rank, not shot count, ends sampling](#resource-account-rank-not-shot-count-ends-sampling)

- [Recover s and verify the promise](#recover-s-and-verify-the-promise)

- [Simon sampler and GF(2) solver](#simon-sampler-and-gf-2-solver)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=29-simon-and-hidden-structure#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/29-simon-and-hidden-structure/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/30-grover-and-amplitude-amplification/ -->

# Grover and Amplitude Amplification

Grover's algorithm is the most honest speedup in this book: a real, provable quadratic gain for unstructured search, with an iteration count you must tune and an overshoot that punishes greed.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How does amplitude amplification rotate probability toward marked states, and what resource assumptions govern the quadratic gain?

Two reflections rotate the state within the plane spanned by marked and unmarked components by a fixed angle; about \(\frac{\pi}{4}\sqrt{N/M}\) iterations maximize success when M is known, but oracle, state-preparation, verification, and fault-tolerant costs determine end-to-end value.

Scope and non-goals.

- This chapter does not describe Grover as reading every candidate or promise a quadratic wall-clock speedup in every workload.

- It does not ignore unknown solution count, overshooting, or reversible oracle cost.

[Figure 30.1.](#fig-30-grover-and-amplitude-amplification-1) Notice that the curve turns back down: each Grover step rotates the state by a fixed angle, so success climbs to a peak near \(k ∗\) and then falls. Iteration count is a tuned parameter with a genuine optimum, not a dial to crank.

Prerequisites. 27-oracles-and-query-complexity, 17-one-qubit-gates-and-bloch-sphere

Notation used here. N search states, M marked, sin²θ=M/N, iteration k, success sin²((2k+1)θ); oracle query separated from gate cost.

## Compress N amplitudes into a two-dimensional plane

Define marked and unmarked normalized components.

Grover's algorithm searches \(N\) items for \(M\) marked ones, where "marked" means an oracle recognizes a solution. Classically you check items one by one: about \(N / M\) queries. Grover needs only about \(\sqrt{N/M}\); a quadratic speedup, provable and, in the oracle model, provably optimal.

The mechanism is two reflections that compose into one rotation. First, the oracle marks solutions by flipping their phase. Second, the diffusion operator reflects every amplitude about the mean. In the two-dimensional plane spanned by "the marked direction" and "the uniform unmarked direction," those two reflections add up to a rotation by a small fixed angle. Each iteration turns the state a little closer to the marked state; and, crucially, keeps turning past it if you let it. The right number of iterations is approximately:

\(k\approx\left\lfloor\frac\pi4\sqrt{N/M}\right\rfloor\)[(30.1)](#eq-30-grover-and-amplitude-amplification-1)

Too few iterations under-amplify. Too many overshoot and hand you a wrong answer with confidence.

Evidence boundary. Grover search uses amplitude amplification to achieve \(O(\sqrt{N/M})\) oracle queries for M marked items. [Lov K. Grover](https://doi.org/10.1145/237814.237866) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## The oracle reflects marked phase

Show the first geometric operation.

The marking oracle acts as I-2 Pi_good, negating the good subspace and leaving its magnitude unchanged. This reflection is useful only relative to a prepared starting state and a second reflection. Counting it as a unit-cost query is a black-box abstraction; compiling a real predicate must include its reversible arithmetic, ancillas, and uncomputation.

Evidence boundary. Amplitude amplification is a rotation produced by two reflections in a two-dimensional invariant subspace. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## Diffusion reflects about the prepared state

Derive the second operation.

The oracle uses the same phase-kickback discipline as the previous chapters:

\(U_f\lvert x\rangle\lvert-\rangle=(-1)^{f(x)}\lvert x\rangle\lvert-\rangle\)[(30.2)](#eq-30-grover-and-amplitude-amplification-2)

A marked \(x\) gets a minus sign; everything else is untouched. Diffusion then maps each amplitude \(a\) to \(2 mean − a\), which is reflection about the average. Neither step alone does anything impressive; a sign flip is unmeasurable, and reflection about the mean without the flip is the identity. Alternated, they rotate.

The iteration formula above is an estimate derived from that geometry, not a license to run the loop forever. If \(M\) is unknown, practical variants estimate it or use randomized schedules; the core point stands: amplitude amplification has a clock, and the algorithm must know when to stop.

Evidence boundary. Query improvement does not automatically include oracle construction, state preparation, verification, or hardware overhead. [Ethan Bernstein](https://doi.org/10.1137/S0097539796300921) [National Academies of Sciences](https://doi.org/10.17226/25196)

\(\sin^2\theta=M/N,\qquad P_k=\sin^2((2k+1)\theta)\)[(30.3)](#eq-30-grover-and-amplitude-amplification-3)
Notation contract: N search states, M marked, sin²θ=M/N, iteration k, success sin²((2k+1)θ); oracle query separated from gate cost.

## Four items complete one exact rotation

Calculate every amplitude with one marked item.

With one marked item among four, sin(theta)=1/2 and theta=pi/6. The uniform state starts at angle theta from the bad axis. One Grover iterate rotates by 2theta, reaching 3theta=pi/2 and success probability one. The statevector fixture exposes both reflections so the exact result cannot be mistaken for generic monotonic amplification.

## Stop before the probability turns back

Relate angle, M, and iteration count.

Grover is a reusable subroutine pattern:

- prepare a uniform superposition over candidates;

- mark good states by phase;

- reflect about the starting state (diffusion);

- repeat a tuned number of times;

- measure;

- verify the candidate classically.

The last step is easy to forget and essential: the algorithm returns a candidate with high probability, not a certificate. Amplitude amplification generalizes beyond search; it boosts any subroutine that produces a good outcome with known probability; which is why it shows up inside counting, optimization, and Monte Carlo speedups.

In code, treat oracle and diffusion as separately testable components. First verify the oracle flips the marked branch and leaves the rest unchanged. Then verify diffusion implements the reflection. Finally, sweep the iteration count and confirm the curve rises and falls as predicted. That sweep catches the most common Grover bug: a circuit that performs the sign flip but never actually amplifies.

## Price preparation, oracle, and verification

Build the end-to-end quadratic-gain condition.

The O(sqrt(N/M)) query count excludes constructing the searchable superposition, implementing the predicate, routing its gates, repeating after failure, and checking a candidate. If preparation or verification costs Theta(N), the composed workflow remains linear. Resource estimates must also address unknown M, because over-rotation can reduce success after the optimum.

## Amplitude-amplification explorer

Acceptance contract for Amplitude-amplification explorer
 | Field | Reader-visible record

 | Format | Exact/numerical simulator with iteration curve and resource calculator
 | Verification | Tests N=4 exact amplitudes, general sin²((2k+1)θ) probabilities, overshoot, and break-even under supplied cost functions.
 | Availability | Published companion and deterministic command

[Two-qubit Grover trace](/playground/quantum/labs/#grover-trace) is the executable companion used by this page.

```
cd labs && python -m unittest tests.test_companion_models.CompanionModelTests.test_one_grover_iteration_finds_one_of_four -v
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
def grover4(marked, apply_oracle=True):
    if marked not in range(4) or type(apply_oracle) is not bool:
        raise ValueError("marked must be a four-item index")
    amplitudes = [0.5] * 4
    if apply_oracle:
        amplitudes[marked] *= -1
    mean = sum(amplitudes) / 4
    result = [2 * mean - amplitude for amplitude in amplitudes]
    return {"amplitudes": result, "success": result[marked] ** 2,
            "normalized": abs(sum(value * value for value in result) - 1.0) < 1e-12}

marked_two = grover4(2)
marked_zero = grover4(0)
missing_oracle = grover4(2, False)
invalid_rejected = False
try:
    grover4(4)
except ValueError:
    invalid_rejected = True
assert marked_two["normalized"] and marked_two["success"] == 1.0
assert marked_zero["amplitudes"] == [1.0, 0.0, 0.0, 0.0]
assert missing_oracle["success"] == 0.25 and invalid_rejected
print(f"PASS: 30 Grover marked2={marked_two['success']:.2f} marked0={marked_zero['success']:.2f} no_oracle={missing_oracle['success']:.2f}")
```

Scope boundary

- This chapter does not describe Grover as reading every candidate or promise a quadratic wall-clock speedup in every workload.

- It does not ignore unknown solution count, overshooting, or reversible oracle cost.

Depth commitment. One two-plane proof, one N=4 trace, one N=8 table, and one cost calculator.

Practice problem

For N=8 and M=2, derive θ, compute success probability for k=0,1,2,3, and choose the best integer iteration.

** Deliverable** : Angle derivation, probability table, circuit iteration count, and overshoot explanation.

** Pass condition** : The explorer evaluates the analytic formula and statevector simulation and requires agreement for every k.

Verification record

Expected solution form. Geometric derivation plus statevector and formula comparison.

Model answer. sin^2(theta)=M/N=1/4, so theta=pi/6. The success probabilities sin^2((2k+1)theta) for k=0,1,2,3 are 1/4, 1, 1/4, and 1/4; one iteration is the unique best choice in this range.

Model result and check. CI checks exact/float probabilities and the selected maximum.

Acceptance test. The explorer evaluates the analytic formula and statevector simulation and requires agreement for every k.

External review. Open.

Expertise still needed. Quantum algorithms theorist specializing in amplitude amplification; Performance modeler able to review oracle and verification cost boundaries.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

source code

### [Amplitude-amplification explorer](/playground/quantum/labs/#grover-trace)

[Download fixture (.py)](/playground/quantum/artifacts/30-grover-and-amplitude-amplification/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/30-grover-and-amplitude-amplification/artifact.json)

Reproduce or test
`cd labs && python -m unittest tests.test_companion_models.CompanionModelTests.test_one_grover_iteration_finds_one_of_four -v`

Provenance

## Sources and review

- [Lov K. Grover. A fast quantum mechanical algorithm for database search. Proceedings of STOC. 1996](https://doi.org/10.1145/237814.237866) primary paper

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [Ethan Bernstein and Umesh Vazirani. Quantum complexity theory. SIAM Journal on Computing. 1997](https://doi.org/10.1137/S0097539796300921) primary paper

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=30-grover-and-amplitude-amplification#report)

Dependency graph

## Prerequisites for this chapter

- [Oracles and Query Complexity Part IV. Protocols and Algorithms · Chapter 27](/playground/quantum/book/27-oracles-and-query-complexity/)

- [One-Qubit Gates and the Bloch Sphere Part III. Circuit Model · Chapter 17](/playground/quantum/book/17-one-qubit-gates-and-bloch-sphere/)

Continue the thread

## Next concepts from this chapter

- [Optimization: Where Caution Is Required Part VIII. Applications and Strategy · Chapter 67](/playground/quantum/book/67-optimization-where-caution-is-required/)

- [Full-Stack Algorithm Trace Part X. Capstones · Chapter 83](/playground/quantum/book/83-full-stack-algorithm-trace/)

- [Simon and Hidden Structure Part IV. Protocols and Algorithms · Chapter 29](/playground/quantum/book/29-simon-and-hidden-structure/)

[Previous Simon and Hidden Structure](/playground/quantum/book/29-simon-and-hidden-structure/)[Next Quantum Fourier Transform](/playground/quantum/book/31-quantum-fourier-transform/)

In this chapter

- [Compress N amplitudes into a two-dimensional plane](#compress-n-amplitudes-into-a-two-dimensional-plane)

- [The oracle reflects marked phase](#the-oracle-reflects-marked-phase)

- [Diffusion reflects about the prepared state](#diffusion-reflects-about-the-prepared-state)

- [Four items complete one exact rotation](#four-items-complete-one-exact-rotation)

- [Stop before the probability turns back](#stop-before-the-probability-turns-back)

- [Price preparation, oracle, and verification](#price-preparation-oracle-and-verification)

- [Amplitude-amplification explorer](#amplitude-amplification-explorer)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 6 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=30-grover-and-amplitude-amplification#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/30-grover-and-amplitude-amplification/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/31-quantum-fourier-transform/ -->

# Quantum Fourier Transform

The quantum Fourier transform never appears in a headline and appears inside nearly every serious algorithm: it is the basis change that turns hidden periodicity into bits you can measure.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. What transformation does the quantum Fourier transform perform, and what information can its circuit make observable?

The QFT maps computational-basis amplitudes to discrete Fourier components with phase-encoded output, implemented by Hadamards, controlled rotations, and bit reversal; it is valuable as a subroutine when structured phases are later sampled, not as a way to read an exponentially long Fourier vector.

Scope and non-goals.

- This chapter does not claim the QFT alone solves a problem or outputs all transform coefficients.

- It does not hide approximation error, qubit-order reversal, or controlled-rotation cost.

[Figure 31.1.](#fig-31-quantum-fourier-transform-1) Notice how little machinery the transform needs; one Hadamard per qubit plus controlled phases between them. The circuit is the easy part; what matters is what it decodes: periodic phase structure written by an earlier subroutine.

Prerequisites. 08-complex-numbers-for-quantum-computing, 19-multi-qubit-circuits

Notation used here. \(\operatorname{QFT}_N\lvert x\rangle=N^{-1/2}\sum_y e^{2\pi ixy/N}\lvert y\rangle\); \(N=2^n\); bit order and sign convention declared; R_k angle defined.

## The DFT written as a unitary

Define the matrix, normalization, and basis action.

The quantum Fourier transform maps computational-basis states to Fourier-basis states; superpositions whose amplitudes step through regular phase progressions. Applied to a state with no periodic structure, it gives you nothing you wanted. Applied to a state whose phases encode a period, the inverse QFT concentrates that information into measurement outcomes you can read.

That is why the QFT appears inside phase estimation and period finding rather than on its own poster. Those algorithms arrange for the answer to live in phases; the QFT is the reader. Understanding it as a basis change; the same conceptual move as the Hadamard, one chapter-sized step further; keeps both halves of that sentence in view.

Evidence boundary. The QFT is the unitary discrete Fourier transform over computational basis states. [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/)

## Binary fractions factor the output state

Derive the product form for a basis input.

For an n-bit input x, QFT|x> can be written as a tensor product of single-qubit phase states whose angles are binary fractions 0.x_j x_{j+1}... . Circuit order reverses those factors, which is why diagrams either end with SWAPs or declare reversed output order. A two-qubit hand trace should reconcile matrix indices, wire order, and that swap convention.

Evidence boundary. Its circuit decomposes into Hadamards, controlled phase rotations, and output-order reversal. [John Preskill](https://www.preskill.caltech.edu/ph219/) [Don Coppersmith](https://arxiv.org/abs/quant-ph/0201067)

## Two qubits expose every phase

Calculate the four-by-four transform and circuit.

On an \(n\) -qubit register with \(N=2^n\), the definition is:

\(\operatorname{QFT}_N\lvert x\rangle=\frac1{\sqrt N}\sum_{y=0}^{N-1}e^{2\pi ixy/N}\lvert y\rangle\)[(31.1)](#eq-31-quantum-fourier-transform-1)

Each input basis state spreads over all output basis states with equal magnitude, distinguished only by phase. For two qubits, \(N = 4\), and the phases step through the fourth roots of unity:

\(1 , i , − 1 , − i\)[(31.2)](#eq-31-quantum-fourier-transform-2)

Different inputs produce different phase progressions, and those progressions are mutually orthogonal; which is why the transform is unitary, reversible, and implementable as a circuit of one Hadamard per qubit plus controlled phase gates. The circuit is a corollary of the definition, not the definition.

Evidence boundary. Approximate QFT can omit small rotations with a quantifiable accuracy/cost tradeoff. [Don Coppersmith](https://arxiv.org/abs/quant-ph/0201067) [Peter W. Shor](https://doi.org/10.1137/S0097539795293172)

\(\operatorname{QFT}_N\lvert x\rangle=\frac1{\sqrt N}\sum_{y=0}^{N-1}e^{2\pi ixy/N}\lvert y\rangle,\qquad N=2^n\)[(31.3)](#eq-31-quantum-fourier-transform-3)
Notation contract: \(\operatorname{QFT}_N\lvert x\rangle=N^{-1/2}\sum_y e^{2\pi ixy/N}\lvert y\rangle\); \(N=2^n\); bit order and sign convention declared; R_k angle defined.

## Resource account: controlled rotations build precision

Map phase angles to gate sequence.

Exact and truncated QFT gate ledger
 | Resource | Exact `n` -qubit QFT | Truncated account

 | Hadamards | `n` | `n`
 | Controlled rotations | `n(n-1)/2` | Keep only angles above the declared cutoff; report the retained count.
 | Output swaps | `floor(n/2)` or zero under reversed output convention | Same convention must be used by the verifier.
 | Depth and synthesis | Architecture-dependent after routing and gate synthesis | Report depth together with the approximation metric; omission count alone is insufficient.

Hadamards create each output phase reference; controlled R_k rotations add successively smaller binary-fraction contributions. The exact circuit uses n Hadamards and n(n-1)/2 controlled rotations, plus optional output swaps. This O(n^2) gate account describes preparing Fourier amplitudes, not reading all Fourier coefficients, which measurement cannot do.

## Swaps reconcile mathematical and wire order

Make bit reversal explicit.

The QFT is the quantum cousin of the discrete Fourier transform from signal processing, with one decisive difference: you cannot read the coefficients. A classical DFT hands you the whole spectrum; the QFT holds it in amplitudes, and measurement returns samples. Algorithm design is the art of arranging for the coefficient you want to carry most of the probability before you measure.

The implementation checklist for any QFT-based workflow:

- choose the register size; it sets both resolution and circuit depth;

- prepare the phase-structured input state;

- apply the QFT or its inverse;

- measure;

- interpret the sampled bit string classically.

Precision and sample distributions matter even for clean, noise-free algorithms. A QFT on paper is exact; a QFT in a workflow is a statistical component.

## Approximate QFT drops small angles

State an error/cost trade rather than a slogan.

Omitting rotations below an angle threshold shortens depth while perturbing the output state. The approximation must be tied to a norm or downstream success bound and the hardware's native precision; saying a rotation is small is not an error analysis. On noisy devices, an omitted gate can improve observed performance even as ideal algorithmic error rises, so report both contributions.

## QFT conformance suite

Acceptance contract for QFT conformance suite
 | Field | Reader-visible record

 | Format | Parameterized circuit generator, dense-matrix oracle, and approximation comparison
 | Verification | Tests n≤6 circuit/matrix equivalence up to declared bit order, inverse round-trip, and approximation error versus omitted rotations.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "QFT conformance suite",
  "format": "Parameterized circuit generator, dense-matrix oracle, and approximation comparison",
  "acceptance_test": "Tests n≤6 circuit/matrix equivalence up to declared bit order, inverse round-trip, and approximation error versus omitted rotations.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import cmath

def qft_matrix(size, normalized=True):
    if type(size) is not int or size < 2 or size & (size - 1):
        raise ValueError("QFT fixture requires a power-of-two size")
    scale = size ** 0.5 if normalized else 1.0
    return [[cmath.exp(2j * cmath.pi * row * column / size) / scale
             for column in range(size)] for row in range(size)]

def unitarity_error(matrix):
    size = len(matrix)
    return max(abs(sum(matrix[row][a].conjugate() * matrix[row][b] for row in range(size))
                   - (1.0 if a == b else 0.0))
               for a in range(size) for b in range(size))

four_point = qft_matrix(4)
eight_point = qft_matrix(8)
unnormalized = qft_matrix(4, False)
four_error = unitarity_error(four_point)
eight_error = unitarity_error(eight_point)
mutant_error = unitarity_error(unnormalized)
invalid_rejected = False
try:
    qft_matrix(6)
except ValueError:
    invalid_rejected = True
assert four_error < 1e-12 and eight_error < 1e-12
assert mutant_error > 1.0 and invalid_rejected
print(f"PASS: 31 QFT unitary_error_N4={four_error:.3g} N8={eight_error:.3g} unnormalized_error={mutant_error:.1f}")
```

Scope boundary

- This chapter does not claim the QFT alone solves a problem or outputs all transform coefficients.

- It does not hide approximation error, qubit-order reversal, or controlled-rotation cost.

Depth commitment. One unitary definition, one product factorization, one two-qubit trace, and one approximation test.

Practice problem

Compute QFT|01> for two qubits by matrix and circuit, including the final swap convention, then apply inverse QFT.

** Deliverable** : Two derivations, phase-labeled output vector, ordering statement, and round-trip result.

** Pass condition** : The conformance suite compares matrix/circuit states up to global phase and recovers |01>.

Verification record

Expected solution form. Dense-matrix calculation beside a gate trace and automated diff.

Model answer. With basis order 00,01,10,11, QFT|01>=(|00>+i|01>-|10>-i|11>)/2. The standard two-qubit circuit produces the same labeled amplitudes once its final swap convention is applied; inverse QFT returns |01>.

Model result and check. CI executes both conventions and verifies the student's declared one.

Acceptance test. The conformance suite compares matrix/circuit states up to global phase and recovers |01>.

External review. Open.

Expertise still needed. Quantum algorithms theorist specializing in Fourier methods; Quantum compiler reviewer able to assess QFT ordering and approximate decompositions.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

algorithm fixture

### [QFT conformance suite](/playground/quantum/book/31-quantum-fourier-transform/#artifact-31-quantum-fourier-transform)

[Download fixture (.py)](/playground/quantum/artifacts/31-quantum-fourier-transform/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/31-quantum-fourier-transform/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [Don Coppersmith. An approximate Fourier transform useful in quantum factoring. IBM Research report / arXiv. 2002](https://arxiv.org/abs/quant-ph/0201067) primary paper

- [Peter W. Shor. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Journal on Computing. 1997](https://doi.org/10.1137/S0097539795293172) primary paper

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=31-quantum-fourier-transform#report)

Dependency graph

## Prerequisites for this chapter

- [Complex Numbers for Quantum Computing Part II. Mathematical Core · Chapter 8](/playground/quantum/book/08-complex-numbers-for-quantum-computing/)

- [Multi-Qubit Circuits Part III. Circuit Model · Chapter 19](/playground/quantum/book/19-multi-qubit-circuits/)

Continue the thread

## Next concepts from this chapter

- [Phase Estimation Part IV. Protocols and Algorithms · Chapter 32](/playground/quantum/book/32-phase-estimation/)

- [Grover and Amplitude Amplification Part IV. Protocols and Algorithms · Chapter 30](/playground/quantum/book/30-grover-and-amplitude-amplification/)

- [Simon and Hidden Structure Part IV. Protocols and Algorithms · Chapter 29](/playground/quantum/book/29-simon-and-hidden-structure/)

[Previous Grover and Amplitude Amplification](/playground/quantum/book/30-grover-and-amplitude-amplification/)[Next Phase Estimation](/playground/quantum/book/32-phase-estimation/)

In this chapter

- [The DFT written as a unitary](#the-dft-written-as-a-unitary)

- [Binary fractions factor the output state](#binary-fractions-factor-the-output-state)

- [Two qubits expose every phase](#two-qubits-expose-every-phase)

- [Resource account: controlled rotations build precision](#resource-account-controlled-rotations-build-precision)

- [Swaps reconcile mathematical and wire order](#swaps-reconcile-mathematical-and-wire-order)

- [Approximate QFT drops small angles](#approximate-qft-drops-small-angles)

- [QFT conformance suite](#qft-conformance-suite)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=31-quantum-fourier-transform#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/31-quantum-fourier-transform/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/32-phase-estimation/ -->

# Phase Estimation

Phase estimation turns "this unitary has structure" into a number: it reads eigenphases at a precision you choose and pay for, one counting qubit at a time.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How does quantum phase estimation convert an eigenphase into a bit string, and what controls its precision and success probability?

Controlled powers of a unitary accumulate binary-weighted phase on a counting register, and an inverse QFT converts that phase pattern into a sampled estimate; counting-register width, input eigenstate overlap, controlled-U cost, and approximation determine the useful precision.

Scope and non-goals.

- Eigenstate preparation and controlled powers remain explicit resource costs.

- A t-bit register yields a distribution whose accuracy depends on the phase and success criterion, rather than t guaranteed correct bits.

[Figure 32.1.](#fig-32-phase-estimation-1) Notice the two registers doing different jobs: the counting register only records phase, while the eigenstate register powers every controlled operation. That is why the cost of U; not the inverse QFT; usually dominates the budget.

Prerequisites. 31-quantum-fourier-transform, 27-oracles-and-query-complexity

Notation used here. φ∈[0,1); U|u>=e^{2πiφ}|u>; t counting qubits; bit significance and inverse-QFT convention declared.

## The eigenphase contract

Specify U|u>=e^{2πiφ}|u> and input overlap.

Every unitary has eigenstates that it leaves alone except for a phase:

\(U\lvert\psi\rangle=e^{2\pi i\theta}\lvert\psi\rangle\)[(32.1)](#eq-32-phase-estimation-1)

Phase estimation is the algorithm that measures \(\theta\). Prepare the eigenstate on one register, put \(m\) counting qubits into superposition on another, apply controlled powers of \(U\) —\(U\), \(U^2\), \(U^4\), and so on, each controlled by one counting qubit—and finish with the inverse QFT. The counting register then holds an \(m\) -bit estimate of \(\theta\), readable by an ordinary measurement.

This single subroutine is the engine room of the algorithms that made the field famous. Factoring, discrete logarithms, quantum chemistry energies, linear-systems solvers; all can be reframed as "learn a phase of a structured unitary." Learn to read a phase-estimation circuit and you can read most of the heavyweight algorithm literature.

Evidence boundary. Phase estimation estimates an eigenvalue phase using controlled powers and inverse QFT. Kitaev's Abelian stabilizer formulation is a primary source for the phase-estimation method; the textbook and lecture notes provide later systematic treatments. [A. Yu. Kitaev](https://arxiv.org/abs/quant-ph/9511026) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) [John Preskill](https://www.preskill.caltech.edu/ph219/)

## Binary-weighted powers write a phase gradient

Trace each counting qubit after controlled U^{2^j}.

If U|psi>=exp(2 pi i phi)|psi>, controlled powers U^(2^j) write phases exp(2 pi i 2^j phi) on the control register. The inverse QFT converts that gradient into an m-bit estimate. Counting m controlled operations can conceal exponential evolution time: expanded base-U use totals 2^m-1 applications.

Evidence boundary. Finite counting-register width produces a probability distribution whose concentration depends on phase representability and precision. [John Watrous](https://cs.uwaterloo.ca/~watrous/TQI/) [Don Coppersmith](https://arxiv.org/abs/quant-ph/0201067)

## Inverse QFT decodes the exact-grid case

Derive a deterministic representable phase.

The counting register sets the resolution:

\(\text{resolution}\approx2^{-m}\)[(32.2)](#eq-32-phase-estimation-2)

Each additional counting qubit doubles the resolution; and demands controlled applications of ever-higher powers of \(U\). The inverse QFT that gets all the attention is, by comparison, a modest tail of Hadamards and controlled phase gates:

\(\operatorname{QFT}_N\lvert x\rangle=\frac1{\sqrt N}\sum_{y=0}^{N-1}e^{2\pi ixy/N}\lvert y\rangle\)[(32.3)](#eq-32-phase-estimation-3)

The accounting is the lesson: how many counting qubits do you need? is simultaneously a question about the precision your application requires and about the deepest, most expensive part of the circuit. Precision is not a footnote to phase estimation. It is the budget.

Evidence boundary. Resource cost depends on controlled powers of U and eigenstate preparation, not only counting qubits. [Peter W. Shor](https://doi.org/10.1137/S0097539795293172) [National Academies of Sciences](https://doi.org/10.17226/25196)

\(\phi\in[0,1),\qquad U\lvert u\rangle=e^{2\pi i\phi}\lvert u\rangle\)[(32.4)](#eq-32-phase-estimation-4)
Notation contract: φ∈[0,1); U|u>=e^{2πiφ}|u>; t counting qubits; bit significance and inverse-QFT convention declared.

## Off-grid phases spread probability

Calculate the nearest estimates and success mass.

When 2^m phi is not an integer, the inverse-QFT amplitudes form a Dirichlet-kernel distribution rather than a single basis state. The nearest integer is most likely, but success within a requested error needs enough precision bits and repetitions. Report the complete distribution or a confidence bound; a rounded binary string alone hides the algorithm's probabilistic contract.

## Resource account: precision carries a controlled-evolution bill

Account for qubits, maximum power, synthesis, and repetitions.

Phase-estimation precision bill for `m` counting qubits
 | Resource | Required account

 | Counting qubits | `m`, giving grid spacing `2^-m` before confidence padding.
 | Controlled evolutions | Powers `U, U^2, ..., U^(2^(m-1))`; expanded base-`U` use totals `2^m-1`.
 | Inverse QFT | `m` Hadamards and `m(m-1)/2` controlled rotations before approximation.
 | Repetitions | Chosen from the required success interval for off-grid phases and input eigenstate overlap.
 | State preparation | Separate gate/depth/success budget; never charge it implicitly to the phase register.

Phase estimation is a subroutine with a sharp interface:

- Input: an eigenstate of \(U\), or a state with useful overlap on one;

- Operation: controlled powers of \(U\), up to \(2^m-1\);

- Register: \(m\) counting qubits;

- Transform: inverse QFT;

- Output: a sampled \(m\) -bit phase estimate;

- Post-processing: interpret the bits, with a confidence statement.

The interface is only as useful as its feasibility conditions. Textbook diagrams assume the input is an eigenstate. Real workflows often prepare a superposition of eigenstates, so the measurement samples from several phases at once; still useful, but the output is evidence with probabilities attached, and the state-preparation cost belongs in the budget next to the controlled unitaries.

## Eigenstate preparation is a separate algorithm

Expose overlap and postselection consequences.

Phase estimation preserves an eigenstate and reports its phase only when that eigenstate is supplied. A superposition of eigenstates produces the corresponding mixture of phase estimates and projects onto one component. Preparing appreciable overlap with the desired eigenstate can dominate chemistry or simulation workflows, so it belongs as its own resource and success assumption.

## Phase-estimation precision workbench

Acceptance contract for Phase-estimation precision workbench
 | Field | Reader-visible record

 | Format | Statevector simulator with exact/off-grid cases and controlled-power ledger
 | Verification | Tests exactly representable phases, off-grid distributions, inverse-QFT ordering, precision scaling, and explicit controlled-U call counts.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Phase-estimation precision workbench",
  "format": "Statevector simulator with exact/off-grid cases and controlled-power ledger",
  "acceptance_test": "Tests exactly representable phases, off-grid distributions, inverse-QFT ordering, precision scaling, and explicit controlled-U call counts.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import cmath

def phase_distribution(bits, theta):
    if type(bits) is not int or bits < 1 or not 0.0 <= theta < 1.0:
        raise ValueError("bits must be positive and phase must be in [0, 1)")
    size = 2 ** bits
    probabilities = []
    for outcome in range(size):
        amplitude = sum(cmath.exp(2j * cmath.pi * k * (theta - outcome / size))
                        for k in range(size)) / size
        probabilities.append(abs(amplitude) ** 2)
    return probabilities

def estimate(bits, theta):
    probabilities = phase_distribution(bits, theta)
    peak = max(range(len(probabilities)), key=probabilities.__getitem__)
    return {"bits": bits, "peak": peak, "phase": peak / (2 ** bits),
            "peak_probability": probabilities[peak], "mass": sum(probabilities)}

exact = estimate(3, 3 / 8)
coarse = estimate(3, 1 / 3)
fine = estimate(5, 1 / 3)
invalid_rejected = False
try:
    estimate(3, 1.0)
except ValueError:
    invalid_rejected = True
assert exact["peak"] == 3 and abs(exact["mass"] - 1.0) < 1e-12
assert abs(fine["phase"] - 1 / 3) < abs(coarse["phase"] - 1 / 3)
assert invalid_rejected and exact["peak_probability"] > 1.0 - 1e-12
print(f"PASS: 32 phase estimation exact={exact['peak']:03b} coarse_error={abs(coarse['phase']-1/3):.6f} fine_error={abs(fine['phase']-1/3):.6f}")
```

Scope boundary

- Eigenstate preparation and controlled powers remain explicit resource costs.

- A t-bit register yields a distribution whose accuracy depends on the phase and success criterion, rather than t guaranteed correct bits.

Depth commitment. One exact derivation, one off-grid case, one overlap boundary, and one resource ledger.

Practice problem

Run three-bit phase estimation for φ=3/8 and φ=0.3; derive the first output exactly and compare the second with simulated probabilities.

** Deliverable** : Controlled-phase states, inverse-QFT result, probability table, and controlled-U ledger.

** Pass condition** : The workbench asserts output 011 for 3/8 under the declared bit order and reproduces the off-grid distribution.

Verification record

Expected solution form. Exact-grid derivation plus off-grid numerical report.

Model answer. For three bits and phi=3/8, phase estimation returns 011 with probability one. For phi=0.3, the distribution follows the squared Dirichlet-kernel amplitudes and peaks at y=2 (phase 0.25), with y=3 next. The largest controlled power is U^4; powers 1,2,4 represent seven base-U applications if expanded.

Model result and check. CI compares analytic and simulated probabilities and recomputes maximum power/query cost.

Acceptance test. The workbench asserts output 011 for 3/8 under the declared bit order and reproduces the off-grid distribution.

External review. Open.

Expertise still needed. Quantum algorithms theorist specializing in phase estimation; Numerical quantum simulation reviewer able to verify precision distributions and bit ordering.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

algorithm fixture

### [Phase-estimation precision workbench](/playground/quantum/book/32-phase-estimation/#artifact-32-phase-estimation)

[Download fixture (.py)](/playground/quantum/artifacts/32-phase-estimation/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/32-phase-estimation/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [A. Yu. Kitaev. Quantum measurements and the Abelian Stabilizer Problem. arXiv. 1995](https://arxiv.org/abs/quant-ph/9511026) primary preprint

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [Don Coppersmith. An approximate Fourier transform useful in quantum factoring. IBM Research report / arXiv. 2002](https://arxiv.org/abs/quant-ph/0201067) primary paper

- [Peter W. Shor. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Journal on Computing. 1997](https://doi.org/10.1137/S0097539795293172) primary paper

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=32-phase-estimation#report)

Dependency graph

## Prerequisites for this chapter

- [Quantum Fourier Transform Part IV. Protocols and Algorithms · Chapter 31](/playground/quantum/book/31-quantum-fourier-transform/)

- [Oracles and Query Complexity Part IV. Protocols and Algorithms · Chapter 27](/playground/quantum/book/27-oracles-and-query-complexity/)

Continue the thread

## Next concepts from this chapter

- [Shor as Period Finding Part IV. Protocols and Algorithms · Chapter 33](/playground/quantum/book/33-shor-as-period-finding/)

- [Grover and Amplitude Amplification Part IV. Protocols and Algorithms · Chapter 30](/playground/quantum/book/30-grover-and-amplitude-amplification/)

- [Hamiltonian Simulation Part IV. Protocols and Algorithms · Chapter 34](/playground/quantum/book/34-hamiltonian-simulation/)

[Previous Quantum Fourier Transform](/playground/quantum/book/31-quantum-fourier-transform/)[Next Shor as Period Finding](/playground/quantum/book/33-shor-as-period-finding/)

In this chapter

- [The eigenphase contract](#the-eigenphase-contract)

- [Binary-weighted powers write a phase gradient](#binary-weighted-powers-write-a-phase-gradient)

- [Inverse QFT decodes the exact-grid case](#inverse-qft-decodes-the-exact-grid-case)

- [Off-grid phases spread probability](#off-grid-phases-spread-probability)

- [Resource account: precision carries a controlled-evolution bill](#resource-account-precision-carries-a-controlled-evolution-bill)

- [Eigenstate preparation is a separate algorithm](#eigenstate-preparation-is-a-separate-algorithm)

- [Phase-estimation precision workbench](#phase-estimation-precision-workbench)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 7 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=32-phase-estimation#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/32-phase-estimation/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/33-shor-as-period-finding/ -->

# Shor as Period Finding

Shor's algorithm factors numbers by finding a period, and holding that one reduction clearly in mind tells you both why the algorithm matters and why it is so hard to build.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. How does Shor's algorithm reduce factoring to period finding, and where does the quantum speedup enter?

Classical preprocessing chooses a coprime base, quantum phase estimation/Fourier sampling estimates the period of modular exponentiation, and continued fractions plus gcd calculations recover factors when number-theoretic conditions succeed; the quantum advantage is in period finding, with substantial reversible arithmetic and fault-tolerant cost.

Scope and non-goals.

- This chapter does not imply every base succeeds, that the quantum circuit outputs factors directly, or that textbook query complexity equals a near-term runtime.

- It does not make current cryptographic migration estimates without dated resource assumptions.

[Figure 33.1.](#fig-33-shor-as-period-finding-1) Notice how small the quantum region is: a single period-finding subroutine, with classical number theory before and after; and a retry loop, because some runs return a period you cannot use.

Prerequisites. 32-phase-estimation, 02-classical-information-gates-circuits-reversibility

Notation used here. N composite; a coprime base; order r; modular exponentiation U_a|x>=|ax mod N>; fractions k/r; bit precision declared.

## Factoring becomes an order-finding task

Derive why an even period can expose nontrivial gcds.

Peter Shor published his factoring algorithm in 1994, and the first thing to understand about it is that the quantum computer never factors anything. The algorithm reduces factoring to a different problem: given an integer \(N\) and a randomly chosen \(a\), find the period of modular exponentiation; the smallest \(r\) such that

\(a^r\bmod N=1\)[(33.1)](#eq-33-shor-as-period-finding-1)

If \(r\) is even and \(a^{r/2}\) is not congruent to \(− 1\) mod \(N\), then \(\gcd(a^{r/2}-1,N)\) and \(\gcd(a^{r/2}+1,N)\) reveal nontrivial factors. That reduction is classical number theory. The quantum contribution is finding \(r\) efficiently, and there is no known classical method that keeps up.

Evidence boundary. Shor's algorithm factors integers in polynomial time by reducing factoring to quantum order finding. [Peter W. Shor](https://doi.org/10.1137/S0097539795293172) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## N=15 shows every classical branch

Choose a=2, compute powers, and recover factors from r=4.

For N=15 and a=2, modular powers 1,2,4,8 repeat after r=4. Because r is even and 2^(r/2)=4 is not -1 modulo 15, gcd(4-1,15)=3 and gcd(4+1,15)=5. A complete trace also records easy failures: a shares a factor with N, the recovered period is odd, or the half-period power is -1.

Evidence boundary. Quantum Fourier sampling/phase estimation estimates rational phases related to the order. [Peter W. Shor](https://doi.org/10.1137/S0097539795293172) [Don Coppersmith](https://arxiv.org/abs/quant-ph/0201067)

## Modular exponentiation is the quantum workload

Specify the reversible unitary and its register costs.

The full algorithm is a pipeline with exactly one quantum stage:

- Choose a random \(a\) less than \(N\).

- Compute \(gcd ( a , N )\) classically; if it exceeds 1, you already have a factor and can stop.

- Estimate the period \(r\) of \(a x mod N\) using quantum phase estimation on the modular-exponentiation unitary.

- Use classical continued fractions to convert the phase estimate into a candidate \(r\).

- Compute the candidate factors with \(gcd\) and verify them; if the period was odd or unhelpful, retry with a new \(a\).

The precision question from the previous chapter is now a security-relevant number:

\(\text{resolution}\approx2^{-m}\)[(33.2)](#eq-33-shor-as-period-finding-2)

Cryptographic-scale instances need enough counting qubits to resolve the period and controlled modular exponentiation deep enough to reach it. Toy examples demonstrate the structure beautifully; they establish nothing about near-term capability against real keys.

Evidence boundary. Practical resource estimates are dominated by reversible modular arithmetic and fault-tolerant overhead. [Craig Gidney](https://doi.org/10.22331/q-2021-04-15-433) [National Academies of Sciences](https://doi.org/10.17226/25196)

\(N composite; a coprime base; order r; modular exponentiation U_a|x>=|ax mod N>; fractions k/r; bit precision declared.\)[(33.3)](#eq-33-shor-as-period-finding-3)
Notation contract: N composite; a coprime base; order r; modular exponentiation U_a|x>=|ax mod N>; fractions k/r; bit precision declared.

## Phase estimation reveals a rational multiple

Connect measured fractions to r with continued fractions.

The quantum register samples a value near j 2^m/r. Continued fractions converts y/2^m into a candidate denominator, which must be checked by modular exponentiation. Finite precision may yield a divisor or unusable convergent; repeated samples and least-common-multiple logic recover the period with bounded probability. The classical validation step is part of correctness, not cleanup.

## Failure branches and retries

Handle odd periods, trivial square roots, and unlucky samples.

Shor is a stack, and every layer is a potential bottleneck:

- the number-theoretic reduction from factoring to period finding;

- reversible circuits for modular exponentiation;

- phase estimation at the required precision;

- the QFT and inverse QFT;

- classical continued fractions and verification;

- error correction underneath all of it;

- resource estimation across qubits, depth, and runtime.

The mathematics has been sound since 1994. The open question is engineering: each layer must survive contact with a real, noisy machine, and the layers multiply. A full-stack view is mandatory for any security or investment judgment that invokes this algorithm.

## Resource account: from logical arithmetic to physical execution

Separate theorem, circuit, and fault-tolerant estimate.

Order-finding resource layers that must not be collapsed
 | Layer | Reported quantity | Verification

 | Query theorem | Controlled modular-multiplication uses under the selected phase-estimation construction | Promise and success probability stated.
 | Logical circuit | Register width, modular-arithmetic gates, non-Clifford count, depth, ancillas, and retries | Candidate period checked classically.
 | Fault-tolerant execution | Code distance, physical qubits, factory throughput, cycle time, and wall time | Assumptions tied to an explicit error budget.
 | Classical wrapper | GCD, continued fractions, least-common multiples, and failed-base retries | All branches retained in the run record.

The order-finding circuit needs coherent modular exponentiation, controlled arithmetic, inverse QFT, and enough precision to recover r. Logical gate counts depend on the arithmetic design and can be dominated by non-Clifford operations; physical cost additionally depends on code distance, factory throughput, routing, and cycle time. Small-N demonstrations do not validate that full resource chain.

## Order-finding end-to-end notebook

Acceptance contract for Order-finding end-to-end notebook
 | Field | Reader-visible record

 | Format | Classical/quantum small-N trace with reversible-cost and continued-fraction logs
 | Verification | Tests multiple bases for N=15 and 21, verifies periods and gcd recovery, records failure/retry branches, and reconciles quantum samples with classical post-processing.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Order-finding end-to-end notebook",
  "format": "Classical/quantum small-N trace with reversible-cost and continued-fraction logs",
  "acceptance_test": "Tests multiple bases for N=15 and 21, verifies periods and gcd recovery, records failure/retry branches, and reconciles quantum samples with classical post-processing.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
from math import gcd

def period_trace(modulus, base):
    if modulus < 3 or not 1 < base < modulus or gcd(modulus, base) != 1:
        raise ValueError("base must be nontrivial and coprime to modulus")
    values, current = [], 1
    while current not in values:
        values.append(current)
        current = current * base % modulus
    return {"period": len(values), "orbit": values}

def factor_from_period(modulus, base):
    trace = period_trace(modulus, base)
    period = trace["period"]
    if period % 2 or pow(base, period // 2, modulus) == modulus - 1:
        return {**trace, "factors": set()}
    factors = {gcd(pow(base, period // 2) - 1, modulus),
               gcd(pow(base, period // 2) + 1, modulus)} - {1, modulus}
    return {**trace, "factors": factors}

fifteen = factor_from_period(15, 2)
twenty_one = factor_from_period(21, 2)
invalid_rejected = False
try:
    factor_from_period(15, 3)
except ValueError:
    invalid_rejected = True
assert fifteen["period"] == 4 and fifteen["factors"] == {3, 5}
assert twenty_one["period"] == 6 and twenty_one["factors"] == {3, 7}
assert invalid_rejected
print(f"PASS: 33 period finding N15_r={fifteen['period']} factors={sorted(fifteen['factors'])} N21_r={twenty_one['period']} factors={sorted(twenty_one['factors'])}")
```

Scope boundary

- This chapter does not imply every base succeeds, that the quantum circuit outputs factors directly, or that textbook query complexity equals a near-term runtime.

- It does not make current cryptographic migration estimates without dated resource assumptions.

Depth commitment. One N=15 trace, one N=21 exercise, one phase sample, retries, and one sourced resource comparison.

Practice problem

For N=21, test bases a=2,4,5; compute orders, identify successful factor-recovery conditions, and trace one phase-estimation sample through continued fractions.

```
N=21; bases a in {2,4,5}.
For the continued-fraction branch use a=2, six phase bits, and measured y=11; analyze y/64.
```

** Deliverable** : Classical power tables, success/failure labels, one rational reconstruction, gcd outputs, and a resource boundary.

** Pass condition** : The notebook reproduces each order and factor, checks failed conditions, and validates the continued-fraction convergent.

Verification record

Expected solution form. Complete N=21 order-finding dossier with executable arithmetic.

Model answer. For N=21, base 2 has order 6 and yields gcd(2^3-1,21)=7 and gcd(2^3+1,21)=3. Base 4 has odd order 3; base 5 has order 6 but 5^3=-1 mod 21, so both branches fail. The convergent 1/6 from 11/64 identifies the successful period candidate for base 2.

Model result and check. CI reruns modular powers, gcds, convergents, and the declared branch outcomes.

Acceptance test. The notebook reproduces each order and factor, checks failed conditions, and validates the continued-fraction convergent.

External review. Open.

Expertise still needed. Quantum algorithms/number theory specialist; Fault-tolerant resource-estimation reviewer familiar with reversible modular arithmetic.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

algorithm fixture

### [Order-finding end-to-end notebook](/playground/quantum/book/33-shor-as-period-finding/#artifact-33-shor-as-period-finding)

[Download fixture (.py)](/playground/quantum/artifacts/33-shor-as-period-finding/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/33-shor-as-period-finding/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Peter W. Shor. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Journal on Computing. 1997](https://doi.org/10.1137/S0097539795293172) primary paper

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [Don Coppersmith. An approximate Fourier transform useful in quantum factoring. IBM Research report / arXiv. 2002](https://arxiv.org/abs/quant-ph/0201067) primary paper

- [Craig Gidney and Martin Ekerå. How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits. Quantum. 2021](https://doi.org/10.22331/q-2021-04-15-433) primary peer-reviewed resource estimate

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=33-shor-as-period-finding#report)

Dependency graph

## Prerequisites for this chapter

- [Phase Estimation Part IV. Protocols and Algorithms · Chapter 32](/playground/quantum/book/32-phase-estimation/)

- [Classical Information, Gates, Circuits, and Reversibility Part I. Mental Model · Chapter 2](/playground/quantum/book/02-classical-information-gates-circuits-reversibility/)

Continue the thread

## Next concepts from this chapter

- [Resource Estimation for Fault-Tolerant Algorithms Part V. Practical Software · Chapter 43](/playground/quantum/book/43-resource-estimation-for-fault-tolerant-algorithms/)

- [Cryptography, PQC, QKD, and Security Migration Part VIII. Applications and Strategy · Chapter 68](/playground/quantum/book/68-cryptography-pqc-qkd-and-security-migration/)

- [Hamiltonian Simulation Part IV. Protocols and Algorithms · Chapter 34](/playground/quantum/book/34-hamiltonian-simulation/)

[Previous Phase Estimation](/playground/quantum/book/32-phase-estimation/)[Next Hamiltonian Simulation](/playground/quantum/book/34-hamiltonian-simulation/)

In this chapter

- [Factoring becomes an order-finding task](#factoring-becomes-an-order-finding-task)

- [N=15 shows every classical branch](#n-15-shows-every-classical-branch)

- [Modular exponentiation is the quantum workload](#modular-exponentiation-is-the-quantum-workload)

- [Phase estimation reveals a rational multiple](#phase-estimation-reveals-a-rational-multiple)

- [Failure branches and retries](#failure-branches-and-retries)

- [Resource account: from logical arithmetic to physical execution](#resource-account-from-logical-arithmetic-to-physical-execution)

- [Order-finding end-to-end notebook](#order-finding-end-to-end-notebook)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=33-shor-as-period-finding#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/33-shor-as-period-finding/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/34-hamiltonian-simulation/ -->

# Hamiltonian Simulation

Simulating quantum dynamics is the oldest and most natural job proposed for a quantum computer. This chapter turns that intuition into an auditable engineering question: which Hamiltonian, which observable, which precision, and what will the run actually cost?

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. What does it mean to simulate a quantum Hamiltonian, and which parameters determine the circuit cost and accuracy?

Given a Hamiltonian H, evolution time t, input state, and error tolerance ε, the task is to approximate e^{-iHt}; cost depends on structure, norm, decomposition method, time, precision, state preparation, and measured observable, not merely the number of simulated particles.

Scope and non-goals.

- This chapter does not treat all chemistry as Hamiltonian simulation or promise application value from asymptotic simulation complexity alone.

- It does not compare every modern simulation algorithm or publish unsourced resource estimates.

[Figure 34.1.](#fig-34-hamiltonian-simulation-1) Notice that each product-formula step is a short, fixed circuit. The total cost is that step repeated r times; and r, not the step itself, is where precision and simulation time send the bill.

Prerequisites. 12-unitary-operations-and-reversibility, 14-observables-eigenvectors-and-measurement

Notation used here. H Hermitian; U(t)=e^{-iHt}; ℏ=1 declared; operator norm/error metric named; r product-formula segments; Pauli ordering fixed.

## Specify the evolution target

Define H, t, input, observable, and error metric.

Hamiltonian simulation asks a quantum computer to reproduce the time evolution of a quantum system; a molecule, a material, a field theory reduced to a lattice. The idea predates most of quantum computing: nature already computes this evolution, so a controllable quantum device should be able to as well, without paying the classical cost of tracking an exponentially large state.

That intuition is sound, and it is also where rigor usually stops. Representing a system "naturally" does not tell you how many qubits the encoding needs, how deep the circuit runs, or how many measurements the answer requires. Those numbers decide whether a given simulation is a product, a research program, or a fantasy. A claim that cannot state them is not yet an engineering claim.

So the central question is never "can quantum computers simulate molecules?" It is always: which Hamiltonian, which observable, which precision, which runtime, under which hardware assumptions?

Evidence boundary. Quantum simulation targets unitary evolution generated by a Hamiltonian. [Richard P. Feynman](https://doi.org/10.1007/BF02650179) [Seth Lloyd](https://doi.org/10.1126/science.273.5278.1073)

## One Pauli Hamiltonian is exactly solvable

Derive e^{-iθZ} and its circuit.

A closed quantum system evolves under its Hamiltonian \(H\) according to:

\(\lvert\psi(t)\rangle=e^{-iHt}\lvert\psi(0)\rangle\)[(34.1)](#eq-34-hamiltonian-simulation-1)

The simulation task is to prepare \(\lvert\psi(0)\rangle\), approximate the operator \(e − i H t\) as a circuit, and measure an observable; an energy, a correlation, a reaction rate proxy. Product formulas split \(H\) into pieces you can implement and alternate them in short steps, as in the figure. Qubitization and phase-estimation methods cost more per step but scale better with precision. Each choice trades gate count, error tolerance, and circuit depth differently.

The second half of the model is the translation from the algorithm's requirements to hardware:

```
physical_qubits approximately logical_qubits * physical_per_logical

```

A credible estimate starts from logical qubits, logical depth, precision, and error tolerance; then expands through an error-correction assumption into physical hardware, where `physical_per_logical` can be hundreds or thousands. Skipping that expansion is how a two-day laptop demo gets compared against a fault-tolerant machine that does not exist yet.

Evidence boundary. Product-formula methods approximate evolution of sums of noncommuting terms with error/cost tradeoffs. [Seth Lloyd](https://doi.org/10.1126/science.273.5278.1073) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## Noncommuting terms create approximation error

Apply first-order product formulas to X+Z.

Evidence boundary. Application relevance requires state preparation, observable estimation, precision, and classical baseline accounting. [National Academies of Sciences](https://doi.org/10.17226/25196) [Yudong Cao et al.](https://doi.org/10.1021/acs.chemrev.8b00803) [John Preskill](https://www.preskill.caltech.edu/ph219/)

\(H Hermitian; U(t)=e^{-iHt}; ℏ=1 declared; operator norm/error metric named; r product-formula segments; Pauli ordering fixed.\)[(34.2)](#eq-34-hamiltonian-simulation-2)
Notation contract: H Hermitian; U(t)=e^{-iHt}; ℏ=1 declared; operator norm/error metric named; r product-formula segments; Pauli ordering fixed.

## Step count trades gates for accuracy

Measure error as segments increase.

For first-order product formulas, splitting \(H=\sum_j H_j\) into \(r\) steps gives \(\left(\prod_j e^{-iH_jt/r}\right)^r\); noncommuting terms create an error that falls as r grows under an explicit bound. Each added step multiplies gate cost. Compare against exact evolution on the same state and metric, and verify unitarity separately so numerical drift is not misreported as algorithmic error.

The classic trap is treating "quantum simulates quantum" as a complete argument. It tells you why the application class exists; it says nothing about encoding cost, precision, noise, measurement overhead, or the classical method you must beat. Each of those can sink the advantage on its own.

## Resource account: the algorithm ends at an observable

Include sampling and state-preparation costs.

End-to-end Hamiltonian-simulation cost ledger
 | Resource | Record before claiming advantage

 | Encoding and preparation | Logical qubits, preparation gates, depth, overlap or fidelity, and failed preparations.
 | Evolution | Algorithm family, segment/query count, synthesized gates, routed depth, and approximation error.
 | Observable estimation | Measurement groups, shots, variance, confidence interval, and repeated circuit executions.
 | Classical work | Hamiltonian construction, compilation, aggregation, and comparator runtime at the same tolerance.
 | Physical expansion | Logical error target, code overhead, cycle time, and wall-clock estimate when fault tolerance is assumed.

Hamiltonian simulation is a workload-definition problem long before it is an implementation problem. You parse the model, choose a representation, select an algorithm, estimate resources, and define how the result will be validated. The artifact that comes out of that work should contain:

- the input model and its Hamiltonian representation,

- the target observable and precision target,

- the algorithm choice and its logical resource estimate,

- the mapping onto physical hardware assumptions,

- the classical baseline, and

- a validation plan.

That document is worth more than any application slogan, because someone else can check it, rerun it, and update it when hardware assumptions move.

## A simulation claim ledger

Record structure, norm, precision, resources, and classical baseline.

A reproducible claim names the Hamiltonian representation, coefficient units, system size, evolution time, target observable, error metric and tolerance, input-state preparation, algorithm family, oracle or block-encoding assumptions, logical resources, sampling cost, and classical baseline. Change any one of these and the meaning of 'simulation advantage' can change; the ledger prevents cross-instance comparisons by headline qubit count.

## Hamiltonian simulation error laboratory

Acceptance contract for Hamiltonian simulation error laboratory
 | Field | Reader-visible record

 | Format | Notebook comparing exact exponentiation and product formulas with resource ledger
 | Verification | Tests one commuting and one noncommuting Hamiltonian, verifies error scaling over segment counts, and records gate/sample costs.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Hamiltonian simulation error laboratory",
  "format": "Notebook comparing exact exponentiation and product formulas with resource ledger",
  "acceptance_test": "Tests one commuting and one noncommuting Hamiltonian, verifies error scaling over segment counts, and records gate/sample costs.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import cmath, math
def mm(A,B): return [[sum(A[i][k]*B[k][j] for k in range(2)) for j in range(2)] for i in range(2)]
I=((1+0j,0j),(0j,1+0j)); X=((0j,1+0j),(1+0j,0j)); Z=((1+0j,0j),(0j,-1+0j))
def exp_pauli(P,t): return [[math.cos(t)*I[i][j]-1j*math.sin(t)*P[i][j] for j in range(2)] for i in range(2)]
def trotter(n):
    if type(n) is not int or n <= 0: raise ValueError("step count must be positive")
    step=mm(exp_pauli(X,1/n),exp_pauli(Z,0.3/n)); out=[list(r) for r in I]
    for _ in range(n): out=mm(step,out)
    return out
def delta(A,B): return sum(abs(A[i][j]-B[i][j])**2 for i in range(2) for j in range(2))**0.5
r=math.sqrt(1.09); exact=[[math.cos(r)*I[i][j]-1j*math.sin(r)*(X[i][j]+0.3*Z[i][j])/r for j in range(2)] for i in range(2)]
errors=[delta(trotter(n),exact) for n in (1,2,4)]
invalid_rejected=False
try: trotter(0)
except ValueError: invalid_rejected=True
assert errors[2] < errors[1] < errors[0]
assert invalid_rejected
print(f"PASS: 34 Hamiltonian simulation Trotter_errors={[round(value, 6) for value in errors]} invalid_steps={invalid_rejected}")
```

Scope boundary

- This chapter does not treat all chemistry as Hamiltonian simulation or promise application value from asymptotic simulation complexity alone.

- It does not compare every modern simulation algorithm or publish unsourced resource estimates.

Depth commitment. One exact Hamiltonian, one noncommuting case, four segment counts, and one claim ledger.

Practice problem

Approximate e^{-it(X+Z)} at t=1 with first-order product formulas for r=1,2,4,8 and compare with exact evolution.

** Deliverable** : Circuit/gate counts, matrix or state error table, and observed scaling.

** Pass condition** : The notebook regenerates exact and approximate unitaries, computes the declared norm error, and matches every row.

Verification record

Expected solution form. Exact diagonalization versus product-formula report with plotted error.

Model answer. For H=X+Z, exact evolution uses frequency sqrt(2). The first-order product U_r=(exp(-iX/r)exp(-iZ/r))^r is unitary for every r; its chosen matrix-norm error decreases across r=1,2,4,8. The ordered product and error metric must be held fixed when claiming the trend.

Model result and check. CI reruns all segment counts and verifies monotonic trend within the chosen metric.

Acceptance test. The notebook regenerates exact and approximate unitaries, computes the declared norm error, and matches every row.

External review. Open.

Expertise still needed. Quantum algorithms researcher specializing in Hamiltonian simulation; Computational physicist able to verify exponentiation, error metrics, and numerical fixtures.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

algorithm fixture

### [Hamiltonian simulation error laboratory](/playground/quantum/book/34-hamiltonian-simulation/#artifact-34-hamiltonian-simulation)

[Download fixture (.py)](/playground/quantum/artifacts/34-hamiltonian-simulation/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/34-hamiltonian-simulation/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Richard P. Feynman. Simulating physics with computers. International Journal of Theoretical Physics. 1982](https://doi.org/10.1007/BF02650179) primary paper

- [Seth Lloyd. Universal quantum simulators. Science. 1996](https://doi.org/10.1126/science.273.5278.1073) primary paper

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

- [Yudong Cao et al.. Quantum Chemistry in the Age of Quantum Computing. Chemical Reviews. 2019](https://doi.org/10.1021/acs.chemrev.8b00803) peer-reviewed review

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=34-hamiltonian-simulation#report)

Dependency graph

## Prerequisites for this chapter

- [Unitary Operations and Reversibility Part II. Mathematical Core · Chapter 12](/playground/quantum/book/12-unitary-operations-and-reversibility/)

- [Observables, Eigenvectors, and Measurement Part II. Mathematical Core · Chapter 14](/playground/quantum/book/14-observables-eigenvectors-and-measurement/)

Continue the thread

## Next concepts from this chapter

- [Variational Algorithms and Their Limits Part IV. Protocols and Algorithms · Chapter 35](/playground/quantum/book/35-variational-algorithms-and-their-limits/)

- [Neutral Atoms Part VII. Hardware Architecture · Chapter 57](/playground/quantum/book/57-neutral-atoms/)

- [Quantum Simulation and Chemistry Part VIII. Applications and Strategy · Chapter 65](/playground/quantum/book/65-quantum-simulation-and-chemistry/)

[Previous Shor as Period Finding](/playground/quantum/book/33-shor-as-period-finding/)[Next Variational Algorithms and Their Limits](/playground/quantum/book/35-variational-algorithms-and-their-limits/)

In this chapter

- [Specify the evolution target](#specify-the-evolution-target)

- [One Pauli Hamiltonian is exactly solvable](#one-pauli-hamiltonian-is-exactly-solvable)

- [Noncommuting terms create approximation error](#noncommuting-terms-create-approximation-error)

- [Step count trades gates for accuracy](#step-count-trades-gates-for-accuracy)

- [Resource account: the algorithm ends at an observable](#resource-account-the-algorithm-ends-at-an-observable)

- [A simulation claim ledger](#a-simulation-claim-ledger)

- [Hamiltonian simulation error laboratory](#hamiltonian-simulation-error-laboratory)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 6 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=34-hamiltonian-simulation#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/34-hamiltonian-simulation/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/35-variational-algorithms-and-their-limits/ -->

# Variational Algorithms and Their Limits

A variational algorithm is a training loop with a quantum device inside it: a parameterized circuit, a measured objective, a classical optimizer, repeat. This chapter gives you the audit questions that decide whether such a loop produces utility or just consumes shots.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reader question. When does a variational quantum algorithm constitute a meaningful experiment rather than an under-specified optimization loop?

It is meaningful only when the ansatz, encoded problem, observable estimator, optimizer, noise, shot budget, initialization, and classical baselines are fixed and the full repeated-run distribution is reported; a lower objective on one small run is not evidence of advantage.

Scope and non-goals.

- The evidence review allows useful variational and NISQ experiments without generalizing from them.

- VQE, QAOA, and quantum machine learning retain separate contracts, each compared with a tuned classical baseline.

[Figure 35.1.](#fig-35-variational-algorithms-and-their-limits-1) Notice where the loop pays: not in any single circuit, but in the repetition. Each optimizer step needs fresh estimates, each estimate needs many shots, and noise sits on every one of them.

Prerequisites. 14-observables-eigenvectors-and-measurement, 34-hamiltonian-simulation

Notation used here. Hamiltonian H and energy E(θ)=<ψ(θ)|H|ψ(θ)>; shot budget, optimizer evaluations, seeds, and confidence summaries declared.

## The hybrid loop as an experimental system

Name state preparation, measurement, optimizer, and stopping rule.

Variational algorithms split the work between two machines. The quantum device prepares a parameterized state and returns estimates of an objective; typically an expectation value. The classical computer looks at those estimates and proposes new parameters. Around and around until the objective stops improving or the budget runs out.

The appeal for near-term hardware is real: the circuit can be shallow compared to what a fully fault-tolerant algorithm demands, and some noise can be absorbed into the optimization. But shallower is not the same as useful. Hard optimization surfaces, noise that warps the objective, data-loading costs that erase the claimed speedup, and very strong classical baselines all survive the move to shallow circuits.

Evidence boundary. VQE estimates Hamiltonian energies with a parameterized quantum state and classical optimization loop. [Alberto Peruzzo et al.](https://doi.org/10.1038/ncomms5213) [Michael A. Nielsen](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE)

## VQE grounds the objective in an observable

Write the energy estimator and shot decomposition.

Write \(H=\sum_j c_jP_j\). For parameters \(\theta\), VQE estimates \(E(\theta)=\sum_j c_j\langle P_j\rangle_\theta\) from finite samples and passes that estimate to a classical optimizer. The variational principle bounds the exact expectation above the ground energy, but shot noise can make an estimator fluctuate below it. Keep exact expectation, sampled estimate, and optimizer record distinct.

Evidence boundary. Near-term variational algorithms face noise, sampling cost, trainability, and optimization limitations. [John Preskill](https://doi.org/10.22331/q-2018-08-06-79) [Marco Cerezo et al.](https://doi.org/10.1038/s43588-022-00311-3)

## A two-parameter surface you can inspect

Run a small Hamiltonian with exact optimum available.

The quantum computer in this story is usually an expectation-value estimator. For an observable \(A\):

\(\langle A\rangle=\langle\psi\rvert A\lvert\psi\rangle\)[(35.1)](#eq-35-variational-algorithms-and-their-limits-1)

You never read \(\langle A\rangle\) directly; you estimate it from repeated measurements, with sampling error that shrinks like the inverse square root of the shot count. That single fact drives the economics of the whole approach. Estimating one objective may require summing many measured terms, each optimizer step needs its own estimates, and gradient-based training multiplies the cost again. A shallow circuit with a cheap price per run can still be an expensive algorithm.

For evaluating claims rather than running them, this book uses a decision checklist:

```
application_score = evidence_strength - baseline_gap - integration_risk - hardware_risk

```

It is not a law of nature. It is a forcing device: any memo that wants a build or invest decision must name its evidence, its baseline, and its risks explicitly.

Evidence boundary. QAOA and other variational claims require strong tuned classical baselines and complete resource accounting. [Edward Farhi](https://arxiv.org/abs/1411.4028) [National Academies of Sciences](https://doi.org/10.17226/25196)

\(E(\theta)=\langle\psi(\theta)\rvert H\lvert\psi(\theta)\rangle\)[(35.2)](#eq-35-variational-algorithms-and-their-limits-2)
Notation contract: Hamiltonian H and energy E(θ)=<ψ(θ)|H|ψ(θ)>; shot budget, optimizer evaluations, seeds, and confidence summaries declared.

## Noise, sampling, and optimizer variance

Separate three sources of run-to-run spread.

Energy uncertainty depends on coefficient weights, Pauli variances, grouping, and shot allocation; it is not one device-wide number. Hardware noise biases the landscape while sampling adds variance, and the optimizer reacts to both. Multiple disclosed seeds and budgets reveal instability that a best-run plot hides. Error bars must propagate to the final comparison with the classical baseline.

## Ansatz and encoding can preclude success

Use expressibility and trainability as testable constraints.

If you have trained classical models, you already own most of the mental machinery. A variational algorithm is a noisy, expensive training loop:

- choose an ansatz,

- prepare the parameterized circuit,

- measure the objective terms,

- estimate gradients or use derivative-free updates,

- optimize classically,

- validate against the baseline,

- repeat under noise and sampling limits.

Every step can inject bias, variance, or hidden cost. Standard ML discipline applies unchanged: held-out test sets, honest baselines, ablations, reproducibility, and metric choice that matches the buyer's problem. The quantum part adds exactly one new virtue to cultivate; counting circuit evaluations; and removes none of the old ones.

## Resource account: benchmark the whole loop

Require seeds, budgets, repeated trials, and classical comparators.

VQE circuit, shot, optimizer, and baseline budget
 | Ledger row | Required record

 | Compiled circuit | Parameters, entanglers, native two-qubit count, routed depth, and qubit count.
 | One objective evaluation | Observable groups, shots per group, total circuit executions, and estimator uncertainty.
 | Optimization | Function and gradient evaluations, seeds, stopping rule, failed runs, and wall time.
 | Full experiment | Every seed at every shot budget; no best-run-only reporting.
 | Comparator | Exact diagonalization or best relevant classical solver on the same instance and accuracy target.

Report encoding and ansatz, parameter count, circuit depth after compilation, observable groups, shots per evaluation, optimizer evaluations, every seed, wall time, exact or best-known reference, and final uncertainty. Compare against a classical method using the same instance and accuracy target. A low energy on a toy Hamiltonian establishes a run record, not scaling advantage.

## Reproducible VQE benchmark card

Acceptance contract for Reproducible VQE benchmark card
 | Field | Reader-visible record

 | Format | Pinned notebook, exact diagonalization baseline, repeated-seed run records, and result schema
 | Verification | CI reproduces the noiseless optimum, runs seeded shot/noise variants, validates budget equality, and reports distributions rather than best-only values.
 | Availability | Source-embedded acceptance record; no separate download is claimed

```
{
  "artifact": "Reproducible VQE benchmark card",
  "format": "Pinned notebook, exact diagonalization baseline, repeated-seed run records, and result schema",
  "acceptance_test": "CI reproduces the noiseless optimum, runs seeded shot/noise variants, validates budget equality, and reports distributions rather than best-only values.",
  "publication_state": "source-embedded contract and worked fixture"
}
```

Executable reference fixture

Run with Python 3.11 or later. The final assertion is the chapter-level pass condition for this small instance.

```
import math
def energy(theta): return math.cos(theta)  # <0|Ry(theta)^dagger Z Ry(theta)|0>
def optimize(seed):
    theta=seed
    for _ in range(80): theta += 0.1*math.sin(theta)
    return theta, energy(theta)
runs=[optimize(seed) for seed in (0.2,1.0,2.5)]
stalled=optimize(0.0)
assert all(e < -0.999 for _,e in runs)
assert stalled[1] == 1.0 and all(result[1] < stalled[1] for result in runs)
print(f"PASS: 35 variational runs={[round(result[1], 6) for result in runs]} stationary_boundary={stalled[1]:.1f}")
```

Scope boundary

- The evidence review allows useful variational and NISQ experiments without generalizing from them.

- VQE, QAOA, and quantum machine learning retain separate contracts, each compared with a tuned classical baseline.

Depth commitment. One exact baseline, one small objective surface, repeated seeded runs, and a benchmark card.

Practice problem

Run a two-parameter VQE instance with five fixed seeds at two shot budgets, compare with exact diagonalization, and report all outcomes.

```
H = Z0 + Z1 + 0.5 X0 X1
ansatz = Ry(theta0)|0> tensor Ry(theta1)|0>
seeds = [3, 11, 29, 47, 71]
shot budgets = [1000, 10000]
Report every seed-budget pair and the exact-diagonalization ground energy.
```

** Deliverable** : Pinned environment, run records, objective distributions, exact gap, and a no-advantage/limited-evidence conclusion.

** Pass condition** : The reference notebook replays seeds, validates total evaluations/shots, and recomputes summary statistics from raw records.

Verification record

Expected solution form. Reproducibility bundle with exact baseline and distributional rubric.

Model answer. For the declared product Ry ansatz, E(theta0,theta1)=cos(theta0)+cos(theta1)+0.5 sin(theta0)sin(theta1); its variational minimum is -2 at theta0=theta1=pi. Exact diagonalization of H gives -sqrt(4.25), exposing an ansatz gap. The complete result table must retain all ten seed-budget outcomes, including failures.

Model result and check. CI executes the notebook, validates schema and budgets, and fails if only the best run is reported.

Acceptance test. The reference notebook replays seeds, validates total evaluations/shots, and recomputes summary statistics from raw records.

External review. Open.

Expertise still needed. Variational quantum algorithms researcher; Optimization/experimental-design reviewer able to audit baselines, budgets, and repeated-run statistics.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

algorithm fixture

### [Reproducible VQE benchmark card](/playground/quantum/book/35-variational-algorithms-and-their-limits/#artifact-35-variational-algorithms-and-their-limits)

[Download fixture (.py)](/playground/quantum/artifacts/35-variational-algorithms-and-their-limits/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/35-variational-algorithms-and-their-limits/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_00_35.json --from 0 --through 35 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Alberto Peruzzo et al.. A variational eigenvalue solver on a photonic quantum processor. Nature Communications. 2014](https://doi.org/10.1038/ncomms5213) primary paper

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Quantum Computing in the NISQ era and beyond. Quantum. 2018](https://doi.org/10.22331/q-2018-08-06-79) peer-reviewed perspective

- [Marco Cerezo et al.. Challenges and opportunities in quantum machine learning. Nature Computational Science. 2022](https://doi.org/10.1038/s43588-022-00311-3) peer-reviewed perspective

- [Edward Farhi, Jeffrey Goldstone, and Sam Gutmann. A Quantum Approximate Optimization Algorithm. arXiv. 2014](https://arxiv.org/abs/1411.4028) primary preprint

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=35-variational-algorithms-and-their-limits#report)

Dependency graph

## Prerequisites for this chapter

- [Observables, Eigenvectors, and Measurement Part II. Mathematical Core · Chapter 14](/playground/quantum/book/14-observables-eigenvectors-and-measurement/)

- [Hamiltonian Simulation Part IV. Protocols and Algorithms · Chapter 34](/playground/quantum/book/34-hamiltonian-simulation/)

Continue the thread

## Next concepts from this chapter

- [Quantum-Centric Supercomputing and Hybrid Workflows Part VII. Hardware Architecture · Chapter 63](/playground/quantum/book/63-quantum-centric-supercomputing-and-hybrid-workflows/)

- [Optimization: Where Caution Is Required Part VIII. Applications and Strategy · Chapter 67](/playground/quantum/book/67-optimization-where-caution-is-required/)

- [Quantum Machine Learning and Benchmark Discipline Part VIII. Applications and Strategy · Chapter 69](/playground/quantum/book/69-quantum-machine-learning-and-benchmark-discipline/)

[Previous Hamiltonian Simulation](/playground/quantum/book/34-hamiltonian-simulation/)[Next Python and Quantum Programming Workflow](/playground/quantum/book/36-python-and-quantum-programming-workflow/)

In this chapter

- [The hybrid loop as an experimental system](#the-hybrid-loop-as-an-experimental-system)

- [VQE grounds the objective in an observable](#vqe-grounds-the-objective-in-an-observable)

- [A two-parameter surface you can inspect](#a-two-parameter-surface-you-can-inspect)

- [Noise, sampling, and optimizer variance](#noise-sampling-and-optimizer-variance)

- [Ansatz and encoding can preclude success](#ansatz-and-encoding-can-preclude-success)

- [Resource account: benchmark the whole loop](#resource-account-benchmark-the-whole-loop)

- [Reproducible VQE benchmark card](#reproducible-vqe-benchmark-card)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 6 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=35-variational-algorithms-and-their-limits#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/35-variational-algorithms-and-their-limits/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/36-python-and-quantum-programming-workflow/ -->

# Python and Quantum Programming Workflow

A quantum result you cannot rerun is a story, not evidence. This chapter sets up the Python workflow — pinned environments, runnable tests, explicit run records — that makes a quantum experiment reproducible enough for someone else to audit.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Use a locked Python environment, separate invariant circuit fixtures from SDK adapters, execute every result through tests or scripts, and commit a run record containing the command, versions, seed, shots, backend, expected output, and known limits.

A screenshot records appearance. A notebook records one path through one interpreter. Neither tells a second engineer which commit ran, what was installed, or whether the observed counts were permitted by the circuit. The unit of work here is therefore a repository state plus an executable claim.

[Figure 36.1.](#fig-36-python-and-quantum-programming-workflow-1) A mathematical oracle should survive an SDK migration. The adapter and backend record explain how that oracle became this particular output.

## The experiment begins at a clean checkout

“Works on my machine” usually means the machine is an undocumented input. Remove it. The starting condition is a commit identifier, an unmodified working tree, a supported Python version, and a dependency lock whose hash is recorded before installation. The command must run from a named directory; relative paths and environment variables are part of its interface. Wall-clock time is reported in seconds, not as “fast,” and shots are a count, not a precision label.

The core companion package deliberately uses the Python standard library. Optional SDK adapters live outside that core because Qiskit’s supported execution interfaces are versioned software, not laws of quantum mechanics [Qiskit documentation]. Cirq has its own circuit, simulator, and result conventions and must be pinned independently [Cirq documentation]. A lock should be regenerated intentionally, reviewed as code, and tied to an API review date.

```
repository: quantum-end-to-end
commit: <40-hex-character revision>
python: 3.13.x
lock_sha256: <64 hex characters>
command: PYTHONPATH=src python -m quantum_end_to_end bell --shots 10000 --seed 7
cwd: labs

```

A portable circuit representation can help, but it has a boundary. OpenQASM 3 specifies circuit and control semantics subject to implementation support; it does not standardize an SDK’s Python objects, package resolver, displayed bit order, or backend calibration [OpenQASM 3 specification].

## Invariant fixtures, adapters, and run records

Put three concerns in three places. An invariant fixture states what the circuit means: the Bell preparation has exact support on 00 and 11 and zero support on 01 and 10 when q0 is displayed as the most-significant bit. An adapter translates that contract into one SDK. A run record stores what one execution did. If an adapter changes, the fixture does not. If finite-shot counts move, the exact fixture does not.

The record needs enough evidence to falsify the claim: code and input hashes, interpreter and dependency versions, adapter and backend identity, transpiled representation where applicable, seed, shots, exact oracle, statistical acceptance rule, stdout or raw result, duration, and known omissions. ACM’s artifact framework distinguishes availability, functionality, reusability, and reproducibility; placing a zip online establishes only the first dimension [ACM artifact review guidance].

## One Bell run, recorded end to end

The ideal state after Hadamard on q0 and CNOT(q0,q1) is
\(|\psi\rangle=(|00\rangle+|11\rangle)/\sqrt{2}\)[(36.1)](#eq-36-python-and-quantum-programming-workflow-1)
That equation yields exact probabilities 0.5, 0, 0, 0.5 in displayed order. It does not yield an exact 5,000/5,000 histogram. The seeded sampler makes the book’s transcript deterministic for regression purposes, while its scientific interpretation remains stochastic. The record must preserve both layers rather than replacing the probability oracle with one lucky histogram.

### Clean-checkout Bell experiment and signed run record

Exemplar run record
 | Field | Recorded value | Acceptance

 | command | `PYTHONPATH=src python -m quantum_end_to_end bell --shots 10000 --seed 7` | exit 0
 | exact support | 00, 11 | 01=10=0
 | shots | 10,000 | counts sum exactly
 | provenance | commit, lock hash, Python, file hashes | all present and re-hash
 | boundary | ideal local simulator | no hardware inference

```
import hashlib, json
REQUIRED = {"python": str, "seed": int, "shots": int, "backend": str,
            "support": dict, "command": str}
def validate_record(record):
    errors = [name for name, kind in REQUIRED.items()
              if name not in record or type(record[name]) is not kind]
    support = record.get("support", {})
    if (record.get("shots", 0) <= 0 or not support or
            any(type(value) not in (int, float) or value < 0 for value in support.values()) or
            abs(sum(support.values()) - 1.0) > 1e-12):
        errors.append("shots_or_support")
    if errors:
        raise ValueError(",".join(sorted(set(errors))))
    payload = json.dumps(record, sort_keys=True, separators=(",", ":")).encode()
    return {"digest": hashlib.sha256(payload).hexdigest(),
            "outcomes": sorted(support), "probability_mass": sum(support.values())}

record = {"python": "3.13", "seed": 7, "shots": 10_000,
          "backend": "quantum_end_to_end.Statevector",
          "support": {"00": 0.5, "11": 0.5},
          "command": "PYTHONPATH=src python -m quantum_end_to_end bell --shots 10000 --seed 7"}
baseline = validate_record(record)
changed_seed = validate_record({**record, "seed": 8})
missing_rejected = False
try:
    validate_record({key: value for key, value in record.items() if key != "command"})
except ValueError:
    missing_rejected = True
assert baseline["outcomes"] == ["00", "11"] and baseline["probability_mass"] == 1.0
assert baseline["digest"] != changed_seed["digest"] and missing_rejected
print(f"PASS: 36 run record digest7={baseline['digest'][:12]} digest8={changed_seed['digest'][:12]} missing_command={missing_rejected}")
```

Reproduce: `cd labs && python -m unittest discover -s tests -v`, then run the recorded Bell command. The first command must pass; the second must match the committed seed-7 transcript and total 10,000 shots.

## Failure drill: version drift versus semantic error

Version drift fails before or at the adapter boundary: an import moved, a result field changed, a backend option disappeared, or the lock no longer resolves on a supported interpreter. Preserve the traceback, installed versions, and failing adapter test. Do not “repair” the circuit oracle to make an SDK migration green.

A semantic error survives installation but violates the invariant fixture. A classic example is reversing the display convention: the SDK may return classical bits in a native order different from the book’s q0-most-significant strings. The fix belongs in normalization, with a truth-table test. Evidence differs: an environment fault is diagnosed by dependency and API records; a semantic fault is diagnosed by exact support, ordering, and circuit hashes.

## The minimum publishable Python artifact

CI should start from the lock, run the stable suite, validate record schemas, regenerate hashes, and compare deterministic transcripts. A probabilistic claim needs a predeclared acceptance interval rather than byte equality. Optional adapters that cannot install must be reported as blocked or expired, not silently skipped. A publishable artifact also includes a license and tells the reviewer what the suite does not prove.

Treat the run record as an append-only observation, not a cache to be overwritten. A rerun under a new interpreter receives a new record and points back to the circuit fixture it tested. That preserves a useful distinction: identical source hashes with different dependency hashes diagnose environment sensitivity; different source hashes are a new experiment. CI can then compare records field by field and refuse the seductive but meaningless verdict that two JSON files are “close enough.”

The controlled failure belongs in the published evidence. In the drift branch, change only the declared dependency constraint and keep the commit, command, seed, shots, and Bell oracle fixed. A resolver or import failure is then an environment result. In the semantic branch, keep the environment fixed and reverse the bit normalization for an asymmetric fixture; that run should install cleanly and fail the oracle. These failures occupy different layers, so a reader can reproduce both without guessing what the author changed.

The boundary here is deliberate. This chapter establishes repository and evidence structure; it does not derive the state-vector implementation, and it does not nominate Qiskit, Cirq, or any one SDK as the book-wide programming model.

### Repository drift drill

Prompt: Clone or copy the lab into an empty environment, run the Bell fixture, then introduce one dependency-version mismatch and document how the failure differs from a wrong expected distribution.

Deliverable: A JSON run record, command transcript, lock hash, and two-paragraph diagnosis of the controlled failure.

Pass condition: A fresh environment reproduces the stated exact state/probabilities and seeded counts, and the diagnosis identifies environment drift without changing the circuit oracle.

### Solution record

Format: Checked exemplar run-record JSON plus a short failure transcript.

Verification: Validate required JSON keys and hashes, rerun the recorded command, and compare stdout byte-for-byte with the committed seeded fixture.

A passing submission keeps the Bell oracle unchanged while the intentionally mismatched environment fails at dependency resolution or adapter import. The diagnosis names the differing version and preserves both transcripts; it does not edit expected support or probabilities to accommodate the broken installation.

Limits

A green local suite says nothing about a named quantum processor, device noise, application advantage, or SDK behavior outside the pinned versions. Signed here means content-addressed provenance, not an identity or trust-service claim.

External review

Open. Useful expertise: Python packaging and reproducible builds, plus current quantum-SDK execution metadata.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

lab

### [Clean-checkout Bell experiment and signed run record](/playground/quantum/book/36-python-and-quantum-programming-workflow/#artifact-36-python-and-quantum-programming-workflow)

[Download fixture (.py)](/playground/quantum/artifacts/36-python-and-quantum-programming-workflow/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/36-python-and-quantum-programming-workflow/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=36-python-and-quantum-programming-workflow#report)

Dependency graph

## Prerequisites for this chapter

- [Circuit Notation as a Programming Language Part III. Circuit Model · Chapter 16](/playground/quantum/book/16-circuit-notation-as-programming-language/)

- [Building a Small Simulator From Scratch Part V. Practical Software · Chapter 37](/playground/quantum/book/37-building-a-small-simulator-from-scratch/)

Continue the thread

## Next concepts from this chapter

- [Qiskit, Primitives, and Circuit Execution Part V. Practical Software · Chapter 38](/playground/quantum/book/38-qiskit-primitives-and-circuit-execution/)

- [Cirq and Alternative Toolchains Part V. Practical Software · Chapter 39](/playground/quantum/book/39-cirq-and-alternative-toolchains/)

- [Benchmarking Quantum Programs Part V. Practical Software · Chapter 42](/playground/quantum/book/42-benchmarking-quantum-programs/)

[Previous Variational Algorithms and Their Limits](/playground/quantum/book/35-variational-algorithms-and-their-limits/)[Next Building a Small Simulator From Scratch](/playground/quantum/book/37-building-a-small-simulator-from-scratch/)

In this chapter

- [The experiment begins at a clean checkout](#the-experiment-begins-at-a-clean-checkout)

- [Invariant fixtures, adapters, and run records](#invariant-fixtures-adapters-and-run-records)

- [One Bell run, recorded end to end](#one-bell-run-recorded-end-to-end)

- [Clean-checkout Bell experiment and signed run record](#clean-checkout-bell-experiment-and-signed-run-record)

- [Failure drill: version drift versus semantic error](#failure-drill-version-drift-versus-semantic-error)

- [The minimum publishable Python artifact](#the-minimum-publishable-python-artifact)

- [Repository drift drill](#repository-drift-drill)

- [Solution record](#solution-record)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=36-python-and-quantum-programming-workflow#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/36-python-and-quantum-programming-workflow/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/37-building-a-small-simulator-from-scratch/ -->

# Building a Small Simulator From Scratch

The fastest way to find out whether you actually understand quantum circuits is to implement one. A vector, a handful of matrices, and a sampler — a few dozen lines of Python — will expose every gap that reading hides.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Represent an n-qubit pure state as a normalized complex vector in declared big-endian basis order, apply gates as unitary linear maps to selected axes, compute Born probabilities exactly, and place seeded sampling behind a separate interface with invariant tests.

The implementation is intentionally small enough to distrust line by line. That is its value: an ordering convention, an in-place update, or an invalid normalization can no longer disappear behind a framework call.

[Figure 37.1.](#fig-37-building-a-small-simulator-from-scratch-1) The target bit selects pairs separated by one stride. Every other bit is held fixed, making the index convention executable rather than implicit.

## A state vector with a declared index map

For n qubits, allocate \(N=2^n\) complex amplitudes. This reference uses big-endian display: q0 is the most-significant bit, so basis string 101 is integer index five and q0 contributes weight four. The zero constructor sets amplitude zero to one and every other amplitude to zero. Pure states inhabit this exponentially growing complex vector space [Nielsen and Chuang].

The constructor should reject a vector unless
\(\sum_{i=0}^{N-1}|\psi_i|^2=1\)[(37.1)](#eq-37-building-a-small-simulator-from-scratch-1)
within absolute tolerance 10 −12. Silent normalization is tempting and wrong: it can turn a caller’s bug into a plausible state. Validate dimensions, finite values, and norm; report the faulty quantity.

## Applying a one-qubit matrix without building 2^n by 2^n

A gate on target qubit q mixes amplitude pairs whose indices differ only at bit q. With big-endian display, the target mask is `1 << (n - 1 - q)`. Iterate indices whose target bit is zero, copy the pair `(a0,a1)`, and write `(u00*a0+u01*a1, u10*a0+u11*a1)`. Copying both old values before either write prevents an in-place corruption that often passes basis-state tests and fails superpositions.

If \(U^\dagger U=I\), then the pair norm is preserved; summing over disjoint pairs preserves the whole norm. Test the implementation anyway. A transposed gate, wrong mask, or aliased write can be algebraically unitary and operationally wrong.

### Why the pair update is the tensor product

Fix every bit except the target. The two corresponding basis states span a two-dimensional slice of the full vector, with amplitudes \(a_0\) and \(a_1\). Applying \(U\) to that qubit applies the same \(2\times2\) map to every such slice. This is exactly \(I\otimes\cdots\otimes U\otimes\cdots\otimes I\), evaluated without materializing its mostly zero \(2^n\times2^n\) matrix. There are \(2^{n-1}\) disjoint pairs, so a one-qubit gate costs \(O(2^n)\) arithmetic and a copied output vector costs \(O(2^n)\) memory.

A diagnostic trace should print the target mask and the first few index pairs. For three qubits, target q1 must produce (0,2), (1,3), (4,6), and (5,7). If the trace instead begins (0,4), the implementation is applying the gate to q0. That one line often localizes an ordering defect faster than comparing eight complex amplitudes after a long circuit.

## CNOT exposes every ordering decision

CNOT flips the target bit exactly when the control bit is one. Do not start with Bell states. First assert the complete two-qubit truth table: \(00\mapsto00\), \(01\mapsto01\), \(10\mapsto11\), \(11\mapsto10\) for control \(q_0\) and target \(q_1\) under this book’s display. Then repeat with control and target exchanged. Those eight cases identify which integer mask belongs to which logical label.

Qiskit and Cirq expose their own ordering and output conventions [Qiskit documentation] [Cirq documentation]. An adapter may reverse a displayed string without changing the state. That is a translation, not a reason to make the core simulator ambiguous. OpenQASM defines serialized circuit semantics and QIR defines an intermediate representation, but neither settles a Python library’s in-memory endianness [OpenQASM 3 specification] [QIR Alliance specification].

The implementation can be read as a permutation. For each source index \(i\), compute the control mask; if it is set, move the amplitude to \(i\mathbin{\oplus}m_t\), otherwise leave it at \(i\). Every destination must be written exactly once. Summing into a zeroed vector makes that bijection visible and avoids a second in-place hazard: swapping an amplitude twice while iterating both members of a pair.

Control equal to target is not a degenerate CNOT; it is an invalid request and should raise before mutation. Negative or out-of-range labels fail for the same reason. Public methods need these rejection paths because Python’s shifts and negative indices can otherwise turn a bad circuit into a different, executable circuit.

## The Bell fixture has exact and stochastic halves

Apply H to q0 and then CNOT(q0,q1). The exact vector is `(1/√2, 0, 0, 1/√2)`. The Born rule maps an amplitude to its squared magnitude [Nielsen and Chuang], producing probabilities 0.5 on 00 and 11. These are deterministic numerical assertions at tolerance 10 −12.

Sampling is a different API. It consumes probabilities, a shot count, and an optional seed; it returns integer counts. Assert that counts total the shots and impossible outcomes remain absent for the ideal Bell state. Use the seed only to stabilize a regression transcript. An unseeded scientific check needs a declared binomial interval, not an exact count.

Construct the cumulative distribution in basis-index order and force its final boundary to one after checking the probability sum within tolerance. The correction is only for floating-point roundoff; it must not rescue a vector whose norm is materially wrong. Given a uniform variate \(r\in[0,1)\), return the first index whose cumulative mass exceeds \(r\). Tests should cover zero shots, a negative shot request, a basis state with probability one, and a distribution whose tiny tail would expose an off-by-one comparison.

### Inspectable state-vector simulator with Bell CLI

Bell trace in q0-most-significant order
 | step | state vector | invariant

 | \(\lvert 00 \rangle\) | (1,0,0,0) | norm 1
 | H(q0) | \((1/\sqrt{2},0,1/\sqrt{2},0)\) | indices 0,2
 | CNOT(q0,q1) | \((1/\sqrt{2},0,0,1/\sqrt{2})\) | indices 0,3
 | measure | {00:.5,11:.5} | Born probabilities sum 1

```
from math import sqrt
H = ((1/sqrt(2), 1/sqrt(2)), (1/sqrt(2), -1/sqrt(2)))
state = [1+0j, 0j, 0j, 0j]

def one_qubit(vector, gate, target, n=2):
    out = vector[:]
    mask = 1 << (n - 1 - target)
    for i in range(len(vector)):
        if i & mask: continue
        j = i | mask; a, b = vector[i], vector[j]
        out[i] = gate[0][0]*a + gate[0][1]*b
        out[j] = gate[1][0]*a + gate[1][1]*b
    return out

def cnot(vector, control, target, n=2):
    out = [0j] * len(vector)
    cm = 1 << (n - 1 - control); tm = 1 << (n - 1 - target)
    for i, amplitude in enumerate(vector): out[i ^ tm if i & cm else i] += amplitude
    return out

product_state = one_qubit(state, H, 0)
state = cnot(product_state, 0, 1)
missing_entangler = cnot(product_state, 1, 0)
expected = [1/sqrt(2), 0, 0, 1/sqrt(2)]
assert all(abs(a-b) <= 1e-12 for a,b in zip(state, expected))
assert abs(sum(abs(a)**2 for a in state)-1) <= 1e-12
assert missing_entangler == product_state and missing_entangler != state
print(f"PASS: 37 simulator Bell_support={[i for i,a in enumerate(state) if abs(a) > 1e-12]} missing_entangler_support={[i for i,a in enumerate(missing_entangler) if abs(a) > 1e-12]}")
```

Repository check: `cd labs && python -m unittest tests.test_simulator -v`. The suite and the documented seed-7 CLI output must agree at complex tolerance 10 −12.

## Tests that catch plausible-looking wrong simulators

Reject non-power-of-two dimensions and non-normalized input. Apply H twice to several states, not only \(\lvert 0 \rangle\). Exercise CNOT on every basis state in both directions. Check a phase-sensitive superposition so a sign bug cannot hide behind computational-basis probabilities. Assert impossible Bell outcomes, exact probability sums, sample totals, and error messages for invalid qubit indices. Include a randomized unitary test with a fixed generator seed, but keep small analytic fixtures as the diagnostic core.

A controlled-Z extension is especially useful: its computational-basis probabilities do not change, yet the relative phase of \(\lvert 11 \rangle\) does. The Bell state used above happens to acquire a relative minus sign, not a global phase; an X-basis measurement or later interference reveals it.

Test relative phase by composing operations, not by inspecting a comment. Prepare \((|00\rangle+|11\rangle)/\sqrt2\), apply CZ, then apply H to both qubits. The resulting probability distribution differs from the unmodified Bell path even though the distribution immediately after CZ does not. This fixture catches a simulator that stores only magnitudes, conjugates at the wrong point, or quietly rounds complex amplitudes to real values.

Property tests complement, rather than replace, exact cases. Generate a small normalized vector and a unitary matrix from a fixed seed; assert norm preservation and agreement with a slow reference matrix product. Then shrink a failure to the explicit vector, matrix, target, and mask. A seed without the generated inputs is not a reproducible counterexample.

## Where the model ends

Memory and gate work grow exponentially with qubit count. This implementation has no mid-circuit measurement, reset, classical control, density matrices, leakage, or device noise. It is an oracle for small pure-state circuits, not a performance competitor to optimized simulators and not a proxy for hardware. Its public API earns trust only through its declared domain and tests.

Those omissions are architectural, not missing convenience methods. Mid-circuit measurement changes a pure state conditionally and requires a classical outcome record; a density-matrix backend changes storage from \(2^n\) amplitudes to \(4^n\) complex entries; leakage requires states outside the qubit basis. Adding any one of them changes invariants and tests. A small simulator stays trustworthy by refusing unsupported operations rather than attaching device-sounding names to an ideal state vector.

Numerical comparison needs a policy too. Compare complex amplitudes with an absolute tolerance on small analytic fixtures and compare state vectors up to global phase only when the contract permits it. Probability agreement is weaker: states with different relative phase can share every computational-basis probability. The API should expose amplitudes for exact tests, probabilities for measurement oracles, and counts for sampling; converting all three into one dictionary would erase the evidence that locates a failure.

Every public method named here now has a corresponding rejection or invariant test: constructor dimension and norm, one-qubit target range and pair update, CNOT control/target validity and truth table, Born probability normalization, and sampler shot totals. That coverage is more meaningful than a line percentage because it follows the semantic contracts a caller can violate.

### Controlled-Z extension

Prompt: Implement a controlled-Z operation using the simulator's indexing convention, add exact basis-state tests, and show its action on the Bell state.

Deliverable: A function, four basis tests, one Bell-state invariant test, and a 150-word explanation of global versus relative phase.

Pass condition: All tests pass at tolerance 1e-12, normalization remains one, and the explanation correctly identifies the changed phase without claiming a computational-basis probability change.

### Reference result

Format: Reference patch and expected vector table for |00>, |01>, |10>, |11>, and the Bell input.

Verification: Run the added unit tests and independently compare each output against diagonal CZ = diag(1,1,1,-1).

The basis vectors remain unchanged except |11>, whose amplitude gains a minus sign. On the Bell input the result is \((\lvert00\rangle-\lvert11\rangle)/\sqrt{2}\): normalization and computational-basis probabilities stay fixed, but the relative phase changes and can be exposed by a later interference measurement.

Limits

The fixture establishes the selected algebra and index map. It does not establish numerical stability for large systems, density-operator evolution, device calibration, or SDK equivalence.

External review

Open. Useful expertise: a quantum-simulator engineer and a numerical test engineer familiar with complex tolerances.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

lab

### [Inspectable state-vector simulator with Bell CLI](/playground/quantum/book/37-building-a-small-simulator-from-scratch/#artifact-37-building-a-small-simulator-from-scratch)

[Download fixture (.py)](/playground/quantum/artifacts/37-building-a-small-simulator-from-scratch/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/37-building-a-small-simulator-from-scratch/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [QIR Alliance. Quantum Intermediate Representation specification and projects. Linux Foundation Joint Development Foundation. 2026](https://www.qir-alliance.org/projects/) official technical specification

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=37-building-a-small-simulator-from-scratch#report)

Dependency graph

## Prerequisites for this chapter

- [Vectors, Bases, and Amplitudes Part II. Mathematical Core · Chapter 9](/playground/quantum/book/09-vectors-bases-and-amplitudes/)

- [Matrices as Gates Part II. Mathematical Core · Chapter 11](/playground/quantum/book/11-matrices-as-gates/)

- [Tensor Products and State-Space Growth Part II. Mathematical Core · Chapter 13](/playground/quantum/book/13-tensor-products-and-state-space-growth/)

- [Multi-Qubit Circuits Part III. Circuit Model · Chapter 19](/playground/quantum/book/19-multi-qubit-circuits/)

Continue the thread

## Next concepts from this chapter

- [Python and Quantum Programming Workflow Part V. Practical Software · Chapter 36](/playground/quantum/book/36-python-and-quantum-programming-workflow/)

- [Qiskit, Primitives, and Circuit Execution Part V. Practical Software · Chapter 38](/playground/quantum/book/38-qiskit-primitives-and-circuit-execution/)

- [Transpilation and Hardware-Aware Compilation Part V. Practical Software · Chapter 40](/playground/quantum/book/40-transpilation-and-hardware-aware-compilation/)

[Previous Python and Quantum Programming Workflow](/playground/quantum/book/36-python-and-quantum-programming-workflow/)[Next Qiskit, Primitives, and Circuit Execution](/playground/quantum/book/38-qiskit-primitives-and-circuit-execution/)

In this chapter

- [A state vector with a declared index map](#a-state-vector-with-a-declared-index-map)

- [Applying a one-qubit matrix without building 2^n by 2^n](#applying-a-one-qubit-matrix-without-building-2-n-by-2-n)

- [Why the pair update is the tensor product](#why-the-pair-update-is-the-tensor-product)

- [CNOT exposes every ordering decision](#cnot-exposes-every-ordering-decision)

- [The Bell fixture has exact and stochastic halves](#the-bell-fixture-has-exact-and-stochastic-halves)

- [Inspectable state-vector simulator with Bell CLI](#inspectable-state-vector-simulator-with-bell-cli)

- [Tests that catch plausible-looking wrong simulators](#tests-that-catch-plausible-looking-wrong-simulators)

- [Where the model ends](#where-the-model-ends)

- [Controlled-Z extension](#controlled-z-extension)

- [Reference result](#reference-result)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=37-building-a-small-simulator-from-scratch#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/37-building-a-small-simulator-from-scratch/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/38-qiskit-primitives-and-circuit-execution/ -->

# Qiskit, Primitives, and Circuit Execution

An SDK tutorial can put a Bell circuit on screen in ten minutes; knowing whether the output means anything takes a bit more structure. This chapter separates the stable execution workflow — build, choose a backend, set shots, record, interpret — from the API surface that keeps changing underneath it.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Define the circuit and observable independently of the backend, use the appropriate primitive for expectation estimation or sampled outcomes, pin the Qiskit version and execution options, and store the transpiled circuit, shots or precision target, backend identity, and result schema.

The useful distinction is semantic, not syntactic: an estimator answers a question about an observable; a sampler answers a question about a distribution. A versioned adapter makes those contracts explicit without promoting today’s class names into timeless pedagogy.

[Figure 38.1.](#fig-38-qiskit-primitives-and-circuit-execution-1) Sharing a circuit does not make the result types interchangeable. Their inputs, uncertainty, and validation rules differ.

## Sampler and estimator answer different questions

For a state \(\lvert \psi \rangle\) and observable O, an estimator targets \(E[O]=\langle\psi|O|\psi\rangle\). A sampler approximates \(\Pr(X=x)\) through finite draws. Qiskit documents these as distinct primitive interfaces [Qiskit primitives documentation]. The estimator needs an observable and precision contract; the sampler needs measurement interpretation and a shot contract.

Keep a framework-neutral fixture beside the adapter: circuit operations in the book’s q0-most-significant convention, the analytic expectation or exact support, tolerances, and an acceptance rule. OpenQASM 3 can record circuit and control semantics, while QIR defines an intermediate-representation contract; neither makes interchange automatic [OpenQASM 3 specification] [QIR Alliance specification].

## The pinned Qiskit environment

The lab records Python, exact Qiskit distribution versions, a lock hash, imports, primitive implementation, and review date. It does not install Qiskit in the core lab environment. Optional dependency churn should break an optional adapter job, not the reference simulator. Store the output schema version too: a numerical result can remain correct while a container or metadata field changes.

Execution envelope
 | Interpreter | exact major/minor; supported platform
 | Resolver evidence | lock file and SHA-256
 | Primitive | fully qualified implementation and options
 | Target | ideal reference or named backend identity
 | Review | date plus migration owner

## Estimate Z after a Hadamard

Prepare \(\lvert + \rangle\) by applying H to \(\lvert 0 \rangle\) and ask for Pauli Z. Analytically, the +1 and −1 eigenvalues have equal weight, so E[Z]=0. This is an expectation check, not a histogram check. Store circuit and observable hashes, estimator options, returned value, target precision, and metadata. On an ideal reference primitive, use a tight numerical tolerance. On shot-based or hardware execution, attach an uncertainty method and backend evidence.

The derivation is the durable oracle. The Qiskit call is a dated adapter. That separation allows an API migration to alter imports or result extraction without altering the expected value.

The zero expectation alone is a weak fixture: the states \(\lvert 0 \rangle\) and \(\lvert 1 \rangle\) could be accidentally averaged by a broken batch adapter and also yield zero. Add anchor cases. For \(\lvert 0 \rangle\), \(\langle Z\rangle=1\); for \(\lvert 1\rangle\), \(\langle Z\rangle=-1\); for \(\lvert +\rangle\), \(\langle X\rangle=1\) and \(\langle Z\rangle=0\). The set exercises state preparation, observable ordering, sign, and batch alignment. Store results keyed by stable case IDs rather than assuming the returned list is in submission order.

For a Pauli observable with eigenvalues ±1 estimated from \(n\) independent shots, a sample mean \(\hat E\) has estimated standard error \(\sqrt{(1-\hat E^2)/n}\) under the simple binomial model. An ideal state-vector estimator has numerical error instead, so reporting “shots” for it is a category mistake. The record schema should make the uncertainty source explicit: analytic, finite-shot, mitigation-derived, or backend-reported.

## Sample a Bell circuit without losing bit order

The paired sampler fixture prepares the Bell state and measures both qubits. Exact support is {00,11}; expected probability is one half for each. Finite shots fluctuate. With n shots and ideal p=0.5, a simple teaching band can use \(C_{00}/n\in[0.5-3/(2\sqrt n),0.5+3/(2\sqrt n)]\). This is an explicitly declared normal-approximation fixture, not a universal test.

Finite-shot output cannot be interpreted like a state vector [Nielsen and Chuang] [benchmarking review]. Normalize the SDK’s native classical-bit display into the book convention before comparing support, and preserve the native record so the translation remains auditable.

Bell support is deliberately paired with asymmetric calibration fixtures. Prepare 01 and 10, measure them, and verify the adapter maps each native key to the intended book string. Without those rows, reversing both classical columns leaves 00 and 11 unchanged and the headline test passes. The normalization function should receive the explicit logical-to-classical map emitted by compilation; it should never infer order from dictionary iteration or a formatted histogram label.

Quasi-distributions need another boundary. Error mitigation can produce small negative weights or values above one, which are not raw counts and must not be rounded into a histogram. Retain the native numeric type, normalization convention, and mitigation metadata. A sampler acceptance test may compare an explicitly normalized probability estimate, but its record must distinguish that estimate from observed integer frequencies.

### Pinned Qiskit sampler/estimator lab

Stored primitive assertions
 | case | oracle | evidence

 | H then Z estimator | E[Z]=0 | value, precision, observable/circuit hashes
 | Bell sampler | support 00/11, p=.5/.5 | shots, seed, native and normalized bit maps
 | migration | same semantic oracle | old/new schema diff

```
from math import sqrt
def band(shots, sigma=3):
    if type(shots) is not int or shots <= 0:
        raise ValueError("shots must be a positive integer")
    half_width = sigma / (2 * sqrt(shots))
    return 0.5 - half_width, 0.5 + half_width

records = [
    {"shots": 1_000, "counts": {"00": 508, "11": 492}},
    {"shots": 10_000, "counts": {"00": 4_963, "11": 5_037}},
]
thousand_band = band(1_000)
ten_thousand_band = band(10_000)
assert abs(0.0) <= 1e-12  # analytic H-Z estimator oracle
for record in records:
    assert set(record["counts"]) == {"00", "11"}
    assert sum(record["counts"].values()) == record["shots"]
    lo, hi = band(record["shots"])
    assert lo <= record["counts"]["00"] / record["shots"] <= hi
invalid_rejected = False
try:
    band(0)
except ValueError:
    invalid_rejected = True
assert ten_thousand_band[1] - ten_thousand_band[0] < thousand_band[1] - thousand_band[0]
assert invalid_rejected
print(f"PASS: 38 primitives band1000={thousand_band} band10000={ten_thousand_band} invalid_shots={invalid_rejected}")
```

## Transpiled evidence belongs in the record

Backend compilation and measurement conventions are evidence, not plumbing [benchmarking review]. Record target identity, native instruction set, initial/final layout, optimization level, seed, native gate counts, depth in layers, measurement map, and transpiled-circuit hash. A result from an ideal primitive and one from a named processor may share an API while supporting different claims.

Parameter binding is part of this evidence. Hash the symbolic circuit, the ordered parameter names, and the bound numeric vector separately. A batch in which angles are transposed can return correctly shaped data for the wrong experiments. Before interpreting values, assert that every submitted case ID, observable ID, and parameter-set ID appears exactly once in the result record.

## Migration test for the next Qiskit release

On a schedule, create a fresh environment with the candidate version, run schema tests before numerical tests, and classify failure as import/API, metadata/schema, circuit translation, or changed numerical semantics. Never update expected output merely because the new adapter emits it. Re-derive the oracle, document the migration, and retain the last passing record.

A schema migration should be narrow enough to review. Capture the old native result and the new native result, normalize both through version-specific readers, and compare the small semantic record. If the semantic record agrees, the change is an adapter migration. If it differs, stop and inspect transpilation, parameter association, observable convention, and bit order before changing a tolerance. Wider tolerances are not a remedy for a permuted experiment batch.

The deterministic and stochastic checks deliberately fail differently. A state-vector or exact reference expectation outside 10 −12 is a semantic or numerical defect; rerunning it with more shots has no meaning. A finite-shot Bell frequency outside its predeclared interval is a statistical alert whose record includes n and the test method. Repeated alerts across independent seeds may motivate model investigation, but one alert is not automatically an adapter bug.

Store the two output schemas separately. The estimator row contains observable ID, value, uncertainty source, target precision, and backend metadata. The sampler row contains native keys, logical keys, integer shots when applicable, probabilities or quasi-weights with their numeric kind, and measurement mapping. A field named `result` that alternates between float, array, and distribution defeats schema validation.

The optional Qiskit job must be allowed to report unavailable. That state records the pinned environment requested, platform, resolver or import failure, and last known passing version. It does not convert the framework-neutral analytic fixtures into failures, and it does not disappear from the release record. This boundary keeps a software migration from rewriting the physics oracle.

Case identifiers must survive batching, transpilation, and result extraction. Assert their cardinality and order before attaching values to observables; otherwise a perfectly shaped array can associate the Bell sample with the Hadamard expectation. Shape validation is necessary, but semantic keys make the result reviewable.

### Two-shot sampler audit

Prompt: Run the same Bell circuit through a Qiskit sampler at two shot counts, retain the transpiled circuit and metadata, and explain whether the frequency difference is statistically ordinary.

Deliverable: Pinned environment file, source module, two JSON result records, and a calculation of the acceptance intervals.

Pass condition: Both records identify version/backend/layout/shots; no impossible ideal outcomes occur; observed 00 and 11 frequencies fall inside the predeclared interval.

### Reference package

Format: Version-specific reference module, stored records, and analytic binomial calculation.

Verification: CI recreates the optional environment and checks schema, metadata, circuit hash, total shots, support, and interval membership.

Both records preserve only 00 and 11, their counts sum to their declared shots, and each observed 00 fraction falls within the predeclared shot-dependent interval. A difference between the two fractions is therefore ordinary sampling evidence, not a changed state, provided the transpiled circuit and bit map also match.

Limits

This is a dated adapter lab. It does not promise stable class names, treat an ideal primitive as hardware evidence, or merge estimator precision with sampling error.

External review

Open. Useful expertise: a current Qiskit primitives maintainer or power user and a statistical software reviewer.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

lab

### [Pinned Qiskit sampler/estimator lab](/playground/quantum/book/38-qiskit-primitives-and-circuit-execution/#artifact-38-qiskit-primitives-and-circuit-execution)

[Download fixture (.py)](/playground/quantum/artifacts/38-qiskit-primitives-and-circuit-execution/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/38-qiskit-primitives-and-circuit-execution/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [QIR Alliance. Quantum Intermediate Representation specification and projects. Linux Foundation Joint Development Foundation. 2026](https://www.qir-alliance.org/projects/) official technical specification

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=38-qiskit-primitives-and-circuit-execution#report)

Dependency graph

## Prerequisites for this chapter

- [Python and Quantum Programming Workflow Part V. Practical Software · Chapter 36](/playground/quantum/book/36-python-and-quantum-programming-workflow/)

- [Building a Small Simulator From Scratch Part V. Practical Software · Chapter 37](/playground/quantum/book/37-building-a-small-simulator-from-scratch/)

- [Benchmarking Quantum Programs Part V. Practical Software · Chapter 42](/playground/quantum/book/42-benchmarking-quantum-programs/)

Continue the thread

## Next concepts from this chapter

- [Cirq and Alternative Toolchains Part V. Practical Software · Chapter 39](/playground/quantum/book/39-cirq-and-alternative-toolchains/)

- [Software and Developer-Platform Diligence Part IX. Company and Investing · Chapter 75](/playground/quantum/book/75-software-and-developer-platform-diligence/)

- [Hardware-Constrained Lab Part X. Capstones · Chapter 84](/playground/quantum/book/84-hardware-constrained-lab/)

[Previous Building a Small Simulator From Scratch](/playground/quantum/book/37-building-a-small-simulator-from-scratch/)[Next Cirq and Alternative Toolchains](/playground/quantum/book/39-cirq-and-alternative-toolchains/)

In this chapter

- [Sampler and estimator answer different questions](#sampler-and-estimator-answer-different-questions)

- [The pinned Qiskit environment](#the-pinned-qiskit-environment)

- [Estimate Z after a Hadamard](#estimate-z-after-a-hadamard)

- [Sample a Bell circuit without losing bit order](#sample-a-bell-circuit-without-losing-bit-order)

- [Pinned Qiskit sampler/estimator lab](#pinned-qiskit-sampler-estimator-lab)

- [Transpiled evidence belongs in the record](#transpiled-evidence-belongs-in-the-record)

- [Migration test for the next Qiskit release](#migration-test-for-the-next-qiskit-release)

- [Two-shot sampler audit](#two-shot-sampler-audit)

- [Reference package](#reference-package)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=38-qiskit-primitives-and-circuit-execution#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/38-qiskit-primitives-and-circuit-execution/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/39-cirq-and-alternative-toolchains/ -->

# Cirq and Alternative Toolchains

Every quantum SDK can run a Bell circuit. They differ in what they make easy, what they hide, and how much maintenance they will cost you over two years. This chapter turns SDK choice from a taste question into an evidence question.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Compare one fixed circuit contract across tools using explicit qubit order, native result objects, simulator mode, compilation target, versions, and identical statistical tests; choose a tool from workload fit and maintenance cost, not feature counts or popularity.

Portability begins with a test oracle that belongs to neither SDK. The comparison then measures the translation tax instead of mistaking two different APIs for two different algorithms.

[Figure 39.1.](#fig-39-cirq-and-alternative-toolchains-1) The native records remain available for diagnosis. The normalized record is deliberately smaller: only fields whose meaning has been reconciled cross the adapter boundary.

## Freeze the circuit contract before choosing syntax

The fixture declares two qubits, q0 as the most-significant displayed bit, H(q0), CNOT(q0,q1), computational-basis measurement, exact support {00,11}, probabilities 0.5/0.5, seed, shots, and an acceptance rule. It also declares simulator mode: exact state-vector comparison and sampled comparison are separate.

Write this as plain data and assertions. If the contract is embedded in one adapter’s result types, the second adapter will be judged against the first SDK rather than against the circuit. OpenQASM 3 may supply an interchange representation, but serialized equivalence does not erase backend-specific compilation or execution [OpenQASM 3 specification].

## Cirq's qubits, moments, and simulator result

Cirq asks the programmer to choose explicit qubit objects, organizes scheduled operations into moments, and returns native simulator and measurement result objects [Cirq documentation]. Preserve those concepts in the adapter. Record ordered qubits, moment structure, simulator type, resolver options, measurement key, repetitions, seed, version, and dependency lock hash.

Normalization happens after inspection. Convert the native measurement array to book-visible strings using a tested qubit-column map. Store both that map and the native shape. A two-qubit Bell histogram can look correct after an accidental reversal because 00 and 11 are palindromes; include asymmetric basis fixtures 01 and 10 so ordering errors cannot hide.

Consider the native row `[0,1]` returned for ordered qubits `(q1,q0)`. It denotes q1=0 and q0=1, so the book’s q0-most-significant string is 10, not 01. The repair is a column permutation derived from qubit identities. Reversing every string happens to repair this two-qubit case, but it is not a general adapter: measurement keys may cover subsets of qubits, appear in a different order, or be concatenated from multiple registers.

Moments also carry semantics that a flat operation list loses. Operations in one moment are intended to coexist under Cirq’s scheduling model; a second tool may express the same partial order through dependencies or barriers. Preserve the native schedule and compare only a declared derived quantity, such as critical-path layers after both adapters apply the same dependency rule.

## A second adapter under the same assertions

Qiskit’s execution abstraction and result conventions warrant a separate adapter [Qiskit documentation]. The second adapter may use different qubit identifiers, scheduling concepts, and transpilation hooks. It must still emit a normalized record with circuit ID, displayed-bit convention, exact or sampled mode, support/probability or counts, shots, seed, SDK version, and native-record hash.

The shared harness first tests deterministic basis circuits, then the exact Bell state, then seeded samples. It refuses unknown result fields rather than guessing. An adapter can be unavailable without making the core contract fail, but the comparison record must say unavailable and why.

The failure sequence matters. The 01 and 10 cases diagnose bit and qubit order before entanglement is involved. A phase fixture such as H–Z–H on one qubit diagnoses whether a simulator preserved relative phase. Only then does the Bell case exercise the two-qubit operation and sampling path. When a port fails, this ladder identifies the first semantic layer that diverged instead of producing one unhelpful “histograms differ” message.

### Cross-SDK Bell conformance harness

Fields normalized only after semantics are reconciled
 | field | Cirq source | second-tool source | shared meaning

 | bit_order | ordered qubits/columns | classical map | q0-most-significant
 | support | state or measurement array | quasi/count result | display strings with nonzero mass
 | schedule | moments | transpiled depth | kept native; not equated
 | provenance | version + lock | version + lock | required independently

```
contract = {"order": ("q0", "q1"), "support": {"00", "11"}, "p": {"00": .5, "11": .5}}
def canonical_counts(record):
    columns = record.get("columns")
    counts = record.get("counts", {})
    if (type(columns) is not tuple or len(columns) != len(set(columns)) or
            set(columns) != set(contract["order"]) or not counts):
        raise ValueError("adapter columns must be a permutation of the contract order")
    output = {}
    for bitstring, count in counts.items():
        if len(bitstring) != len(columns) or type(count) is not int or count < 0:
            raise ValueError("counts must use fixed-width bit strings and integer counts")
        by_qubit = dict(zip(columns, bitstring))
        canonical = "".join(by_qubit[qubit] for qubit in contract["order"])
        output[canonical] = output.get(canonical, 0) + count
    return output

cirq_bell = canonical_counts({"columns": ("q0", "q1"), "counts": {"00": 501, "11": 499}})
second_bell = canonical_counts({"columns": ("q1", "q0"), "counts": {"00": 501, "11": 499}})
cirq_asymmetric = canonical_counts({"columns": ("q0", "q1"), "counts": {"01": 700, "10": 300}})
second_asymmetric = canonical_counts({"columns": ("q1", "q0"), "counts": {"10": 700, "01": 300}})
wrong_declaration = canonical_counts({"columns": ("q0", "q1"), "counts": {"10": 700, "01": 300}})
invalid_rejected = False
try:
    canonical_counts({"columns": ("q0", "q0"), "counts": {"00": 1}})
except ValueError:
    invalid_rejected = True
assert set(cirq_bell) == contract["support"] and cirq_bell == second_bell
assert cirq_asymmetric == second_asymmetric == {"01": 700, "10": 300}
assert wrong_declaration != cirq_asymmetric and invalid_rejected
print(f"PASS: 39 adapter Bell={cirq_bell} asymmetric={cirq_asymmetric} wrong_order={wrong_declaration}")
```

## Differences the equality test cannot erase

Equal ideal probabilities say nothing about compilation target, native gates, scheduling, cloud access, parameter binding, noise model, dynamic-circuit support, or maintenance surface. Measure code and dependency size in files or bytes; compile and run time in seconds; shots as counts. Report serialized size and whether round-trip parsing preserves the contract. Do not convert moments into depth unless the scheduling definitions truly match.

Artifact comparison needs runnable evidence and declared environment boundaries, not feature-matrix checkmarks [ACM artifact review guidance]. The most expensive difference may be organizational: which SDK the target hardware supports, how often APIs migrate, and who owns the adapter when they do.

Noise simulators are particularly easy to compare badly. A channel attached “after each gate” depends on how each compiler decomposes the circuit; equal channel parameters do not imply equal noisy processes when native gate counts differ. Either compare an agreed compiled operation trace or label each noisy result as tool-specific. Likewise, a state-vector simulator and a tensor-network simulator may agree on a small fixture while having radically different tractable circuit families.

## A workload-specific selection record

A teaching simulator values readability, deterministic local execution, and a small dependency boundary. A hardware characterization project values target integration, calibration access, pulse or schedule controls, and result metadata. State the workload, weighted requirements, measured adapter costs, chosen version, and reversal conditions. “More popular” is not a requirement; “maintained by the target team and exposes required calibration fields” can be.

Make reversal conditions measurable. A choice can be revisited if the pinned environment stops receiving security fixes, the target backend drops the integration, median compilation time exceeds the project’s CI budget, or a required dynamic-circuit feature becomes available only through the other adapter. Recording the owner and next review date turns tool choice from folklore into a maintainable engineering decision.

The GHZ extension strengthens, but does not replace, asymmetric fixtures. Exact support {000,111} tests a three-qubit entangling chain and normalized qubit order, while prepared 001 and 100 still expose a full reversal that GHZ cannot. The conformance report therefore names which defect each case can reveal. Test portfolios should be designed for identifiability, not chosen because their output looks recognizably quantum.

Portability is earned at a boundary. The project promises that each pinned adapter maps the declared circuit contract into the common semantic record; it does not promise identical native schedules, noise attachments, intermediate representations, or future APIs. That narrower promise is testable and useful. A broad claim that “the code runs everywhere” is neither.

Retain native exceptions too. Normalizing every failure to “adapter unavailable” would erase whether construction, simulation, measurement extraction, or bit-order translation failed.

### GHZ adapter extension

Prompt: Add a GHZ circuit to both adapters and make the shared harness test exact ideal support plus seeded sampled support.

Deliverable: Two implementations, normalized records, shared tests, and a one-page choice memo for a named research or teaching workload.

Pass condition: Both implementations satisfy the same semantic oracle, all convention translations are explicit, and the choice memo cites measured maintenance or compilation differences.

### Reference comparison

Format: Reference GHZ adapters, expected normalized result records, and selection-memo rubric.

Verification: Run both pinned test environments and compare normalized exact probabilities within tolerance and count support against the shared oracle.

The normalized GHZ records have exact support on 000 and 111 with probability one half each, while each native record retains its own column ordering and schedule metadata. The selection memo chooses a tool only for the named workload and lists the integration or maintenance measurement that would reverse that choice.

Limits

This is a two-adapter experiment, not an SDK ranking. Equal ideal semantics do not establish equal native gates, resource cost, device access, or long-term maintenance.

External review

Open. Useful expertise: a Cirq power user and a cross-platform Python integration engineer.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

lab

### [Cross-SDK Bell conformance harness](/playground/quantum/book/39-cirq-and-alternative-toolchains/#artifact-39-cirq-and-alternative-toolchains)

[Download fixture (.py)](/playground/quantum/artifacts/39-cirq-and-alternative-toolchains/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/39-cirq-and-alternative-toolchains/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=39-cirq-and-alternative-toolchains#report)

Dependency graph

## Prerequisites for this chapter

- [Python and Quantum Programming Workflow Part V. Practical Software · Chapter 36](/playground/quantum/book/36-python-and-quantum-programming-workflow/)

- [Qiskit, Primitives, and Circuit Execution Part V. Practical Software · Chapter 38](/playground/quantum/book/38-qiskit-primitives-and-circuit-execution/)

Continue the thread

## Next concepts from this chapter

- [Transpilation and Hardware-Aware Compilation Part V. Practical Software · Chapter 40](/playground/quantum/book/40-transpilation-and-hardware-aware-compilation/)

- [Building a Small Simulator From Scratch Part V. Practical Software · Chapter 37](/playground/quantum/book/37-building-a-small-simulator-from-scratch/)

- [Noise Models and Noisy Simulation Part V. Practical Software · Chapter 41](/playground/quantum/book/41-noise-models-and-noisy-simulation/)

[Previous Qiskit, Primitives, and Circuit Execution](/playground/quantum/book/38-qiskit-primitives-and-circuit-execution/)[Next Transpilation and Hardware-Aware Compilation](/playground/quantum/book/40-transpilation-and-hardware-aware-compilation/)

In this chapter

- [Freeze the circuit contract before choosing syntax](#freeze-the-circuit-contract-before-choosing-syntax)

- [Cirq's qubits, moments, and simulator result](#cirq-s-qubits-moments-and-simulator-result)

- [A second adapter under the same assertions](#a-second-adapter-under-the-same-assertions)

- [Cross-SDK Bell conformance harness](#cross-sdk-bell-conformance-harness)

- [Differences the equality test cannot erase](#differences-the-equality-test-cannot-erase)

- [A workload-specific selection record](#a-workload-specific-selection-record)

- [GHZ adapter extension](#ghz-adapter-extension)

- [Reference comparison](#reference-comparison)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=39-cirq-and-alternative-toolchains#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/39-cirq-and-alternative-toolchains/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/40-transpilation-and-hardware-aware-compilation/ -->

# Transpilation and Hardware-Aware Compilation

The circuit you drew is not the circuit that runs. Between them sits the transpiler, rewriting your gates into the native set, routing around missing connections, and quietly deciding whether your algorithm fits the hardware's error budget.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Compile against a declared native gate set and coupling graph, record initial and final layouts, inserted SWAPs, direction fixes, depth, duration, and two-qubit count, then verify the compiled circuit against the abstract unitary or a complete small-instance oracle.

A routed circuit is a proof obligation with a cost ledger. The compiler must show which logical state occupies each physical site after every move and why the output still means what the input circuit meant.

[Figure 40.1.](#fig-40-transpilation-and-hardware-aware-compilation-1) After a SWAP, physical position and logical identity diverge. A compiler that reports only inserted gate count has omitted the map needed to interpret measurement.

## The target is a graph plus an instruction set

Start with an abstract circuit and a target contract. Vertices are physical qubit locations; directed or undirected edges identify allowed two-qubit operations; the instruction set names native one- and two-qubit gates. Add operation durations in seconds and calibration-specific error probabilities only when their protocol, scope, and date are known. Transpilation maps a circuit into such a target, and SDK compiler interfaces expose target-specific behavior [Qiskit transpiler documentation] [Cirq transformer documentation].

OpenQASM can express a program while leaving physical placement and target cost unresolved [OpenQASM 3 specification]. The compiler input must therefore include logical circuit, coupling graph, native entangler direction, initial layout policy, optimization objective, and whether measurements are reverse-mapped.

## Route one distant CNOT on a line

On physical line 0—1—2—3, logical CNOT(q0,q3) is unavailable at the initial layout [q0,q1,q2,q3]. The transparent teaching router moves q0 right twice: SWAP(0,1), SWAP(1,2), then CNOT(2,3). The physical operation trace is short, but the logical layout is now [q1,q2,q0,q3]. If the output is read as the original layout, a correct physical run becomes a wrong logical result.

The route is not claimed optimal. A production compiler may move the target, exploit direction, commute gates, or choose a different initial placement. Its result must still expose enough layout and target data to reproduce the cost.

### Expand SWAPs before comparing native cost

A SWAP is not usually a primitive entangler. Under a bidirectional CNOT basis, the familiar decomposition uses three CNOTs, so the teaching trace expands from two SWAPs plus one CNOT to seven CNOTs before single-qubit direction corrections. On a directed coupling graph, a reverse CNOT may itself require basis changes around an allowed-direction entangler. Reporting “three operations” would therefore mix an abstract routing instruction with native hardware instructions.

The ledger should retain both levels. Logical operations explain intent; routing operations explain movement; native instructions support duration and calibration lookup. These rows must not be summed until each operation has been lowered to the same instruction set. The expansion also changes depth: some one-qubit gates can overlap, while the CNOT chain sharing the moved qubit cannot.

## Prove the routed operation means the same thing

For five small logical bits, enumerate all 32 basis inputs. Simulate the abstract CNOT. Simulate every routed SWAP and CNOT on physical positions. Convert the final physical bit vector back through the final layout, then compare. This catches a correct-looking gate trace with a stale measurement map.

A basis oracle is complete for this classical reversible fragment. General quantum circuits need a unitary comparison up to global phase, process comparison, or a trusted simulator over a sufficiently complete test set. The semantic test and resource test are separate: a compiler can preserve the unitary while regressing depth badly.

For unitary matrices \(U\) and \(V\), a small-instance check can estimate the phase \(e^{i\phi}\) from a nonzero entry of \(U\) and test \(V\approx e^{i\phi}U\). Comparing entries directly would reject a physically identical circuit that differs only by global phase. Once measurement, reset, or classical control appears, there may be no single unitary; compare the resulting channels or an exhaustive branch oracle instead.

Measurement mapping deserves its own assertion. If logical q0 finishes at physical p2, the classical bit receiving p2 must be labeled q0 in the normalized result. Test this with asymmetric basis inputs after routing. A Bell circuit is insufficient because symmetric outcomes can conceal a stale final layout just as they conceal a reversed display convention.

### Nearest-neighbor routing trace and equivalence table

Distant CNOT on a four-site line
 | step | physical operation | layout after | two-qubit count

 | 0 | input | q0 q1 q2 q3 | 0
 | 1 | SWAP p0,p1 | q1 q0 q2 q3 | 1 SWAP
 | 2 | SWAP p1,p2 | q1 q2 q0 q3 | 2 SWAP
 | 3 | CNOT p2,p3 | q1 q2 q0 q3 | 2 SWAP + 1 CNOT

```
def route(control=0, target=3, sites=4):
    if (type(sites) is not int or sites < 2 or control == target or
            control not in range(sites) or target not in range(sites)):
        raise ValueError("control and target must be distinct physical sites")
    layout = list(range(sites)); ops = []
    while abs(layout.index(control)-layout.index(target)) > 1:
        p = layout.index(control); step = 1 if layout.index(target) > p else -1
        q = p + step
        layout[p], layout[q] = layout[q], layout[p]
        ops.append(("SWAP", p, q, tuple(layout)))
    ops.append(("CNOT", layout.index(control), layout.index(target), tuple(layout)))
    return ops
ops = route()
reverse_ops = route(3, 0)
adjacent_ops = route(1, 2)
invalid_rejected = False
try:
    route(0, 0)
except ValueError:
    invalid_rejected = True
assert [op[0] for op in ops] == ["SWAP", "SWAP", "CNOT"]
assert abs(ops[-1][1]-ops[-1][2]) == 1
assert sorted(ops[-1][3]) == [0,1,2,3]
assert [op[0] for op in reverse_ops] == ["SWAP", "SWAP", "CNOT"]
assert [op[0] for op in adjacent_ops] == ["CNOT"] and invalid_rejected
print(f"PASS: 40 routing forward_ops={len(ops)} reverse_ops={len(reverse_ops)} adjacent_ops={len(adjacent_ops)}")
```

Existing fixture: `cd labs && python -m unittest tests.test_companion_models.CompanionModelTests.test_line_router_exposes_swap_cost_and_layout -v`.

## Count gates, layers, duration, and error separately

Gate count is a count. Depth is a schedule length in layers under a stated parallelism rule. Duration is seconds computed from target-specific instruction times. Error is a protocol-defined probability per operation or circuit. Do not multiply a vendor average error by a gate count and call it success probability without an independence model, leakage policy, and calibration match. Modern benchmarking guidance treats these as non-equivalent axes [benchmarking review].

Units-bearing comparison
 | metric | abstract | routed teaching trace | unit/assumption

 | two-qubit operations | 1 CNOT | 2 SWAP + 1 CNOT | operation counts; SWAP decomposition not expanded
 | depth | 1 | 3 | serial layers
 | duration | unknown | 2t swap +t cx | seconds after calibration supplied
 | error | unknown | unknown | requires operation-level model

Suppose a calibrated target declares 240 ns for each native CNOT and 35 ns for each required Hadamard. Seven serial CNOTs alone imply 1.68 μs; direction fixes add their scheduled one-qubit layers. That arithmetic is a target-specific duration estimate, not a fidelity estimate. A cost record must include the calibration identifier and the exact schedule from which the critical path was summed.

An error ledger is more delicate. The product \(\prod_j(1-r_j)\) is defensible only under a stated independent stochastic model with matched per-instruction error probabilities. Coherent error, crosstalk, leakage, and temporal drift violate that shortcut. Preserve raw calibration fields and label any composed number as a model output rather than measured circuit success.

## Calibration turns one circuit into many schedules

A layout favorable yesterday may cross a weak edge today. Direction fixes, dynamical constraints, readout assignment, and concurrent-crosstalk exclusions change the schedule. Full-stack performance couples compiler decisions to control and topology [full-stack review]. Store target and calibration identifiers, compiler version/options, and transpiled hash. Compiled evidence expires even when the logical circuit does not.

This is why optimization should be multiobjective and auditable. Minimizing two-qubit count may choose a slower edge; minimizing nominal duration may concentrate work on a drifting qubit; minimizing an error-model score may lengthen the critical path beyond a coherence budget. Record the objective and the values of the alternatives considered. A compiler seed is part of the evidence because stochastic placement can otherwise make a regression appear and disappear between runs.

## Compiler regression fixtures

Maintain three classes: semantic fixtures compare outputs after reverse mapping; structural fixtures assert every operation is native and every entangler uses an allowed edge/direction; cost fixtures use explicit ceilings or relative non-regression thresholds. Never hard-code one exact route unless route stability itself is the API. Report improvements and regressions in counts, layers, and seconds independently.

Add metamorphic cases: relabel the physical graph and initial layout together, reverse a line target, or insert canceling one-qubit gates before optimization. The compiled text may change, but normalized semantics and appropriately relabeled costs should not. These tests detect hidden dependence on vertex numbering and compiler passes that silently discard or duplicate operations.

The five-site exercise has 32 inputs because the transparent verifier carries five logical bits even though the routed CNOT names only two. For each row, it initializes physical positions from the initial layout, applies every SWAP and directed CNOT, then reconstructs logical order from the final layout. Comparing before reverse mapping would test a different output convention and can falsely condemn a correct route.

Report the route trace as state transitions, not only a final permutation. After every SWAP, assert that the layout remains a bijection over logical labels; after every entangler, assert adjacency and direction in the target graph. Those local invariants identify the first illegal step. A final truth-table mismatch alone says only that something somewhere in routing or measurement mapping went wrong.

Cost ceilings should tolerate equivalent routing choices while detecting regression. For a named target and seed, one policy might require semantic equality, native-only operations, at most a declared two-qubit count, and duration no worse than the recorded baseline by more than a stated percentage. If calibration changes, create a new baseline record rather than comparing seconds computed from different target data.

Finally, keep compiler optimization claims scoped. Reducing a symbolic depth from ten to eight layers says nothing about wall time until scheduling applies instruction durations and constraints. Reducing seven native entanglers to six says nothing about fidelity without a matched error model. The compiler has several ledgers because optimization can improve one while harming another.

The publishable record links those ledgers through one transpiled-circuit hash. Counts, schedule seconds, layout trace, and semantic verification must all describe that exact artifact, not neighboring compiler runs.

### Five-site route audit

Prompt: Route CNOT(q0,q4) on a five-site line, verify every computational-basis input, and compare it with an all-to-all target.

Deliverable: Operation trace, final layout, exhaustive truth table, and before/after resource table with counts, layers, and assumed durations.

Pass condition: All 32 basis inputs agree after reverse mapping, every resource column has units, and the report does not infer physical error from gate count alone.

### Reference route

Format: Generated trace/CSV and a reference reverse-layout verifier.

Verification: Unit tests regenerate the trace, assert semantic equality, validate layout permutations, and check resource-table totals.

A transparent route moves one endpoint through three adjacent SWAPs before the CNOT and preserves the resulting final layout for reverse mapping. All 32 inputs agree with the abstract operation. The all-to-all case uses one two-qubit layer; duration remains symbolic until target operation times are supplied.

Limits

The line router is inspectable, not optimal. Unitary equivalence does not establish calibrated feasibility, and the symbolic duration table is not a device forecast.

External review

Open. Useful expertise: placement-and-routing expertise and hardware-aware compiler testing.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

lab

### [Nearest-neighbor routing trace and equivalence table](/playground/quantum/book/40-transpilation-and-hardware-aware-compilation/#artifact-40-transpilation-and-hardware-aware-compilation)

[Download fixture (.py)](/playground/quantum/artifacts/40-transpilation-and-hardware-aware-compilation/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/40-transpilation-and-hardware-aware-compilation/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=40-transpilation-and-hardware-aware-compilation#report)

Dependency graph

## Prerequisites for this chapter

- [Circuit Cost: Depth, Width, Gate Set, Connectivity Part III. Circuit Model · Chapter 22](/playground/quantum/book/22-circuit-cost-depth-width-gate-set-connectivity/)

- [Building a Small Simulator From Scratch Part V. Practical Software · Chapter 37](/playground/quantum/book/37-building-a-small-simulator-from-scratch/)

Continue the thread

## Next concepts from this chapter

- [The Full Quantum Computer Stack Part VII. Hardware Architecture · Chapter 54](/playground/quantum/book/54-full-quantum-computer-stack/)

- [Superconducting Qubits Part VII. Hardware Architecture · Chapter 55](/playground/quantum/book/55-superconducting-qubits/)

- [Trapped Ions Part VII. Hardware Architecture · Chapter 56](/playground/quantum/book/56-trapped-ions/)

[Previous Cirq and Alternative Toolchains](/playground/quantum/book/39-cirq-and-alternative-toolchains/)[Next Noise Models and Noisy Simulation](/playground/quantum/book/41-noise-models-and-noisy-simulation/)

In this chapter

- [The target is a graph plus an instruction set](#the-target-is-a-graph-plus-an-instruction-set)

- [Route one distant CNOT on a line](#route-one-distant-cnot-on-a-line)

- [Expand SWAPs before comparing native cost](#expand-swaps-before-comparing-native-cost)

- [Prove the routed operation means the same thing](#prove-the-routed-operation-means-the-same-thing)

- [Nearest-neighbor routing trace and equivalence table](#nearest-neighbor-routing-trace-and-equivalence-table)

- [Count gates, layers, duration, and error separately](#count-gates-layers-duration-and-error-separately)

- [Calibration turns one circuit into many schedules](#calibration-turns-one-circuit-into-many-schedules)

- [Compiler regression fixtures](#compiler-regression-fixtures)

- [Five-site route audit](#five-site-route-audit)

- [Reference route](#reference-route)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=40-transpilation-and-hardware-aware-compilation#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/40-transpilation-and-hardware-aware-compilation/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/41-noise-models-and-noisy-simulation/ -->

# Noise Models and Noisy Simulation

An ideal simulator tells you what your circuit means; a noisy one tells you what it might survive. This chapter gives you the handful of noise models worth knowing and the diagnosis habit that turns strange counts into evidence instead of shrugs.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Implement each channel as a trace-preserving map on a declared density matrix, choose preparations and measurement bases that make its signature observable, separate exact channel output from sampled counts, and label every parameter as pedagogical or calibrated.

Noise diagnosis is an experimental-design problem. A channel may change an off-diagonal matrix element while leaving the computational-basis histogram untouched; the simulator must preserve that distinction instead of producing one generic “noise strength” slider.

[Figure 41.1.](#fig-41-noise-models-and-noisy-simulation-1) Readout confusion acts on classical outcome probabilities. Moving it into the channel changes the physical question and can hide a basis-dependent diagnosis.

## A noise model is a map with a declared domain

The teaching domain is a \(2\times2\) density matrix \(\rho\): Hermitian, positive semidefinite, trace one. A physical quantum channel must be trace preserving and completely positive [Nielsen and Chuang]. These conditions prevent a simulator from emitting negative probabilities or changing total probability while still drawing an attractive plot.

The bit-flip channel is \(\mathcal E_p(\rho)=(1-p)\rho+pX\rho X\), with dimensionless p per channel application. This is a pedagogical Pauli channel, not a named device mechanism. Decoherence models are useful only when their assumptions remain visible [Preskill notes]. The Lindblad and Gorini–Kossakowski–Sudarshan results characterize generators of continuous-time Markovian completely positive dynamical semigroups; citing them does not make every processor’s noise Markovian [Lindblad] [Gorini, Kossakowski, and Sudarshan].

The Kraus form makes the validity check executable. Set \(K_0=\sqrt{1-p}I\) and \(K_1=\sqrt p X\), then compute \(\mathcal E_p(\rho)=\sum_k K_k\rho K_k^\dagger\). The completeness relation \(\sum_k K_k^\dagger K_k=I\) proves trace preservation for \(0\le p\le1\); the operator-sum construction supplies complete positivity. Reject p outside that interval rather than clipping it. Clipping conceals a caller error and changes a supposedly recorded experiment.

Test positivity with eigenvalues, not diagonal entries alone. A Hermitian matrix can have nonnegative diagonal elements and still possess a negative eigenvalue because its coherence is too large. For a \(2\times2\) state, checking trace, Hermiticity, and both eigenvalues to a declared numerical tolerance is inexpensive. The tolerance belongs to floating-point validation; it is not permission to accept a materially unphysical state.

## Bit flips move populations

Apply the channel to \(\lvert0\rangle\!\langle0\rvert\). The result is diagonal: population 1−p on \(\lvert 0 \rangle\) and p on \(\lvert 1 \rangle\). A Z-basis measurement sees it directly. At p=0, recover the input; at p=1, recover \(\lvert 1 \rangle\); at p=0.1, exact probabilities are 0.9 and 0.1. Assert trace one, Hermiticity, nonnegative diagonal probabilities, and analytic entries at tolerance 10 −12.

On an arbitrary state \(\rho=\begin{bmatrix}a&c\\c^*&1-a\end{bmatrix}\), the bit-flip channel gives diagonal entry \(a'= (1-p)a+p(1-a)\) and exchanges the off-diagonal elements inside the weighted sum. At p=1/2, populations become equal for every input, but coherence need not vanish. This is why “bit flip at fifty percent” is not the completely depolarizing channel: some X-axis information survives.

Use \(\lvert 0 \rangle\) and \(\lvert + \rangle\) as complementary probes. The first exposes population transfer in Z. The second is an +1 eigenstate of X, so an X error changes it only by the same state and the X-basis outcome remains deterministic. A diagnostic that reports identical degradation for both probes has likely implemented a depolarizing shortcut instead of the declared bit-flip map.

## Dephasing hides until the basis changes

For \(\lvert+\rangle\!\langle+\rvert\), computational-basis populations begin at one half and stay there under dephasing. The off-diagonal coherence shrinks. A Z histogram therefore cannot distinguish ideal \(\lvert + \rangle\) from a fully dephased mixture. Rotate with H and measure Z—equivalently measure X—and the lost coherence becomes a changed outcome probability.

This is why “we measured the same bit distribution” is not a channel-validation claim. State preparation and measurement basis decide which channel signature is identifiable.

The fixture uses the phase-flip convention \(\mathcal Z_p(\rho)=(1-p)\rho+pZ\rho Z\). For \(\lvert + \rangle\), the coherence is multiplied by \(1-2p\), and the X-basis minus probability is p. At p=1/2 the state is fully dephased; at p=1 the state is \(\lvert - \rangle\), which is coherent rather than mixed. Calling p=1 “maximum dephasing” would therefore be wrong under this parameterization.

A phase-damping model is often parameterized so coherence decays monotonically toward zero instead. The two channels may coincide at selected parameter values but their parameters do not share a universal meaning. Store the channel name, Kraus operators or defining equation, application scope, and parameter convention. A bare field named `dephasing: 0.1` is not reproducible.

The two-basis diagnosis is now analytic. With p=0.1 and \(\lvert + \rangle\) input, Z probabilities remain (0.5,0.5), while after H the Z probability of one is 0.1. For a bit-flip channel on \(\lvert 0 \rangle\), Z probability of one is 0.1, while an X measurement is balanced. The same decimal produces different pairs of signatures; the pair, not the decimal, identifies the implemented mechanism.

## Shot noise and channel noise leave different records

The exact post-channel matrix and probabilities belong in one record. Sampled counts, shots, pseudorandom generator, seed, and acceptance interval belong in another. Increasing shots narrows sampling uncertainty; it does not remove channel error. Conversely, setting p=0 does not force a finite sample to contain exact expected proportions. Hardware benchmark interpretation must separate sampling, preparation, gate, and measurement contributions [benchmarking review]; randomized benchmarking supports its own bounded decay-model claim rather than a general application claim [Magesan, Gambetta, and Emerson].

For a binary measurement with exact probability q and n independent shots, the count variance is \(nq(1-q)\); the frequency standard deviation is \(\sqrt{q(1-q)/n}\). At q=0.1 and n=1,000, that standard deviation is about 0.0095. A frequency of 0.112 may be ordinary shot variation even though it differs from the exact channel output. The acceptance rule must be chosen before seeing the count and must state whether a normal approximation, exact interval, or hypothesis test is used.

Repeat seeds do not provide independent experimental replicates if every other simulated input is identical, and more simulated shots cannot establish that a toy channel matches hardware. They estimate the sampler wrapped around the chosen model. Report exact-model error separately from Monte Carlo error so that a reader can see which one additional computation can reduce.

### Channel signature and readout-confusion notebook-free lab

Diagnostic signatures at p=0.1
 | input | mechanism | Z-basis Pr(1) | X-basis Pr(−)

 | \(\lvert 0 \rangle\) | bit flip | 0.1 | 0.5
 | \(\lvert + \rangle\) | dephasing | 0.5 | 0.1 under phase-flip convention
 | measured bit | 5% symmetric confusion | 0.05+0.90p | applied after basis measurement

```
def bit_flip_zero(p): return ((1-p, 0.0), (0.0, p))
def dephase_plus(p): return ((0.5, 0.5*(1-2*p)), (0.5*(1-2*p), 0.5))
def trace(rho): return rho[0][0] + rho[1][1]
def x_minus_probability(rho): return 0.5*(1 - 2*rho[0][1])
def readout_confuse(p_one, e=.05): return e*(1-p_one) + (1-e)*p_one
rho_x = bit_flip_zero(.1); rho_z = dephase_plus(.1)
identity_case = bit_flip_zero(0.0); complete_dephase = dephase_plus(0.5)
assert abs(trace(rho_x)-1) < 1e-12 and abs(trace(rho_z)-1) < 1e-12
assert abs(rho_x[1][1]-.1) < 1e-12
assert abs(x_minus_probability(rho_z)-.1) < 1e-12
assert abs(readout_confuse(.1)-.14) < 1e-12
assert identity_case == ((1.0, 0.0), (0.0, 0.0)) and complete_dephase[0][1] == 0.0
print(f"PASS: 41 noise bitflip_population={rho_x[1][1]:.3f} dephase_coherence={rho_z[0][1]:.3f} complete_dephase={complete_dephase[0][1]:.1f}")
```

Existing check: `cd labs && python -m unittest tests.test_companion_models.CompanionModelTests.test_bit_flip_and_dephasing_channels -v`.

## Readout confusion belongs after the state

A symmetric confusion matrix flips the reported classical bit with probability e. If the true probability of one is q, the reported probability is e(1−q)+(1−e)q. The matrix acts after the chosen quantum measurement. Treating it as decoherence would incorrectly make it change with preparation basis and would prevent separate calibration.

Official SDK simulators expose model-specific configurations, not a universal hardware truth [Qiskit noise documentation] [Cirq noise documentation]. Preserve whether a configured error is a channel, gate attachment, or readout model.

For asymmetric readout, write \(M=\begin{bmatrix}1-e_{0\to1}&e_{1\to0}\\e_{0\to1}&1-e_{1\to0}\end{bmatrix}\) acting on the true probability column. Each column sums to one. Calibrate the two error directions separately using prepared \(\lvert 0 \rangle\) and \(\lvert 1 \rangle\). Symmetry is a simplifying assumption, not a property to infer from one average percentage.

Inverting M can estimate pre-readout probabilities when the matrix is known and well conditioned, but inversion amplifies calibration and sampling error. It may produce negative components. Keep the raw counts, calibration record, inversion method, and uncertainty; never replace observations with clipped corrected values. Mitigation changes the estimator and its variance, not the underlying state.

## Calibrated claims need more than p

A device claim needs channel scope, gate dependence, qubit pair, timing, leakage policy, correlations, crosstalk, drift, timestamp, calibration protocol, and uncertainty. One-qubit stationary channels omit non-Markovian behavior and context. Label the artifact’s p values “teaching parameters.” Calibration-like decimal places do not make them calibrated.

Composition order can matter. A coherent rotation followed by dephasing need not equal dephasing followed by that rotation, and a gate-attached channel is applied a different number of times after transpilation changes. Record the compiled operation trace and the precise insertion rule: before gate, after gate, per duration, or once per idle interval. Otherwise two simulators can accept the same parameter file and implement different processes.

Finally, validate the simulator against limiting cases and composition identities before fitting anything. Identity at p=0, X conjugation at p=1, complete phase loss at the convention’s p=1/2, trace preservation after repeated applications, and agreement between explicit matrices and Kraus evaluation are stronger evidence than a smooth noise curve. Smoothness is easy to generate; the declared channel algebra is the contract.

Channel order should be an explicit test case. Apply dephasing to \(\lvert + \rangle\), rotate with H, then add readout confusion; compare that with the deliberately wrong implementation that confuses labels before the H. The first path changes a classical distribution only after a quantum basis choice. The second effectively defines a different quantum experiment. Their disagreement is the evidence that the simulator has preserved layer boundaries rather than collapsing every imperfection into one probability.

For each mechanism, store an identifiability statement: which inputs and observables respond, which remain unchanged, and which alternative channel shares that signature. Bit-flip p=0.1 on \(\lvert 0 \rangle\) is visible in Z; phase flip p=0.1 on \(\lvert + \rangle\) is visible in X; symmetric readout affects both after measurement. A model library without this table encourages parameter fitting to non-identifying data.

A final fixture composes each channel twice and compares the result with the analytic effective parameter. This catches implementations that mutate the input matrix, apply the channel once per matrix entry, or renormalize after every step. Composition tests the map as an operation, not merely one attractive endpoint.

### Mechanism separation

Prompt: Choose an input state and two measurement bases that distinguish bit-flip probability 0.1 from dephasing probability 0.1, then add five-percent symmetric readout confusion.

Deliverable: Analytic density matrices, simulator output, sampled records with seed/shots, and a diagnosis table for the three mechanisms.

Pass condition: Trace remains one, matrices stay Hermitian, the chosen bases separate channel signatures, and readout error is applied only after quantum measurement probabilities.

### Reference diagnostics

Format: Reference matrices, CSV outputs, and diagnosis table with tolerance and confidence rules.

Verification: Tests compare matrix entries to analytic values at 1e-12 and sampled proportions to precomputed binomial acceptance intervals.

Use |0> with Z measurement to reveal bit flips and |+> with X measurement to reveal dephasing. Both exact matrices retain trace one and Hermiticity. The five-percent confusion matrix then acts on each already-computed measurement distribution, so its effect remains separable from channel evolution.

Limits

The fixture omits leakage, correlated and non-Markovian noise, drift, crosstalk, and any named processor. It cannot validate hardware merely because its curves look realistic.

External review

Open. Useful expertise: open-quantum-systems and simulation-software expertise.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

lab

### [Channel signature and readout-confusion notebook-free lab](/playground/quantum/book/41-noise-models-and-noisy-simulation/#artifact-41-noise-models-and-noisy-simulation)

[Download fixture (.py)](/playground/quantum/artifacts/41-noise-models-and-noisy-simulation/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/41-noise-models-and-noisy-simulation/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [Göran Lindblad. On the generators of quantum dynamical semigroups. Communications in Mathematical Physics. 1976](https://doi.org/10.1007/BF01608499) primary peer-reviewed theory paper

- [Vittorio Gorini, Andrzej Kossakowski, and E. C. G. Sudarshan. Completely positive dynamical semigroups of N-level systems. Journal of Mathematical Physics. 1976](https://doi.org/10.1063/1.522979) primary peer-reviewed theory paper

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

- [Easwar Magesan, J. M. Gambetta, and Joseph Emerson. Scalable and robust randomized benchmarking of quantum processes. Physical Review Letters. 2011](https://doi.org/10.1103/PhysRevLett.106.180504) primary paper

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=41-noise-models-and-noisy-simulation#report)

Dependency graph

## Prerequisites for this chapter

- [Density Matrices and Mixed States Part II. Mathematical Core · Chapter 15](/playground/quantum/book/15-density-matrices-and-mixed-states/)

- [Building a Small Simulator From Scratch Part V. Practical Software · Chapter 37](/playground/quantum/book/37-building-a-small-simulator-from-scratch/)

Continue the thread

## Next concepts from this chapter

- [Benchmarking Quantum Programs Part V. Practical Software · Chapter 42](/playground/quantum/book/42-benchmarking-quantum-programs/)

- [Decoherence and Error Channels Part VI. Reliability and Fault Tolerance · Chapter 45](/playground/quantum/book/45-decoherence-and-error-channels/)

- [Error Mitigation vs Error Correction Part VI. Reliability and Fault Tolerance · Chapter 46](/playground/quantum/book/46-error-mitigation-vs-error-correction/)

[Previous Transpilation and Hardware-Aware Compilation](/playground/quantum/book/40-transpilation-and-hardware-aware-compilation/)[Next Benchmarking Quantum Programs](/playground/quantum/book/42-benchmarking-quantum-programs/)

In this chapter

- [A noise model is a map with a declared domain](#a-noise-model-is-a-map-with-a-declared-domain)

- [Bit flips move populations](#bit-flips-move-populations)

- [Dephasing hides until the basis changes](#dephasing-hides-until-the-basis-changes)

- [Shot noise and channel noise leave different records](#shot-noise-and-channel-noise-leave-different-records)

- [Channel signature and readout-confusion notebook-free lab](#channel-signature-and-readout-confusion-notebook-free-lab)

- [Readout confusion belongs after the state](#readout-confusion-belongs-after-the-state)

- [Calibrated claims need more than p](#calibrated-claims-need-more-than-p)

- [Mechanism separation](#mechanism-separation)

- [Reference diagnostics](#reference-diagnostics)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=41-noise-models-and-noisy-simulation#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/41-noise-models-and-noisy-simulation/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/42-benchmarking-quantum-programs/ -->

# Benchmarking Quantum Programs

A benchmark is a reproducible comparison under stated assumptions, not a chart. This chapter builds the artifact that makes a quantum result inspectable: a benchmark card that names the baseline, the circuit cost, the noise assumptions, and the exact claim the evidence supports.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Fix the task, input distribution, success metric, hardware or simulator layer, compilation policy, classical baseline, shot allocation, and uncertainty method before running; report capability, quality, speed, and resource costs separately because no scalar score makes them interchangeable.

The benchmark record is a contract for comparison. It says what stayed fixed, what varied, which observations count, and which result must be rejected even if a curve fits.

[Figure 42.1.](#fig-42-benchmarking-quantum-programs-1) The four measurements do not flow into a weighted “quantum score.” They pass through a validity gate whose assumptions and baseline are part of the result.

## The comparison contract comes before the circuit

Write the task, input ensemble, success condition, execution layer, compilation policy, excluded runs, and classical baseline before collecting results. If input sizes differ, if one system receives preprocessed answers, or if failed quantum jobs vanish from the denominator, the chart compares pipelines chosen to produce a conclusion rather than systems answering the same question.

Record SDK/backend versions, target identity, transpilation settings, shots, seeds, raw outputs, and calibration date [Qiskit documentation] [Cirq documentation]. Decide uncertainty and stopping rules in advance. A public plot without raw data and analysis code does not meet a rerunnable artifact standard [ACM artifact review guidance].

The unit of observation must be declared. A shot, circuit instance, random sequence, compilation seed, calibration session, and device day are different replication levels. Ten thousand shots from one compiled circuit characterize its measurement distribution; they do not provide ten thousand independent samples of compiler variability or day-to-day device behavior. Confidence intervals that treat nested observations as independent will be too narrow.

Predeclare missing-data policy. Queue timeout, calibration abort, compiler failure, and invalid output are benchmark outcomes unless the contract explicitly assigns them outside the evaluated service. Dropping them only from one system changes the denominator. Preserve a reason-coded exclusion table and publish the result both before and after any allowed exclusions.

## Four axes that refuse to collapse

Capability states which instances can run under declared width, connectivity, memory, and instruction constraints. Quality states success probability, distance, energy, fidelity, or another task metric with uncertainty. Time separates compile, queue, device, sampling, and total wall seconds. Resources report physical/logical qubits, shots, two-qubit operations, memory, energy, or cost under defined denominators.

A machine can be faster and less accurate, capable of a wider circuit and slower end to end, or lower-error at vastly greater physical overhead. Benchmark surveys therefore treat multiple non-equivalent properties and interpretation boundaries [benchmarking review]. A scalar score hides the trade the reader needs to see.

Denominators make the axes interpretable. Success per attempted instance differs from success per completed job. Seconds per shot differs from seconds per statistically accepted answer. Physical qubits differ from logical qubits, and both differ from qubit-seconds. Put the denominator in the column name and reject rows that omit it. Unit conversion cannot repair a different task or success criterion.

Present Pareto comparisons where appropriate. If system A is faster and system B is more accurate, neither dominates until the workload supplies a constraint or utility. A latency ceiling may select A; a minimum fidelity may select B. The benchmark should expose that decision boundary instead of choosing private weights and announcing a winner.

## Fit the synthetic RB decay

The teaching fixture uses single-qubit randomized-benchmarking survival \(S(m)=Ap^m+B\), with fixed A=0.4 and B=0.5 in the synthetic generator. Under this convention, error per Clifford is (1−p)/2. The protocol’s decay interpretation is model-dependent, not an application runtime or advantage measure [randomized benchmarking] [benchmarking review].

Subtract B, take logarithms, and fit log(S−B) against sequence length m. For exact synthetic data planted with p=0.98, the slope is log(0.98). Publish lengths, survival values, fixed constants, fit implementation, residuals, and derived convention. A fitted number without those items is not portable.

The log transform changes the error model. Ordinary least squares in log space treats multiplicative residuals as homogeneous, while measured survival fractions have shot-dependent binomial variance in linear space. The exact teaching fixture avoids that complication; experimental analysis must state its likelihood or weighting. Points near B are especially sensitive because a small survival error becomes a large error in \(\log(S-B)\), and observations at or below the fixed floor cannot be logged.

Sequence averaging is part of the protocol. For each length, sample multiple random Clifford sequences, execute multiple shots per sequence, and retain both levels. Variation across sequences can exceed finite-shot variation. Pooling all shots before analysis discards that heterogeneity and can make an unstable compilation ensemble look precise.

Under the chapter’s convention, p is a decay parameter and \((1-p)/2\) is an inferred error per Clifford for the stated single-qubit model. It is not automatically error per native gate. A Clifford may compile to different native sequences across targets or dates, so translating the estimate requires a declared decomposition model and additional assumptions.

## Break the fit with leakage and drift

A leakage-like floor shift bends residuals because the assumed B is wrong. Temporal drift makes early and late sequences follow different effective decays. Both datasets can return a numerical slope; neither earns the label “error per Clifford under the model.” The benchmark should fail its own validity gate.

Inspect signed residuals by length and acquisition order. Random scatter around zero supports, but does not prove, the model. Curvature, runs, or split-session offsets trigger a rejection code. Numerical convergence is not model validity.

A concrete floor-shift fixture can add an m-dependent offset that approaches 0.03. Fitting the fixed B=0.5 model forces the slope to absorb the curvature: short sequences pull one way and long sequences another. The residual signs then form a structured arc. The correct output is a failed model check plus the raw curve, not a more precise decimal for p.

For drift, interleave sequence lengths rather than acquiring all short sequences first and long ones last. Randomized acquisition order reduces confounding between m and time, while timestamps preserve the ability to diagnose drift. Split the record at the known intervention or use a time-aware model only if that analysis was specified. Averaging two regimes into one decay parameter describes neither regime.

Leakage may require an observable or outcome space beyond the assumed qubit survival model. If leaked population is coerced into a binary result, the residual test can miss the mechanism. Record invalid or out-of-computational-space outcomes when the platform exposes them, and state when the measurement cannot distinguish leakage from loss or readout error.

### Randomized-benchmarking fit with assumption-violation fixtures

Fixture decisions
 | dataset | construction | fit behavior | publication decision

 | valid | 0.4·0.98 m +0.5 | recovers p=0.98 | report with model label
 | floor shift | asymptote changes with m | curved residuals | reject single decay
 | drift | p changes by acquisition block | ordered residual runs | reject aggregate

```
from math import log, exp
lengths = [1,2,4,8,16]
valid = [0.4*(0.98**m)+0.5 for m in lengths]
def fit_fixed_model(values):
    xs, ys = lengths, [log((s-.5)/.4) for s in values]
    slope = sum(x*y for x,y in zip(xs,ys))/sum(x*x for x in xs)
    p = exp(slope)
    residuals = [s-(.4*(p**m)+.5) for m,s in zip(xs,values)]
    return p, residuals
p, residuals = fit_fixed_model(valid)
assert abs(p-.98) < 1e-12 and max(map(abs,residuals)) < 1e-12
violated = valid[:]; violated[-1] += .03
_, bad_residuals = fit_fixed_model(violated)
assert max(map(abs,bad_residuals)) > 1e-3
print(f"PASS: 42 benchmark fitted_decay={p:.6f} valid_max_residual={max(map(abs,residuals)):.3g} mutant_max_residual={max(map(abs,bad_residuals)):.6f}")
```

Existing fit check: `cd labs && python -m unittest tests.test_companion_models.CompanionModelTests.test_rb_fit_recovers_synthetic_decay -v`.

## The classical baseline gets its own tuning budget

For program benchmarks, name the best relevant classical method and implementation, hardware, precision, initialization, preprocessing, tuning budget, and stopping rule. Give both paths the same task inputs and count all work. A quantum run compared with an untuned textbook baseline establishes only that the baseline was weak.

Keep device characterization separate from application comparison. RB may help explain a device layer; it cannot substitute for task quality, total time, or a classical baseline.

Count preprocessing symmetrically. If a quantum workflow receives a problem-specific embedding, compiled ansatz, or classically optimized parameters, their computation belongs in total time unless the comparison contract explicitly evaluates an amortized repeated-use setting. The baseline receives the same training data, precision target, and wall-clock or compute budget. Initialization and failed restarts remain in the record.

A credible baseline can be a portfolio rather than one algorithm. Choose among relevant exact, heuristic, and approximation methods using a tuning protocol fixed without access to held-out benchmark answers. Reporting only the weakest baseline invites a false advantage claim; reporting an unlimited classical search against a time-limited quantum run is equally uninformative.

## A benchmark record that can expire

Publish environment locks, code/data hashes, target and calibration date, circuit hashes before and after compilation, raw observations, exclusion log, analysis command, uncertainty method, baseline record, and review deadline. Dated hardware and SDK facts expire. The raw record should remain immutable while a later analysis version can be compared against it.

Include a machine-readable validity decision. Fields should name the assumed model, checks performed, thresholds chosen in advance, pass/fail outcome, and reason code. A downstream chart generator must refuse rejected rows by default while still allowing a diagnostic plot. That prevents a numerical result from escaping its failed model check during later aggregation.

Separate acquisition revision from analysis revision. Re-fitting old raw data with corrected code can be legitimate if both versions and changed conclusions are preserved. Replacing raw data after seeing a result is a new acquisition and needs a new identifier. The history is part of the evidence because seemingly minor cleaning choices can decide which system appears best.

Uncertainty should follow the comparison level. Binomial intervals describe shots within a circuit. Bootstrap or hierarchical estimates can capture variation across random sequences, compilation seeds, or sessions when those are the sampled units. A confidence interval over pooled shots cannot support a claim about day-to-day stability. Publish the grouping columns so a second analyst can reconstruct the chosen level.

Timing needs the same decomposition. Record classical preprocessing, circuit construction, compilation, queue, device execution, readout, network transfer, and analysis in seconds. For a service claim, total elapsed time includes queue and retries. For a device-control experiment, an explicitly scoped device duration may be the target. Both can be reported, but substituting one for the other after results arrive invalidates the comparison contract.

The intentionally failed fixture belongs in the primary artifact. Its fit routine returns a finite p, and the validity layer rejects the result because residual structure exceeds the predeclared threshold. CI must assert both facts. If later code suppresses the numerical output or lets it pass, the test fails. This is stronger than documenting, in prose, that models sometimes break.

A benchmark conclusion should be no broader than its input distribution. Success on selected small instances supports performance on that sampled set under the recorded stack. It does not establish asymptotic scaling, another workload family, or advantage over future classical methods. State the population to which the estimate generalizes, then identify the next experiment that would widen it.

Publication tables should carry a validity column beside every estimate. The rejected floor-shift and drift rows remain visible with their finite fitted slopes, but downstream ranking code excludes them. That design proves the validity gate controls interpretation instead of serving as prose that a chart can ignore.

### Three-fit validity audit

Prompt: Fit the three supplied decay datasets, inspect residuals, and decide which result may be reported as error per Clifford under the chapter's assumptions.

Deliverable: Raw-data hashes, fit outputs, residual plot or table, comparison contract, and a one-paragraph validity decision per dataset.

Pass condition: The valid fixture recovers the planted parameter within tolerance; leakage and drift cases are not presented as valid single-decay estimates.

### Reference decisions

Format: Reference fits, residual tables, and a rubric separating numerical fit success from model validity.

Verification: Regenerate all outputs from raw CSV, assert hashes and tolerances, and require explicit rejection codes for violated fixtures.

Only the planted single-decay dataset earns an error-per-Clifford value under the chapter’s fixed-asymptote model. The shifted-floor and drift fixtures may return finite slopes, but their structured residuals trigger explicit rejection codes. Numerical optimizer success is recorded separately from model acceptance.

Limits

The fixture fixes the asymptote and omits SPAM separation, leakage modeling, gate dependence, drift inference, and confidence intervals. It cannot rank vendors or establish application advantage.

External review

Open. Useful expertise: quantum-characterization and experimental-design/statistical expertise.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

lab

### [Randomized-benchmarking fit with assumption-violation fixtures](/playground/quantum/book/42-benchmarking-quantum-programs/#artifact-42-benchmarking-quantum-programs)

[Download fixture (.py)](/playground/quantum/artifacts/42-benchmarking-quantum-programs/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/42-benchmarking-quantum-programs/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Easwar Magesan, J. M. Gambetta, and Joseph Emerson. Scalable and robust randomized benchmarking of quantum processes. Physical Review Letters. 2011](https://doi.org/10.1103/PhysRevLett.106.180504) primary paper

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=42-benchmarking-quantum-programs#report)

Dependency graph

## Prerequisites for this chapter

- [Python and Quantum Programming Workflow Part V. Practical Software · Chapter 36](/playground/quantum/book/36-python-and-quantum-programming-workflow/)

- [Noise Models and Noisy Simulation Part V. Practical Software · Chapter 41](/playground/quantum/book/41-noise-models-and-noisy-simulation/)

Continue the thread

## Next concepts from this chapter

- [Qiskit, Primitives, and Circuit Execution Part V. Practical Software · Chapter 38](/playground/quantum/book/38-qiskit-primitives-and-circuit-execution/)

- [Reproducible Quantum Labs Part V. Practical Software · Chapter 44](/playground/quantum/book/44-reproducible-quantum-labs/)

- [Quantum-Centric Supercomputing and Hybrid Workflows Part VII. Hardware Architecture · Chapter 63](/playground/quantum/book/63-quantum-centric-supercomputing-and-hybrid-workflows/)

[Previous Noise Models and Noisy Simulation](/playground/quantum/book/41-noise-models-and-noisy-simulation/)[Next Resource Estimation for Fault-Tolerant Algorithms](/playground/quantum/book/43-resource-estimation-for-fault-tolerant-algorithms/)

In this chapter

- [The comparison contract comes before the circuit](#the-comparison-contract-comes-before-the-circuit)

- [Four axes that refuse to collapse](#four-axes-that-refuse-to-collapse)

- [Fit the synthetic RB decay](#fit-the-synthetic-rb-decay)

- [Break the fit with leakage and drift](#break-the-fit-with-leakage-and-drift)

- [Randomized-benchmarking fit with assumption-violation fixtures](#randomized-benchmarking-fit-with-assumption-violation-fixtures)

- [The classical baseline gets its own tuning budget](#the-classical-baseline-gets-its-own-tuning-budget)

- [A benchmark record that can expire](#a-benchmark-record-that-can-expire)

- [Three-fit validity audit](#three-fit-validity-audit)

- [Reference decisions](#reference-decisions)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=42-benchmarking-quantum-programs#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/42-benchmarking-quantum-programs/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/43-resource-estimation-for-fault-tolerant-algorithms/ -->

# Resource Estimation for Fault-Tolerant Algorithms

Raw qubit counts are weak evidence. This chapter turns a logical workload into numbers you can audit — logical qubits and depth, error-correction overhead, physical error rates, runtime — and then stress-tests the estimate by changing one assumption at a time.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Start from logical qubits, operation classes, logical cycles, and a total failure budget; allocate per-cycle error, solve a named code model for distance, account for patches and factories, and multiply scheduled cycles by cycle duration while preserving uncertainty and sensitivity for every assumption.

A resource estimate is a program plus an architecture plus a failure argument. The output is not “qubits.” It is a linked set of counts, rates, times, assumptions, and omitted costs that another analyst can vary.

[Figure 43.1.](#fig-43-resource-estimation-for-fault-tolerant-algorithms-1) Every arrow carries assumptions. Quibit count and runtime branch from a common logical schedule but are not convertible into each other.

## Write the logical workload before the machine

Define logical data and ancilla patches, operation counts by class, dependency depth, measurement and feed-forward steps, output success criterion, and total allowed algorithm failure. A thousand logical qubits used for a shallow Clifford workload is not the same request as a hundred logical qubits fed by billions of non-Clifford operations. Resource research repeatedly shows that code, factories, routing, workload, and failure target all matter [fault-tolerant roadmaps] [surface-code analysis].

The input schema distinguishes counts from schedules. Logical operation count estimates throughput demand; logical-cycle depth estimates elapsed protected time. A versioned SDK export may populate these fields, but the implementation and execution metadata must remain attached [Qiskit documentation].

Decompose the workload far enough to expose bottlenecks: Clifford layers, arbitrary rotations, T or Toffoli consumption, measurements, resets, classical reactions, and concurrent logical width. A total gate count cannot reveal whether one factory is starved by a burst of magic-state demand or mostly idle. Retain the dependency graph or a schedule summary that states maximum and average consumption per cycle.

Logical qubit count also needs a lifetime. Data patches may persist for the whole algorithm; temporary ancillas, routing patches, and factory buffers do not. Report peak patches, average patch-cycles, and the schedule that produces the peak. Multiplying peak width by total depth is a safe upper-bound ledger, not an automatically achievable space-time optimum.

## Allocate failure probability across cycles

If the workload lasts C relevant logical cycles and total allowed failure is ε, a conservative union-bound teaching target is \(p_L\le\epsilon/C\) per cycle. The inequality labels an allocation, not an exact independence model. Different operation classes may receive different budgets; correlated failures can invalidate a naive sum.

For C=10 9 and ε=10 −2, the teaching target is 10 −11 per declared cycle. Write “per syndrome cycle” or “per logical operation”; never leave the denominator implicit.

A complete budget has rows. Data-memory faults, logical operations, magic-state production, state injection, measurement, decoding failure, and classical-control failure can receive separate allocations whose sum does not exceed ε under the union bound. Moving budget from one row to another can change different code distances or factory protocols. Publish both the allocation rule and unused reserve.

The union bound does not require independent failures, but it can be loose. If an estimator instead uses \(1-(1-p_L)^C\), it has introduced an independence and stationarity model. At small \(Cp_L\), the two are close; near the budget boundary, the difference can matter. Name which relation selected distance and keep the alternative as a sensitivity case rather than blending them.

## Solve distance in the companion model

The companion model uses a named illustrative relation \(p_L=A(p_{phys}/p_{th})^{(d+1)/2}\). Search odd distances until the allocated target is met. Suppression is conditional on the below-threshold error model; threshold is not a universal material constant [surface-code analysis] [Google Quantum AI below-threshold experiment].

Distance changes discretely. A small change in p phys or ε can move d by two and physical area roughly with d². Report the grid, not only the most flattering cell.

Taking logarithms explains the search. With \(r=p_{phys}/p_{th}<1\), the condition is \((d+1)/2\ge \log((\epsilon/C)/A)/\log r\); because \(\log r<0\), the inequality reverses during division. Round upward to an integer exponent, translate to odd d, and then verify the original equation. Direct verification catches boundary and floating-point mistakes.

For the baseline values \(p_{phys}=10^{-3}\), \(p_{th}=10^{-2}\), \(A=0.1\), and target \(10^{-11}\), \(d=19\) gives exactly \(10^{-11}\) and therefore passes the declared inclusive comparison. The fixture parses the decimal inputs exactly and asserts this boundary. A float-only implementation can round the candidate infinitesimally above the target and incorrectly select \(d=21\); this is why the record publishes comparison policy and witness cells.

Four independent perturbations have distinct effects. Doubling C halves the per-cycle budget; tightening ε does the same without changing runtime depth; improving p phys changes the exponential base; changing A shifts the model normalization. Each can move d across a discrete boundary. A useful sensitivity report varies one while freezing the other three, then records why each distance step occurred.

## Turn patches into qubits and cycles into seconds

Under the companion geometry, \(Q_{phys}=2Pd^2\) for P logical patches. This counts data and syndrome qubits in a simplified patch factor. Runtime is \(T=Ct_{cycle}\) only if decoding and feed-forward sustain that cycle. Decoder latency belongs in seconds and must close the reaction deadline.

Detailed factoring estimates illustrate how physical-qubit and runtime conclusions move with factory and architectural assumptions [Gidney and Ekerå]. The calculation is useful because it is specific, not because its headline transfers to every architecture.

The formula \(2Pd^2\) is a geometry convention. It does not include a chip’s disabled sites, couplers, readout resonators, communication links, or fabrication yield. Keep “physical code qubits” as its unit. Converting that count into packaged devices or cryostat footprint requires another architecture model and another evidence ledger.

Runtime branches at the schedule. If one logical layer consumes d syndrome cycles and measurement feed-forward takes additional cycles, C must already include them before multiplying by \(t_{cycle}\). A 1 μs cycle over \(10^9\) cycles gives 1,000 seconds of scheduled code time. Queueing, checkpointing, calibration, factory warm-up, and retries are separate wall-time terms, not hidden multipliers.

Decoder throughput imposes a stability condition: each round’s syndrome work must be processed quickly enough that the backlog does not grow without bound. Average throughput is insufficient when bursts exceed buffer capacity or a logical measurement needs a decision by a fixed reaction deadline. Report decoder latency percentiles, input bits per cycle, parallelism, and the deadline used by the logical schedule.

### Surface-code sensitivity grid with explicit assumption schema

Illustrative cells for P=100, C=10 9, ε=0.01, p th =0.01, A=0.1
 | p phys | target p L /cycle | minimum odd d | 2Pd² physical qubits

 | 10 −3 | 10 −11 | 19 | 72,200
 | \(5\times10^{-4}\) | 10 −11 | 15 | 45,000
 | \(2\times10^{-3}\) | 10 −11 | 29 | 168,200

```
from decimal import Decimal
def decimal(value):
    return value if isinstance(value, Decimal) else Decimal(str(value))
def logical_error(p_phys, distance, threshold="0.01", prefactor="0.1"):
    p_phys, threshold, prefactor = map(decimal, (p_phys, threshold, prefactor))
    assert distance > 0 and distance % 2 == 1 and 0 < p_phys < threshold
    return prefactor * (p_phys/threshold) ** ((distance+1)//2)
def minimum_distance(p_phys, cycles, budget):
    target = decimal(budget)/decimal(cycles)
    for distance in range(1, 100, 2):
        if logical_error(p_phys, distance) <= target: return distance
    raise ValueError("distance search exhausted")
cells=[]
for p in ("0.001", "0.0005", "0.002"):
    d=minimum_distance(p, 10**9, "0.01")
    cells.append((p,d,2*100*d*d))
nominal_distance=minimum_distance("0.001", 10**9, "0.01")
worse_distance=minimum_distance("0.002", 10**9, "0.01")
assert logical_error("0.001", 19) == Decimal("1e-11")
assert nominal_distance == 19
assert [d for _,d,_ in cells] == [19,15,29]
assert all(d%2 for _,d,_ in cells) and worse_distance > nominal_distance
print(f"PASS: 43 resource estimate nominal_d={nominal_distance} worse_d={worse_distance} physical_qubits={[qubits for _,_,qubits in cells]}")
```

Existing check: `cd labs && python -m unittest tests.test_companion_models.CompanionModelTests.test_resource_model_makes_assumptions_and_monotonicity_visible -v`.

## Factories, routing, and idle space are not free

The patch model omits magic-state factory throughput and footprint, routing corridors, lattice-surgery scheduling, boundary effects, idle patches, spare capacity, injection failures, decoder compute, classical wiring, and manufacturing yield. A detailed factoring estimate shows how factories, schedules, decoding assumptions, and hardware timing couple to the algorithm [Gidney and Ekerå]. List each omission with direction: factory demand usually increases space and time; parallel factories trade space for time.

Model a factory with output interval \(\tau_f\) cycles, accepted-state probability, footprint in patches, and required input fidelity. If the scheduled algorithm consumes T states faster than one factory supplies them, runtime stretches or parallel factory count rises. The buffer needed for bursty consumption occupies patches too. A single total T count cannot choose between these designs; the time profile is required.

Distillation can be recursive. Output error and acceptance at one level determine how many lower-level states and factories feed the next. Round every factory count upward, include failed attempts, and show the protocol boundary. Quoting a magic-state error without its production rate and footprint leaves the dominant resource path unaccounted.

Routing is likewise a schedule constraint, not a percentage surcharge. Moving or lattice-surgery operations occupy corridors and can block otherwise parallel interactions. An estimator should either schedule those conflicts or label routing as omitted. Adding twenty percent to patch count may be a scenario, but it is not a substitute for geometry.

## A sensitivity surface, not a headline point

Vary physical error, threshold/prefactor model, total budget, logical cycles, patches, factory policy, cycle seconds, and decoder deadline independently. Preserve input JSON, generated CSV, units, code revision, and warnings. Explain every step in d. False precision appears when an analyst reports seven-digit qubit counts from one-digit assumptions.

Use scenarios rather than probability distributions when inputs are not empirically characterized. A “hopeful,” “reference,” and “stress” row can make correlations explicit: an improved physical error rate may arrive with a slower gate, or a faster cycle may worsen control error. Cartesian grids are useful for local sensitivity, but their cells are not equally likely futures.

For every discontinuous distance change, print the previous distance’s logical error, the new distance’s logical error, and the target. For every factory-count jump, print demand rate and capacity on each side. These witness values turn a step plot from a mysterious cliff into an auditable integer decision.

Cross-check at three levels. Unit tests verify formulas and monotonicity. An independent spreadsheet or short script recomputes sampled cells. A domain review checks whether the workload, architecture, and failure categories correspond to the intended computation. Agreement at the arithmetic level cannot repair an omitted factory or a mismatched logical-operation denominator.

The six-cell exercise should expose at least four independent levers. Holding C, ε, A, and pth fixed while improving pphys changes the exponential ratio. Holding the error model fixed while tightening ε changes only the target. Changing cycle seconds moves wall time without changing distance. Changing P moves the simplified patch count without changing pL. If one code path changes several outputs at once, the fixture should explain the causal dependency rather than celebrate “sensitivity.”

Discontinuous distance selection deserves integer-safe arithmetic or a documented comparison tolerance. In the baseline decimal example, the mathematical boundary may land exactly on the target while binary floating-point evaluates infinitesimally above it. A robust implementation evaluates logarithms with a conservative policy or verifies candidate distances at controlled precision. The record must not silently spend two extra distance units because of representation error.

That numerical detail matters physically: moving d from 19 to 21 increases the simplified \(2Pd^2\) count for P=100 from 72,200 to 88,200 code qubits, a 22 percent jump. The model uncertainty may dwarf floating error, but the implementation still needs a deterministic boundary rule. Scientific humility is not an excuse for avoidable arithmetic ambiguity.

End with a reconciliation table. One row carries peak physical code qubits, one patch-cycles, one factory footprint and output interval, one decoder throughput and deadline, and one scheduled wall time. Each value points to inputs and omitted costs. A reader can then change a workload or architecture assumption without reverse-engineering a headline number.

The estimator should reject nonphysical or structurally invalid inputs before search: nonpositive cycles or patches, budget outside (0,1), physical error at or above the model threshold, even or nonpositive candidate distance, and missing time units. An exhausted distance search is not evidence that the largest tried code works; it is an explicit failure to meet the target within the declared domain.

Preserve the exact input decimals as strings or controlled-precision values in the run record. Binary floats are fine for much of the grid, but boundary decisions need reproducible parsing and comparison. The generated CSV should include the raw ratio, exponent, pL, target, acceptance boolean, and software revision for every selected or rejected distance witness.

### Six-cell resource estimate

Prompt: For 100 logical patches and 10^9 cycles, compute distance and physical qubits across at least three physical error rates and two total failure budgets, then add an assumed cycle duration.

Deliverable: Input JSON, generated CSV, heatmap or table, wall-clock column, and an assumptions/omissions ledger.

Pass condition: Every value regenerates from the command, units are present, monotonic relations hold, and the report does not call the teaching model a hardware forecast.

### Reference fixtures

Format: Reference input/output fixtures and monotonicity assertions rather than one universal numerical answer.

Verification: Run the resource tests, regenerate CSV hashes, and recompute three sampled cells independently from the documented formulas.

For each physical error and failure budget, divide the budget by 10^9 cycles, select the first odd distance satisfying the declared model, compute 2·100·d² physical qubits, and multiply cycles by the stated cycle seconds. The answer keeps factory, routing, decoder, and idle omissions visible.

Limits

This monotonic teaching model is neither vendor-neutral procurement guidance nor a hardware forecast. Counts, cycles, decoder seconds, and wall seconds remain separate.

External review

Open. Useful expertise: fault-tolerant resource-estimation and scientific-computing expertise.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

lab

### [Surface-code sensitivity grid with explicit assumption schema](/playground/quantum/book/43-resource-estimation-for-fault-tolerant-algorithms/#artifact-43-resource-estimation-for-fault-tolerant-algorithms)

[Download fixture (.py)](/playground/quantum/artifacts/43-resource-estimation-for-fault-tolerant-algorithms/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/43-resource-estimation-for-fault-tolerant-algorithms/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Earl T. Campbell, Barbara M. Terhal, and Christophe Vuillot. Roads towards fault-tolerant universal quantum computation. Nature. 2017](https://doi.org/10.1038/nature23460) peer-reviewed review

- [Austin G. Fowler et al.. Surface codes: Towards practical large-scale quantum computation. Physical Review A. 2012](https://doi.org/10.1103/PhysRevA.86.032324) peer-reviewed review

- [Craig Gidney and Martin Ekerå. How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits. Quantum. 2021](https://doi.org/10.22331/q-2021-04-15-433) primary peer-reviewed resource estimate

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI and Collaborators. Quantum error correction below the surface code threshold. Nature. 2025](https://doi.org/10.1038/s41586-024-08449-y) primary peer-reviewed experiment

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=43-resource-estimation-for-fault-tolerant-algorithms#report)

Dependency graph

## Prerequisites for this chapter

- [Circuit Cost: Depth, Width, Gate Set, Connectivity Part III. Circuit Model · Chapter 22](/playground/quantum/book/22-circuit-cost-depth-width-gate-set-connectivity/)

- [Shor as Period Finding Part IV. Protocols and Algorithms · Chapter 33](/playground/quantum/book/33-shor-as-period-finding/)

Continue the thread

## Next concepts from this chapter

- [Surface Codes and Threshold Intuition Part VI. Reliability and Fault Tolerance · Chapter 49](/playground/quantum/book/49-surface-codes-and-threshold-intuition/)

- [Why Useful Quantum Computers Are Systems Engineering Projects Part VI. Reliability and Fault Tolerance · Chapter 53](/playground/quantum/book/53-useful-quantum-computers-are-systems-engineering-projects/)

- [Quantum Simulation and Chemistry Part VIII. Applications and Strategy · Chapter 65](/playground/quantum/book/65-quantum-simulation-and-chemistry/)

[Previous Benchmarking Quantum Programs](/playground/quantum/book/42-benchmarking-quantum-programs/)[Next Reproducible Quantum Labs](/playground/quantum/book/44-reproducible-quantum-labs/)

In this chapter

- [Write the logical workload before the machine](#write-the-logical-workload-before-the-machine)

- [Allocate failure probability across cycles](#allocate-failure-probability-across-cycles)

- [Solve distance in the companion model](#solve-distance-in-the-companion-model)

- [Turn patches into qubits and cycles into seconds](#turn-patches-into-qubits-and-cycles-into-seconds)

- [Surface-code sensitivity grid with explicit assumption schema](#surface-code-sensitivity-grid-with-explicit-assumption-schema)

- [Factories, routing, and idle space are not free](#factories-routing-and-idle-space-are-not-free)

- [A sensitivity surface, not a headline point](#a-sensitivity-surface-not-a-headline-point)

- [Six-cell resource estimate](#six-cell-resource-estimate)

- [Reference fixtures](#reference-fixtures)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=43-resource-estimation-for-fault-tolerant-algorithms#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/43-resource-estimation-for-fault-tolerant-algorithms/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/44-reproducible-quantum-labs/ -->

# Reproducible Quantum Labs

A lab nobody else can rerun is a diary entry. This chapter turns private quantum experiments into public artifacts: exact commands, seeded sampling, expected outputs, stated failure modes, and the limitations that keep a toy simulator from impersonating hardware.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Ship source, tests, locked dependencies, fixtures, raw outputs, commands, seeds, tolerances, provenance hashes, an explicit claim boundary, and a clean-environment verification record; reproducibility includes negative and stochastic cases, not only the happy path.

This chapter audits the book’s companion package as an artifact. The score belongs to evidence that a reviewer can inspect now, including red or unavailable components, not to the author’s confidence in the code.

[Figure 44.1.](#fig-44-reproducible-quantum-labs-1) These dimensions are cumulative evidence questions, not decorative badges. A downloadable file can be available and still fail every command.

## A lab is a claim attached to an artifact

Write the claim first: “this package reproduces the ideal Bell vector and seeded sample, routes a distant CNOT on a line, evaluates two one-qubit channels, recovers a planted RB decay, and validates a teaching surface-code model.” Then write exclusions: no hardware calibration, no application advantage, no high-performance simulation, and optional SDK adapters only when their pinned environments are present.

Artifact review distinguishes availability, functionality, reusability, and reproducibility [ACM artifact review guidance]. A passing suite supports only the fixtures it runs. Scientific novelty, hardware accuracy, and external validity require other evidence.

## Inventory the companion package

The artifact includes a license and README; `pyproject.toml`; dependency-free modules for state-vector simulation, routing, noise, benchmarking, resource sensitivity, algorithms, and error correction; unit tests; and a machine-readable run record. The manifest records each file’s SHA-256, byte length, role, generation status, and test command.

Stable and optional dependencies must be separated. Official Qiskit and Cirq examples age with their APIs and need pinned environments plus scheduled review [Qiskit documentation] [Cirq documentation]. A missing optional environment is an explicit “not evaluated,” not a green check.

Inventory generated and hand-authored files separately. A generated CSV needs its producing command, input hashes, and generator revision; committing only the CSV proves availability, not regeneration. Conversely, rebuilding every fixture during installation can hide the exact evidence that accompanied publication. Keep immutable reference outputs and compare regenerated outputs against them under declared numeric or byte-level rules.

## Reproduce the Bell record in a sealed environment

Create a new virtual environment, install only declared dependencies, run from the recorded directory, and capture platform, Python, command, stdout, exit status, duration in seconds, and hashes. Strip machine-specific absolute paths before publication but preserve enough platform detail to diagnose differences. Recompute exact vector/probabilities and compare the seed-7 transcript byte for byte.

OpenQASM round-trip conformance would support serialization portability, not reconstruction of backend calibration or execution state [OpenQASM 3 specification]. Record that boundary.

“Sealed” means the audit starts without undeclared packages, local source paths, cached generated results, or inherited environment variables. It need not mean disconnected from a package index; network access and fetched artifacts must be logged. After installation, record the resolved dependency graph rather than assuming the input lock alone describes what was installed.

The Bell audit has two comparisons. Complex amplitudes and exact probabilities are checked numerically against the analytic fixture at 10 −12. The seed-7 CLI transcript is compared byte for byte only because the package, interpreter behavior, and generator are part of the frozen regression contract. A cross-generator rerun uses the support and distribution rule instead.

## Reproducible randomness needs a distribution rule

A seed provides a repeatable pseudorandom sequence for regression. It does not make observed frequencies mathematical constants. For unseeded or cross-generator replay, store shots, generator family, expected support, expected probabilities, and a predeclared interval or test. Never fail a correct experiment because it did not reproduce exactly 5,000 Bell counts.

## Negative fixtures reveal the real boundary

A useful dossier includes expected failures: non-power-of-two state dimension; non-normalized vector; non-unitary gate; invalid channel probability; even code distance where odd is required; RB data below its fixed floor; and routing to an absent site. Record exception type and a stable message fragment. If these cases succeed, the package is accepting claims outside its domain.

Expected failure is not an ignored test. The harness must reach the intended guard, match the declared exception class and reason, and fail if the call unexpectedly succeeds. Avoid matching an entire traceback, which is brittle across Python versions, but match enough of the stable message to distinguish “invalid probability” from an unrelated file or import error.

Include one tamper test: change a byte in a copied fixture and require the manifest check to fail before execution. Then restore it and rerun. This demonstrates that hashes are actually verified rather than merely printed. The test copy prevents the audit from mutating published evidence.

### Whole-package reproducibility dossier

Completed local artifact audit
 | dimension | evidence | status

 | available | license, README, source, tests, downloadable archive/checksum | present in publication source
 | functional | `python -m unittest discover -s tests -v` | must be rerun for release
 | reusable | module boundaries, test names, declared limits | core package documented
 | reproducible | run record, hashes, seed, expected output | verified only for recorded platform/run
 | optional SDKs | separate pins and adapter CI | not implied by core pass

```
import hashlib, pathlib
here = pathlib.Path(__file__).resolve() if "__file__" in globals() else pathlib.Path.cwd()
candidates = [pathlib.Path.cwd() / "labs"]
if len(here.parents) > 3:
    candidates.append(here.parents[3] / "labs")
root = next((path for path in candidates if path.is_dir()), None)
assert root is not None, f"labs directory not found in: {candidates}"
required = ["LICENSE", "README.md", "pyproject.toml", "run-record.json",
            "src/quantum_end_to_end/simulator.py", "tests/test_simulator.py"]
def audit_package(package_root, names):
    if not names or len(names) != len(set(names)):
        raise ValueError("inventory must contain unique required paths")
    missing = [name for name in names
               if not (package_root / name).is_file() or (package_root / name).stat().st_size <= 0]
    if missing:
        raise ValueError("missing package paths: " + ",".join(missing))
    hashes = {name: hashlib.sha256((package_root / name).read_bytes()).hexdigest()
              for name in names}
    digest = hashlib.sha256("".join(name + hashes[name] for name in sorted(hashes)).encode()).hexdigest()
    return {"files": len(names), "hashes": hashes, "inventory_digest": digest}

full_result = audit_package(root, required)
metadata_result = audit_package(root, required[:4])
missing_rejected = False
try:
    audit_package(root, [*required, "tests/not-present.py"])
except ValueError:
    missing_rejected = True
assert full_result["files"] == 6 and all(len(value) == 64 for value in full_result["hashes"].values())
assert metadata_result["files"] == 4 and metadata_result["inventory_digest"] != full_result["inventory_digest"]
assert missing_rejected
print(f"PASS: 44 lab dossier files={full_result['files']} digest={full_result['inventory_digest'][:12]} metadata_files={metadata_result['files']} missing={missing_rejected}")
```

Full run: `cd labs && python -m unittest discover -s tests -v`, followed by the Bell CLI. Validate all manifest hashes and ensure expected-failure cases fail for the declared reasons.

## Artifact review and expiry

Record review date, reviewer environment, commands, outcomes, discrepancies, and blocked components. A stable standard-library fixture may need infrequent review; an SDK adapter has a 180-day window or triggers on dependency release. Never overwrite a failed record. Append a new run and state which claim changed.

The most important red result is an honest one. A package with one recorded limitation is more reusable than a package whose CI silently skipped the dependency that mattered.

A completed local audit should identify its actor as the authoring process and its environment by platform and interpreter; it must not be labeled independent reproduction. The status vocabulary is finite: passed, failed, unavailable, blocked, or expired. Each non-passing status needs a reason and the command that would resolve it. Blank cells are invalid because they are indistinguishable from skipped work.

Archive stdout, stderr, and exit status for every command, including setup. A test suite that passes after an installer emitted a dependency conflict is not clean evidence. The dossier can summarize the run, but its claims link to raw logs and file hashes. Redact credentials and user-specific paths before publication without deleting diagnostic version and platform fields.

The book package audit also checks correspondence: every chapter command points to an existing module or test, every artifact identifier is unique, and every run-record path is relative to the declared root. A green unit suite cannot catch prose that names a removed command. Treat documentation examples as executable interfaces and run them during release validation.

Record failures without contaminating the working evidence. Expected-failure fixtures run in temporary inputs; drift experiments use a copied lock; tamper tests modify a copied artifact. The published manifest and reference records remain immutable. This makes the negative evidence repeatable and prevents an audit from changing the object it claims to inspect.

The handoff to an external evaluator is a one-command entry point plus the dossier, not an implicit shell history. It states expected duration, network needs, optional jobs, platform constraints, and where outputs appear. The evaluator should be able to delete the environment, start again, and obtain the same exact fixtures or the same statistical acceptance decisions without asking the author which cell to run.

A release is blocked when a stable command or manifest hash fails. An optional adapter may ship as unavailable only when that limitation is explicit in the claim boundary and dossier.

### Independent package audit

Prompt: Audit the companion package from a clean environment using the ACM artifact dimensions, including one expected stochastic result and three expected failures.

Deliverable: Artifact manifest, command log, hashes, rubric scores with evidence, and a list of blocked or expired components.

Pass condition: All stable tests reproduce; probabilistic checks use acceptance bands; every score links to evidence; missing optional SDK environments are reported rather than silently skipped.

### Model dossier

Format: Model artifact manifest and completed rubric with redacted machine-specific paths.

Verification: A second process validates schemas/hashes and reruns commands without relying on the author's shell state.

The model dossier lists every required file and digest, a clean-environment command log, a distribution rule for the stochastic fixture, and three expected exceptions with stable reasons. Optional SDK jobs are marked passed, failed, expired, or unavailable—never omitted from the rubric.

Limits

A passing artifact audit does not certify hardware accuracy, scientific novelty, security, or application value. The local completed row is not independent reproduction.

External review

Open. Useful expertise: an artifact evaluator and a Python CI/supply-chain engineer.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

lab

### [Whole-package reproducibility dossier](/playground/quantum/book/44-reproducible-quantum-labs/#artifact-44-reproducible-quantum-labs)

[Download fixture (.py)](/playground/quantum/artifacts/44-reproducible-quantum-labs/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/44-reproducible-quantum-labs/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=44-reproducible-quantum-labs#report)

Dependency graph

## Prerequisites for this chapter

- [Python and Quantum Programming Workflow Part V. Practical Software · Chapter 36](/playground/quantum/book/36-python-and-quantum-programming-workflow/)

- [Benchmarking Quantum Programs Part V. Practical Software · Chapter 42](/playground/quantum/book/42-benchmarking-quantum-programs/)

Continue the thread

## Next concepts from this chapter

- [Resource Estimation for Fault-Tolerant Algorithms Part V. Practical Software · Chapter 43](/playground/quantum/book/43-resource-estimation-for-fault-tolerant-algorithms/)

- [Noise Models and Noisy Simulation Part V. Practical Software · Chapter 41](/playground/quantum/book/41-noise-models-and-noisy-simulation/)

- [Transpilation and Hardware-Aware Compilation Part V. Practical Software · Chapter 40](/playground/quantum/book/40-transpilation-and-hardware-aware-compilation/)

[Previous Resource Estimation for Fault-Tolerant Algorithms](/playground/quantum/book/43-resource-estimation-for-fault-tolerant-algorithms/)[Next Decoherence and Error Channels](/playground/quantum/book/45-decoherence-and-error-channels/)

In this chapter

- [A lab is a claim attached to an artifact](#a-lab-is-a-claim-attached-to-an-artifact)

- [Inventory the companion package](#inventory-the-companion-package)

- [Reproduce the Bell record in a sealed environment](#reproduce-the-bell-record-in-a-sealed-environment)

- [Reproducible randomness needs a distribution rule](#reproducible-randomness-needs-a-distribution-rule)

- [Negative fixtures reveal the real boundary](#negative-fixtures-reveal-the-real-boundary)

- [Whole-package reproducibility dossier](#whole-package-reproducibility-dossier)

- [Artifact review and expiry](#artifact-review-and-expiry)

- [Independent package audit](#independent-package-audit)

- [Model dossier](#model-dossier)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 4 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=44-reproducible-quantum-labs#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/44-reproducible-quantum-labs/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/45-decoherence-and-error-channels/ -->

# Decoherence and Error Channels

An ideal circuit is a fiction your hardware spends its entire runtime betraying. This chapter gives you the vocabulary to say precisely how — decoherence timescales, error channels, coherence budgets — and a diagnosis discipline that separates sampling noise from real corruption.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Treat each mechanism as a channel or classical confusion process with a declared timescale and experimental context: T1 changes populations, dephasing attenuates coherence, control error changes the intended operation, leakage leaves the computational subspace, and readout error changes reported labels.

T1 and T2 are device-dependent measured times, not universal quality rankings or interchangeable error probabilities. The one-qubit companion channels illustrate mechanism; they omit non-Markovian drift, spatial correlation, pulse dependence, leakage dynamics, and a named device calibration.

[Figure 45.1.](#fig-45-decoherence-and-error-channels-1) One-qubit channel diagnosis matrix: The diagram separates population decay, coherence loss, leakage, and readout so each has a distinct falsifying experiment.

## Five failure locations in one experiment

Place relaxation, phase loss, imperfect gates, leakage, and readout at distinct locations in a prepare-evolve-measure sequence.

A circuit diagram shows ideal instructions. Hardware executes them with physical systems that interact with control electronics, the surrounding environment, measurement devices, and time itself. Decoherence is the loss of useful quantum coherence through those interactions; an error channel is a simplified mathematical model of what the interactions do to the state.

Open-system evolution is represented with density operators and quantum channels rather than pure-state unitary evolution alone. [nielsen-chuang] [watrous-tqi]

### Worked mechanism audit: derive before diagnosing

Put the mechanisms on a timeline. Preparation error changes the initial state. Control error changes the implemented operation. Relaxation and dephasing act during gates and idle intervals. Leakage moves population outside the declared two-level space. Measurement maps the final quantum state to an outcome distribution, after which classical readout confusion changes reported labels. Two mechanisms can produce the same final histogram, so location and intervention are part of the diagnosis.

A minimal record contains the prepared state, delay or gate durations in seconds, the operation schedule, measurement basis, raw outcome alphabet, and readout calibration. Without durations, a coherence time cannot predict attenuation. Without basis, unchanged populations cannot rule out phase loss. Without the raw alphabet, leakage can be silently reassigned to zero or one.

### Relaxation is a time-domain process

Energy relaxation is not the symmetric bit-flip channel. In the zero-temperature amplitude-damping model, excited-state survival after idle time t is \(P_1(t)=P_1(0)e^{-t/T_1}\). The loss probability for that interval is \(\gamma(t)=1-e^{-t/T_1}\). The ground state remains the ground state, while excited population decays toward it; the process has a preferred direction.

The Kraus operators \(K_0=|0\rangle\langle0|+\sqrt{1-\gamma}|1\rangle\langle1|\) and \(K_1=\sqrt\gamma|0\rangle\langle1|\) give \(\rho(t)=\sum_kK_k\rho(0)K_k^\dagger\). Starting in \(\lvert 1 \rangle\), t=60 μs and T1=30 μs produce survival \(e^{-2}\approx0.1353\). A Z-basis experiment at several delays can estimate that decay only after state-preparation and readout effects are addressed.

A straight line in \(\log P_1\) versus t supports the simple stationary exponential over the measured interval. Curvature or time-ordered residuals can indicate drift, multiple decay modes, thermal repopulation, or calibration error. Fitting still returns a number in those cases; the residual test decides whether calling it T1 under the single-exponential model is warranted.

## T1 changes energy populations

Define amplitude relaxation operationally, state seconds as the unit, and derive a simple exponential survival curve under explicit assumptions.

The bit-flip channel is \(\mathcal{E}(\rho)=(1-p)\rho+pX\rho X\). With probability \(p\) the qubit flips; otherwise nothing happens. It is the quantum echo of a classical unreliable wire.

Relaxation and dephasing affect populations and coherence differently and require basis-appropriate characterization. [preskill-notes] [quantum-computers-review]

### Coherence needs a second basis

Prepare \(\lvert + \rangle\), idle for t, and measure X by applying a final Hadamard before Z readout. Under a simple exponential coherence model, \(\langle X(t)\rangle=\langle X(0)\rangle e^{-t/T_2}\), possibly multiplied by an oscillation if the frame is detuned. The Z populations can remain near one half while the X contrast decays. That two-basis record separates coherence loss from ordinary population relaxation more clearly than either trace alone.

Relaxation itself contributes to coherence decay: under common Markovian assumptions, \(1/T_2=1/(2T_1)+1/T_\phi\), where \(T_\phi\) is a pure-dephasing time. Thus \(T_2\le2T_1\) for that model. A fitted pair violating the inequality signals a mismatched protocol, drift, uncertainty, or invalid simplifying assumptions; it is not repaired by clipping T2.

Depolarization is different again. The normalized single-qubit convention must be written explicitly because authors attach p to different mixtures. A depolarizing fit can mimic decay in several bases while erasing the mechanism-specific information that T1 and Ramsey experiments were designed to retain. Use it as a declared effective model, not as an explanation of microscopic noise.

## T2 changes off-diagonal coherence

Use Ramsey-style preparation and basis change to distinguish dephasing from computational-basis population loss.

Under the convention used here, the depolarizing channel is \(\mathcal{E}(\rho)=(1-p)\rho+\frac{p}{3}(X\rho X+Y\rho Y+Z\rho Z)\). The error is a random Pauli, so the state is nudged toward maximum mixedness from every direction at once.

Fault-tolerance analysis requires an explicit physical error model and cannot infer logical protection from coherence time alone. [fault-tolerant-roads] [surface-codes-2012]

### Time and probability are linked only by a model

For amplitude damping over duration Δt, \(\gamma=1-e^{-\Delta t/T_1}\); repeating m equal intervals gives survival \((1-\gamma)^m=e^{-m\Delta t/T_1}\). If gates have different durations, each receives a different γ. Assigning the same “T1 error probability” to a 20 ns gate and a 2 μs measurement destroys the time dependence.

The ratio T1 divided by layer duration is at best a scale estimate. It ignores state dependence, dephasing, gate errors, parallel scheduling, idle imbalance, measurement time, and the success criterion. A circuit does not suddenly fail at one coherence time; its observable degrades continuously under a process model. Publish the computed attenuation or channel composition, not a mythical maximum depth.

## Channel probabilities are not coherence times

Show how a duration-dependent channel parameter can be derived only after choosing a model and interval.

The coherence budget is a scale estimate, \(N_{\mathrm{layers}}\approx T_{\mathrm{coherence}}/t_{\mathrm{layer}}\). This has engineering teeth: it bounds how deep a circuit can run before the state decays, and it turns "is this device good enough?" into arithmetic. All three are teaching models — they do not replace calibrated device physics — but they force you to name the error type, its probability, and its timescale.

NISQ-era device behavior includes control, measurement, and noise constraints beyond ideal channel examples. [nisq-preskill]

### Leakage, readout, and control require distinct tests

Leakage introduces at least one state outside \(\{\lvert0\rangle,\lvert1\rangle\}\). A trace-preserving channel on a \(2\times2\) density matrix cannot represent population leaving that space unless the missing population is disguised as loss. Extend the Hilbert space or keep an explicit leakage probability and return path. State whether measurement distinguishes the leaked level, discards the shot, or assigns it to a computational outcome.

Readout confusion acts after quantum measurement. With false-one probability \(e_{0\to1}\) and false-zero probability \(e_{1\to0}\), the observed distribution is a \(2\times2\) stochastic matrix times the true distribution. Preparation of known zero and one states estimates its columns. Applying that matrix before a basis rotation would be physically wrong: it would turn a classical label error into basis-dependent quantum evolution.

Control error has another signature. A systematic over-rotation accumulates coherently and can oscillate with repeated gates, whereas a stochastic Pauli approximation often predicts monotone decay. Vary the number and sign of repeated gates, and insert echo sequences, to distinguish coherent calibration error from stationary decoherence. The same average error rate can imply very different long-circuit behavior.

## Leakage and readout need different state spaces

Explain why a two-level Pauli model cannot represent leaving the subspace and why classical confusion belongs after measurement.

An ideal Bell circuit outputs only 00 and 11. Your noisy run shows plenty of 01 and 10. Before blaming decoherence, enumerate the suspects:

A full-stack account assigns device, control, measurement, and feedback errors to different system layers. [full-stack-review]

### Close the diagnosis three ways

Build each row from an observation, at least two candidate mechanisms, and a controlled discriminator. Falling Z excited-state population suggests relaxation or readout drift; repeat at zero delay and swap prepared basis states. Stable Z populations with falling Ramsey contrast suggests dephasing or detuning; inspect phase versus delay and add an echo. Missing outcomes suggest leakage or filtering; retain the full discriminator record.

The synthetic pair is internally consistent: excited-state survival at 60 μs gives T1=30 μs, and X coherence at 20 μs gives T2=20 μs. Symmetric readout confusion would introduce an approximately delay-independent affine offset in both traces rather than those two exponentials. A basis-swapped readout calibration is the decisive follow-up, not a larger shot count alone.

Record residuals and rejected alternatives. A diagnosis is stronger when it states what observation would reverse it. Parameter agreement across Z and X fixtures, limiting behavior at zero delay, and trace-preserving executable channels form a three-way check: time-domain derivation, basis response, and implementation must tell the same story.

Shot allocation follows the discriminating question. More repetitions at one delay reduce sampling error there, but additional delay points test the exponential shape and additional bases test mechanism. Spend measurements where competing models make different predictions. A design that collects a million Z shots at t=0 cannot identify T2, no matter how narrow its error bar.

When fitting both traces, keep seconds and probabilities in separate columns. T1 and T2 are time constants with uncertainty in seconds; γ(t), outcome probability, and readout confusion are dimensionless quantities tied to a duration or measurement. Converting a time constant into “percent error” without a named interval is a unit failure, not a convenient summary.

The companion fixture is synthetic and stationary. Its purpose is to catch algebra, basis, and record-schema mistakes. It provides no estimate for a named device, and the correct conclusion is not that one mechanism is universally dominant. The conclusion is that these particular generated observations are consistent with the declared pair of exponential channels and inconsistent with the specified symmetric readout-only alternative.

Check limiting cases before accepting the fit. At t=0, amplitude damping and dephasing reduce to the identity map. At long time, the amplitude-damping fixture approaches ground-state population one, while the simple coherence term approaches zero. Trace and Hermiticity remain invariant throughout. A model that matches the two quoted points but fails those limits is not the declared channel.

## A diagnosis matrix with falsifying experiments

Map each observed signature to alternative mechanisms and the next controlled measurement.

The next run should isolate one explanation: raise the shot count, remove the noise model, change the channel probability, or inspect the exact statevector before sampling. One controlled change per run — anything more is astrology, not debugging.

Open-system evolution is represented with density operators and quantum channels rather than pure-state unitary evolution alone. [nielsen-chuang] [watrous-tqi]

Claim-to-source ledger

Open-system evolution is represented with density operators and quantum channels rather than pure-state unitary evolution alone. [nielsen-chuang] [watrous-tqi]

Relaxation and dephasing affect populations and coherence differently and require basis-appropriate characterization. [preskill-notes] [quantum-computers-review]

Fault-tolerance analysis requires an explicit physical error model and cannot infer logical protection from coherence time alone. [fault-tolerant-roads] [surface-codes-2012]

NISQ-era device behavior includes control, measurement, and noise constraints beyond ideal channel examples. [nisq-preskill]

A full-stack account assigns device, control, measurement, and feedback errors to different system layers. [full-stack-review]

### One-qubit channel diagnosis matrix

Format: Reuse `labs/src/quantum_end_to_end/noise.py`; add time-indexed relaxation/dephasing fixtures and a generated table comparing Z- and X-basis observables.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
from math import exp
def channel(delay_s, t1_s, t2_s, state):
    if min(delay_s, t1_s, t2_s) < 0 or not t1_s or not t2_s:
        raise ValueError("times must be positive")
    p0, p1, coherence = state
    survival, contrast = exp(-delay_s / t1_s), exp(-delay_s / t2_s)
    return p0 + p1 * (1 - survival), p1 * survival, coherence * contrast, coherence.conjugate() * contrast
state = (.2, .8, .3 + .1j)
boundary = channel(0.0, 30e-6, 20e-6, state)
baseline = channel(20e-6, 30e-6, 20e-6, state)
counterfactual = channel(1e-3, 30e-6, 20e-6, state)
assert boundary == (.2, .8, .3 + .1j, .3 - .1j)
assert all(abs(row[0] + row[1] - 1) < 1e-15 and row[2] == row[3].conjugate() for row in (boundary, baseline, counterfactual))
assert counterfactual[1] < 1e-14 and abs(counterfactual[2]) < 1e-20
print(f"PASS: 45 channel evidence population={baseline[1]:.6f} coherence={abs(baseline[2]):.6f} long_population={counterfactual[1]:.3e} trace={baseline[0]+baseline[1]:.1f}")
```

Verification: Tests preserve trace/Hermiticity and recover limiting cases at t=0 and long time; each diagnosis row includes units, model assumptions, and at least one discriminating measurement.

Commissioned exercise

Prompt: Given synthetic Z- and X-basis data at four delay times, determine whether relaxation, pure dephasing, or symmetric readout confusion is the leading model.

Deliverable: Fitted or calculated parameter table with seconds and probabilities, residuals, alternative explanation, and one follow-up experiment.

Pass condition: The selected mechanism matches both bases within tolerance, T1/T2 remain time quantities rather than probabilities, and the alternative is testable.

Verifiable solution

Format: Reference calculation with model equations, fitted parameters, residual table, and discriminating-experiment rationale.

Verification: Regenerate synthetic inputs and assert recovered parameters within declared tolerance and correct units.

For the published fixture, the excited population after 60 microseconds with T1=30 microseconds is exp(-2)=0.1353, while coherence after 20 microseconds with T2=20 microseconds is exp(-1)=0.3679. Those distinct population and coherence observations reject symmetric readout confusion as the leading model; an additional basis-swapped readout run tests that alternative.

Limits and non-transfer conditions

T1 and T2 are device-dependent measured times, not universal quality rankings or interchangeable error probabilities. The one-qubit companion channels illustrate mechanism; they omit non-Markovian drift, spatial correlation, pulse dependence, leakage dynamics, and a named device calibration. The decay traces are generated mechanism fixtures, not measurements of a named device or calibration.

External review

Open. Useful expertise: Experimental quantum-control physicist; Open-quantum-systems theorist.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering fixture

### [One-qubit channel diagnosis matrix](/playground/quantum/book/45-decoherence-and-error-channels/#artifact-45-decoherence-and-error-channels)

[Download fixture (.py)](/playground/quantum/artifacts/45-decoherence-and-error-channels/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/45-decoherence-and-error-channels/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Watrous. The Theory of Quantum Information. Cambridge University Press / University of Waterloo. 2018](https://cs.uwaterloo.ca/~watrous/TQI/) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [T. D. Ladd et al.. Quantum computers. Nature. 2010](https://doi.org/10.1038/nature08812) peer-reviewed review

- [Earl T. Campbell, Barbara M. Terhal, and Christophe Vuillot. Roads towards fault-tolerant universal quantum computation. Nature. 2017](https://doi.org/10.1038/nature23460) peer-reviewed review

- [Austin G. Fowler et al.. Surface codes: Towards practical large-scale quantum computation. Physical Review A. 2012](https://doi.org/10.1103/PhysRevA.86.032324) peer-reviewed review

- [John Preskill. Quantum Computing in the NISQ era and beyond. Quantum. 2018](https://doi.org/10.22331/q-2018-08-06-79) peer-reviewed perspective

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=45-decoherence-and-error-channels#report)

Dependency graph

## Prerequisites for this chapter

- [Density Matrices and Mixed States Part II. Mathematical Core · Chapter 15](/playground/quantum/book/15-density-matrices-and-mixed-states/)

- [Noise Models and Noisy Simulation Part V. Practical Software · Chapter 41](/playground/quantum/book/41-noise-models-and-noisy-simulation/)

Continue the thread

## Next concepts from this chapter

- [Noise, Error Correction, and Fault Tolerance Orientation guide](/playground/quantum/book/orientation-05-noise-error-correction-and-fault-tolerance/)

- [Error Mitigation vs Error Correction Part VI. Reliability and Fault Tolerance · Chapter 46](/playground/quantum/book/46-error-mitigation-vs-error-correction/)

- [Superconducting Qubits Part VII. Hardware Architecture · Chapter 55](/playground/quantum/book/55-superconducting-qubits/)

[Previous Reproducible Quantum Labs](/playground/quantum/book/44-reproducible-quantum-labs/)[Next Error Mitigation vs Error Correction](/playground/quantum/book/46-error-mitigation-vs-error-correction/)

In this chapter

- [Five failure locations in one experiment](#five-failure-locations-in-one-experiment)

- [Worked mechanism audit: derive before diagnosing](#worked-mechanism-audit-derive-before-diagnosing)

- [Relaxation is a time-domain process](#relaxation-is-a-time-domain-process)

- [T1 changes energy populations](#t1-changes-energy-populations)

- [Coherence needs a second basis](#coherence-needs-a-second-basis)

- [T2 changes off-diagonal coherence](#t2-changes-off-diagonal-coherence)

- [Time and probability are linked only by a model](#time-and-probability-are-linked-only-by-a-model)

- [Channel probabilities are not coherence times](#channel-probabilities-are-not-coherence-times)

- [Leakage, readout, and control require distinct tests](#leakage-readout-and-control-require-distinct-tests)

- [Leakage and readout need different state spaces](#leakage-and-readout-need-different-state-spaces)

- [Close the diagnosis three ways](#close-the-diagnosis-three-ways)

- [A diagnosis matrix with falsifying experiments](#a-diagnosis-matrix-with-falsifying-experiments)

- [One-qubit channel diagnosis matrix](#one-qubit-channel-diagnosis-matrix)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=45-decoherence-and-error-channels#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/45-decoherence-and-error-channels/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/46-error-mitigation-vs-error-correction/ -->

# Error Mitigation vs Error Correction

Mitigation and correction both fight noise, but they make different promises and demand different evidence. This chapter draws the line — statistical cleanup on one side, protected logical information on the other — so a demo can never quietly slide across it.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Mitigation trades additional executions and model assumptions for a less biased estimator of selected observables on noisy circuits; correction encodes a logical state, repeatedly extracts syndromes, and suppresses logical failure, so mitigation cannot establish protected state lifetime or arbitrarily deep reliable computation.

The chapter compares evidence contracts and resource currencies; it does not survey every mitigation algorithm or code family. Reduced estimator bias in a selected observable must not be described as a lower physical gate-error rate or a logical qubit.

[Figure 46.1.](#fig-46-error-mitigation-vs-error-correction-1) Mitigation/correction evidence and cost matrix: The matrix keeps estimator bias, sampling cost, encoded protection, and logical failure in non-interchangeable columns.

## Two outputs with different contracts

Define a mitigated observable estimate versus an encoded logical operation and list what each output certifies.

Mitigation infers a better estimate from noisy runs: calibration, extrapolation to zero noise, post-processing, cleverly designed sampling. The qubits stay noisy; the answer gets cleaner. Correction encodes information into a larger system, extracts syndrome data, and actively protects or restores the logical state. The representation itself changes.

Quantum error mitigation estimates observables under noise using additional assumptions and sampling rather than encoding a protected logical state. [error-mitigation-review]

### Worked comparison: keep the resource currencies separate

A mitigation record names the observable, circuit family, noise-scaling method, calibration data, shot allocation, estimator, bias model, variance or interval, and unmitigated baseline. A correction record names code, logical state or operation, physical error model, syndrome rounds, decoder, physical and logical failure denominators, and overhead. Their common word “error” does not make their outputs commensurate.

### Derive the extrapolate and its variance

For the linear two-scale fixture, write \(E(\lambda)=E_0+a\lambda+O(\lambda^2)\). Evaluating at λ and 3λ and cancelling the first-order term gives \(\widehat E_0=(3E(\lambda)-E(3\lambda))/2\). The synthetic values 0.74 and 0.62 yield 0.80. The cancellation is only as credible as linearity between the chosen scales and the claim that scaling preserves the target circuit semantics.

If the two estimates are independent with variances \(v_1\) and \(v_3\), the extrapolated variance is \((9v_1+v_3)/4\). Even equal input variances become 2.5 times larger. Allocate shots using those coefficients or report the avoidable variance penalty. Reusing correlated calibration data changes the covariance term and must be modeled rather than silently assuming independence.

A third scale tests curvature. Fit the declared linear and quadratic models, inspect residuals, and treat model disagreement as mitigation uncertainty. Choosing scales after observing which pair lands nearest the desired answer is analysis leakage. The raw noisy estimates and the unmitigated result remain visible beside the extrapolate.

## Zero-noise extrapolation spends variance

Use a small synthetic fit to show bias reduction, variance amplification, shots, and extrapolation assumptions.

The boundary matters because the two have different ceilings. Mitigation can improve near-term experiments whose circuits are shallow enough to survive at all. Fault-tolerant computation — arbitrarily long, arbitrarily reliable — requires correction plus reliable logical operations. No sampling trick crosses that gap.

Quantum error correction encodes information and uses syndrome information to diagnose correctable errors without measuring logical data directly. [nielsen-chuang] [gottesman-stabilizer]

### Trace what correction actually supplies

Correction begins by encoding one logical degree of freedom across several physical systems. Each cycle couples data to ancillas, measures checks, decodes a syndrome history, and updates a physical correction or Pauli frame. Logical error per cycle is estimated from failures of the encoded task. It is neither a gate-error percentage nor an estimator bias, and its denominator must name the logical memory or operation tested.

More distance raises data/check qubits, extracted syndrome bits, decoder work, and often logical-operation time. Decoder latency is seconds; code distance is dimensionless; physical qubits and syndrome cycles are counts. These quantities jointly constrain a design but cannot be summed into an “overhead score.”

## Correction spends qubits, cycles, and latency

Trace encode-syndrome-decode-frame-update and keep physical and logical errors separate.

Mitigation pays in shots. Its estimates are still sampled, so for a Bernoulli estimator \(\operatorname{SE}(\widehat p)\approx\sqrt{p(1-p)/S}\), and methods like zero-noise extrapolation tend to raise variance as they remove bias — the total shot cost can grow steeply with circuit size.

Fault-tolerant computation requires reliable logical operations and control beyond one error-detection or correction demonstration. [fault-tolerant-roads]

## One table, incompatible units

Compare shots, estimator variance, physical qubits, code distance, logical error per cycle, and decoder time without summing them.

Correction pays in qubits. The overhead estimate from Chapter 43 applies: \(Q_{\mathrm{physical}}\approx Q_{\mathrm{logical}}q_{\mathrm{per\ logical}}\) , with the multiplier set by the code, the distance, and the physical error rate. Mitigation changes how noisy estimates are interpreted; correction changes how information is represented and protected. Budget accordingly.

The Shor and Steane codes are canonical examples of encoded correction and do not share mitigation's sampling-resource contract. [shor-code-1995] [steane-code-1996]

### Reject boundary-crossing claims

“Mitigation reduced the error rate” is incomplete. It may mean one expectation moved closer to a trusted value; report absolute estimator bias and uncertainty. “The code corrected an error” may mean one ideal injected fault was reversed; report the correctable set and extraction assumptions. “Fault tolerant” requires error propagation control and improving logical behavior under increased protection, not merely an encoded circuit.

Postselection illustrates the risk. Discarding runs that trigger a check can improve a conditional observable while lowering acceptance probability and changing the sampled population. The evidence record needs accepted shots, attempted shots, selection rule, and any induced bias. It does not demonstrate preservation of an arbitrary unknown state across the discarded cases.

## Claims that cross the boundary without evidence

Reject concrete statements that equate a cleaner estimate, error detection, correction, and fault tolerance.

A strong answer: mitigation can reduce bias in estimates from noisy runs, but it does not encode arbitrary logical information for long computations. Error correction uses redundancy and syndrome extraction to protect logical states, and fault tolerance adds reliable logical gates, repeated syndrome cycles, decoding, and control — at substantial resource overhead. A mitigated demo may be valuable evidence. It becomes evidence of protected logical computation only when logical error behavior itself is demonstrated.

Near-term utility claims must keep mitigation evidence distinct from fault-tolerance roadmaps. [nisq-preskill] [error-mitigation-review]

### Let the workload decide

Choose mitigation when the deliverable is a bounded set of observables, the noisy circuits remain informative, a trusted scaling or calibration model is testable, and the shot budget is acceptable. Reverse the choice when variance or model sensitivity overwhelms the claimed bias reduction. Choose correction when the deliverable requires protected state lifetime, repeated logical operations, or depth beyond the physical error budget; reverse an architecture choice when logical suppression fails to improve with added protection.

A project may use both: correction supplies a logical experiment and mitigation adjusts a residual observable. The report must preserve both layers. Mitigating logical data does not retroactively establish that the code achieved its logical error target, and correction does not validate the mitigation model.

The comparison table should therefore carry evidence labels. A mitigated estimate is “model-derived from noisy samples”; its uncertainty includes sampling and scaling assumptions. A corrected syndrome trace is “ideal executable fixture” unless noisy extraction was modeled. A logical-error measurement is “empirical under named code and protocol.” Rows with different labels may inform one engineering decision, but they are not interchangeable observations.

Bias, variance, and shot cost also need distinct columns. An extrapolate can move closer to the known synthetic target while its confidence interval widens; that is a bias–variance trade, not unqualified improvement. Correction has a different failure curve: added protection is useful only when measured logical error decreases under the same denominator and operating protocol.

Reversal criteria make the decision falsifiable. Abandon the chosen mitigation when held-out scales show curvature or required shots exceed the workload budget. Reject the correction configuration when repeated syndrome extraction raises logical failure, decoder deadlines are missed, or the physical error model lies outside the code’s demonstrated suppression regime.

## Choose by workload and claim

Match shallow observable estimation or long protected computation to the appropriate evidence path and reversal condition.

The second trap: "more physical qubits solve it." More qubits without lower error rates, syndrome extraction, and logical operations build a larger noisy system, not a more reliable one. Scale is an ingredient, not the recipe.

Quantum error mitigation estimates observables under noise using additional assumptions and sampling rather than encoding a protected logical state. [error-mitigation-review]

Claim-to-source ledger

Quantum error mitigation estimates observables under noise using additional assumptions and sampling rather than encoding a protected logical state. [error-mitigation-review]

Quantum error correction encodes information and uses syndrome information to diagnose correctable errors without measuring logical data directly. [nielsen-chuang] [gottesman-stabilizer]

Fault-tolerant computation requires reliable logical operations and control beyond one error-detection or correction demonstration. [fault-tolerant-roads]

The Shor and Steane codes are canonical examples of encoded correction and do not share mitigation's sampling-resource contract. [shor-code-1995] [steane-code-1996]

Near-term utility claims must keep mitigation evidence distinct from fault-tolerance roadmaps. [nisq-preskill] [error-mitigation-review]

### Mitigation/correction evidence and cost matrix

Format: New companion fixture with synthetic noisy expectation samples at multiple noise scales plus reuse of repetition-code syndrome output for the correction side.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
from math import sqrt
def extrapolate(e1, e3, sigma1, sigma3):
    return (3 * e1 - e3) / 2, sqrt((1.5 * sigma1) ** 2 + (0.5 * sigma3) ** 2)
def majority(bits):
    return int(sum(bits) >= 2)
baseline = extrapolate(.74, .62, .02, .03)
counterfactual = extrapolate(.74, .68, .02, .03)
single_flips = [majority(tuple(int(i == j) for i in range(3))) for j in range(3)]
double_flip = majority((1, 1, 0))
assert abs(baseline[0] - .8) < 1e-12 and baseline[1] > .03
assert counterfactual[0] < baseline[0] and single_flips == [0, 0, 0] and double_flip == 1
print(f"PASS: 46 mitigation={baseline[0]:.3f}+/-{baseline[1]:.3f} shifted={counterfactual[0]:.3f} corrected={single_flips}")
```

Verification: The mitigation fit reports bias and variance with bootstrap or analytic uncertainty; repetition-code tests correct all declared single flips; no metric crosses columns without a conversion model.

Commissioned exercise

Prompt: Analyze a synthetic noisy expectation at three noise scales and a three-bit repetition-code run, then classify exactly what each result supports.

Deliverable: Mitigation fit with uncertainty, correction trace, units-bearing comparison table, and two prohibited claims with explanations.

Pass condition: The mitigation result reports estimator bias/variance and shot cost; the correction result reports syndrome/error model; neither is labeled fault tolerance.

Verifiable solution

Format: Reference fit, syndrome trace, and claim-classification rubric.

Verification: Tests regenerate samples, verify confidence calculations, and compare repetition corrections against the truth table.

The two synthetic mitigated estimates E(lambda)=0.74 and E(3 lambda)=0.62 give the linear zero-noise extrapolate (3*0.74-0.62)/2=0.80. The correction-side syndrome table contains four distinct outcomes for I, X0, X1, and X2; it recovers a discrete error rather than adjusting an expectation estimator.

Limits and non-transfer conditions

The chapter compares evidence contracts and resource currencies; it does not survey every mitigation algorithm or code family. Reduced estimator bias in a selected observable must not be described as a lower physical gate-error rate or a logical qubit. The extrapolation samples and syndrome rows are constructed examples and support no empirical hardware claim.

External review

Open. Useful expertise: Quantum error-mitigation researcher; Quantum error-correction researcher.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering fixture

### [Mitigation/correction evidence and cost matrix](/playground/quantum/book/46-error-mitigation-vs-error-correction/#artifact-46-error-mitigation-vs-error-correction)

[Download fixture (.py)](/playground/quantum/artifacts/46-error-mitigation-vs-error-correction/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/46-error-mitigation-vs-error-correction/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Zhenyu Cai et al.. Quantum error mitigation. Reviews of Modern Physics. 2023](https://doi.org/10.1103/RevModPhys.95.045005) peer-reviewed review

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [Daniel Gottesman. Stabilizer codes and quantum error correction. California Institute of Technology / arXiv. 1997](https://arxiv.org/abs/quant-ph/9705052) doctoral thesis

- [Earl T. Campbell, Barbara M. Terhal, and Christophe Vuillot. Roads towards fault-tolerant universal quantum computation. Nature. 2017](https://doi.org/10.1038/nature23460) peer-reviewed review

- [Peter W. Shor. Scheme for reducing decoherence in quantum computer memory. Physical Review A. 1995](https://doi.org/10.1103/PhysRevA.52.R2493) primary paper

- [Andrew M. Steane. Error correcting quantum code. Physical Review Letters. 1996](https://doi.org/10.1103/PhysRevLett.77.793) primary paper

- [John Preskill. Quantum Computing in the NISQ era and beyond. Quantum. 2018](https://doi.org/10.22331/q-2018-08-06-79) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=46-error-mitigation-vs-error-correction#report)

Dependency graph

## Prerequisites for this chapter

- [Noise Models and Noisy Simulation Part V. Practical Software · Chapter 41](/playground/quantum/book/41-noise-models-and-noisy-simulation/)

- [Decoherence and Error Channels Part VI. Reliability and Fault Tolerance · Chapter 45](/playground/quantum/book/45-decoherence-and-error-channels/)

- [Stabilizers and Syndrome Measurement Part VI. Reliability and Fault Tolerance · Chapter 47](/playground/quantum/book/47-stabilizers-and-syndrome-measurement/)

Continue the thread

## Next concepts from this chapter

- [Repetition, Bit-Flip, Phase-Flip, and Shor Codes Part VI. Reliability and Fault Tolerance · Chapter 48](/playground/quantum/book/48-repetition-bit-flip-phase-flip-and-shor-codes/)

- [Surface Codes and Threshold Intuition Part VI. Reliability and Fault Tolerance · Chapter 49](/playground/quantum/book/49-surface-codes-and-threshold-intuition/)

- [LDPC, Bosonic, Cat, GKP, and Topological Approaches Part VI. Reliability and Fault Tolerance · Chapter 50](/playground/quantum/book/50-ldpc-bosonic-cat-gkp-and-topological-approaches/)

[Previous Decoherence and Error Channels](/playground/quantum/book/45-decoherence-and-error-channels/)[Next Stabilizers and Syndrome Measurement](/playground/quantum/book/47-stabilizers-and-syndrome-measurement/)

In this chapter

- [Two outputs with different contracts](#two-outputs-with-different-contracts)

- [Worked comparison: keep the resource currencies separate](#worked-comparison-keep-the-resource-currencies-separate)

- [Derive the extrapolate and its variance](#derive-the-extrapolate-and-its-variance)

- [Zero-noise extrapolation spends variance](#zero-noise-extrapolation-spends-variance)

- [Trace what correction actually supplies](#trace-what-correction-actually-supplies)

- [Correction spends qubits, cycles, and latency](#correction-spends-qubits-cycles-and-latency)

- [One table, incompatible units](#one-table-incompatible-units)

- [Reject boundary-crossing claims](#reject-boundary-crossing-claims)

- [Claims that cross the boundary without evidence](#claims-that-cross-the-boundary-without-evidence)

- [Let the workload decide](#let-the-workload-decide)

- [Choose by workload and claim](#choose-by-workload-and-claim)

- [Mitigation/correction evidence and cost matrix](#mitigation-correction-evidence-and-cost-matrix)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 7 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=46-error-mitigation-vs-error-correction#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/46-error-mitigation-vs-error-correction/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/47-stabilizers-and-syndrome-measurement/ -->

# Stabilizers and Syndrome Measurement

You cannot copy an unknown quantum state, and you cannot inspect it without disturbing it — yet error correction has to find errors anyway. This chapter shows the escape route: measure checks that report which error occurred while revealing nothing about the data.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Encode information in a simultaneous eigenspace of commuting Pauli checks, couple ancillas to measure each check eigenvalue, and decode the resulting plus/minus pattern; the checks commute with logical information but anticommute with specific errors, so the syndrome changes without disclosing alpha or beta.

The three-qubit repetition example detects X errors only and does not protect an arbitrary qubit from the full single-qubit Pauli set. An ideal syndrome table omits faulty ancillas, measurement errors, repeated rounds, decoder ambiguity, and propagation faults.

[Figure 47.1.](#fig-47-stabilizers-and-syndrome-measurement-1) Operator-derived repetition syndrome table: The sign pattern connects a physical error to ancilla outcomes without exposing the encoded amplitudes.

## The code space is a shared eigenspace

Define stabilizers, commuting checks, and logical states using the repetition code's Z0Z1 and Z1Z2 operators.

Classical error correction has it easy: copy the value, compare the copies, vote. Quantum mechanics bans both moves. The no-cloning theorem forbids copying an unknown state, and measurement collapses what it touches. So quantum error correction encodes the logical information into a larger system and measures checks — stabilizers — that reveal error information while leaving the logical data alone.

Stabilizer codes define code spaces through commuting Pauli operators and diagnose errors through changed eigenvalues. [gottesman-stabilizer] [nielsen-chuang]

### Define the code space before the decoder

Let \(S_0=Z_0Z_1\) and \(S_1=Z_1Z_2\). They commute because they are products of Z operators, and both \(\lvert 000 \rangle\) and \(\lvert 111 \rangle\) have eigenvalue +1 under each check. Every encoded state \(|\psi_L\rangle=\alpha|000\rangle+\beta|111\rangle\) is therefore in their shared +1 eigenspace. The checks constrain parity but do not select α or β.

The two independent checks cut an eight-dimensional three-qubit Hilbert space down by a factor of two each, leaving a two-dimensional code space—exactly one logical qubit. Multiplying the checks gives \(S_0S_1=Z_0Z_2\), another stabilizer but not an independent constraint. Counting independent generators prevents a redundant check from being mistaken for extra encoded protection.

### Anticommutation predicts every sign

If error E commutes with a stabilizer S, the eigenvalue is unchanged. If it anticommutes, then \(SE|\psi_L\rangle=-ES|\psi_L\rangle=-E|\psi_L\rangle\), so the measured sign flips. X anticommutes with Z on the same qubit and commutes on different qubits. This local rule derives the whole table without choosing α or β.

For no error I, both signs are (+1,+1). X0 overlaps S0 once and S1 zero times, giving (−1,+1). X1 overlaps both checks, giving (−1,−1). X2 overlaps only S1, giving (+1,−1). Mapping +1 to bit 0 and −1 to bit 1 yields 00, 10, 11, and 01. The four signatures are distinct, so the ideal decoder can identify the declared error set {I,X0,X1,X2}.

The argument remains symbolic. For X1, the damaged state is \(\alpha|010\rangle+\beta|101\rangle\). Both components have odd parity across qubits 0–1 and 1–2, so the syndrome is 11 for every normalized α and β. No step evaluates either amplitude.

## An error changes signs, not amplitudes

Use commutation and anticommutation to derive every single-X syndrome while leaving alpha and beta symbolic.

Syndrome measurement is the bridge. The syndrome is a pattern of bits that says which error likely occurred and where. Properly designed, it says nothing about the logical value itself.

Syndrome extraction can reveal error information without directly measuring the encoded logical amplitudes. [gottesman-stabilizer] [preskill-notes]

### Projectors explain why the logical amplitudes survive

Measuring one stabilizer with desired sign \(s\in\{+1,-1\}\) applies projector \(P_s=(I+sS)/2\), followed by normalization. Because every component of the errored logical state lies in the same syndrome eigenspace, the projector preserves their relative coefficients. The measurement learns the eigenspace label, not which logical basis component was present.

Direct Z measurement of a data qubit is different. It distinguishes \(\lvert 000 \rangle\) from \(\lvert 111 \rangle\) and therefore collapses \(\alpha|000\rangle+\beta|111\rangle\) in general. Stabilizer measurement is safe only because the check operator acts as the same scalar on both logical codewords in the code space.

## Ancillas ask parity questions

Trace the extraction circuit and identify where measuring a data qubit would destroy the logical superposition.

Abstractly, an error pattern maps to diagnostic bits: \(s=H_e e\pmod 2\). The check matrix \(H_e\) turns the error pattern \(e\) into the syndrome \(s\), the same parity-check idea as classical coding theory.

Quantum correction must respect no-cloning and cannot rely on destructive inspection of arbitrary logical data. [no-cloning] [nielsen-chuang]

### Ancillas implement a parity question

To measure Z0Z1, prepare an ancilla in \(\lvert 0 \rangle\), use the data qubits as controls of two CNOTs targeting the ancilla, then measure the ancilla in Z. Its bit is \(b_0\oplus b_1\). Repeating with qubits 1 and 2 measures the second parity. The data qubits are controls, so this ideal circuit writes parity onto the ancilla without writing either data value separately.

CNOT direction matters. Reversing control and target does not measure the same operator and can propagate an ancilla fault into data. A circuit audit records ancilla preparation, interaction order, basis, and measurement map. An abstract label “measure S0” is a specification; the extraction circuit is an implementation with its own faults.

## Generate the complete syndrome table

Connect the operator derivation to the companion truth-table model for both logical codewords.

The danger is measurement itself: a projector with outcome \(i\) sends \(\lvert\psi\rangle\mapsto P_i\lvert\psi\rangle/\sqrt{\langle\psi\rvert P_i\lvert\psi\rangle}\) when the outcome has nonzero probability. Measure the wrong thing and you have rewritten the state you meant to protect. Error-correction design is the art of choosing projectors whose outcomes teach you the error and leave the encoded amplitudes untouched.

Fault-tolerant syndrome extraction requires repeated noisy measurements and control beyond an ideal static table. [fault-tolerant-roads] [surface-codes-2012]

### The parity matrix independently reproduces the table

Represent an X-error pattern as \(e=(e_0,e_1,e_2)^T\) over binary arithmetic and use \(H=\begin{bmatrix}1&1&0\\0&1&1\end{bmatrix}\). Then \(s=He\pmod2\). The zero vector maps to 00; the three unit vectors map to 10, 11, and 01. This executable parity calculation and the Pauli anticommutation derivation arrive at the same mapping by independent routes.

That agreement is a strong fixture. A swapped syndrome-bit order can still produce four distinct outputs, so the test compares exact labels, not only uniqueness. It runs for both \(\lvert 0_L \rangle\) and \(\lvert 1_L \rangle\) and for a symbolic or sampled superposition path where available.

### Recovery may be a frame update

The ideal lookup maps 10 to X0, 11 to X1, and 01 to X2. Applying the chosen X restores the code space for the declared single-error set. A controller need not always apply a physical pulse immediately; it can update a Pauli frame and reinterpret later operations and measurements. Either implementation must record the frame so a later result is not decoded under stale assumptions.

A syndrome does not uniquely identify arbitrary errors. For example, a weight-two X pattern can share a syndrome with a different weight-one pattern and induce a logical failure after minimum-weight recovery. The decoder chooses an error class using the noise model and code distance; the syndrome supplies constraints, not ground truth.

## Noisy syndrome history becomes a decoding problem

Introduce repeated measurement errors and defer real-time inference detail to Chapter 51.

Take the three-qubit bit-flip code with bits \(b_0,b_1,b_2\) and two checks: \(s_0=b_0\oplus b_1\) and \(s_1=b_1\oplus b_2\). The syndrome table:

The three-qubit parity-check model is a restricted teaching instance rather than a full quantum code. [nielsen-chuang] [shor-code-1995]

### Noisy extraction adds a time dimension

A single surprising syndrome may come from a data error or a faulty ancilla measurement. Repeating checks turns the record into syndrome history. Decoders often work with detection events—changes between successive rounds—because a persistent data error and a one-round measurement error trace different patterns in space-time. The first and final boundary conditions are part of that inference.

Repeated measurement is not automatically fault tolerant. Ancilla preparation error can propagate, CNOT faults can correlate data, measurement latency can miss the correction deadline, and extra gates create new failure locations. A fault-tolerant extraction design limits propagation and supplies enough repeated evidence for the decoder. This chapter’s static table establishes none of those engineering conditions.

## The checks do not define the logical gate set

Separate code-space detection from protected preparation, measurement, and operations.

Every single-bit error has a distinct signature, and the signatures depend only on parities between qubits — never on the values themselves. The quantum version learns the error location without ever reading the encoded amplitudes α and β . That is the whole trick, and Chapter 48 puts it to work.

Stabilizer codes define code spaces through commuting Pauli operators and diagnose errors through changed eigenvalues. [gottesman-stabilizer] [nielsen-chuang]

### Checks and logical operations are separate contracts

Knowing the stabilizers identifies the code space and detectable Pauli patterns. It does not by itself provide a fault-tolerant encoder, logical X or Z implementation, logical measurement, or universal gate set. A candidate logical operator must preserve the code space while acting nontrivially within it; a protected implementation must also control how one physical fault spreads.

For the repetition code, \(X_L=X_0X_1X_2\) exchanges \(\lvert 000 \rangle\) and \(\lvert 111 \rangle\), while a single physical Z can act as logical phase and is not detected by the Z-parity checks. That asymmetry is the exact boundary: the code diagnoses one X fault, not an arbitrary unknown-qubit error.

The acceptance test should fail on a plausible permutation. Swap the two syndrome bits in only the parity implementation: all four outputs remain unique, and a superficial test passes, but X0 and X2 receive one another’s recovery. Exact agreement with the operator signs catches it. Then inject one measurement-bit flip across two rounds to show why a static lookup cannot distinguish data and measurement faults.

This paired derivation is the chapter’s evidence contract. Algebra predicts signs from commutation; code predicts bits from parity; the ancilla circuit explains how those bits could be measured; and the limitations state why none of those ideal objects establishes fault-tolerant repeated extraction.

Claim-to-source ledger

Stabilizer codes define code spaces through commuting Pauli operators and diagnose errors through changed eigenvalues. [gottesman-stabilizer] [nielsen-chuang]

Syndrome extraction can reveal error information without directly measuring the encoded logical amplitudes. [gottesman-stabilizer] [preskill-notes]

Quantum correction must respect no-cloning and cannot rely on destructive inspection of arbitrary logical data. [no-cloning] [nielsen-chuang]

Fault-tolerant syndrome extraction requires repeated noisy measurements and control beyond an ideal static table. [fault-tolerant-roads] [surface-codes-2012]

The three-qubit parity-check model is a restricted teaching instance rather than a full quantum code. [nielsen-chuang] [shor-code-1995]

### Operator-derived repetition syndrome table

Format: Reuse `labs/src/quantum_end_to_end/error_correction.py`; add a Pauli-commutation fixture that derives the same syndrome mapping as the truth table.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
def flip(bits, qubit):
    return tuple(bit ^ int(i == qubit) for i, bit in enumerate(bits))
def parity_syndrome(bits):
    return bits[0] ^ bits[1], bits[1] ^ bits[2]
def operator_syndrome(bits):
    return tuple((-1) ** parity for parity in parity_syndrome(bits))
codes = ((0, 0, 0), (1, 1, 1))
baseline = {q: parity_syndrome(flip(codes[0], q)) for q in range(3)}
counterfactual = {q: operator_syndrome(flip(codes[1], q)) for q in range(3)}
correction = {(1, 0): 0, (1, 1): 1, (0, 1): 2}
assert baseline == {0: (1, 0), 1: (1, 1), 2: (0, 1)}
assert all(operator_syndrome(flip(word, q)) == tuple((-1) ** x for x in baseline[q]) for word in codes for q in range(3))
assert all(flip(flip(word, q), correction[parity_syndrome(flip(word, q))]) == word for word in codes for q in range(3))
print(f"PASS: 47 syndrome evidence parity={baseline} operator={counterfactual}")
```

Verification: For I, X0, X1, X2 and both codewords, operator and parity implementations agree; alpha/beta never enter the syndrome and all declared corrections restore the codeword.

Commissioned exercise

Prompt: Derive the two stabilizer eigenvalues for I, X0, X1, and X2 acting on alpha|000>+beta|111>, then verify them with the companion code.

Deliverable: Four-row operator table, ancilla extraction trace, generated truth table, and explanation of why alpha/beta remain unknown.

Pass condition: Signs match the parity implementation for both logical basis states and the explanation does not invoke copying or direct data measurement.

Verifiable solution

Format: Pauli commutation derivation plus reference generated syndrome table.

Verification: Automated test compares operator-derived syndrome bits with `syndrome_table()` for every declared case.

The stabilizer-sign result is I:(+1,+1), X0:(-1,+1), X1:(-1,-1), and X2:(+1,-1), mapping to syndrome bits 00, 10, 11, and 01. The mapping is independent of alpha and beta, so the ancillas reveal the error class without learning the logical amplitudes.

Limits and non-transfer conditions

The three-qubit repetition example detects X errors only and does not protect an arbitrary qubit from the full single-qubit Pauli set. An ideal syndrome table omits faulty ancillas, measurement errors, repeated rounds, decoder ambiguity, and propagation faults. The syndrome cases validate operator and parity logic only; no physical extraction fidelity is inferred.

External review

Open. Useful expertise: Quantum error-correction theorist fluent in stabilizer formalism; Quantum-control reviewer experienced with syndrome extraction circuits.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering fixture

### [Operator-derived repetition syndrome table](/playground/quantum/book/47-stabilizers-and-syndrome-measurement/#artifact-47-stabilizers-and-syndrome-measurement)

[Download fixture (.py)](/playground/quantum/artifacts/47-stabilizers-and-syndrome-measurement/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/47-stabilizers-and-syndrome-measurement/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Daniel Gottesman. Stabilizer codes and quantum error correction. California Institute of Technology / arXiv. 1997](https://arxiv.org/abs/quant-ph/9705052) doctoral thesis

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [William K. Wootters and Wojciech H. Zurek. A single quantum cannot be cloned. Nature. 1982](https://doi.org/10.1038/299802a0) primary paper

- [Earl T. Campbell, Barbara M. Terhal, and Christophe Vuillot. Roads towards fault-tolerant universal quantum computation. Nature. 2017](https://doi.org/10.1038/nature23460) peer-reviewed review

- [Austin G. Fowler et al.. Surface codes: Towards practical large-scale quantum computation. Physical Review A. 2012](https://doi.org/10.1103/PhysRevA.86.032324) peer-reviewed review

- [Peter W. Shor. Scheme for reducing decoherence in quantum computer memory. Physical Review A. 1995](https://doi.org/10.1103/PhysRevA.52.R2493) primary paper

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=47-stabilizers-and-syndrome-measurement#report)

Dependency graph

## Prerequisites for this chapter

- [No-Cloning and Why Copying Breaks Quantum Logic Part III. Circuit Model · Chapter 21](/playground/quantum/book/21-no-cloning-and-why-copying-breaks-quantum-logic/)

- [Matrices as Gates Part II. Mathematical Core · Chapter 11](/playground/quantum/book/11-matrices-as-gates/)

- [Controlled Gates and Reversible Classical Computation Part III. Circuit Model · Chapter 18](/playground/quantum/book/18-controlled-gates-and-reversible-classical-computation/)

Continue the thread

## Next concepts from this chapter

- [Error Mitigation vs Error Correction Part VI. Reliability and Fault Tolerance · Chapter 46](/playground/quantum/book/46-error-mitigation-vs-error-correction/)

- [Repetition, Bit-Flip, Phase-Flip, and Shor Codes Part VI. Reliability and Fault Tolerance · Chapter 48](/playground/quantum/book/48-repetition-bit-flip-phase-flip-and-shor-codes/)

- [Surface Codes and Threshold Intuition Part VI. Reliability and Fault Tolerance · Chapter 49](/playground/quantum/book/49-surface-codes-and-threshold-intuition/)

[Previous Error Mitigation vs Error Correction](/playground/quantum/book/46-error-mitigation-vs-error-correction/)[Next Repetition, Bit-Flip, Phase-Flip, and Shor Codes](/playground/quantum/book/48-repetition-bit-flip-phase-flip-and-shor-codes/)

In this chapter

- [The code space is a shared eigenspace](#the-code-space-is-a-shared-eigenspace)

- [Define the code space before the decoder](#define-the-code-space-before-the-decoder)

- [Anticommutation predicts every sign](#anticommutation-predicts-every-sign)

- [An error changes signs, not amplitudes](#an-error-changes-signs-not-amplitudes)

- [Projectors explain why the logical amplitudes survive](#projectors-explain-why-the-logical-amplitudes-survive)

- [Ancillas ask parity questions](#ancillas-ask-parity-questions)

- [Ancillas implement a parity question](#ancillas-implement-a-parity-question)

- [Generate the complete syndrome table](#generate-the-complete-syndrome-table)

- [The parity matrix independently reproduces the table](#the-parity-matrix-independently-reproduces-the-table)

- [Recovery may be a frame update](#recovery-may-be-a-frame-update)

- [Noisy syndrome history becomes a decoding problem](#noisy-syndrome-history-becomes-a-decoding-problem)

- [Noisy extraction adds a time dimension](#noisy-extraction-adds-a-time-dimension)

- [The checks do not define the logical gate set](#the-checks-do-not-define-the-logical-gate-set)

- [Checks and logical operations are separate contracts](#checks-and-logical-operations-are-separate-contracts)

- [Operator-derived repetition syndrome table](#operator-derived-repetition-syndrome-table)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 7 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=47-stabilizers-and-syndrome-measurement#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/47-stabilizers-and-syndrome-measurement/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/48-repetition-bit-flip-phase-flip-and-shor-codes/ -->

# Repetition, Bit-Flip, Phase-Flip, and Shor Codes

Before arguing about surface codes and thresholds, you need one code you can trace by hand. This chapter walks the smallest real examples — repetition, bit-flip, phase-flip, and Shor's nine-qubit construction — until encode, corrupt, syndrome, recover is mechanical.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

The three-qubit repetition code separates one X error by parity, the phase-flip code conjugates the same construction with Hadamards to separate Z errors, and Shor's nine-qubit code concatenates the two so arbitrary single-qubit Pauli errors are diagnosable under ideal extraction.

These codes illustrate exact single-error correction, not modern overhead, threshold, repeated noisy extraction, or useful fault tolerance. The phrase majority vote is used only for the classical parity pattern; logical amplitudes are never copied or measured directly.

[Figure 48.1.](#fig-48-repetition-bit-flip-phase-flip-and-shor-codes-1) Small-code correctable-error matrix: The table makes the single-error promise and the weight-two failure visible in the same recovery trace.

## The repetition code promises one X error

State codewords, correctable error set, stabilizers, and failure for two flips before presenting recovery.

Small codes are teaching instruments. They show redundancy, syndrome extraction, and recovery working against a limited error set — concretely enough to simulate in your head. They cannot prove a scalable machine, but they make the logic of quantum error correction mechanical instead of mystical.

The three-qubit repetition construction corrects a single bit flip but not arbitrary single-qubit errors. [nielsen-chuang] [preskill-notes]

### The three-qubit promise is deliberately narrow

The bit-flip code uses \(|0_L\rangle=|000\rangle\) and \(|1_L\rangle=|111\rangle\), with stabilizers Z0Z1 and Z1Z2. Its ideal recovery contract covers I and one X on any physical qubit. It also preserves an arbitrary encoded superposition because parity checks reveal only which block parity changed, not whether the logical component was zero or one.

This is not cloning. Encoding maps one input qubit plus initialized ancillas through a unitary into \(\alpha|000\rangle+\beta|111\rangle\). It does not create \((\alpha|0\rangle+\beta|1\rangle)^{\otimes3}\), whose expansion contains six additional basis terms. The encoded state has one logical degree of freedom distributed nonlocally.

### Enumerate the eight promised basis cases

For logical zero, no error and X0, X1, X2 produce 000, 100, 010, and 001. Their syndromes 00, 10, 11, and 01 select no correction, X0, X1, and X2, returning 000. For logical one, the corresponding words 111, 011, 101, and 110 produce the same syndrome sequence and return 111. Recovery is independent of the logical value.

Generate those rows rather than hand-copying them. The executable fixture computes parity bits, chooses a correction, applies it, and asserts equality with the original codeword. A second assertion checks that syndrome labels agree with the operator derivation from Chapter 47. This catches a decoder table that is self-consistent but wired to reversed check order.

## Eight truth-table rows verify the promise

Generate no-error and every single-flip case for logical zero and one from the companion model.

The three-qubit bit-flip code encodes \(\lvert0_L\rangle=\lvert000\rangle\) and \(\lvert1_L\rangle=\lvert111\rangle\). An arbitrary logical state becomes \(\alpha\lvert000\rangle+\beta\lvert111\rangle\). Note what this is not: three copies of \(\alpha\lvert0\rangle+\beta\lvert1\rangle\), which the no-cloning theorem forbids. It is a single entangled state spread across the register. A single bit flip moves the state out of the code space in a way a syndrome can identify.

Phase-flip protection follows from changing basis with Hadamard operations around a repetition construction. [nielsen-chuang]

### Make the uncorrectable case visible

Start with logical zero and apply X0X1, producing 110. Its syndrome is 01, the same signature that a single X2 creates on a valid codeword. The minimum-weight decoder therefore applies X2 and obtains 111: a valid codeword carrying the wrong logical value. The recovery did exactly what its error model prescribed; the actual error lay outside that model.

Every weight-two bit-flip pattern has the same ambiguity with the complementary weight-one pattern. Majority decoding expresses the result classically, but the operator statement is more precise: the product of actual error and chosen recovery is X0X1X2, the logical X operator. A wrong decode can return to the code space, so “all checks are +1” after recovery does not prove the logical state is correct.

## Hadamards rotate phase errors into bit errors

Trace the basis change and preserve the distinction between X and Z channels.

The error model comes first. The bit-flip channel \(\mathcal{E}(\rho)=(1-p)\rho+pX\rho X\) is what the repetition code is built against, and the syndrome map \(s=H_e e\pmod 2\) turns each error pattern into a diagnostic signature.

Shor's nine-qubit scheme was an early code capable of correcting arbitrary single-qubit errors under its model. [shor-code-1995]

### Hadamard conjugation builds phase-flip protection

Hadamard exchanges X and Z: \(HXH=Z\) and \(HZH=X\). Conjugating the repetition construction by H on all three qubits therefore turns a physical Z error in the original basis into an X error in the rotated basis. Run the same parity diagnosis there, apply the correction, and rotate back. The basis changes are part of the code definition, not optional visualization.

The phase-flip codewords can be written \(|0_L\rangle=|+ + +\rangle\) and \(|1_L\rangle=|- - -\rangle\) under this convention. Measuring physical qubits directly in the X basis would reveal logical information; the extraction circuit instead measures the appropriate commuting X-type parities with ancillas.

A Y error is proportional to XZ and therefore carries both bit- and phase-error components. The three-qubit bit-flip code alone does not correct it, and the phase-flip code alone does not correct it. Correcting an arbitrary single-qubit Pauli requires a construction whose syndrome information distinguishes both components.

## Shor concatenates protection in two directions

Describe the nine-qubit block structure and why X, Z, and Y single-qubit errors fit its ideal correctable set.

Bit-flip codes handle X -like errors. Phase-flip codes handle Z -like errors by the same construction in a rotated basis: Hadamard gates turn phase flips into bit flips, the repetition machinery catches them, and Hadamards turn back. Shor's nine-qubit code nests the two — a phase-flip triplet whose three branches are each bit-flip triplets — so any single-qubit error, X , Z , or Y (which acts as both), lands in a distinct syndrome. That nesting, not a bigger majority vote, is the idea that scales.

The Steane code provides a distinct seven-qubit stabilizer construction and should not be presented as a variant of Shor concatenation. [steane-code-1996] [gottesman-stabilizer]

### Shor concatenation separates both components

Shor’s code uses three GHZ-like blocks. One conventional expression is \(|0_L\rangle=(|000\rangle+|111\rangle)^{\otimes3}/(2\sqrt2)\) and \(|1_L\rangle=(|000\rangle-|111\rangle)^{\otimes3}/(2\sqrt2)\). Within each block, Z-parity checks locate one X component. Comparisons across blocks diagnose the Z component through the outer phase-flip repetition structure.

An arbitrary single-qubit operator is a linear combination of I, X, Y, and Z. If the code corrects those Pauli actions on each location and the error-correction conditions hold, linearity extends correction to that arbitrary one-qubit error. The decoder does not need to know a continuous rotation angle; syndrome projection separates the relevant discrete error subspaces.

Y is not a third independent mystery: up to phase, Y=XZ. Its syndrome combines the bit- and phase-component signatures. The global phase attached to the Pauli product is unobservable, while the two syndrome components determine the recovery class.

## Distance three sets the exact boundary

Connect correctable weight, distance, and the failure of ambiguous weight-two patterns.

Encode logical zero as \(\lvert000\rangle\). A bit flip strikes the second physical qubit, so the register reads \(\lvert010\rangle\). The parity checks report \((s_0,s_1)=(1,1)\), the signature of a middle-qubit flip, and applying \(X\) to that qubit returns the word to \(\lvert000\rangle\).

Code definitions alone do not satisfy the additional conditions required for fault-tolerant computation. [fault-tolerant-roads]

### Distance three is the exact algebraic boundary

A distance-three code detects up to two errors in the operator sense and corrects an arbitrary error on at most \(\lfloor(d-1)/2\rfloor=1\) location. Detection and correction are different promises. The selected weight-two repetition-code example is detectable relative to some codeword transitions but not uniquely correctable; the syndrome aliases a more likely single fault.

Error degeneracy can make different physical operators equivalent on the code space when they differ by a stabilizer. A decoder should reason about equivalence classes, not insist on reconstructing the literal microscopic fault. Success means the combined error and recovery acts trivially on logical information, not that every physical event was identified.

## From code definition to fault-tolerant extraction

List ancilla, propagation, measurement, and repeated-cycle requirements intentionally absent here.

Now the important case: the superposition \(\alpha\lvert000\rangle+\beta\lvert111\rangle\) suffers the same flip and becomes \(\alpha\lvert010\rangle+\beta\lvert101\rangle\) . The same syndrome logic identifies the middle qubit, the same X repairs it, and α and β were never read. The correction acted on the error, not the data — which is the only way it can work.

The three-qubit repetition construction corrects a single bit flip but not arbitrary single-qubit errors. [nielsen-chuang] [preskill-notes]

### Ideal correction is not fault-tolerant extraction

The truth tables assume perfect encoding, ancillas, check gates, measurement, decoder, and recovery. In hardware, one ancilla fault can propagate through several data interactions; measurement errors can mimic data syndromes; and recovery pulses add faults. Repeated rounds and verified or carefully scheduled ancillas are needed to bound propagation.

Logical gates add another obligation. An operation must preserve the encoded computation and prevent one fault from spreading into an uncorrectable pattern within a block. The Shor code demonstrates that an arbitrary single physical-qubit error is correctable under ideal extraction; it does not by itself demonstrate a scalable gate set, threshold, useful logical lifetime, or competitive overhead.

The publishable small-code matrix therefore contains both green and red rows: every no-error and single-error case must recover, the chosen weight-two input must decode to the wrong logical value exactly as predicted, and phase cases must show both Hadamard layers. Hiding the red row would erase the code’s most important specification.

The matrix should separate detection, chosen recovery, final stabilizer signs, and logical outcome. The weight-two row is instructive because its final stabilizers return to +1 while its logical outcome flips. A pass/fail column based only on code-space membership would misclassify that row as corrected.

For phase protection, test more than basis labels. Start with \(\alpha|+++\rangle+\beta|---\rangle\), inject one Z, conjugate by H on all data qubits, run the bit-flip syndrome and recovery, then conjugate back. The output must match the encoded input up to a global phase for several analytic α,β choices. Testing only \(\lvert +++ \rangle\) can conceal a relative-phase defect.

The Shor symbolic table should list, for each of nine locations, the syndrome class of X, Z, and Y rather than materializing a 512-amplitude state for every row. An independent small-state or stabilizer calculation can sample rows to verify the table. This keeps the artifact inspectable while still demonstrating that both error components are represented.

Error correction succeeds on spans of correctable errors, not merely a menu of named Paulis. If coherent error \(aI+bX+cY+dZ\) acts on one physical qubit, syndrome measurement projects the state into corresponding error subspaces and the conditioned recovery restores logical information when the code-correction conditions are satisfied. That is why discrete syndrome logic can address continuous small rotations without estimating their angle.

Recovery verification should compare logical states, not demand that every physical ancilla return to its initial value. Ancillas may be measured and reset, and stabilizer-equivalent physical states encode the same logical information. The contract names which registers are outputs, which are disposable syndrome workspace, and whether equality is exact or up to global phase.

Claim-to-source ledger

The three-qubit repetition construction corrects a single bit flip but not arbitrary single-qubit errors. [nielsen-chuang] [preskill-notes]

Phase-flip protection follows from changing basis with Hadamard operations around a repetition construction. [nielsen-chuang]

Shor's nine-qubit scheme was an early code capable of correcting arbitrary single-qubit errors under its model. [shor-code-1995]

The Steane code provides a distinct seven-qubit stabilizer construction and should not be presented as a variant of Shor concatenation. [steane-code-1996] [gottesman-stabilizer]

Code definitions alone do not satisfy the additional conditions required for fault-tolerant computation. [fault-tolerant-roads]

### Small-code correctable-error matrix

Format: Reuse `error_correction.py`; extend fixtures to phase-flip basis-change cases and a symbolic Shor-code error-class table.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
def syndrome(qubit, pauli):
    bit = tuple(int(i == qubit and pauli in "XY") for i in range(3))
    phase = tuple(int(i == qubit and pauli in "ZY") for i in range(3))
    parity = lambda v: (v[0] ^ v[1], v[1] ^ v[2])
    return parity(bit), parity(phase)
def decode(bits):
    return int(sum(bits) >= 2)
baseline = {(q, p): syndrome(q, p) for q in range(3) for p in "XYZ"}
counterfactual = decode((1, 1, 0))
single_x = [decode(tuple(logical ^ int(i == q) for i in range(3))) for logical in (0, 1) for q in range(3)]
assert single_x == [0, 0, 0, 1, 1, 1] and counterfactual == 1
assert all(baseline[q, "Y"] == (baseline[q, "X"][0], baseline[q, "Z"][1]) for q in range(3))
assert all(syndrome(q, "Z")[1] == syndrome(q, "X")[0] for q in range(3))
print(f"PASS: 48 code evidence classes={len(set(baseline.values()))} single_X={single_x} double_X={counterfactual}")
```

Verification: Existing single-bit test passes for both codewords; phase cases round-trip through H; every listed single-qubit Pauli maps to its declared syndrome class without measuring logical value.

Commissioned exercise

Prompt: Generate all no-error and single-X rows for both logical codewords, add one two-X error, and explain why the same syndrome causes a wrong correction.

Deliverable: Generated table, one ambiguous weight-two trace, phase-flip basis trace, and exact statement of each code's correctable set.

Pass condition: All single-X rows recover; the two-X row fails as predicted rather than being hidden; phase trace uses H before and after parity recovery.

Verifiable solution

Format: Reference tables and a short distance-three explanation.

Verification: Automated tests assert every single-error recovery and explicitly assert the selected weight-two failure.

Majority decoding returns the original logical value for every one-bit flip of 000 and 111. The explicit two-flip input 110 decodes as logical one when logical zero was sent, so the result records the promised uncorrectable boundary instead of hiding it.

Limits and non-transfer conditions

These codes illustrate exact single-error correction, not modern overhead, threshold, repeated noisy extraction, or useful fault tolerance. The phrase majority vote is used only for the classical parity pattern; logical amplitudes are never copied or measured directly. The codeword table is exact synthetic data, so it establishes the stated correction boundary rather than device performance.

External review

Open. Useful expertise: Quantum coding theorist; Quantum information educator experienced with small-code simulations.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering fixture

### [Small-code correctable-error matrix](/playground/quantum/book/48-repetition-bit-flip-phase-flip-and-shor-codes/#artifact-48-repetition-bit-flip-phase-flip-and-shor-codes)

[Download fixture (.py)](/playground/quantum/artifacts/48-repetition-bit-flip-phase-flip-and-shor-codes/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/48-repetition-bit-flip-phase-flip-and-shor-codes/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [Peter W. Shor. Scheme for reducing decoherence in quantum computer memory. Physical Review A. 1995](https://doi.org/10.1103/PhysRevA.52.R2493) primary paper

- [Andrew M. Steane. Error correcting quantum code. Physical Review Letters. 1996](https://doi.org/10.1103/PhysRevLett.77.793) primary paper

- [Daniel Gottesman. Stabilizer codes and quantum error correction. California Institute of Technology / arXiv. 1997](https://arxiv.org/abs/quant-ph/9705052) doctoral thesis

- [Earl T. Campbell, Barbara M. Terhal, and Christophe Vuillot. Roads towards fault-tolerant universal quantum computation. Nature. 2017](https://doi.org/10.1038/nature23460) peer-reviewed review

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=48-repetition-bit-flip-phase-flip-and-shor-codes#report)

Dependency graph

## Prerequisites for this chapter

- [Stabilizers and Syndrome Measurement Part VI. Reliability and Fault Tolerance · Chapter 47](/playground/quantum/book/47-stabilizers-and-syndrome-measurement/)

- [No-Cloning and Why Copying Breaks Quantum Logic Part III. Circuit Model · Chapter 21](/playground/quantum/book/21-no-cloning-and-why-copying-breaks-quantum-logic/)

Continue the thread

## Next concepts from this chapter

- [Surface Codes and Threshold Intuition Part VI. Reliability and Fault Tolerance · Chapter 49](/playground/quantum/book/49-surface-codes-and-threshold-intuition/)

- [Error Mitigation vs Error Correction Part VI. Reliability and Fault Tolerance · Chapter 46](/playground/quantum/book/46-error-mitigation-vs-error-correction/)

- [LDPC, Bosonic, Cat, GKP, and Topological Approaches Part VI. Reliability and Fault Tolerance · Chapter 50](/playground/quantum/book/50-ldpc-bosonic-cat-gkp-and-topological-approaches/)

[Previous Stabilizers and Syndrome Measurement](/playground/quantum/book/47-stabilizers-and-syndrome-measurement/)[Next Surface Codes and Threshold Intuition](/playground/quantum/book/49-surface-codes-and-threshold-intuition/)

In this chapter

- [The repetition code promises one X error](#the-repetition-code-promises-one-x-error)

- [The three-qubit promise is deliberately narrow](#the-three-qubit-promise-is-deliberately-narrow)

- [Enumerate the eight promised basis cases](#enumerate-the-eight-promised-basis-cases)

- [Eight truth-table rows verify the promise](#eight-truth-table-rows-verify-the-promise)

- [Make the uncorrectable case visible](#make-the-uncorrectable-case-visible)

- [Hadamards rotate phase errors into bit errors](#hadamards-rotate-phase-errors-into-bit-errors)

- [Hadamard conjugation builds phase-flip protection](#hadamard-conjugation-builds-phase-flip-protection)

- [Shor concatenates protection in two directions](#shor-concatenates-protection-in-two-directions)

- [Shor concatenation separates both components](#shor-concatenation-separates-both-components)

- [Distance three sets the exact boundary](#distance-three-sets-the-exact-boundary)

- [Distance three is the exact algebraic boundary](#distance-three-is-the-exact-algebraic-boundary)

- [From code definition to fault-tolerant extraction](#from-code-definition-to-fault-tolerant-extraction)

- [Ideal correction is not fault-tolerant extraction](#ideal-correction-is-not-fault-tolerant-extraction)

- [Small-code correctable-error matrix](#small-code-correctable-error-matrix)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 6 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=48-repetition-bit-flip-phase-flip-and-shor-codes#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/48-repetition-bit-flip-phase-flip-and-shor-codes/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/49-surface-codes-and-threshold-intuition/ -->

# Surface Codes and Threshold Intuition

The surface code dominates fault-tolerance roadmaps for a boring reason: it only asks qubits to talk to their nearest neighbors. This chapter builds the threshold intuition — why crossing an error-rate line lets code distance buy reliability — and keeps the overhead in view the whole time.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Below a model-specific threshold, with local stochastic errors, repeated syndrome extraction, and a decoder whose latency and accuracy meet the cycle contract, logical error per cycle falls approximately exponentially with odd distance while patch area, syndrome volume, and logical-operation time grow roughly with distance.

There is no universal surface-code threshold; geometry, circuit, decoder, leakage, correlations, and metric change the number. The companion formula is a labeled sensitivity model and omits lattice surgery, factories, correlated errors, boundary details, and calibrated timing.

[Figure 49.1.](#fig-49-surface-codes-and-threshold-intuition-1) Surface-code threshold and overhead sensitivity plot: The curves join a conditional suppression model to distance, area, cycle time, and decoder evidence.

## A patch stores information in boundaries and checks

Define data/check roles, X/Z stabilizers, logical operators, distance, and a syndrome cycle at the needed level.

Surface codes matter because their checks are local: each stabilizer touches only a few neighboring qubits on a two-dimensional grid, a layout many hardware approaches can plausibly build. The central intuition is threshold behavior. If the physical error rate sits below a threshold value — and the other assumptions hold — then increasing the code distance drives the logical error rate down. Above the threshold, more qubits mean more places to fail, and distance makes things worse.

Surface codes use local stabilizer measurements on a two-dimensional architecture and offer threshold behavior under explicit models. [surface-codes-2012]

### What a distance-d patch actually promises

A planar surface-code patch arranges data qubits and local X- and Z-type checks on a two-dimensional geometry. Repeated ancilla measurements report check eigenvalues without directly reading logical data. Boundaries are chosen so that one nontrivial string of Pauli operators connects one pair of boundaries and implements logical X, while a crossing string connects the other pair and implements logical Z.

Distance d is the minimum weight of an undetectable logical operator under the specified patch and fault model. With perfect syndrome measurement, up to \(\lfloor(d-1)/2\rfloor\) suitably modeled data errors can be corrected. With noisy extraction, faults live in space-time and the relevant distance depends on the syndrome circuit and number of rounds. Patch width alone is not the complete protection parameter.

Checks are local, but a logical operation need not be instantaneous. Moving boundaries, braiding defects, or lattice-surgery measurements consume patch area and syndrome cycles. A memory patch count therefore cannot be reused as a complete computation estimate without a logical-operation schedule.

### Threshold appears as a family of crossings

For a fixed decoding protocol and noise model, plot logical failure per declared cycle against physical error for several distances. Below the crossing region, larger distance should suppress logical error; above it, the added fault locations overwhelm the extra protection. Finite sizes produce a band of crossings rather than a perfectly universal point.

The companion relation \(p_L=A(p_{phys}/p_{th})^{(d+1)/2}\) is a sensitivity model. When \(p_{phys}/p_{th}=0.5\), every increase of distance by two multiplies pL by 0.5. At ratio 0.9 the improvement is much slower. At ratio 1.1 the same formula increases with distance, explicitly demonstrating that the below-threshold extrapolation no longer buys protection.

The prefactor A, threshold pth, exponent, and even the denominator of pL depend on the circuit, decoder, physical noise, and whether the reported event is memory failure, logical operation failure, or per-round detection. A “one-percent threshold” copied from another protocol is not an input measurement for this one.

## Threshold is a crossing of scaling curves

Compare logical error versus distance above and below threshold without presenting a single universal percentage.

Overhead never disappears, though. Larger distance means more physical qubits per logical qubit, more syndrome rounds, more decoding work, and more control infrastructure. Threshold says the trade can pay off; it does not say the trade is cheap.

Fault-tolerance thresholds are conditional on noise, operations, syndrome extraction, and decoder assumptions. [fault-tolerant-roads] [preskill-notes]

### Size distance from the workload, not a headline

If a workload exposes one logical patch to C relevant cycles and assigns total failure budget ε to that path, the union-bound teaching target is \(p_L\le\epsilon/C\). For many patches and operation classes, allocate separate rows and keep their sum within the total budget. A longer algorithm tightens the per-cycle target even when the physical hardware is unchanged.

Search odd distances and verify the selected cell in the original formula. Because d changes by two, a small adjustment to pphys, A, C, or ε can produce a step in qubit count. The report prints the rejected distance’s pL, the accepted distance’s pL, and the target. Those witness values explain the discontinuity.

A workload budget also needs a denominator. “Logical error 10 −12 ” is incomplete; it could mean per syndrome round, logical gate, code cycle, or entire algorithm. Multiplying a per-gate number by code cycles is a unit error even when both are probabilities.

## Solve distance for a workload failure budget

Use the companion model to allocate per-cycle error and find the minimum odd distance.

Keep the overhead relation on the table: \(Q_{\mathrm{physical}}\approx Q_{\mathrm{logical}}q_{\mathrm{per\ logical}}\), where the multiplier grows with the distance your reliability target demands. And keep the syndrome picture from Chapter 47 in mind: every cycle produces \(s=H_e e\pmod 2\), and the decoder turns streams of those syndromes into corrections.

Code distance controls a correctable-error boundary and increasing it introduces physical and temporal overhead. [nielsen-chuang] [surface-codes-2012]

### Distance buys several kinds of overhead

A rotated patch uses a geometry-dependent number proportional to d² physical code qubits. Write \(Q_{patch}=c_qd^2+O(d)\) and state the convention behind cq. A machine needs additional routing space, logical ancillas, magic-state factories, spare capacity, couplers, readout, and control hardware. Patch qubits are not packaged-system qubits.

Syndrome volume also grows. If a patch has \(c_sd^2\) checks measured for R rounds, the decoder receives on the order of \(c_sd^2R\) raw syndrome bits before compression or sparsification. Logical lattice-surgery steps often require a number of rounds proportional to d, so temporal overhead rises with the same distance that suppresses error.

Cycle time is seconds per round. Decoder latency is seconds from available syndrome to required decision, while throughput is syndrome bits per second. A decoder can meet average throughput yet miss a feed-forward deadline in the tail. Publish latency percentiles, hardware used, batch size, and the logical schedule’s reaction deadline.

Suppose a simplified patch coefficient yields 1,000 physical code qubits at one distance and 3,000 at the next distance required by a tighter budget. Ten simultaneous logical patches then move from roughly 10,000 to 30,000 code qubits before factories or routing. The tripling follows a reliability decision, not an algorithmic width change.

## Distance buys area, time, and decoder load

Generate a table of physical patch qubits, cycles, syndrome bits, and assumed latency with units.

Threshold intuition is only as good as the machinery underneath it. If syndrome extraction is too noisy, the decoder too slow, or leakage unhandled, the conditional fails and distance stops helping. Code distance is an overhead-and-reliability lever, and levers need a fulcrum.

Resource implications must be connected to the full control and decoding stack rather than patch area alone. [full-stack-review]

### Three ways the simple curve can fail

First, spatial or temporal correlations can create long error chains more often than the local stochastic model predicts. Crosstalk, shared control faults, radiation events, and drift can couple many locations. A scalar average physical error cannot preserve the tail structure that determines logical failure.

Second, leakage leaves the computational subspace and can persist across rounds, corrupting repeated interactions. Unless the circuit includes leakage reduction and the simulator models the leaked level, distance scaling from a Pauli model may be optimistic. Discarding leaked shots changes the denominator and must be reported.

Third, the decoder can be part of the failure mechanism. Approximation, limited search windows, stale calibration weights, and missed deadlines can raise logical error even when the code and physical process are unchanged. Threshold curves from two decoders are different protocol results, not measurements of one code constant.

Measurement errors add a time-like ambiguity. One wrong syndrome bit can resemble a data fault in a single round; repeated rounds allow the decoder to distinguish their space-time patterns. A perfect-measurement threshold cannot be compared numerically with a circuit-level noisy-measurement threshold without translating the model.

## Correlations and leakage can invalidate the curve

Identify the error-model assumptions whose failure makes the extrapolation non-comparable to hardware.

Suppose one logical qubit needs a teaching overhead of 1,000 physical qubits at your current reliability target. A ten-logical-qubit workload then costs roughly 10,000 physical qubits. Now tighten the target logical error rate — the workload got longer, or the answer got more valuable — and the required distance pushes the overhead to 3,000 per logical qubit. The same ten logical qubits now cost roughly 30,000 physical qubits.

Concrete resource estimates must publish their chosen surface-code model instead of importing a headline threshold. [gidney-ekera-2021] [surface-codes-2012]

### What empirical suppression evidence must contain

The central experimental signature is logical-error suppression as protection grows under the same declared protocol. Compare at least two, preferably three, distances with matched logical task, physical operating regime, number of rounds, decoder, inclusion rules, and logical-error denominator. Show confidence intervals and raw failure counts; a zero-failure point is an upper bound determined by trials, not proof of zero error.

Plot both sides of the fitted crossing when the claim concerns threshold behavior. Below-threshold data should improve with distance. Above-threshold or intentionally stressed data should not be hidden; it checks that the analysis can see the reversal. A fit that forces monotone suppression on every dataset has encoded the conclusion.

Cross-experiment comparison fails when geometry, syndrome circuit, decoder, leakage handling, noise bias, correlation structure, or metric differs. Calibration date and cycle duration matter too. Normalize only quantities with the same operational definition; do not rank platforms by isolated threshold percentages.

## Evidence is suppression as protection grows

Define an empirical claim as measured logical scaling across distances under a stated protocol.

The algorithm never changed. The reliability requirement did, and the hardware budget tripled. This is why resource estimation and threshold talk are the same conversation, and why the sensitivity discipline of Chapter 43 applies here unchanged.

Surface codes use local stabilizer measurements on a two-dimensional architecture and offer threshold behavior under explicit models. [surface-codes-2012]

### Connect threshold evidence back to resource estimates

A resource estimate selects distance using a suppression model supported—or explicitly not supported—by evidence. It then adds logical layout, factories, routing, decoder compute, timing, and failure-budget allocations. Changing the suppression fit must regenerate the whole estimate because patch area and logical-operation time both depend on d.

The model card names the formula, valid domain, pphys and pth definitions, distance set, decoder, cycle, units, omitted mechanisms, code revision, and source date. The CSV keeps raw pL values rather than only a plot. Every curve point and selected distance must regenerate from the committed command.

The decision rule is conditional but sharp: below the protocol-specific threshold and with decoding/control deadlines met, increased distance is evidence-backed protection when logical failure falls. If those curves flatten, reverse, or become non-comparable, more qubits are overhead without demonstrated suppression. That is the boundary a best-in-class threshold discussion should make impossible to miss.

The three exercise ratios expose different resource consequences. At 0.5, a modest distance increase produces rapid suppression and may meet the workload target before area dominates. At 0.9, many more distance steps may be required, sharply increasing patch area and syndrome volume. At 1.1, no distance search should return a protected design; the estimator must report “outside model’s suppressing regime” instead of exhausting an arbitrary maximum and calling the last distance a result.

A confidence-aware crossing analysis retains failure counts and trials for every distance and physical-error setting. Near the crossing, uncertainty can change curve order. Report an interval or posterior appropriate to the acquisition design, and avoid declaring a precise threshold from overlapping finite-size points. More distances and operating points test scaling more directly than simply adding shots to one cell.

Resource tables must preserve time as well as area. For each chosen distance, include code qubits per patch, number of checks, syndrome rounds per logical operation, syndrome bits per round, cycle seconds, decoder latency seconds, and peak patches. A single “physical qubits” column cannot show whether the selected design stalls on decoding or factories.

Finally, distinguish threshold demonstration from break-even. A logical memory can outperform one chosen physical baseline over one duration without mapping an entire threshold curve; a family of distances can show suppression without yet beating the best physical component at the workload’s duration. Both are useful evidence when their comparators and denominators are explicit. Neither licenses the claim that arbitrary fault-tolerant computation is already available.

The model must also reject even distance when its geometry and search assume odd patches. Quietly rounding an input changes both reliability and area; report the invalid request instead.

Claim-to-source ledger

Surface codes use local stabilizer measurements on a two-dimensional architecture and offer threshold behavior under explicit models. [surface-codes-2012]

Fault-tolerance thresholds are conditional on noise, operations, syndrome extraction, and decoder assumptions. [fault-tolerant-roads] [preskill-notes]

Code distance controls a correctable-error boundary and increasing it introduces physical and temporal overhead. [nielsen-chuang] [surface-codes-2012]

Resource implications must be connected to the full control and decoding stack rather than patch area alone. [full-stack-review]

Concrete resource estimates must publish their chosen surface-code model instead of importing a headline threshold. [gidney-ekera-2021] [surface-codes-2012]

### Surface-code threshold and overhead sensitivity plot

Format: Reuse `resources.py`; generate logical-error curves above/below threshold and a units-bearing distance/patch/latency CSV with model metadata.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
from hashlib import sha256
def logical_error(p_phys, distance, threshold=.01):
    if distance < 3 or distance % 2 == 0:
        raise ValueError("distance must be odd and at least three")
    return .1 * (p_phys / threshold) ** ((distance + 1) / 2)
def physical_qubits(distance):
    return 2 * distance * distance - 1
baseline = [logical_error(.001, d) for d in (3, 5, 7)]
counterfactual = [logical_error(.02, d) for d in (3, 5, 7)]
overhead = [physical_qubits(d) for d in (3, 5, 7)]
try:
    logical_error(.001, 4)
    raise AssertionError("even distance accepted")
except ValueError:
    invalid_rejected = True
digest = sha256(repr((.001, .02, (3, 5, 7), .01)).encode()).hexdigest()[:10]
assert baseline == sorted(baseline, reverse=True) and counterfactual == sorted(counterfactual)
assert overhead == [17, 49, 97] and invalid_rejected
print(f"PASS: 49 threshold evidence below={baseline} above={counterfactual} qubits={overhead} input={digest}")
```

Verification: Tests require logical error to decrease with odd distance only for p_phys<p_th, reject invalid distances, and validate physical-qubit scaling and input hashes.

Commissioned exercise

Prompt: Generate logical-error curves for p_phys/p_th values 0.5, 0.9, and 1.1 across odd distances 3–15, then size one workload failure budget.

Deliverable: Plot, CSV, model card, selected distance/patch budget, and explanation of why the above-threshold curve invalidates scaling.

Pass condition: Axes and probabilities are labeled, monotonic behavior matches the model, the above-threshold case is not extrapolated as protection, and omissions are explicit.

Verifiable solution

Format: Generated reference curves and independently checked distance calculation.

Verification: Regenerate from committed JSON and compare data hashes, monotonicity, distance parity, and sampled formula cells.

With A=0.1 and threshold 0.01, p_phys=0.001 produces a logical-error sequence that decreases as odd distance grows from 3 to 7. At p_phys=0.02 the same expression increases with distance. The second curve is therefore evidence of model failure above threshold, not protection.

Limits and non-transfer conditions

There is no universal surface-code threshold; geometry, circuit, decoder, leakage, correlations, and metric change the number. The companion formula is a labeled sensitivity model and omits lattice surgery, factories, correlated errors, boundary details, and calibrated timing. The plotted probabilities come from the declared sensitivity equation and are not experimental threshold observations.

External review

Open. Useful expertise: Surface-code fault-tolerance researcher; Experimental logical-qubit researcher familiar with repeated syndrome data.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering fixture

### [Surface-code threshold and overhead sensitivity plot](/playground/quantum/book/49-surface-codes-and-threshold-intuition/#artifact-49-surface-codes-and-threshold-intuition)

[Download fixture (.py)](/playground/quantum/artifacts/49-surface-codes-and-threshold-intuition/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/49-surface-codes-and-threshold-intuition/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Austin G. Fowler et al.. Surface codes: Towards practical large-scale quantum computation. Physical Review A. 2012](https://doi.org/10.1103/PhysRevA.86.032324) peer-reviewed review

- [Earl T. Campbell, Barbara M. Terhal, and Christophe Vuillot. Roads towards fault-tolerant universal quantum computation. Nature. 2017](https://doi.org/10.1038/nature23460) peer-reviewed review

- [John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018](https://www.preskill.caltech.edu/ph219/) graduate lecture notes

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [Craig Gidney and Martin Ekerå. How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits. Quantum. 2021](https://doi.org/10.22331/q-2021-04-15-433) primary peer-reviewed resource estimate

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=49-surface-codes-and-threshold-intuition#report)

Dependency graph

## Prerequisites for this chapter

- [Stabilizers and Syndrome Measurement Part VI. Reliability and Fault Tolerance · Chapter 47](/playground/quantum/book/47-stabilizers-and-syndrome-measurement/)

- [Repetition, Bit-Flip, Phase-Flip, and Shor Codes Part VI. Reliability and Fault Tolerance · Chapter 48](/playground/quantum/book/48-repetition-bit-flip-phase-flip-and-shor-codes/)

- [Resource Estimation for Fault-Tolerant Algorithms Part V. Practical Software · Chapter 43](/playground/quantum/book/43-resource-estimation-for-fault-tolerant-algorithms/)

Continue the thread

## Next concepts from this chapter

- [LDPC, Bosonic, Cat, GKP, and Topological Approaches Part VI. Reliability and Fault Tolerance · Chapter 50](/playground/quantum/book/50-ldpc-bosonic-cat-gkp-and-topological-approaches/)

- [Decoders and Real-Time Classical Control Part VI. Reliability and Fault Tolerance · Chapter 51](/playground/quantum/book/51-decoders-and-real-time-classical-control/)

- [Logical Qubits and Reliable Operations Part VI. Reliability and Fault Tolerance · Chapter 52](/playground/quantum/book/52-logical-qubits-and-reliable-operations/)

[Previous Repetition, Bit-Flip, Phase-Flip, and Shor Codes](/playground/quantum/book/48-repetition-bit-flip-phase-flip-and-shor-codes/)[Next LDPC, Bosonic, Cat, GKP, and Topological Approaches](/playground/quantum/book/50-ldpc-bosonic-cat-gkp-and-topological-approaches/)

In this chapter

- [A patch stores information in boundaries and checks](#a-patch-stores-information-in-boundaries-and-checks)

- [What a distance-d patch actually promises](#what-a-distance-d-patch-actually-promises)

- [Threshold appears as a family of crossings](#threshold-appears-as-a-family-of-crossings)

- [Threshold is a crossing of scaling curves](#threshold-is-a-crossing-of-scaling-curves)

- [Size distance from the workload, not a headline](#size-distance-from-the-workload-not-a-headline)

- [Solve distance for a workload failure budget](#solve-distance-for-a-workload-failure-budget)

- [Distance buys several kinds of overhead](#distance-buys-several-kinds-of-overhead)

- [Distance buys area, time, and decoder load](#distance-buys-area-time-and-decoder-load)

- [Three ways the simple curve can fail](#three-ways-the-simple-curve-can-fail)

- [Correlations and leakage can invalidate the curve](#correlations-and-leakage-can-invalidate-the-curve)

- [What empirical suppression evidence must contain](#what-empirical-suppression-evidence-must-contain)

- [Evidence is suppression as protection grows](#evidence-is-suppression-as-protection-grows)

- [Connect threshold evidence back to resource estimates](#connect-threshold-evidence-back-to-resource-estimates)

- [Surface-code threshold and overhead sensitivity plot](#surface-code-threshold-and-overhead-sensitivity-plot)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 6 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=49-surface-codes-and-threshold-intuition#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/49-surface-codes-and-threshold-intuition/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/50-ldpc-bosonic-cat-gkp-and-topological-approaches/ -->

# LDPC, Bosonic, Cat, GKP, and Topological Approaches

Surface codes set the reference point for fault tolerance; they do not end the search. This chapter gives you a disciplined way to compare LDPC codes, bosonic and cat encodings, GKP states, and topological approaches — by the assumptions each one makes and the evidence each one has, not by the vocabulary in the pitch.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

No family wins without a workload and hardware contract: qLDPC trades check locality for encoding rate, bosonic/cat/GKP schemes trade oscillator preparation and control for structured errors, and intrinsic topology trades difficult physical evidence and operations for potential passive protection.

The chapter compares code and encoding families, not vendor roadmaps, and must not assign current maturity without dated family-specific evidence. Overhead ratios are comparable only under matched physical error channels, logical operation sets, target failure, timing, connectivity, and accounting boundaries.

[Figure 50.1.](#fig-50-ldpc-bosonic-cat-gkp-and-topological-approaches-1) Matched-assumption encoding comparison matrix: The matrix compares encoding families only after channel, operation set, timing, connectivity, and resource boundary agree.

## Define the baseline contract

Fix workload, logical operations, physical error model, connectivity, cycle duration, and surface-code accounting before comparison.

The surface code from Chapter 49 asks for a two-dimensional grid of qubits with nearest-neighbor checks — an assumption most hardware can almost meet. The families in this chapter each relax one line of that bill while raising another:

GKP encodes quantum information in oscillator phase space to correct small displacement errors under a specific idealized construction. [gkp-2001]

### Work the comparison from the failure budget outward

Begin with a memory experiment, because it exposes the bookkeeping without pretending that memory is a computer. Declare an encoded state, a storage interval \(T\), allowed logical failure \(\varepsilon_{\mathrm{mem}}\), and the operations included in a correction cycle. A surface-code row counts data and syndrome qubits, repeated stabilizer rounds, decoder work, and boundary geometry. A qLDPC row must count the hardware used to realize its higher-weight or nonlocal checks, not only the code's favorable ratio of physical to logical qubits. A bosonic row counts modes, nonlinear ancillas, pumps, readout chains, reset operations, and any outer code. The unit “physical qubits per logical qubit” is therefore not automatically common: one row may call an oscillator a physical qubit while another counts every coupled two-level element. Normalize the inventory before comparing it.

Next convert the workload target into a per-cycle budget. If a run contains \(N\) correction opportunities and failures are sufficiently rare and approximately independent, the first-order requirement is \(p_L \lesssim \varepsilon_{\mathrm{mem}}/N\). That inequality is an allocation, not a law of nature. Correlated bursts, leakage lasting across rounds, and decoder backlogs violate the approximation. A serious table therefore has separate columns for the fitted logical failure per round, the correlation model, the number of rounds, and the resulting run-level bound. This is the point at which a visually smaller code can lose: it may require slower checks, create more correlation, or consume a larger fraction of the total latency budget.

Comparison audit: Before approving the matrix, have an independent analyst reconstruct every denominator from the component list. Check whether a mode contains its ancillary nonlinear element, whether a qLDPC check contains routing and measurement ancillas, whether the surface baseline contains boundaries and factories relevant to the workload, and whether decoder compute is inside the system boundary. Recompute run failure from per-cycle quantities and flag any correlation assumption. Then remove the family names and ask whether the recommendation still follows from topology, channel, timing, and evidence. If swapping labels leaves the prose unchanged, the analysis is generic. If the result changes because a required primitive is unmeasured, the missing evidence—not confidence in a family—is the controlling conclusion.

## qLDPC moves cost into nonlocal checks

Explain rate/distance promise and expose routing, measurement scheduling, and decoder consequences without unsupported current numbers.

The factor physical_per_logical is where the approaches fight. Then grade the claim with the same discipline you would bring to any milestone:

Bosonic qubits exploit oscillator degrees of freedom and introduce distinct control, loss, leakage, and measurement assumptions. [bosonic-review]

### qLDPC: rate is valuable only when the checks can be serviced

Quantum low-density parity-check codes seek sparse checks and asymptotically favorable encoding rate or distance. Those are code properties. The machine still has to measure each check repeatedly and deliver the syndrome to a decoder. If a check touches qubits that are distant in the device graph, implementation choices include moving quantum information, distributing entanglement, adding couplers, or embedding the interaction in a modular network. Each choice adds locations that can fail. Count check weight, interaction range, maximum simultaneous checks, ancilla preparation, routing depth, and the number of time steps in one syndrome round. “Constant rate” does not imply constant-time correction on a planar nearest-neighbor processor.

Decoder complexity is similarly part of the architecture. A code may have an attractive threshold under a particular noise ensemble and decoder while a hardware control system supplies a different ensemble or cannot finish decoding before feedback is required. Store the decoder version, latency distribution, throughput, memory footprint, and whether decisions can be deferred. Compare the entire service rate with the syndrome arrival rate, as Chapter 51 does. A discriminating qLDPC experiment requires more than a larger encoded block: repeated correction with the intended check implementation, a declared decoder, and a logical failure curve that improves as the relevant code parameter grows.

## Oscillators turn small displacements into syndromes

Group bosonic and GKP mechanisms around phase-space redundancy, state preparation, loss, and analog measurement precision.

The score does not compute itself. It forces evidence and risk into one table, where a low-overhead promise with no demonstrated checks loses to a boring approach with working hardware.

Fault-tolerant approaches must be compared through operations, overhead, decoding, and error models rather than code names alone. [fault-tolerant-roads] [nielsen-chuang]

### GKP and other oscillator encodings: analog information is a resource

The ideal GKP construction places a lattice of peaks in phase space so that small displacement errors can be inferred modulo the lattice spacing [gkp-2001]. Finite-energy states replace infinitely sharp peaks, so preparation quality and analog syndrome precision enter the logical channel. A comparison must record squeezing or an equivalent state-quality measure, photon number, loss rate, measurement resolution, and how analog outcomes are passed to an outer decoder. Throwing away the analog residual and retaining only a hard bit can discard information that the decoding claim assumes.

Loss also acts differently across encodings. In an oscillator, a single physical mode spans many Fock levels; photon loss, dephasing, Kerr distortion, thermal excitation, and leakage from the intended code space do not collapse into one interchangeable “gate error.” The useful question is which errors the encoding makes detectable or biased after the complete operation set. A memory lifetime measured under continuous stabilization cannot be inserted unchanged into a controlled gate, readout, or reset budget. The registered bosonic review is useful for the mechanism and taxonomy, while a quantitative row needs a primary experiment matching the claimed operation [bosonic-review].

## Cat encodings reshape the channel

Show how bias can reduce outer-code cost only if preparation, gates, and readout preserve it.

A memo compares two approaches for the same target workload. Approach A promises tenfold lower overhead but needs long-range parity checks the chip cannot route. Approach B maps cleanly onto the existing two-dimensional layout but consumes three times more physical qubits.

Surface codes provide the declared local-check baseline for this chapter, under their own threshold assumptions. [surface-codes-2012]

### Cat codes: preserve the bias through the operations that matter

A stabilized cat manifold can make transitions between well-separated coherent states much rarer than phase-like errors. Call the resulting ratio a bias only after defining numerator, denominator, operation, and duration. An idle bias, entangling-gate bias, measurement bias, and reset bias are four measurements, not one platform attribute. When an outer repetition-style code is proposed to exploit the asymmetry, propagate all four channels through its cycle. A spectacular idle ratio is irrelevant if the entangling operation converts the dominant phase channel into bit flips or if leakage defeats the decoder's model.

Resource accounting for a cat architecture must also state whether a “mode” includes the nonlinear element and ancillary mode used for stabilization and readout. Pumps occupy bandwidth and introduce crosstalk; repeated parity measurements occupy time; engineered dissipation requires a reservoir whose behavior can drift. The matched baseline should achieve the same logical memory or operation target and include its own ancillas and controls. Only then can a claim of fewer physical components be distinguished from a change in what was counted.

## Intrinsic topology raises the evidence burden

Separate theoretical protection, material signature, qubit definition, operation, and architecture.

Only after that table exists does the memo discuss preference. A lower-overhead claim means nothing until someone shows the checks, states, gates, measurements, and decoders it quietly assumes.

Topological-device roadmaps require staged evidence from physical signatures through controlled qubit operations. [majorana-evidence-review]

### Intrinsic topology: separate protection in the Hamiltonian from protected computation

Topological quantum computation begins with a theoretical promise: information encoded nonlocally can be insensitive to sufficiently local perturbations, and braiding or measurement sequences can implement operations [majorana-evidence-review]. An experiment showing a transport feature consistent with a candidate excitation sits far below that architectural promise. The evidence ladder must pass through reproducible material and device signatures, exclusion of ordinary alternatives, controlled parity or state initialization, coherent manipulation, readout, and an operation whose error behavior supports the proposed protection mechanism.

Even a convincing topological qubit would not eliminate active engineering. Initialization, measurement, quasiparticle poisoning, finite-temperature excitations, calibration, classical control, and operations outside a natively protected gate set remain in the budget. Record which operations are topologically protected, which are merely conventional, and how universality is completed. A proposal that quotes a protected braid error while omitting state preparation and nonprotected operations is not an end-to-end comparison.

## A comparison table with explicit blanks

Record known mechanism, required primitive, dominant residual error, topology, timing, decoder, and missing registered evidence.

Stable physics and last quarter's company progress belong in different evidence columns. The theory of a cat qubit does not expire; the evidence that one team's cat qubit beats another's changes constantly. Keep the two separate in the memo, and re-verify the dated column before acting on it.

The current registered source set does not contain a qLDPC primary reference, so the commissioned draft must add one before publishing quantitative qLDPC claims. [fault-tolerant-roads]

### A decision matrix should preserve incomparability

Populate each row with four layers. The code layer states distance, rate, checks, and decoder assumptions. The device layer states noise, connectivity, timing, and measurement primitives. The control layer states scheduling, ancillas, feedback, and calibration. The evidence layer states whether each value is theoretical, simulated, component-level, encoded-memory, or operation-level. Blanks are meaningful. If no registered experiment supports the qLDPC check schedule on the declared graph, leave the achieved cycle time blank; do not borrow a surface-code cycle time. If a bosonic experiment reports memory break-even but not a two-mode gate, leave the gate row blank.

Then make the recommendation conditional. For a memory workload on hardware with high-quality oscillators and precise analog readout, an oscillator code may deserve the next experiment. For a modular processor with reliable nonlocal parity resources, a qLDPC architecture may justify a system prototype. For a planar device with local gates and a mature decoder path, the surface code remains the better-specified baseline even when its qubit count looks larger. For intrinsic topology, the next investment may still be a discriminating materials or parity experiment rather than a computer architecture. The output is not a universal champion; it is a short list of assumptions whose measurement would change the engineering decision.

## Choose a research question, not a champion

End with the next discriminating experiment for each family under the fixed contract.

For an engineer, these encodings are alternative architectures, and they deserve an architecture review rather than a brand comparison:

GKP encodes quantum information in oscillator phase space to correct small displacement errors under a specific idealized construction. [gkp-2001]

### A matched review example

Assume the requested service is a logical memory for \(10^6\) correction cycles with total failure below \(10^{-3}\). The planning allocation is therefore roughly \(10^{-9}\) logical failure per cycle before correlation margin. The surface-code candidate supplies a distance series under a circuit-level Pauli model and a local-check schedule. The oscillator candidate supplies a measured memory channel but no entangling operation. The qLDPC candidate supplies simulation under the same Pauli model but assumes direct measurement of nonlocal checks. Those are not three comparable overhead numbers. Only the surface and qLDPC code models share a channel, and only the surface candidate supplies a schedule on the declared planar hardware.

The review should preserve partial conclusions. The qLDPC simulation may justify studying a nonlocal-check interconnect because its rate is attractive if those checks can be serviced. The oscillator memory may justify a complete-cycle experiment because its measured channel is promising. Neither supports a lower system footprint today. Fill a scenario column in which missing primitives are assigned explicit hypothetical parameters, then run a sensitivity sweep. Do not merge that scenario with the evidence column. A hypothetical crossover tells the team what performance a new primitive must reach; it does not say the primitive has reached it.

Finally, price the next experiment. For qLDPC, construct and repeatedly measure a small set of representative nonlocal checks on the intended connectivity, including ancillas, routing, and decoder timing. For the oscillator, execute preparation, repeated correction, one workload-relevant gate, and readout while tracking loss, leakage, and analog syndrome information. For the surface baseline, measure the same run duration and target operation under current controls. Predetermine the acceptance condition: the alternative must meet the run-level failure allocation and improve a common system resource without exceeding timing or control limits. That result would move a cell from hypothetical to observed and could legitimately change the recommendation.

### Use sensitivity surfaces, not a league table

The comparison becomes decision-ready only after uncertain inputs are allowed to move. Sweep physical loss, check error, decoder latency, oscillator lifetime, coupling degree, and target logical failure over ranges supported by the declared evidence. For each point, recompute total devices, correction-cycle seconds, classical throughput, and run-level failure. A boundary where the preferred construction changes is more informative than a single winning row: it identifies the measurement that could reverse the engineering choice. Preserve infeasible cells instead of dropping them, because “no design closes the budget” is a valid result.

Break-even also needs a named baseline. A memory encoding may outperform one bare component over a storage interval while losing once preparation, recovery, and readout enter the denominator. A qLDPC layout may reduce asymptotic qubit overhead while demanding checks the chosen interconnect cannot schedule. A bosonic mode may suppress one channel while an entangling operation restores a nearly symmetric error. The worksheet should report those reversals as properties of workload and architecture, not as defects hidden by a composite score.

Claim-to-source ledger

GKP encodes quantum information in oscillator phase space to correct small displacement errors under a specific idealized construction. [gkp-2001]

Bosonic qubits exploit oscillator degrees of freedom and introduce distinct control, loss, leakage, and measurement assumptions. [bosonic-review]

Fault-tolerant approaches must be compared through operations, overhead, decoding, and error models rather than code names alone. [fault-tolerant-roads] [nielsen-chuang]

Surface codes provide the declared local-check baseline for this chapter, under their own threshold assumptions. [surface-codes-2012]

Topological-device roadmaps require staged evidence from physical signatures through controlled qubit operations. [majorana-evidence-review]

The current registered source set does not contain a qLDPC primary reference, so the commissioned draft must add one before publishing quantitative qLDPC claims. [fault-tolerant-roads]

### Matched-assumption encoding comparison matrix

Format: Machine-readable table for five families with baseline, channel, connectivity, operation, measurement, timing, decoder, overhead definition, evidence class, and source IDs; blank unsupported cells are retained.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
def validate(row):
    required = {"family", "overhead", "unit", "noise", "baseline", "falsifier", "source"}
    missing = required - row.keys()
    if missing or row["overhead"] <= 0:
        raise ValueError(sorted(missing) or "nonpositive overhead")
    return row["overhead"]
def ratio(left, right):
    validate(left); validate(right)
    scope = ("unit", "noise", "baseline")
    return left["overhead"] / right["overhead"] if all(left[k] == right[k] for k in scope) else None
baseline = {"family":"surface-A", "overhead":120, "unit":"qubits/logical", "noise":"Pauli-v1", "baseline":"target-v1", "falsifier":"no suppression", "source":"synthetic"}
matched = {**baseline, "family":"LDPC-B", "overhead":80}
counterfactual = {**matched, "unit":"modes/logical", "noise":"shift-v1"}
comparison = ratio(baseline, matched)
blocked = ratio(baseline, counterfactual)
try:
    validate({"family":"unlabeled", "overhead":9})
    raise AssertionError("incomplete row accepted")
except ValueError:
    rejected = True
assert comparison == 1.5 and blocked is None and rejected
print(f"PASS: 50 comparison evidence matched_ratio={comparison:.2f} mismatched={blocked} schema_rejected={rejected}")
```

Verification: Schema rejects unlabeled overhead values and rows missing baseline or units; every populated empirical cell resolves to a registered source and every family has a falsifying experiment.

Commissioned exercise

Prompt: Compare a surface-code baseline with one oscillator family and one nonlocal-check family for a declared memory workload, leaving unsupported quantitative cells blank.

Deliverable: Three-row matched-assumption matrix, source ledger, two missing-evidence findings, and one discriminating experiment per alternative.

Pass condition: No numerical ranking uses unmatched channels or operations, all units are explicit, and absent registered evidence is not replaced by an invented estimate.

Verifiable solution

Format: Completed qualitative matrix with explicit evidence gaps and a comparison-validity rubric.

Verification: Validate schema/source IDs and independently review every comparability flag; no universal winner is encoded.

The surface-code row reports physical qubits per logical qubit under a circuit-Pauli channel; the GKP row reports oscillator modes per logical encoding under shift noise. Because both denominator and channel differ, the fixture leaves the ranking blank and requests a matched operation/channel experiment.

Limits and non-transfer conditions

The chapter compares code and encoding families, not vendor roadmaps, and must not assign current maturity without dated family-specific evidence. Overhead ratios are comparable only under matched physical error channels, logical operation sets, target failure, timing, connectivity, and accounting boundaries. All filled comparison cells are teaching inputs; blank empirical fields remain unresolved until family-specific evidence is supplied.

External review

Open. Useful expertise: Quantum coding theorist with qLDPC expertise; Bosonic-code experimentalist; Topological quantum-device physicist.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering fixture

### [Matched-assumption encoding comparison matrix](/playground/quantum/book/50-ldpc-bosonic-cat-gkp-and-topological-approaches/#artifact-50-ldpc-bosonic-cat-gkp-and-topological-approaches)

[Download fixture (.py)](/playground/quantum/artifacts/50-ldpc-bosonic-cat-gkp-and-topological-approaches/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/50-ldpc-bosonic-cat-gkp-and-topological-approaches/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Daniel Gottesman, Alexei Kitaev, and John Preskill. Encoding a qubit in an oscillator. Physical Review A. 2001](https://doi.org/10.1103/PhysRevA.64.012310) primary paper

- [Yvonne Y. Gao et al.. Quantum information processing with bosonic qubits in circuit QED. PRX Quantum. 2021](https://doi.org/10.1088/2058-9565/abe989) peer-reviewed review

- [Earl T. Campbell, Barbara M. Terhal, and Christophe Vuillot. Roads towards fault-tolerant universal quantum computation. Nature. 2017](https://doi.org/10.1038/nature23460) peer-reviewed review

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [Austin G. Fowler et al.. Surface codes: Towards practical large-scale quantum computation. Physical Review A. 2012](https://doi.org/10.1103/PhysRevA.86.032324) peer-reviewed review

- [David Aasen et al.. Milestones toward Majorana-based quantum computing. Physical Review X. 2016](https://doi.org/10.1103/PhysRevX.6.031016) peer-reviewed evidence roadmap

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=50-ldpc-bosonic-cat-gkp-and-topological-approaches#report)

Dependency graph

## Prerequisites for this chapter

- [Surface Codes and Threshold Intuition Part VI. Reliability and Fault Tolerance · Chapter 49](/playground/quantum/book/49-surface-codes-and-threshold-intuition/)

- [Density Matrices and Mixed States Part II. Mathematical Core · Chapter 15](/playground/quantum/book/15-density-matrices-and-mixed-states/)

Continue the thread

## Next concepts from this chapter

- [Cat Qubits and Bosonic Encodings Part VII. Hardware Architecture · Chapter 60](/playground/quantum/book/60-cat-qubits-and-bosonic-encodings/)

- [Topological Qubits and Evidence Standards Part VII. Hardware Architecture · Chapter 61](/playground/quantum/book/61-topological-qubits-and-evidence-standards/)

- [Decoders and Real-Time Classical Control Part VI. Reliability and Fault Tolerance · Chapter 51](/playground/quantum/book/51-decoders-and-real-time-classical-control/)

[Previous Surface Codes and Threshold Intuition](/playground/quantum/book/49-surface-codes-and-threshold-intuition/)[Next Decoders and Real-Time Classical Control](/playground/quantum/book/51-decoders-and-real-time-classical-control/)

In this chapter

- [Define the baseline contract](#define-the-baseline-contract)

- [Work the comparison from the failure budget outward](#comparison-worked-through)

- [qLDPC moves cost into nonlocal checks](#qldpc-moves-cost-into-nonlocal-checks)

- [qLDPC: rate is valuable only when the checks can be serviced](#qldpc-rate-is-valuable-only-when-the-checks-can-be-serviced)

- [Oscillators turn small displacements into syndromes](#oscillators-turn-small-displacements-into-syndromes)

- [GKP and other oscillator encodings: analog information is a resource](#gkp-and-other-oscillator-encodings-analog-information-is-a-resource)

- [Cat encodings reshape the channel](#cat-encodings-reshape-the-channel)

- [Cat codes: preserve the bias through the operations that matter](#cat-codes-preserve-the-bias-through-the-operations-that-matter)

- [Intrinsic topology raises the evidence burden](#intrinsic-topology-raises-the-evidence-burden)

- [Intrinsic topology: separate protection in the Hamiltonian from protected computation](#intrinsic-topology-separate-protection-in-the-hamiltonian-from-protected-computation)

- [A comparison table with explicit blanks](#a-comparison-table-with-explicit-blanks)

- [A decision matrix should preserve incomparability](#a-decision-matrix-should-preserve-incomparability)

- [Choose a research question, not a champion](#choose-a-research-question-not-a-champion)

- [A matched review example](#comparison-review-example)

- [Use sensitivity surfaces, not a league table](#use-sensitivity-surfaces-not-a-league-table)

- [Matched-assumption encoding comparison matrix](#matched-assumption-encoding-comparison-matrix)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 6 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=50-ldpc-bosonic-cat-gkp-and-topological-approaches#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/50-ldpc-bosonic-cat-gkp-and-topological-approaches/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/51-decoders-and-real-time-classical-control/ -->

# Decoders and Real-Time Classical Control

Error correction runs on a clock. Every cycle, the machine dumps a stream of syndrome bits and a classical decoder has microseconds to answer one question — what went wrong? — before the next cycle begins. This chapter follows that loop from readout to correction and shows why the decoder, not the qubit count, often sets the pace.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

The classical path must ingest every timestamped syndrome bit, update an error hypothesis or Pauli frame, and deliver required feed-forward before the architecture's deadline at the chosen code distance; accuracy matters only under a bounded tail-latency and backlog contract.

Offline decoder accuracy on stored data is not evidence that live hardware meets a cycle-time deadline. Cycle time, measurement duration, decoder service time, and feedback deadline are different quantities and cannot be compared without defining buffering and required reaction points.

[Figure 51.1.](#fig-51-decoders-and-real-time-classical-control-1) Syndrome-stream latency and backlog simulator: The stream view links syndrome arrival, ambiguous inference, queue growth, and the consuming operation’s deadline.

## One cycle produces a timed syndrome stream

Define number of checks, bits per round, round frequency, timestamps, and history window for a patch.

Quantum error correction is usually drawn as a static object — a lattice of qubits and checks. On a running machine it is a loop. Check measurements produce classical bits every cycle; a decoder infers the most likely error pattern from the bit stream; the control system folds that answer back into the computation. All of it happens while the qubits keep decohering.

Repeated stabilizer measurements produce syndrome history that must be decoded to infer likely errors. [surface-codes-2012] [gottesman-stabilizer]

### Treat the decoder as a continuously loaded control service

A fault-tolerant machine does not hand the decoder one tidy syndrome and wait. Every code block emits measurements every cycle. Let \(B\) be the number of syndrome bits in a batch, \(\tau_c\) the cycle duration, and \(K\) the number of blocks. The sustained input rate is \(KB/\tau_c\), before metadata and retransmission. A decoder implementation must sustain that rate while keeping the tail of its response-time distribution inside the feedback deadline. Mean latency is insufficient: a rare pause can arrive after the controller has already committed to an operation whose interpretation depends on the missing correction.

Separate three clocks. Measurement latency is the interval from the physical interaction to a classified bit. Decode latency starts only when the required data are available and ends when a correction or frame update is produced. Control latency carries that decision back to the sequencer. Some architectures can keep a Pauli frame in software and defer physical correction; that reduces immediate actuation but does not erase deadlines at non-Clifford gates, conditional resets, or final interpretation. Write the deadline at the consumer of the decision, not at the decoder's output port.

Operational review: Include cold start, model or table loading, health checks, and failover in the latency record. A redundant decoder helps only if state, frame history, and sequence position can transfer without ambiguity. Inject a primary failure while the syndrome stream continues and measure lost batches, reconciliation time, and logical consequence. Security and integrity also matter: malformed coordinates or stale calibration metadata must be rejected before they corrupt the frame. These are ordinary real-time-service requirements applied to unusually unforgiving data.

## Decoding is ambiguous inference

Show that multiple error chains share syndromes and connect model assumptions to decoder accuracy.

That last step is the one outsiders miss. A round that finishes late is not a slower success; it is new noise the code was never sized to handle.

Fault-tolerant architectures require classical decoding and control to operate within hardware-dependent timing constraints. [fault-tolerant-roads] [full-stack-review]

### Accuracy and service quality form a Pareto surface

A more sophisticated decoder can reduce logical error on a fixed dataset and still be the worse systems choice. Compare logical failures per round, median and high-quantile latency, sustained throughput, memory, energy, and behavior when the input distribution shifts. Report all of them at the same code distance, noise model, and hardware budget. A neural decoder evaluated on a GPU cannot be compared with a matching decoder on an embedded FPGA by quoting accuracy alone; device-to-host transfer and batching policy belong in the measurement.

Confidence estimates need operational semantics. If the decoder returns a low-confidence decision, the controller might request another measurement, flag an erasure, slow the schedule, or continue and record the risk. Each policy changes both error and timing. Calibrate confidence on held-out syndrome streams, including correlated faults and drift, and state what fraction of events enter the fallback path. The system cannot benefit from uncertainty that no downstream component consumes.

## A queue forms when service misses arrival

Build a deterministic timing model for ingress, decode, decision, and feedback; distinguish mean and tail latency.

Decoding is the inverse problem: many different errors share a fingerprint, so the decoder must pick the most likely one, and pick it fast. The deadline comes from the hardware:

Pauli-frame tracking can defer physical correction while preserving a classical record needed by subsequent operations. [nielsen-chuang] [surface-codes-2012]

### Queue stability is the first pass/fail test

For a simplified single-server model, let syndromes arrive at rate \(\lambda\) and the decoder complete work at rate \(\mu\). If \(\lambda \geq \mu\), backlog grows without bound. When \(\lambda < \mu\), a small utilization margin can still produce unacceptable tail latency because bursts and service-time variance matter. Run the fixture with a deterministic stream, a bursty stream, and a temporary slowdown. Plot queue depth and deadline misses over time; an average-throughput table hides the failure that operators will actually see.

Backpressure must be explicit. Can the quantum schedule pause without invalidating coherence assumptions? Can batches be dropped, and if so how is the resulting erasure represented? Is spare decoder capacity reserved for recovery after a burst? A production design should define a maximum queue, an overload alarm, and a safe response. Silent accumulation is not a policy. Neither is assuming that a faster future processor will repair an unstable architecture.

## Pauli frames defer pulses, not correctness

Explain frame bookkeeping, compiler/runtime dependencies, and when a decision must materialize.

If measurement latency, data movement, decoder runtime, or control latency eat the round, the loop fails — no matter how good the physical qubits look on a datasheet.

Decoder performance cannot be represented by accuracy alone when live throughput and latency constrain the control loop. [full-stack-review] [fault-tolerant-roads]

### Partitioning and data movement can dominate arithmetic

Large codes are often divided among decoder tiles. Partition boundaries require enough information to reconcile faults that cross regions. More tiles can improve throughput while increasing boundary traffic and synchronization. Measure end-to-end latency from digitizer output to control decision, not kernel runtime inside one tile. Serialization, packetization, memory copies, network arbitration, and clock-domain crossings are part of the decoder path even though none performs decoding.

The placement decision is physical. Room-temperature compute offers abundant resources but pays cable and round-trip latency. Cryogenic electronics shorten some paths but face power and cooling constraints. A hierarchical design may perform classification and local preprocessing near the device, stream compact events upward, and reserve global inference for slower boundaries. The right split depends on code, cycle time, and feedback semantics; “real-time” by itself names no requirement [full-stack-review].

## Benchmark accuracy against deadline misses

Produce a Pareto table across decoder configurations rather than maximizing one scalar.

Every step in that list has a named bottleneck: readout fidelity, measurement latency, bandwidth off the chip, decoder runtime, control latency, calibration drift. A serious architecture names its bottleneck and shows the measurement that bounds it.

System scaling couples syndrome volume and decoder/control resources to code distance and logical workload. [surface-codes-2012] [full-stack-review]

### Verification needs adversarial syndrome streams

Unit tests should cover a no-error stream, every single-fault syndrome supported by the code fixture, repeated measurement faults, ambiguous patterns, malformed records, dropped batches, duplicated sequence numbers, and timestamp wraparound. A reference implementation can be slow if it is simple enough to serve as an oracle for small cases. Compare the optimized decoder against that oracle and independently verify the controller's interpretation of frame updates.

Then test timing without confusing synthetic evidence for device evidence. Replay timestamped streams at controlled rates; inject bursts, pauses, and distribution shifts; record complete latency histograms and deadline misses. Pin processor affinity and versions so a later run is comparable. The final acceptance record should state the largest stable arrival rate, the tested duration, the high-quantile latency, the accuracy metric, and the exact overload behavior. That record connects stabilizer theory to a control component an engineer can provision [gottesman-stabilizer].

## Backpressure and fail-safe behavior

Specify what the controller does when data drops, latency spikes, calibration changes, or the decoder falls behind.

Not every correction should become an immediate physical pulse. Most designs track corrections in the Pauli frame and materialize them only when needed. That saves time, but it moves the bookkeeping into the trusted computing base — a software bug becomes a logical error.

Repeated stabilizer measurements produce syndrome history that must be decoded to infer likely errors. [surface-codes-2012] [gottesman-stabilizer]

### A worked scheduling judgment

Suppose cycles arrive every microsecond and decoder A completes each batch in 0.55 microseconds with occasional 4-microsecond pauses, while decoder B completes in 0.80 microseconds with a tightly bounded 0.95-microsecond worst case under the tested load. If the decision is needed every cycle and there is no buffering slack, B is operationally superior despite its slower mean. If corrections can be deferred for ten cycles and A's pauses are bounded and recoverable, A may win on accuracy or resource use. The answer follows from the consumer deadline and queue experiment, not the label “fast decoder.”

### What a capacity record must show

A credible capacity record includes arrival-rate sweep, code size, syndrome schema, noise generator or captured dataset, decoder configuration, hardware, batch policy, and run length. At each rate it reports logical accuracy, completed batches, dropped or malformed batches, queue-depth distribution, latency quantiles, deadline misses, power where relevant, and recovery after an injected stall. Warm-up and compilation are either included in a clearly named cold-start path or excluded symmetrically. The raw timestamped event log remains available for independent recomputation.

Stress the boundary between accuracy and overload. When a queue is full, dropping an old batch, dropping a new batch, or processing stale batches produces different logical consequences. If the controller can continue with a frame whose update is late, define exactly how eventual reconciliation works. If it must pause, add the pause to the quantum error model. An overload test passes only when the declared policy is executed and observable; it is not enough that the process avoids crashing.

The final review compares at least two designs on the same stream and device budget. A design is dominated only if another is no worse in logical error, high-quantile latency, sustained rate, resource use, and operational complexity. Otherwise present the Pareto choices and connect them to the consumer deadline. This prevents a single accuracy percentage from selecting an implementation that cannot remain synchronized with the quantum machine.

### Design the deadline from the consuming operation

The useful deadline is not an arbitrary service-level target. Derive it from the first operation whose interpretation depends on the frame update, subtract transport and controller-commit time, and leave an explicit safety margin. Then measure the decoder’s conditional latency distribution by syndrome weight, burst history, code distance, and concurrent block count. Hard instances can be rare and still dominate missed deadlines.

A production controller therefore needs admission control and degradation behavior. It can delay a feed-forward branch, reduce the number of live blocks, select a bounded-latency decoder, or abort before producing a misleading result. Each response has a quantum cost. The simulator should expose which policy fired, how much syndrome data was discarded or deferred, and whether the logical experiment remains within its declared semantics.

Claim-to-source ledger

Repeated stabilizer measurements produce syndrome history that must be decoded to infer likely errors. [surface-codes-2012] [gottesman-stabilizer]

Fault-tolerant architectures require classical decoding and control to operate within hardware-dependent timing constraints. [fault-tolerant-roads] [full-stack-review]

Pauli-frame tracking can defer physical correction while preserving a classical record needed by subsequent operations. [nielsen-chuang] [surface-codes-2012]

Decoder performance cannot be represented by accuracy alone when live throughput and latency constrain the control loop. [full-stack-review] [fault-tolerant-roads]

System scaling couples syndrome volume and decoder/control resources to code distance and logical workload. [surface-codes-2012] [full-stack-review]

### Syndrome-stream latency and backlog simulator

Format: New small companion module consuming synthetic syndrome batches with configurable cycle interval and decoder latency distribution; outputs deadline/backlog statistics.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
from math import sqrt
from random import Random
def waits(arrivals, service_s):
    finish = 0.0; out = []
    for arrival in arrivals:
        finish = max(arrival, finish); out.append(finish - arrival); finish += service_s
    return out
def miss_interval(delays, deadline_s):
    hits = sum(delay > deadline_s for delay in delays); p = hits / len(delays)
    radius = 1.96 * sqrt(p * (1 - p) / len(delays))
    return p, max(0.0, p - radius), min(1.0, p + radius)
arrivals = [i * .001 for i in range(100)]
baseline = waits(arrivals, .0008)
counterfactual = waits(arrivals, .0012)
seed = 51; rng = Random(seed)
stochastic = waits([i * .001 + rng.uniform(-.0001, .0001) for i in range(400)], .00105)
interval = miss_interval(stochastic, .002)
assert max(baseline) == 0.0 and counterfactual[-1] > .019
assert interval[1] <= interval[0] <= interval[2] and seed == 51
print(f"PASS: 51 latency evidence stable={max(baseline):.6f}s overload={counterfactual[-1]:.6f}s miss95={interval}")
```

Verification: Deterministic fixtures prove zero backlog when service is below arrival interval and growing backlog above it; stochastic fixtures disclose seed and bound deadline-miss rate with confidence intervals.

Commissioned exercise

Prompt: Simulate a syndrome source every 1 microsecond with three decoder latency profiles and determine which profiles remain stable over one million rounds.

Deliverable: Configuration JSON, backlog/deadline CSV, accuracy-latency Pareto table, and fail-safe policy for overload.

Pass condition: Units are seconds or bits/second, tail latency is reported separately from mean, unstable queues are identified, and accuracy is not used to excuse deadline failure.

Verifiable solution

Format: Reference deterministic queue calculations, seeded simulation outputs, and policy rubric.

Verification: Tests assert conservation of syndrome batches, known stable/unstable regimes, and reproducible tail metrics.

At one syndrome batch per millisecond and 0.8 milliseconds of decoder service, the deterministic queue has zero backlog. Raising service time to 1.2 milliseconds produces 19.8 milliseconds of waiting by job 100, so the second decoder misses the real-time contract even if its offline accuracy is higher.

Limits and non-transfer conditions

Offline decoder accuracy on stored data is not evidence that live hardware meets a cycle-time deadline. Cycle time, measurement duration, decoder service time, and feedback deadline are different quantities and cannot be compared without defining buffering and required reaction points. Arrival and service streams in the simulator are generated workloads, not measured controller-latency distributions.

External review

Open. Useful expertise: Quantum error-correction decoder researcher; Real-time embedded or FPGA control engineer.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering fixture

### [Syndrome-stream latency and backlog simulator](/playground/quantum/book/51-decoders-and-real-time-classical-control/#artifact-51-decoders-and-real-time-classical-control)

[Download fixture (.py)](/playground/quantum/artifacts/51-decoders-and-real-time-classical-control/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/51-decoders-and-real-time-classical-control/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Austin G. Fowler et al.. Surface codes: Towards practical large-scale quantum computation. Physical Review A. 2012](https://doi.org/10.1103/PhysRevA.86.032324) peer-reviewed review

- [Daniel Gottesman. Stabilizer codes and quantum error correction. California Institute of Technology / arXiv. 1997](https://arxiv.org/abs/quant-ph/9705052) doctoral thesis

- [Earl T. Campbell, Barbara M. Terhal, and Christophe Vuillot. Roads towards fault-tolerant universal quantum computation. Nature. 2017](https://doi.org/10.1038/nature23460) peer-reviewed review

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=51-decoders-and-real-time-classical-control#report)

Dependency graph

## Prerequisites for this chapter

- [Stabilizers and Syndrome Measurement Part VI. Reliability and Fault Tolerance · Chapter 47](/playground/quantum/book/47-stabilizers-and-syndrome-measurement/)

- [Surface Codes and Threshold Intuition Part VI. Reliability and Fault Tolerance · Chapter 49](/playground/quantum/book/49-surface-codes-and-threshold-intuition/)

Continue the thread

## Next concepts from this chapter

- [Logical Qubits and Reliable Operations Part VI. Reliability and Fault Tolerance · Chapter 52](/playground/quantum/book/52-logical-qubits-and-reliable-operations/)

- [Why Useful Quantum Computers Are Systems Engineering Projects Part VI. Reliability and Fault Tolerance · Chapter 53](/playground/quantum/book/53-useful-quantum-computers-are-systems-engineering-projects/)

- [The Full Quantum Computer Stack Part VII. Hardware Architecture · Chapter 54](/playground/quantum/book/54-full-quantum-computer-stack/)

[Previous LDPC, Bosonic, Cat, GKP, and Topological Approaches](/playground/quantum/book/50-ldpc-bosonic-cat-gkp-and-topological-approaches/)[Next Logical Qubits and Reliable Operations](/playground/quantum/book/52-logical-qubits-and-reliable-operations/)

In this chapter

- [One cycle produces a timed syndrome stream](#one-cycle-produces-a-timed-syndrome-stream)

- [Treat the decoder as a continuously loaded control service](#decoder-control-loop)

- [Decoding is ambiguous inference](#decoding-is-ambiguous-inference)

- [Accuracy and service quality form a Pareto surface](#accuracy-and-service-quality-form-a-pareto-surface)

- [A queue forms when service misses arrival](#a-queue-forms-when-service-misses-arrival)

- [Queue stability is the first pass/fail test](#queue-stability-is-the-first-pass-fail-test)

- [Pauli frames defer pulses, not correctness](#pauli-frames-defer-pulses-not-correctness)

- [Partitioning and data movement can dominate arithmetic](#partitioning-and-data-movement-can-dominate-arithmetic)

- [Benchmark accuracy against deadline misses](#benchmark-accuracy-against-deadline-misses)

- [Verification needs adversarial syndrome streams](#verification-needs-adversarial-syndrome-streams)

- [Backpressure and fail-safe behavior](#backpressure-and-fail-safe-behavior)

- [A worked scheduling judgment](#a-worked-scheduling-judgment)

- [What a capacity record must show](#decoder-capacity-record)

- [Design the deadline from the consuming operation](#design-the-deadline-from-the-consuming-operation)

- [Syndrome-stream latency and backlog simulator](#syndrome-stream-latency-and-backlog-simulator)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=51-decoders-and-real-time-classical-control#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/51-decoders-and-real-time-classical-control/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/52-logical-qubits-and-reliable-operations/ -->

# Logical Qubits and Reliable Operations

Grouping a thousand noisy qubits into a block gives you a bigger noisy object, not a logical qubit. What earns the name is error suppression you can measure. This chapter is the checklist that tells the difference between a logical-qubit milestone and a relabeling exercise.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Demonstrate repeated logical preparation, idle memory, measurement, and required gates under the same protocol, then show logical failure decreases as protection grows while reporting physical qubits, distance, cycles, logical operation time, decoder conditions, and uncertainty.

A one-time encoded state, postselected error-detection run, or logical memory result does not establish a universal logical gate set. Logical and physical error rates are comparable only when the operation, duration, decoding, state preparation, measurement, and confidence method are aligned.

[Figure 52.1.](#fig-52-logical-qubits-and-reliable-operations-1) Logical-operation evidence card and suppression fixture: The evidence card distinguishes preparation, memory, gates, measurement, sequences, and their physical baseline.

## A logical qubit needs an operation contract

List preparation, idle, measurement, Clifford, entangling, and non-Clifford capabilities as separate claims.

A logical qubit spreads one qubit of information across many physical qubits so that no single failure destroys it. But the value was never the grouping. The value is that operations on the logical qubit fail less often than operations on the physical qubits underneath — by enough, for long enough, to matter to a workload.

Logical quantum information is encoded across physical degrees of freedom and judged by operation-specific logical failure behavior. [nielsen-chuang] [gottesman-stabilizer]

### A logical qubit is an experiment with a denominator

“Logical” identifies an encoding and a decoding rule; it does not by itself establish protection. The minimum record names the code, physical elements, stabilizers or checks, number and cadence of rounds, decoder, accepted and discarded shots, and the physical comparator. A postselected experiment can demonstrate that an encoded subspace and syndrome information exist, but its discarded runs still count against a claim about reliable computation. Publish both conditional error among accepted shots and unconditional probability of delivering a usable result.

The comparator must perform the same task for the same duration. A logical memory held for (R) correction rounds should be compared with the best specified unencoded memory over the corresponding wall-clock interval, not with a one-gate physical error. If several physical qubits or repeated measurements form the comparator, describe them. Break-even means that the encoded result beats that declared baseline on the declared metric; it is not a universal threshold crossed forever.

Reporting rule: Publish numerators and denominators for every rejected shot, leakage event, detected fault, and decoded failure. Give exact confidence construction and the number of independent calibration periods. Without those fields, a reader cannot distinguish protection from selection or estimate whether the observed advantage will survive a longer operation sequence.

## Choose the physical baseline carefully

Define the best unencoded operation with matched duration and protocol rather than an arbitrary physical-qubit number.

So the practical question for any announcement is short: does this logical qubit reduce risk for a computation anyone actually wants to run? Everything else — the encoding, the code distance, the demonstration — is evidence toward or away from that answer.

Fault-tolerant capability requires reliable logical operations and not merely encoded storage or detection. [fault-tolerant-roads]

### Distance scaling is stronger evidence than one favorable point

For a code family, below-threshold behavior should improve as distance or another protection parameter increases, after holding the noise process and operation definition sufficiently stable. Plot logical failure with confidence intervals against distance for several physical conditions. A single larger code that beats a smaller code is encouraging, but fabrication changes, calibration selection, decoder tuning, and different shot counts can explain part of the improvement. Record those changes rather than fitting one clean exponential through incomparable points [surface-codes-2012].

Use exposure units that match the claim. Memory can be reported per round and per unit time; an operation should be reported per logical operation, including the correction rounds and ancilla work surrounding it. When a sequence contains \(N\) operations with small, roughly independent failure probabilities \(p_i\), \(\sum_i p_i\) is a useful first-order budget. It is not a substitute for testing correlations, coherent accumulation, leakage, or fault propagation through a gate.

## Suppression across protection levels

Build a synthetic distance-series plot with uncertainty and explain what trend constitutes error suppression.

The factor is not a footnote; it decides when the machine becomes buildable. Second, usefulness. A circuit survives only if its operations collectively stay inside the error budget:

Surface-code evidence should relate logical performance to distance, cycles, decoder, and physical error assumptions. [surface-codes-2012]

### Memory, measurement, and gates occupy different evidence rows

A logical memory experiment asks whether encoded information survives. A logical measurement asks whether an encoded observable is read with the claimed reliability. A one-logical-qubit gate asks whether an operation preserves the code space and achieves an error below its comparator. A two-logical-qubit gate adds fault propagation and usually more demanding geometry or ancilla preparation. A non-Clifford operation introduces injection, distillation, code switching, or a platform-specific alternative. Do not fill one row by citing another.

Process-level characterization should include more than truth-table success. Coherent over-rotation can look acceptable on basis states and accumulate badly in algorithms. Leakage can evade a Pauli error model. State-preparation and measurement errors can contaminate an apparent gate result. Use randomized or tomographic tools only with their assumptions stated, and pair aggregate metrics with targeted diagnostics. The conclusion should say exactly which operation and error notion were tested.

## Overhead and time accompany the rate

Report physical count, cycles, wall time, decoder, postselection, and yield next to logical error.

A logical-qubit milestone matters exactly when it improves that product for operations a target workload needs — deeper circuits, more two-qubit gates, lower failure probability. A milestone that improves neither is science, which has its own value, but it is not yet utility.

Physical overhead and runtime must be carried alongside logical error when assessing workload relevance. [gidney-ekera-2021] [full-stack-review]

### Repeated correction changes the claim

One syndrome round can detect a constructed fault; fault tolerance requires repeated operation in which measurement errors are themselves handled. The controller must timestamp syndromes, the decoder must link events across rounds, and resets must return ancillas without corrupting data. Demonstrate enough rounds to expose temporal correlations, heating, drift, decoder backlog, and leakage. If the run is shortened to remain inside a favorable calibration window, that boundary belongs in the result.

Fault-tolerant preparation and gates require that a small number of physical faults not spread into an uncorrectable logical fault. Verify this structurally in the circuit and empirically where possible. An encoded operation with lower observed error but no fault-containment argument may be a useful logical operation without yet being a fault-tolerant one. The distinction is technical, not rhetorical [fault-tolerant-roads].

## Memory, gates, and sequences are separate rungs

Prevent idle-lifetime evidence from silently validating active logical operations or long algorithms.

Suppose a target workload needs on the order of fifty logical qubits, many reliable two-qubit logical gates, and a total failure probability below a stated threshold. An announcement arrives: a team has demonstrated a logical qubit. The evaluation note asks:

Comparative benchmark claims require matched tasks and explicit uncertainty rather than isolated best metrics. [benchmarking-2025]

### Read a milestone table without borrowing confidence

Give each row five fields: task, accepted denominator, comparator, uncertainty, and evidence class. Add blanks for operations not demonstrated. A memory result does not populate two-qubit gates; a detected-error result does not populate corrected operation; a simulator result does not populate hardware. If an organization changes code, decoder, or physical platform between milestones, preserve separate rows rather than drawing a continuous trend line.

Suppose a synthetic distance series reports physical error 0.8%, logical memory failure per round of 1.2%, 0.55%, and 0.31% at distances three, five, and seven. The downward trend supports suppression with distance under that fixture, but the distance-three point does not beat the physical comparator. Call the evidence “scaling without demonstrated break-even at every distance,” not simply “a logical qubit.” If the same packet reports a logical two-qubit gate at 2%, leave the reliable-gate conclusion open until its matched physical implementation, interval, and confidence bound are supplied.

## A workload consumes an error budget

Translate operation-specific logical rates into a named sequence while exposing independence approximations.

If the note cannot answer most of these, the milestone may be real and still be irrelevant to the workload. Both halves of that sentence matter.

Logical quantum information is encoded across physical degrees of freedom and judged by operation-specific logical failure behavior. [nielsen-chuang] [gottesman-stabilizer]

### Convert evidence into a workload reliability claim

An application needs a sequence-level success probability, not a milestone label. Allocate failure among preparation, memory intervals, gates by class, measurements, and classical control. Use upper confidence bounds when provisioning, not only point estimates. Then test whether correlations or shared failure modes make the allocation optimistic. Resource estimates such as large-scale factoring studies are useful precisely because they expose how logical operation counts and target failure drive code and factory requirements [gidney-ekera-2021].

The result of this chapter's exercise should therefore be a sparse evidence matrix and an honest sequence budget. A blank cell is safer than a transferred number. The next experiment is the one that fills the binding cell: perhaps repeated fault-tolerant measurement, a logical entangling gate, or an operation at a larger distance. That is how “logical qubit” becomes a testable engineering statement rather than a ceremonial milestone.

### An operation-level acceptance checklist

For every claimed logical operation, ask six questions. What ideal channel is the target? Which encoded input ensemble was tested? Which correction rounds, ancillas, and decoder decisions are included? What physical or logical baseline performs the same task over the same duration? Which uncertainty interval applies to the difference? Which faults can violate the model? The record must also state postselection and leakage treatment. A process estimate conditioned on remaining in the code space cannot be presented as unconditional delivered reliability.

Sequence tests are a useful cross-check. Construct identity-equivalent sequences of increasing length and interleave the target operation, then compare observed decay with a model derived from the independently measured operation budget. Disagreement can reveal coherent accumulation, context dependence, or correlated correction failures. Do not force agreement by fitting every mechanism into one effective depolarizing parameter; preserve the residual and investigate it.

A milestone passes the chapter's standard when a reader can reproduce the evidence-row classification from the published fields. If the lower confidence bound still beats the declared comparator, the break-even conclusion is supported for that task. If larger distance improves the fitted rate while absolute break-even remains unresolved, report suppression only. If memory is protected but the gate row is blank, say “logical memory demonstrated” and make the gate the next proof target.

### Interleave operations before claiming a processor

A memory curve does not certify a logical gate. Insert preparation, idle, gate, measurement, and reset into sequences that resemble the intended workload, and retain a separate failure denominator for every operation class. Randomized sequences can expose accumulation, while targeted circuits test propagation through the specific logical primitive. Compare protection levels using identical decoding, inclusion, and timing rules. If the larger code changes the schedule or creates more deadline misses, the overhead belongs in the logical-operation result rather than in a footnote.

Claim-to-source ledger

Logical quantum information is encoded across physical degrees of freedom and judged by operation-specific logical failure behavior. [nielsen-chuang] [gottesman-stabilizer]

Fault-tolerant capability requires reliable logical operations and not merely encoded storage or detection. [fault-tolerant-roads]

Surface-code evidence should relate logical performance to distance, cycles, decoder, and physical error assumptions. [surface-codes-2012]

Physical overhead and runtime must be carried alongside logical error when assessing workload relevance. [gidney-ekera-2021] [full-stack-review]

Comparative benchmark claims require matched tasks and explicit uncertainty rather than isolated best metrics. [benchmarking-2025]

### Logical-operation evidence card and suppression fixture

Format: Machine-readable experiment schema plus generated synthetic distance-series plot and workload error-budget table; reuse `resources.py` only for labeled sensitivity context.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
REQUIRED = {"operation", "baseline", "duration_s", "distances", "cycles", "uncertainty", "postselection"}
def classify(card, rates):
    missing = REQUIRED - card.keys()
    if missing or tuple(card["distances"]) != tuple(sorted(rates)):
        raise ValueError(sorted(missing) or "distance mismatch")
    values = [rates[d] for d in card["distances"]]
    trend = "suppression" if all(a > b for a, b in zip(values, values[1:])) else "worsening" if all(a < b for a, b in zip(values, values[1:])) else "flat"
    return trend, "memory-evidence" if card["operation"] == "memory" else "operation-evidence"
card = {"operation":"memory", "baseline":"physical-idle", "duration_s":.001, "distances":[3,5,7], "cycles":1000, "uncertainty":"binomial-95", "postselection":False}
baseline = classify(card, {3:2e-3, 5:7e-4, 7:2e-4})
boundary = classify(card, {3:7e-4, 5:7e-4, 7:7e-4})
counterfactual = classify(card, {3:2e-4, 5:7e-4, 7:2e-3})
assert (baseline[0], boundary[0], counterfactual[0]) == ("suppression", "flat", "worsening")
assert baseline[1] == boundary[1] == counterfactual[1] == "memory-evidence"
print(f"PASS: 52 logical evidence trends={baseline[0]}/{boundary[0]}/{counterfactual[0]} claim={baseline[1]}")
```

Verification: Schema requires operation/baseline/duration/distance/cycles/uncertainty/postselection; fixture tests distinguish suppression, flat, and worsening trends and never reports a logical capability from memory data alone.

Commissioned exercise

Prompt: Classify three synthetic distance-series datasets for logical idle memory and one logical gate, then estimate a 10,000-operation sequence failure under a declared approximation.

Deliverable: Evidence cards, uncertainty plots, classification, resource columns, and workload budget with assumptions.

Pass condition: Suppression is claimed only where confidence-supported trends improve; gate and memory evidence remain separate; overhead and duration appear beside rates.

Verifiable solution

Format: Reference classifications, plots, and error-budget calculation with an independence caveat.

Verification: Tests recompute intervals and trend labels and reject cards missing operation or comparator metadata.

The synthetic distance series falls from 2e-3 at d=3 to 7e-4 at d=5 and 2e-4 at d=7. The operation budget assigns 2e-4 to memory, 3e-4 to measurement, and 5e-4 to two-qubit operations, summing to the declared 1e-3 workload target without treating memory evidence as gate evidence.

Limits and non-transfer conditions

A one-time encoded state, postselected error-detection run, or logical memory result does not establish a universal logical gate set. Logical and physical error rates are comparable only when the operation, duration, decoding, state preparation, measurement, and confidence method are aligned. The suppression fixture tests evidence-card arithmetic without claiming a logical operation on deployed hardware.

External review

Open. Useful expertise: Experimental logical-qubit researcher; Fault-tolerance theorist specializing in logical operations.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering fixture

### [Logical-operation evidence card and suppression fixture](/playground/quantum/book/52-logical-qubits-and-reliable-operations/#artifact-52-logical-qubits-and-reliable-operations)

[Download fixture (.py)](/playground/quantum/artifacts/52-logical-qubits-and-reliable-operations/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/52-logical-qubits-and-reliable-operations/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010](https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE) textbook

- [Daniel Gottesman. Stabilizer codes and quantum error correction. California Institute of Technology / arXiv. 1997](https://arxiv.org/abs/quant-ph/9705052) doctoral thesis

- [Earl T. Campbell, Barbara M. Terhal, and Christophe Vuillot. Roads towards fault-tolerant universal quantum computation. Nature. 2017](https://doi.org/10.1038/nature23460) peer-reviewed review

- [Austin G. Fowler et al.. Surface codes: Towards practical large-scale quantum computation. Physical Review A. 2012](https://doi.org/10.1103/PhysRevA.86.032324) peer-reviewed review

- [Craig Gidney and Martin Ekerå. How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits. Quantum. 2021](https://doi.org/10.22331/q-2021-04-15-433) primary peer-reviewed resource estimate

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=52-logical-qubits-and-reliable-operations#report)

Dependency graph

## Prerequisites for this chapter

- [Surface Codes and Threshold Intuition Part VI. Reliability and Fault Tolerance · Chapter 49](/playground/quantum/book/49-surface-codes-and-threshold-intuition/)

- [Decoders and Real-Time Classical Control Part VI. Reliability and Fault Tolerance · Chapter 51](/playground/quantum/book/51-decoders-and-real-time-classical-control/)

Continue the thread

## Next concepts from this chapter

- [Why Useful Quantum Computers Are Systems Engineering Projects Part VI. Reliability and Fault Tolerance · Chapter 53](/playground/quantum/book/53-useful-quantum-computers-are-systems-engineering-projects/)

- [LDPC, Bosonic, Cat, GKP, and Topological Approaches Part VI. Reliability and Fault Tolerance · Chapter 50](/playground/quantum/book/50-ldpc-bosonic-cat-gkp-and-topological-approaches/)

- [Repetition, Bit-Flip, Phase-Flip, and Shor Codes Part VI. Reliability and Fault Tolerance · Chapter 48](/playground/quantum/book/48-repetition-bit-flip-phase-flip-and-shor-codes/)

[Previous Decoders and Real-Time Classical Control](/playground/quantum/book/51-decoders-and-real-time-classical-control/)[Next Why Useful Quantum Computers Are Systems Engineering Projects](/playground/quantum/book/53-useful-quantum-computers-are-systems-engineering-projects/)

In this chapter

- [A logical qubit needs an operation contract](#a-logical-qubit-needs-an-operation-contract)

- [A logical qubit is an experiment with a denominator](#logical-evidence-account)

- [Choose the physical baseline carefully](#choose-the-physical-baseline-carefully)

- [Distance scaling is stronger evidence than one favorable point](#distance-scaling-is-stronger-evidence-than-one-favorable-point)

- [Suppression across protection levels](#suppression-across-protection-levels)

- [Memory, measurement, and gates occupy different evidence rows](#memory-measurement-and-gates-occupy-different-evidence-rows)

- [Overhead and time accompany the rate](#overhead-and-time-accompany-the-rate)

- [Repeated correction changes the claim](#repeated-correction-changes-the-claim)

- [Memory, gates, and sequences are separate rungs](#memory-gates-and-sequences-are-separate-rungs)

- [Read a milestone table without borrowing confidence](#read-a-milestone-table-without-borrowing-confidence)

- [A workload consumes an error budget](#a-workload-consumes-an-error-budget)

- [Convert evidence into a workload reliability claim](#convert-evidence-into-a-workload-reliability-claim)

- [An operation-level acceptance checklist](#logical-operation-checklist)

- [Interleave operations before claiming a processor](#interleave-operations-before-claiming-a-processor)

- [Logical-operation evidence card and suppression fixture](#logical-operation-evidence-card-and-suppression-fixture)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 7 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=52-logical-qubits-and-reliable-operations#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/52-logical-qubits-and-reliable-operations/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/53-useful-quantum-computers-are-systems-engineering-projects/ -->

# Why Useful Quantum Computers Are Systems Engineering Projects

No single breakthrough ships a useful quantum computer. Qubits, control electronics, fabrication, compilers, decoders, and applications have to cross the line together — and the layer that slips is usually the one nobody put in the press release.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Propagate a named workload's qubits, operations, timing, failure budget, data, and evidence requirements across algorithm, compilation, control, device, readout, decoding, and post-processing interfaces; the binding constraint is the first contract whose measured margin becomes nonpositive.

This chapter supplies the cross-layer reliability method; Chapter 54 traces the concrete hardware stack and should not repeat the same generic layer list. A weakest-layer label is not a scalar score and cannot be chosen without interface units, measured capacity, demand, and uncertainty.

[Figure 53.1.](#fig-53-useful-quantum-computers-are-systems-engineering-projects-1) Cross-layer interface contract and bottleneck calculator: The contract exposes how one interface’s units, capacity, or stale version constrains the workload service level.

## Start with one workload service-level objective

Declare output quality, deadline, throughput, total failure budget, and classical validation boundary.

Useful quantum computing is not one breakthrough in isolation. Physical qubits, control electronics, fabrication, packaging, compilers, decoders, error correction, resource estimates, algorithms, and applications form a single system, and a system fails at its weakest interface.

Useful quantum computation requires coordinated device, control, compiler, error-correction, and application layers. [full-stack-review] [quantum-computers-review]

### Write the workload as a cross-layer contract

A systems analysis begins with a result contract: input class, required accuracy, probability of success, maximum elapsed time, and a classical verification rule. It then works backward. The algorithm supplies logical qubits, operations by class, dependency depth, measurements, and classical feed-forward. Error correction supplies cycles, ancillas, factories, and target logical failure. Compilation supplies routing and schedules on a target graph. Control supplies durations, bandwidth, and calibration constraints. Hardware supplies measured channels and availability. Operations supplies queueing, maintenance, and duty cycle. A “million-qubit computer” is not an answer to any of these fields.

Keep quantities typed. Gate count is dimensionless; circuit depth is layers; control duration is seconds; throughput is operations per second; reliability is a probability conditioned on an error model; availability is a fraction of wall time. Multiplying or comparing values with mismatched definitions is a schema failure, not a small approximation. Give every empirical parameter a source date and every assumed parameter an owner who must validate it.

Review cadence: Reopen the architecture decision when a sensitivity input crosses a declared threshold, an interface version changes, or an assumption receives direct evidence. Preserve superseded analyses and explain why the binding layer moved. This creates a falsifiable engineering history and prevents a readiness score from drifting while keeping the same label.

## Interfaces carry budgets, not adjectives

Define an interface-contract schema for operations, time, error, data rate, capacity, and evidence.

That is why the sharpest diligence question about any roadmap is also the shortest: which layer of this stack is least proven? The honest answer is rarely the layer the roadmap is about. A qubit-count milestone can be blocked by control latency, by decoder throughput, by packaging yield, or by the absence of a workload with a baseline. The blocker hides wherever the talk is thinnest.

Physical implementation criteria include initialization, coherence, universal control, measurement, and scalability rather than qubit count alone. [divincenzo-criteria]

### Allocate budgets before optimizing components

Let the run-level failure allowance be \(\varepsilon_{\mathrm{run}}\). Allocate it among logical operations, state preparation, measurement, control, and other declared mechanisms. The allocations need not be equal, but they must sum to no more than the total. For rare independent events, a linear sum is a useful planning approximation. Shared calibration errors, bursts, and coherent drift require a more conservative model or direct system test. The allocation prevents each team from consuming the entire failure allowance in its own spreadsheet.

Time is allocated the same way. Separate queue wait, compilation, data transfer, quantum execution, mid-circuit feedback, decoding, repeated shots, and classical post-processing. Optimize the term that binds the result contract. Cutting a 10-millisecond kernel in half does not matter to a workflow dominated by ten minutes of queueing, while reducing queueing says nothing about a fault-tolerant schedule whose factories cannot feed non-Clifford gates.

## Propagate a small phase-estimation workload

Trace logical depth through routing, cycle scheduling, decoding, and readout to end-to-end time/error.

The earlier chapters in this part each contributed a small calculation. Together they force a roadmap to name time, error, evidence, and risk:

Fault-tolerant reliability couples physical error, correction cycles, decoding, and logical operations. [fault-tolerant-roads] [surface-codes-2012]

### Interfaces are where local successes become system failures

For every boundary, write the producer's output type and the consumer's expected input type. A compiler may emit a timed instruction assuming a calibration snapshot; the controller may load a newer snapshot or reject an unsupported pulse. A digitizer emits analog records; a classifier attaches bits and uncertainty; a decoder expects ordered syndrome events with code coordinates and round indices. Silent defaults at these interfaces are dangerous because each component can pass its own unit tests while the combined interpretation is wrong.

Version the artifacts carried across boundaries: circuit IR, target description, calibration identifier, pulse schedule, classifier model, code layout, decoder build, and post-processing configuration. Record units and clocks. A timestamp without a clock domain cannot establish ordering; a probability without a conditioning event cannot enter an error budget. Integration tests should deliberately mismatch versions and confirm that the system fails closed with a useful diagnostic.

## Margin exposes the bottleneck

Compute capacity-minus-demand or budget-minus-consumption per interface with units and uncertainty ranges.

None of these is a performance model. They are tripwires. When a claim goes quiet about one of the four quantities, you have found the place to dig.

End-to-end resource estimates translate algorithms into architecture-dependent qubit and runtime budgets. [gidney-ekera-2021]

### Use sensitivity analysis to locate the real bottleneck

Run the analyzer with one controlled perturbation at a time. Increase routing depth while holding physical error fixed; reduce decoder throughput while holding syndrome rate fixed; increase calibration downtime while holding per-shot quality fixed; reduce factory throughput while holding data-block size fixed. The output should change at the expected boundary. If every scenario reports “qubit fidelity” as the bottleneck, the model probably encodes its conclusion.

Then test interactions. Faster gates can raise leakage; more parallelism can raise crosstalk; stronger error correction can increase cycle time and decoder load; multiplexing can reduce wires while consuming bandwidth and complicating calibration. A Pareto surface is more honest than a single readiness score. Preserve configurations that are dominated only after all relevant dimensions use comparable units and evidence classes [full-stack-review].

## Feedback makes the stack dynamic

Show how calibration, decoder backlog, compiler mapping, and drift change upstream assumptions.

On real reviews the weak layer surprises people: control latency, not qubits; decoding, not fabrication; workload definition, not hardware. The exercise works because it checks the layers in the stack's order, not the press release's.

Benchmark evidence must preserve workload and measurement boundaries when comparing system claims. [benchmarking-2025]

### Provision margin and degraded modes

A design that works only at point estimates is not ready to operate. Give throughput, thermal capacity, memory, calibration windows, decoder latency, and network links explicit margin. Use high-quantile demands where bursts matter and lower confidence bounds where capability matters. State what happens when margin is consumed: reduce parallelism, postpone work, lower code distance, switch to a classical method, or abort. Some degraded modes preserve service; others invalidate the scientific claim.

Availability belongs in the capacity calculation. If a processor executes the target circuit quickly but is available only during short calibrated windows, effective throughput includes recalibration and failed runs. Manufacturing yield and spare capacity affect how many nominal devices can be assembled into one usable machine. These are not business footnotes; they determine whether the workload contract can be met repeatedly [quantum-computers-review].

## Test the interface most likely to break

Design an integration experiment and kill criterion for the lowest-margin contract.

A roadmap without kill criteria is not decision-grade. A plan that cannot say what evidence would change it is not a plan; it is a hope with dates on it.

Useful quantum computation requires coordinated device, control, compiler, error-correction, and application layers. [full-stack-review] [quantum-computers-review]

### A four-fixture analyzer should produce four different diagnoses

Fixture one uses a sparse coupling graph and a two-qubit-heavy circuit; routing depth binds. Fixture two uses sufficient routing but slow syndrome service; decoder backlog binds. Fixture three gives ample compute but tight cryogenic channel capacity; control infrastructure binds. Fixture four supplies all technical capacity but a low duty cycle and long queue; operational throughput binds. Each result should show the exhausted budget, remaining margins, and the first measurement that could overturn the diagnosis.

For a small phase-estimation job, the contract might require eight bits of phase precision, 99% accepted-result probability, and a five-second wall-clock limit. The ledger can reveal that logical failure meets its allocation while repeated controlled operations exceed the scheduled depth after routing. The correct recommendation is then a topology-aware algorithm or a device with a better interaction graph—not a generic request for “better qubits.” A different fixture may meet depth but fail because feedback arrives after the next controlled block. The method changes its answer because the evidence changes.

### The contract needs change control

Cross-layer conclusions expire when their inputs change. A new compiler can alter routing depth; a new calibration can change supported parallel patterns; a decoder build can change both error and latency; a package revision can change crosstalk. Version the analysis and define which input changes require requalification. Continuous integration can rerun schema, equivalence, timing, and budget checks on synthetic fixtures, while empirical parameters remain pinned to dated measurement records.

Trace requirements downward and evidence upward. The run-level success requirement allocates a logical-operation budget; the code and schedule allocate physical operations; measurements establish component or subsystem values; roll-up establishes whether the top requirement is met. Every link should name its evidence. An orphan measurement supports no decision, and an unverified requirement rests on an assumption. A compact traceability matrix is more useful than a hundred-page roadmap if it exposes those breaks.

Close the review with ownership. The compiler team owns mapping evidence, controls owns realized timing, device engineering owns measured channels, error correction owns logical assumptions, and operations owns availability. One systems owner adjudicates shared margins and refuses double counting. This governance is technical: without it, two teams can reserve the same latency margin or each assume the other includes reset, calibration, and retry costs.

### Version interfaces as scientific objects

Cross-layer failures often come from a contract that changed silently: the compiler reorders classical bits, control firmware changes pulse duration, a decoder adopts a new syndrome convention, or a calibration service replaces a parameter after the resource estimate was signed. Give every interface a schema version, coordinate convention, unit declaration, calibration timestamp, and producer identity. The downstream consumer should reject an incompatible record rather than coercing it into a plausible-looking value.

Integration tests should cross at least two boundaries. One fixture can compile a small logical instruction, schedule its physical operations, synthesize a measurement record, decode it, and verify the returned answer against a classically known case. Inject reversed bit order, expired calibration, a missed feedback deadline, and a unit conversion error. The test is successful when each fault is attributed to the boundary that introduced it and the run is invalidated before a benchmark number is published.

This discipline changes architecture reviews. Teams no longer argue only about nominal qubit or gate specifications; they can point to a typed handoff whose remaining margin is negative. The next experiment then targets that handoff directly, and a later improvement can be propagated through the same executable system model.

Claim-to-source ledger

Useful quantum computation requires coordinated device, control, compiler, error-correction, and application layers. [full-stack-review] [quantum-computers-review]

Physical implementation criteria include initialization, coherence, universal control, measurement, and scalability rather than qubit count alone. [divincenzo-criteria]

Fault-tolerant reliability couples physical error, correction cycles, decoding, and logical operations. [fault-tolerant-roads] [surface-codes-2012]

End-to-end resource estimates translate algorithms into architecture-dependent qubit and runtime budgets. [gidney-ekera-2021]

Benchmark evidence must preserve workload and measurement boundaries when comparing system claims. [benchmarking-2025]

### Cross-layer interface contract and bottleneck calculator

Format: New JSON schema and small deterministic analyzer for a teaching workload; outputs per-layer demand, capacity, margin, evidence source, and sensitivity.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
def bottleneck(budgets):
    units = {unit for demand, capacity, unit in budgets.values()}
    if len(units) != 1:
        raise ValueError("mixed dimensions")
    margins = {name: capacity - demand for name, (demand, capacity, unit) in budgets.items()}
    return min(margins, key=margins.get), margins
fixtures = {
    "timing":{"timing":(1.2,1.0,"us"),"routing":(.8,1.0,"us")},
    "routing":{"routing":(120,100,"edges"),"decoder":(900,1200,"edges")},
    "decoder":{"decoder":(1.3,1.0,"us"),"control":(.7,1.0,"us")},
    "failure":{"failure":(.012,.010,"probability"),"readout":(.004,.010,"probability")},
}
baseline = {name:bottleneck(case)[0] for name, case in fixtures.items()}
counterfactual = bottleneck({"routing":(90,100,"edges"),"decoder":(1300,1200,"edges")})
try:
    bottleneck({"time":(1,2,"us"),"load":(1,2,"watts")})
    raise AssertionError("mixed units accepted")
except ValueError:
    rejected = True
assert baseline == {name:name for name in fixtures} and counterfactual[0] == "decoder"
assert counterfactual[1]["decoder"] < 0 and rejected
print(f"PASS: 53 bottleneck evidence fixtures={baseline} changed={counterfactual[0]} mixed_units_rejected={rejected}")
```

Verification: Schema enforces dimensional consistency; tests identify known timing, routing, decoder, and failure-budget bottlenecks in four fixtures and change the result when the controlling assumption changes.

Commissioned exercise

Prompt: Complete the supplied cross-layer contract for a small phase-estimation run, compute margins, and perturb routing depth and decoder latency separately.

Deliverable: Validated JSON, baseline report, two sensitivity reports, identified bottleneck, and one integration test with pass/fail threshold.

Pass condition: All quantities carry compatible units, the bottleneck follows the data rather than a preset layer, and the proposed test measures the limiting contract.

Verifiable solution

Format: Four reference fixtures with intentionally different binding layers and an interface-review rubric.

Verification: Run analyzer tests and independently recompute each minimum margin from the JSON values.

The interface ledger gives routing demand 120 operations per second against capacity 100, a margin of -20 operations per second. Decoder and readout margins remain positive, so routing is the computed bottleneck; changing its capacity above 120 moves the bottleneck rather than preserving a predetermined layer.

Limits and non-transfer conditions

This chapter supplies the cross-layer reliability method; Chapter 54 traces the concrete hardware stack and should not repeat the same generic layer list. A weakest-layer label is not a scalar score and cannot be chosen without interface units, measured capacity, demand, and uncertainty. Interface capacities in the companion model are hypothetical and serve only to expose propagation and margin errors.

External review

Open. Useful expertise: Quantum systems architect; Safety-critical or real-time systems engineer experienced with interface budgets.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering fixture

### [Cross-layer interface contract and bottleneck calculator](/playground/quantum/book/53-useful-quantum-computers-are-systems-engineering-projects/#artifact-53-useful-quantum-computers-are-systems-engineering-projects)

[Download fixture (.py)](/playground/quantum/artifacts/53-useful-quantum-computers-are-systems-engineering-projects/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/53-useful-quantum-computers-are-systems-engineering-projects/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [T. D. Ladd et al.. Quantum computers. Nature. 2010](https://doi.org/10.1038/nature08812) peer-reviewed review

- [David P. DiVincenzo. The physical implementation of quantum computation. Fortschritte der Physik. 2000](https://doi.org/10.1002/1521-3978(200009)48:9/11%3C771::AID-PROP771%3E3.0.CO;2-E) primary peer-reviewed perspective

- [Earl T. Campbell, Barbara M. Terhal, and Christophe Vuillot. Roads towards fault-tolerant universal quantum computation. Nature. 2017](https://doi.org/10.1038/nature23460) peer-reviewed review

- [Austin G. Fowler et al.. Surface codes: Towards practical large-scale quantum computation. Physical Review A. 2012](https://doi.org/10.1103/PhysRevA.86.032324) peer-reviewed review

- [Craig Gidney and Martin Ekerå. How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits. Quantum. 2021](https://doi.org/10.22331/q-2021-04-15-433) primary peer-reviewed resource estimate

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=53-useful-quantum-computers-are-systems-engineering-projects#report)

Dependency graph

## Prerequisites for this chapter

- [Resource Estimation for Fault-Tolerant Algorithms Part V. Practical Software · Chapter 43](/playground/quantum/book/43-resource-estimation-for-fault-tolerant-algorithms/)

- [Decoders and Real-Time Classical Control Part VI. Reliability and Fault Tolerance · Chapter 51](/playground/quantum/book/51-decoders-and-real-time-classical-control/)

- [Logical Qubits and Reliable Operations Part VI. Reliability and Fault Tolerance · Chapter 52](/playground/quantum/book/52-logical-qubits-and-reliable-operations/)

Continue the thread

## Next concepts from this chapter

- [The Full Quantum Computer Stack Part VII. Hardware Architecture · Chapter 54](/playground/quantum/book/54-full-quantum-computer-stack/)

- [LDPC, Bosonic, Cat, GKP, and Topological Approaches Part VI. Reliability and Fault Tolerance · Chapter 50](/playground/quantum/book/50-ldpc-bosonic-cat-gkp-and-topological-approaches/)

- [Surface Codes and Threshold Intuition Part VI. Reliability and Fault Tolerance · Chapter 49](/playground/quantum/book/49-surface-codes-and-threshold-intuition/)

[Previous Logical Qubits and Reliable Operations](/playground/quantum/book/52-logical-qubits-and-reliable-operations/)[Next The Full Quantum Computer Stack](/playground/quantum/book/54-full-quantum-computer-stack/)

In this chapter

- [Start with one workload service-level objective](#start-with-one-workload-service-level-objective)

- [Write the workload as a cross-layer contract](#cross-layer-contract)

- [Interfaces carry budgets, not adjectives](#interfaces-carry-budgets-not-adjectives)

- [Allocate budgets before optimizing components](#allocate-budgets-before-optimizing-components)

- [Propagate a small phase-estimation workload](#propagate-a-small-phase-estimation-workload)

- [Interfaces are where local successes become system failures](#interfaces-are-where-local-successes-become-system-failures)

- [Margin exposes the bottleneck](#margin-exposes-the-bottleneck)

- [Use sensitivity analysis to locate the real bottleneck](#use-sensitivity-analysis-to-locate-the-real-bottleneck)

- [Feedback makes the stack dynamic](#feedback-makes-the-stack-dynamic)

- [Provision margin and degraded modes](#provision-margin-and-degraded-modes)

- [Test the interface most likely to break](#test-the-interface-most-likely-to-break)

- [A four-fixture analyzer should produce four different diagnoses](#a-four-fixture-analyzer-should-produce-four-different-diagnoses)

- [The contract needs change control](#systems-change-control)

- [Version interfaces as scientific objects](#version-interfaces-as-scientific-objects)

- [Cross-layer interface contract and bottleneck calculator](#cross-layer-interface-contract-and-bottleneck-calculator)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 7 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=53-useful-quantum-computers-are-systems-engineering-projects#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/53-useful-quantum-computers-are-systems-engineering-projects/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/54-full-quantum-computer-stack/ -->

# The Full Quantum Computer Stack

Every quantum run is a round trip: a classical problem goes in, becomes shaped pulses and fields, and returns as classical bits you have to earn trust in. This chapter walks that whole path and shows where claims quietly break.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

A quantum job is a chain of typed transformations: problem to algorithm, circuit, target-aware schedule, physical controls, measurement record, decoded/logical result, and classical decision; every boundary must preserve semantics while adding measurable cost, uncertainty, and hardware assumptions.

This chapter traces one concrete job through hardware; Chapter 53 owns the general bottleneck-analysis method and should not be duplicated. The stack diagram does not imply one universal architecture: analog, NISQ gate-model, and fault-tolerant systems expose different boundaries.

[Figure 54.1.](#fig-54-full-quantum-computer-stack-1) End-to-end phase-estimation stack trace: The trace follows a phase-estimation job from controlled powers through pulses, analog readout, decoding, and acceptance.

## The job contract: estimate one phase

Fix a small phase-estimation input, output precision, success probability, and classical verification condition.

A quantum computer is a layered system that converts a classical problem into a fragile physical process and back into trustworthy classical information. The path:

A quantum computer comprises integrated algorithm, compilation, control, device, measurement, and classical-processing layers. [full-stack-review] [silicon-digital-qpu]

### Trace one phase-estimation result without skipping a representation

Start with a contract the machine can fail: estimate an eigenphase to \(m\) binary digits with an accepted-result probability of at least \(1-\varepsilon\), given a state-preparation procedure and a classically checkable relation. The algorithm record names the unitary \(U\), its controlled powers, approximation tolerance, and shot or repetition policy. If \(U\) is itself a compiled simulation, that implementation and its approximation error are upstream inputs; the stack cannot treat the controlled operation as a free box.

The circuit representation expands those requirements into registers, controlled operations, inverse Fourier operations, measurements, and classical conditions. Record logical qubit count, operations by type, dependency depth, and the point at which a measurement result is consumed. Preserve the phase convention and bit ordering. A compiler can produce a circuit that is unitary-equivalent under one ordering while post-processing interprets the bits in another, yielding a precise but wrong phase.

End-to-end acceptance: Run the same declared input often enough to estimate both result quality and operational variance. Partition failures by boundary: invalid problem instance, compiler rejection, scheduling conflict, control abort, missing measurement, classifier rejection, decode failure, and final validation failure. Report successful answers per submitted job and per wall-clock hour in addition to conditional accuracy. The distinction catches systems that look excellent only after excluding infrastructure failures. Repeat with a second, intentionally simple instance whose answer is independently computable; this control separates a pipeline regression from difficulty inherent in the target instance. Finally, rebuild the trace from stored artifacts on a clean environment. Every derived field should be reproducible without access to undocumented provider state, or it must be labeled as an external observation with timestamp and request identifier.

## Compiler outputs a timed target program

Carry logical qubits/gates through native decomposition, layout, routing, scheduling, and calibration identifiers.

Every arrow hides an assumption, and any assumption can be the one that fails. The stack is the machine; the chip is one component of it.

Physical implementation requires initialization, coherent control, measurement, and scalable interconnection under explicit criteria. [divincenzo-criteria]

### Compilation adds target assumptions and costs

The target description specifies native operations, coupling graph, durations, error metadata, measurement groups, and control constraints. Decomposition replaces ideal controlled powers with native sequences. Placement maps logical to physical qubits; routing inserts motion or swaps; scheduling resolves resource conflicts. Save the before/after operation counts, critical-path duration, mapping, target version, random seed, and compiler version. “Transpiled successfully” is not a resource account.

Equivalence checks should occur before noisy execution. For a small fixture, compare unitaries up to global phase or compare action on a complete basis. For larger controlled evolutions, use structural invariants, reference simulation on reduced instances, and property tests. Scheduling then needs a separate check: equivalent gates can still overlap resources illegally or use calibrations outside their validity window.

## Controls realize an analog trajectory

Map scheduled instructions to pulses/lasers/fields with durations, bandwidth, crosstalk, and drift assumptions.

Their product is the trap: a circuit that looks shallow in a textbook can grow too deep after routing, too slow after control timing, or too noisy after measurement and reset. Depth, time, and topology are not three concerns; they are one budget wearing three hats.

Fault-tolerant execution adds repeated syndrome extraction, decoding, and logical-operation resources to the stack. [google-surface-code-below-threshold] [google-surface-code-below-threshold]

### Instructions become analog trajectories

A scheduled operation selects calibrated pulses, laser patterns, flux trajectories, or measurement windows. Each has amplitude, phase, frequency, envelope, duration, and hardware channel assignments. The controller must bind the instruction to the calibration identified by the compiler or explicitly revalidate it. A symbolic two-qubit gate therefore crosses an interface where digital semantics meet an analog Hamiltonian and where crosstalk, leakage, distortion, and drift enter.

Timing must include reset, synchronization, conditional branches, and guard intervals. The shortest pulse is not necessarily the shortest reliable schedule: a faster envelope may leak outside the computational subspace, while simultaneous operations may interfere. Store both requested and realized timing. The integrated nature of compilation, control, device, measurement, and classical processing is why full-stack analyses cannot be replaced by a chip specification [full-stack-review].

## The device returns voltages, photons, or counts

Trace physical measurement through analog electronics and classifiers rather than jumping directly to bits.

Take a small phase-estimation routine built from repeated controlled operations, and walk it down the stack. The algorithm requires controlled evolution that preserves phase information long enough to matter. The circuit layer turns that into controlled gates plus an inverse Fourier transform. The compiler asks whether the target device offers the needed two-qubit interactions directly or must insert routing — on a sparsely connected chip, the routing layers arrive before control limits are even considered. The control layer asks whether the pulses fit calibration windows and coherence time. Readout asks whether the outcomes are trustworthy enough to reconstruct a phase. Post-processing asks whether the final distribution supports the original claim.

Benchmark conclusions require the task, execution layer, uncertainty, and classical comparison to remain visible end to end. [benchmarking-2025]

### The device does not return bits

Physical readout produces a voltage trace, photon arrival record, charge signal, or another analog observation. A chain of amplification, filtering, digitization, integration, and classification turns that record into a bit and perhaps a confidence value. Record classifier version, assignment-error calibration, integration window, rejected records, and correlations across simultaneously measured qubits. If mitigation or readout correction is applied, retain the raw counts as well as the transformed estimate.

In a fault-tolerant execution, many measurements are syndromes rather than algorithm outputs. They feed a decoder that updates a frame or requests an action; only after that process does the system have a logical measurement. Current experiments showing below-threshold surface-code correction are primary evidence that this loop can exhibit improved logical behavior under declared conditions, not evidence that arbitrary workloads inherit the same rate [google-surface-code-below-threshold].

## Decoding and post-processing restore the contract

Show where syndrome decoding, result aggregation, uncertainty, and classical phase inference enter.

A useful trace names at least one failure mode per layer, and it ends with a gate: the next measurable result that would raise confidence in the weakest layer — say, reliable execution of the deepest controlled-operation block on the real topology, with settings published so others can reproduce it.

Current stack parameters and integration claims require dated review rather than transfer from a generic architecture diagram. [full-stack-review] [google-surface-code-below-threshold]

### Classical inference closes the original contract

Phase-estimation post-processing maps measured bit strings to phase candidates, handles endianness, aggregates repetitions, and applies the acceptance test. It should report uncertainty or empirical coverage, not just the most frequent string. If the eigenstate preparation is imperfect, multiple phases may be present; the conclusion must distinguish algorithmic sampling from readout error. The final result links back to the original \(m\) -bit and success-probability requirement.

Classical validation can recompute a small instance, verify an algebraic consequence, or compare independent estimates. Benchmarking discipline requires the task, baseline, uncertainty, and complete execution boundary to remain visible [benchmarking-2025]. A hybrid verifier that silently performs most of the useful computation changes the claim; report its cost and information access.

## An end-to-end ledger exposes interface losses

Publish one row per boundary with input/output type, owner, latency, error, evidence, and version/date.

Cloud access is not evidence of stack maturity. Renting time on a machine is excellent for learning and benchmarking. It proves nothing about whether the system can carry a useful workload or a fault-tolerant roadmap.

A quantum computer comprises integrated algorithm, compilation, control, device, measurement, and classical-processing layers. [full-stack-review] [silicon-digital-qpu]

### A boundary ledger makes losses inspectable

Use one row per transition: problem to algorithm, algorithm to circuit, circuit to target program, program to controls, controls to device trajectory, trajectory to analog record, record to classified data, data to decoded logical result, and result to decision. Each row names input type, output type, owner, version, latency, error contribution, evidence, and a reject condition. An absent unit or version makes the row incomplete.

For the synthetic trace, compilation takes 0.040 seconds, queueing 0.200, control 0.006, readout 0.003, and decoding 0.004. The total is 0.253 seconds and queueing dominates this record. That arithmetic does not make queueing a universal bottleneck; it proves that the ledger preserves terms which a kernel-only timing would omit. Replace one value at a time with sourced observations and rerun the sensitivity analysis.

### Use failure injection to verify boundary ownership

A clean end-to-end run proves only one path. Replay the trace after changing one contract at a time: reverse the measurement-bit map, expire the calibration, delay the decoder result beyond its consumer, drop a readout record, and change the target graph after compilation. The responsible boundary should reject the artifact and name the mismatched version or invariant. If the final answer merely becomes worse, the system lacks a detectable contract.

Archive the original problem record, circuit, compiled mapping, timed schedule, control identifier, raw observations, classifier output, decoder events, post-processing configuration, and acceptance result under one trace ID. Hash large artifacts and preserve software and schema versions. A reader should be able to recompute the 0.253-second synthetic total and replace any hypothetical row with an observation without editing unrelated layers.

The proof gate is a repeated run across a meaningful calibration interval. Report variation in compilation output, queueing, realized control timing, readout classification, and final success. A stack is not integrated merely because its components connected once; it is integrated when interface changes are detected, failures are attributable, and the result contract remains testable over operation.

### Close the trace with an error-and-time reconciliation

The phase-estimation trace needs two ledgers that meet at the acceptance test. The timing ledger begins with controlled-evolution blocks and includes routing, pulse schedules, measurement integration, reset, decoding, queueing, and classical phase reconstruction. Parallel operations contribute to the critical path rather than being summed as if sequential; serialized shared resources appear explicitly. The failure ledger allocates the accepted-result budget among imperfect eigenstate preparation, synthesis, physical operations, readout, decoding, and finite-sampling uncertainty. A union bound can be a planning approximation, but correlated calibration or coherent errors need their own model.

Reconciliation means regenerating the final result from boundary records, not trusting a total copied into a summary. The classified bit string must preserve the compiler’s bit significance through inverse-QFT output and classical reconstruction. The declared controlled power must match the scheduled operation, and any approximation tolerance used in synthesis must be included in the algorithmic error allowance. Injecting a reversed register or stale calibration should cause a typed failure, not merely move the reported phase.

The last row states what has actually been demonstrated. A synthetic trace proves schema compatibility and arithmetic. A simulator run adds evidence about the modeled noise and schedule. Hardware samples add evidence only for the named backend, calibration interval, inclusion policy, and shots. Keeping these evidence classes attached to the same trace prevents an architectural diagram from being mistaken for an implemented end-to-end machine.

Claim-to-source ledger

A quantum computer comprises integrated algorithm, compilation, control, device, measurement, and classical-processing layers. [full-stack-review] [silicon-digital-qpu]

Physical implementation requires initialization, coherent control, measurement, and scalable interconnection under explicit criteria. [divincenzo-criteria]

Fault-tolerant execution adds repeated syndrome extraction, decoding, and logical-operation resources to the stack. [google-surface-code-below-threshold]

Benchmark conclusions require the task, execution layer, uncertainty, and classical comparison to remain visible end to end. [benchmarking-2025]

Current stack parameters and integration claims require dated review rather than transfer from a generic architecture diagram. [full-stack-review] [google-surface-code-below-threshold]

### End-to-end phase-estimation stack trace

Format: Machine-readable nine-boundary trace plus a rendered table linking circuit resources, routing output, assumed physical durations/errors, readout records, and classical success criterion.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
def trace(rows):
    if any(row["unit"] != "s" for row in rows) or any(a["output"] != b["input"] for a, b in zip(rows, rows[1:])):
        raise ValueError("incompatible stack boundary")
    duration = sum(row["duration"] for row in rows)
    success = 1.0
    for row in rows:
        success *= 1 - row["failure"]
    return duration, 1 - success, max(rows, key=lambda row:row["duration"])["stage"]
rows = [
 {"stage":"compile","input":"program","output":"job","duration":.04,"failure":.001,"unit":"s","source":"synthetic"},
 {"stage":"queue","input":"job","output":"scheduled","duration":.20,"failure":.002,"unit":"s","source":"synthetic"},
 {"stage":"control","input":"scheduled","output":"samples","duration":.006,"failure":.003,"unit":"s","source":"synthetic"},
 {"stage":"readout","input":"samples","output":"bits","duration":.003,"failure":.004,"unit":"s","source":"synthetic"},
 {"stage":"decode","input":"bits","output":"estimate","duration":.004,"failure":.001,"unit":"s","source":"synthetic"},
]
baseline = trace(rows)
counterfactual = trace([{**row, "duration":.02} if row["stage"] == "queue" else row for row in rows])
try:
    trace([rows[0], {**rows[1], "input":"pulse"}])
    raise AssertionError("bad boundary accepted")
except ValueError:
    rejected = True
assert abs(baseline[0] - .253) < 1e-12 and baseline[2] == "queue"
assert counterfactual[0] < baseline[0] and 0 < baseline[1] < .02 and rejected
print(f"PASS: 54 stack evidence total={baseline[0]:.3f}s failure={baseline[1]:.6f} faster_queue={counterfactual[0]:.3f}s")
```

Verification: Schema enforces compatible types/units between adjacent boundaries; total duration and failure budget recompute from rows; every empirical parameter has a registered source or remains explicitly hypothetical.

Commissioned exercise

Prompt: Complete the supplied phase-estimation stack trace for a declared modality and identify the first interface whose budget or evidence is insufficient.

Deliverable: Validated trace JSON, rendered ledger, total time/error calculation, missing-evidence list, and one integration test.

Pass condition: Every boundary has typed inputs/outputs, owner, units, assumptions, and evidence; the bottleneck follows the ledger rather than qubit count.

Verifiable solution

Format: Reference trace with hypothetical values labeled and a rubric for interface completeness.

Verification: Schema validation plus independent recomputation of totals and adjacent-type compatibility.

The trace totals 0.253 seconds: 0.040 compile, 0.200 queue, 0.006 control, 0.003 readout, and 0.004 decode. Queueing is the largest recorded term. Every transition retains typed inputs and outputs, so the result does not attribute total runtime to QPU control.

Limits and non-transfer conditions

This chapter traces one concrete job through hardware; Chapter 53 owns the general bottleneck-analysis method and should not be duplicated. The stack diagram does not imply one universal architecture: analog, NISQ gate-model, and fault-tolerant systems expose different boundaries. Numeric boundary records in the stack trace are illustrative unless a row carries named backend evidence and date.

External review

Open. Useful expertise: Quantum computer full-stack architect; Quantum control and compiler integration engineer.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering dossier

### [End-to-end phase-estimation stack trace](/playground/quantum/book/54-full-quantum-computer-stack/#artifact-54-full-quantum-computer-stack)

[Download fixture (.py)](/playground/quantum/artifacts/54-full-quantum-computer-stack/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/54-full-quantum-computer-stack/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [David P. DiVincenzo. The physical implementation of quantum computation. Fortschritte der Physik. 2000](https://doi.org/10.1002/1521-3978(200009)48:9/11%3C771::AID-PROP771%3E3.0.CO;2-E) primary peer-reviewed perspective

- [Google Quantum AI and Collaborators. Quantum error correction below the surface code threshold. Nature. 2025](https://doi.org/10.1038/s41586-024-08449-y) primary peer-reviewed experiment

- [Michael Abraham et al.. A digitally controlled silicon quantum processing unit. Nature. 2026](https://doi.org/10.1038/s41586-026-10754-7) primary peer-reviewed experiment

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=54-full-quantum-computer-stack#report)

Dependency graph

## Prerequisites for this chapter

- [Why Useful Quantum Computers Are Systems Engineering Projects Part VI. Reliability and Fault Tolerance · Chapter 53](/playground/quantum/book/53-useful-quantum-computers-are-systems-engineering-projects/)

- [Transpilation and Hardware-Aware Compilation Part V. Practical Software · Chapter 40](/playground/quantum/book/40-transpilation-and-hardware-aware-compilation/)

- [Decoders and Real-Time Classical Control Part VI. Reliability and Fault Tolerance · Chapter 51](/playground/quantum/book/51-decoders-and-real-time-classical-control/)

Continue the thread

## Next concepts from this chapter

- [Superconducting Qubits Part VII. Hardware Architecture · Chapter 55](/playground/quantum/book/55-superconducting-qubits/)

- [Trapped Ions Part VII. Hardware Architecture · Chapter 56](/playground/quantum/book/56-trapped-ions/)

- [Neutral Atoms Part VII. Hardware Architecture · Chapter 57](/playground/quantum/book/57-neutral-atoms/)

[Previous Why Useful Quantum Computers Are Systems Engineering Projects](/playground/quantum/book/53-useful-quantum-computers-are-systems-engineering-projects/)[Next Superconducting Qubits](/playground/quantum/book/55-superconducting-qubits/)

In this chapter

- [The job contract: estimate one phase](#the-job-contract-estimate-one-phase)

- [Trace one phase-estimation result without skipping a representation](#phase-estimation-stack-trace)

- [Compiler outputs a timed target program](#compiler-outputs-a-timed-target-program)

- [Compilation adds target assumptions and costs](#compilation-adds-target-assumptions-and-costs)

- [Controls realize an analog trajectory](#controls-realize-an-analog-trajectory)

- [Instructions become analog trajectories](#instructions-become-analog-trajectories)

- [The device returns voltages, photons, or counts](#the-device-returns-voltages-photons-or-counts)

- [The device does not return bits](#the-device-does-not-return-bits)

- [Decoding and post-processing restore the contract](#decoding-and-post-processing-restore-the-contract)

- [Classical inference closes the original contract](#classical-inference-closes-the-original-contract)

- [An end-to-end ledger exposes interface losses](#an-end-to-end-ledger-exposes-interface-losses)

- [A boundary ledger makes losses inspectable](#a-boundary-ledger-makes-losses-inspectable)

- [Use failure injection to verify boundary ownership](#stack-failure-injection)

- [Close the trace with an error-and-time reconciliation](#close-the-trace-with-an-error-and-time-reconciliation)

- [End-to-end phase-estimation stack trace](#end-to-end-phase-estimation-stack-trace)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=54-full-quantum-computer-stack#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/54-full-quantum-computer-stack/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/55-superconducting-qubits/ -->

# Superconducting Qubits

A superconducting qubit is a manufactured oscillator with one deliberately nonlinear element — a Josephson junction — that lets you address two of its levels as a qubit. This chapter covers how that circuit is driven, read out, and kept cold, and what actually limits scaling.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

A Josephson junction makes a superconducting oscillator anharmonic enough to isolate two levels; microwave pulses drive rotations, a coupler or shared interaction produces entanglement, and a resonator shifts with qubit state for readout, while leakage, loss, crosstalk, wiring heat, fabrication spread, and calibration constrain scale.

The chapter explains transmon-style engineering and does not claim all superconducting designs share identical controls or error budgets. Cross-modality numbers are not ranked unless operation definitions, pulse durations, fidelity protocols, connectivity, and evidence dates match.

[Figure 55.1.](#fig-55-superconducting-qubits-1) Transmon control/readout and scaling budget: The budget ties transmon nonlinearity and pulses to readout, routed workload exposure, calibration, and cryogenic wiring.

## The Josephson junction breaks equal spacing

Explain the LC oscillator failure, nonlinear energy levels, transmon charge-noise trade, and computational subspace.

Start with an LC circuit — an inductor and a capacitor patterned on a chip. Electrically it is an oscillator, and its energy levels are evenly spaced, which makes it useless as a qubit: any pulse that drives the transition from level 0 to level 1 also drives 1 to 2 and beyond. The fix is the Josephson junction, a thin insulating break in a superconducting loop that behaves like a nonlinear inductor. It breaks the even spacing, so one transition gets a frequency of its own. That transition is the qubit.

Josephson nonlinearity produces addressable superconducting circuit transitions used for transmon qubits. [superconducting-review] [transmon-design-2007]

### Follow a transmon operation from circuit parameters to a classified bit

A Josephson junction contributes a nonlinear inductive energy. In the transmon regime, a large ratio of Josephson to charging energy suppresses sensitivity to offset charge while retaining enough anharmonicity to address the lowest transition separately. This is an engineered compromise: increasing the ratio improves charge-noise immunity but reduces anharmonicity, making fast pulses more likely to populate \(\lvert 2 \rangle\) and higher levels. The original transmon design paper supplies the derivation and operating argument; a current device value must come from a dated experiment [transmon-design-2007].

For one single-qubit gate, the control stack selects a carrier frequency near the qubit transition and shapes two quadratures of a microwave envelope. Amplitude and duration set the rotation angle; relative quadrature sets its axis in the rotating frame; detuning and phase history alter the realized operation. Pulse shaping can reduce spectral weight near unwanted transitions, but the result depends on line transfer functions and calibration. Record the waveform at the sequencer, the calibration parameters used to predistort it, and the operation reconstructed at the device.

Calibration stress test: Select several five-qubit connected regions before examining their performance. Calibrate them under the same procedure, compile the same interaction pattern, and run isolated and simultaneous variants. Record waveform versions, spectator states, leakage, readout confusion, drift, rejected runs, and recalibration time. The spread across regions and days is part of the modality evidence. Then perturb scheduling: increase parallelism, shorten guards, or choose a routing with fewer gates but more simultaneous conflicts. This reveals whether the compiler's cost function reflects realized hardware behavior. A route with fewer nominal gates can fail when crosstalk dominates; a longer route can win when it uses stable edges. Publish the mapping and all tested regions so a favorable selection is not mistaken for array-wide capacity.

## Microwave envelopes become rotations

Trace amplitude, phase, frequency, duration, calibration, and leakage through one single-qubit pulse.

The workhorse design, the transmon, adds a large capacitor to make the qubit insensitive to charge noise — at the price of tighter spacing between the remaining levels, which the pulse shapes must respect. Gates are microwave pulses sent down coaxial lines. Readout couples the qubit to a resonator whose state reveals the qubit's. And everything runs at millikelvin temperatures inside a dilution refrigerator, because heat is noise and noise is error.

Superconducting gates, readout, coherence, leakage, coupling, and calibration form a device-and-control system rather than independent specifications. [superconducting-review] [modular-superconducting-interconnects]

### Two-qubit gates are architecture-specific Hamiltonian engineering

Fixed-frequency qubits coupled through a bus, tunable qubits, and tunable couplers expose different interactions and noise sensitivities. A compiler label such as CNOT may decompose into a cross-resonance sequence, a controlled-phase operation plus local rotations, an exchange-like gate, or another calibrated primitive. Compare native entanglers by duration, leakage, spectator effects, connectivity, and calibration burden—not by renaming them all CNOT.

Parallel scheduling requires collision data. Driving one edge can shift or excite neighboring qubits; two nominally disjoint gates can share a coupler, readout resource, or frequency crowding constraint. A coupling graph therefore overstates available parallelism unless it also carries conflict information. Benchmark simultaneous layers and save the exact pattern, because isolated two-qubit fidelity does not predict a dense scheduled workload.

## Entanglement depends on coupling architecture

Compare fixed/tunable interaction categories without declaring one universal CNOT primitive.

In software a gate is a name in a circuit diagram. In hardware it is a physical evolution: the control system shapes the chip's effective Hamiltonian over time so the state evolves as

A physical platform must support initialization, coherent operations, measurement, and scalable architecture. [transmon-design-2007]

### Dispersive readout is an analog estimation problem

In dispersive readout the qubit state shifts a resonator response. A probe traverses the readout chain, cryogenic amplification raises the signal, room-temperature electronics digitize it, and an integration filter produces features for classification. Fidelity depends on integration time, resonator separation, amplifier noise, relaxation during measurement, leakage, and crosstalk. Publish the confusion matrix, not only an average assignment number, and retain raw records when a new classifier is evaluated.

Readout consumes schedule and thermal budget. Frequency multiplexing lets several resonators share hardware, but crowding, dynamic range, and correlated errors appear as the multiplexing factor grows. Active reset may use measurement and feedback or a driven dissipative process; either adds duration and failure modes. An algorithm requiring many mid-circuit measurements must budget the complete measure-classify-decide-reset loop.

## Dispersive readout returns a classified analog signal

Trace resonator response, amplifier chain, integration time, classification error, reset, and feedback.

and the art is landing close enough to the target unitary before decoherence, leakage into higher levels, and crosstalk with neighbors take their cut. Speed helps only inside the budget:

Fault-tolerance relevance depends on error-correction-compatible operations and repeated system behavior, not chip size alone. [google-surface-code-below-threshold] [google-surface-code-below-threshold]

### Coherence numbers are conditional diagnostics

\(T_1\) characterizes energy relaxation under a declared experiment. Ramsey and echo measurements probe different dephasing spectra. None is a gate fidelity, and the ratio of coherence time to gate duration is not an error model. Control error, leakage, crosstalk, state preparation, and nonstationary noise remain. Track distributions across qubits and time; a median hides whether one weak component disconnects the usable graph.

Randomized benchmarking, cycle benchmarking, tomography, and application-oriented tests answer different questions. Use a method appropriate to the claim and expose its averaging assumptions. A low average error can coexist with a coherent error that accumulates on a structured circuit. A calibration procedure optimized for isolated gates can regress simultaneous performance. The workload test should therefore reproduce the interaction density and measurement pattern expected after compilation.

## One nearest-neighbor workload spends the chip budget

Use a declared coupling graph to connect routing, two-qubit operations, duration, and error exposure.

Superconducting gates are fast, so the layer count is generous — provided the error per layer, the reset, and the readout keep pace. Fast and sloppy loses to slow and clean.

Current parameter values need primary device papers beyond the registered review before publication of a quantitative modality table. [superconducting-review]

### Route a five-qubit workload before quoting capacity

Take a circuit whose logical interactions form a star and map it to a five-node line. The center cannot be adjacent to all four leaves, so placement and routing insert swaps or change the gate order. Count native two-qubit operations after decomposition and sum scheduled durations along the critical path. Then evaluate success under a declared per-operation model, clearly labeling the independence approximation. The resulting budget links connectivity to exposure rather than treating qubit count as usable width.

Repeat on the actual coupling and conflict graph. If a tunable-coupler layout supplies the needed edges, it may reduce swaps while adding calibration channels and flux-noise exposure. If modular links supply nonlocal interactions, their heralding, latency, and fidelity enter the schedule. Low-loss superconducting interconnect demonstrations are relevant primary evidence for this boundary, but a component result is not yet a modular workload result [modular-superconducting-interconnects].

## Wiring, heat, crosstalk, and calibration scale together

Build a sourced parameter table with explicit non-comparability notes and one remaining systems bottleneck.

Take an abstract circuit dense in nearest-neighbor entangling gates. The compiler places its logical qubits onto the chip's coupling graph — fixed, planar, and sparse — and inserts routing wherever the graph falls short. The control system schedules microwave pulses; tunable couplers or fixed interactions supply the entanglement; resonators and cryogenic amplifiers pull the answer back out. A calibration database, refreshed constantly, tells the compiler which operations are trustworthy today.

Josephson nonlinearity produces addressable superconducting circuit transitions used for transmon qubits. [superconducting-review] [transmon-design-2007]

### Scaling is a cryogenic and operational problem

Every control and readout channel consumes connector area, attenuation, amplification, room-temperature electronics, calibration time, and some share of the cryostat's heat budget. Multiplexing changes those costs rather than deleting them. Packaging must suppress parasitic modes and deliver repeatable impedance while surviving thermal cycles. Yield must be evaluated as a distribution of frequencies, couplings, coherence, and readout quality after packaging—not simply the fraction of fabricated junctions that conduct.

Calibration is ongoing operations. Frequencies drift, two-qubit interactions change, and a large calibration graph contains dependencies: recalibrating one edge can invalidate neighboring schedules. Record calibration duration, validity interval, automated failure rate, and machine availability. The system-level question is how many workload-quality layers can be delivered per wall-clock hour with uncertainty, not how many attractive gates were measured after selecting a favorable window [superconducting-review].

### Build a parameter table that refuses false rankings

Metrics that must remain separate
 | Record | Unit or denominator | Cannot substitute for

 | Relaxation time | seconds under a named sequence | gate error
 | Entangling error | error per declared operation and context | array-wide simultaneous performance
 | Assignment error | conditional classification probability | complete mid-circuit latency
 | Duty cycle | accepted workload time per wall time | component fidelity

Each row should name device, date, qubit subset, operation, topology, simultaneous context, duration, uncertainty, calibration age, and source. Keep \(T_1\), Ramsey \(T_2^*\), echo time, assignment error, isolated gate error, simultaneous layer error, leakage, and reset in separate columns. Blank cells stay blank. Comparing one device's median isolated one-qubit error with another device's selected two-qubit edge is prohibited even when both are labeled “fidelity.”

Add system columns: usable connected qubits, control and readout channels, package generation, calibration time, duty cycle, and workload result. They reveal tradeoffs hidden by component records. A higher-fidelity pair can be irrelevant if it disconnects the mapping; a faster readout can be worse if it raises crosstalk; more tunability can reduce routing while increasing flux-noise and calibration cost.

The decision experiment should compile and run the same five-qubit interaction pattern across several array regions and times, retaining failed placements. Recompute duration and an error-sensitive observable from raw outcomes. This tests whether the pulse-to-bit trace and topology budget describe repeatable machine behavior rather than a hero calibration.

### Calibration is a dependency graph, not a checklist

A transmon control stack contains coupled calibrations: frequency estimates define drive frames, amplitude and duration define rotations, coupler settings affect spectator phases, readout classifiers depend on amplifier gain, and reset behavior changes the starting distribution. Represent those dependencies as a graph with acquisition time, uncertainty, validity check, and downstream consumers. Recalibrating one edge can invalidate several pulse schedules even when every individual dashboard metric remains inside tolerance.

Workload validation should therefore replay a stable circuit family after calibration changes. Separate gate duration, leakage, assignment error, coherence during idles, and crosstalk under simultaneous operation. Randomized benchmarking or a component fidelity can diagnose a layer, but it does not by itself predict a routed circuit with measurement and reset. The compiled fixture should retain native operation counts, simultaneous groups, idle exposure, and the calibration identifiers actually used.

Scaling reviews need distributions rather than hero values. Frequency collisions, defective couplers, resonator crowding, and line-to-line variation determine how much of a fabricated die is routable and calibratable. Report median and tail behavior across the relevant population, then compute workload yield: the fraction of devices on which the required connected subgraph closes its control and readout contracts. That number can fall even while the best qubit improves. A release candidate should therefore name the calibrated subgraph and repeat the same workload-level checks after any dependency changes, with automatic rejection when the graph is incomplete or expired.

Claim-to-source ledger

Josephson nonlinearity produces addressable superconducting circuit transitions used for transmon qubits. [superconducting-review] [transmon-design-2007]

Superconducting gates, readout, coherence, leakage, coupling, and calibration form a device-and-control system rather than independent specifications. [superconducting-review] [full-stack-review]

A physical platform must support initialization, coherent operations, measurement, and scalable architecture. [transmon-design-2007]

Fault-tolerance relevance depends on error-correction-compatible operations and repeated system behavior, not chip size alone. [google-surface-code-below-threshold]

Current parameter values need primary device papers beyond the registered review before publication of a quantitative modality table. [superconducting-review]

### Transmon control/readout and scaling budget

Format: Sourced table plus a compiled nearest-neighbor circuit trace; fields include encoding, native operation, durations, coherence, readout, topology, leakage, wiring, calibration scope, and as-of date.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
REQUIRED = {"operation", "duration", "unit", "fidelity", "protocol", "source", "date", "device"}
def validate(row):
    if REQUIRED - row.keys() or row["unit"] != "s" or not 0 <= row["fidelity"] <= 1:
        raise ValueError("incomplete or invalid metric")
    return row
def duration(rows):
    return sum(validate(row)["duration"] for row in rows)
def comparable(left, right):
    validate(left); validate(right)
    return all(left[key] == right[key] for key in ("operation", "protocol", "device"))
gate = {"operation":"one-qubit", "duration":20e-9, "unit":"s", "fidelity":.999, "protocol":"RB", "source":"synthetic", "date":"2026-01-01", "device":"A"}
readout = {"operation":"readout", "duration":700e-9, "unit":"s", "fidelity":.97, "protocol":"assignment", "source":"synthetic", "date":"2026-01-01", "device":"A"}
baseline = duration([gate, readout])
counterfactual = duration([gate, {**readout, "duration":300e-9}])
unlike = comparable(gate, {**gate, "device":"B"})
try:
    validate({key:value for key, value in gate.items() if key != "operation"})
    raise AssertionError("undefined fidelity accepted")
except ValueError:
    rejected = True
assert abs(baseline - 720e-9) < 1e-18 and counterfactual < baseline
assert unlike is False and rejected and gate["protocol"] != readout["protocol"]
print(f"PASS: 55 transmon evidence schedule={baseline*1e9:.0f}ns faster_readout={counterfactual*1e9:.0f}ns cross_device={unlike}")
```

Verification: Every number includes unit/protocol/source/date; the table rejects fidelity rows without operation definitions and marks values from unlike devices non-comparable.

Commissioned exercise

Prompt: Compile a five-qubit nearest-neighbor circuit to a declared superconducting coupling graph and combine its schedule with sourced or clearly hypothetical operation durations.

Deliverable: Pre/post circuit metrics, duration budget, readout path, parameter-source table, and one scaling bottleneck with a falsifying test.

Pass condition: Gate counts, depth, seconds, and probabilities remain separate; all measured values resolve to sources/dates; topology and leakage appear.

Verifiable solution

Format: Reference compilation trace using hypothetical labeled timings and a table-comparability rubric.

Verification: Recompute routing metrics and timing sum; validate source/unit/protocol fields for any empirical substitutions.

The illustrative one-qubit operation lasts 20 nanoseconds and the readout lasts 700 nanoseconds, totaling 720 nanoseconds in the serial trace. Their 0.999 RB-derived figure and 0.97 assignment figure use different protocols, so the dossier explicitly refuses to rank them as one fidelity metric.

Limits and non-transfer conditions

The chapter explains transmon-style engineering and does not claim all superconducting designs share identical controls or error budgets. Cross-modality numbers are not ranked unless operation definitions, pulse durations, fidelity protocols, connectivity, and evidence dates match. Timing and error cells used by the compilation fixture are labeled assumptions, not a characterization of a commercial chip.

External review

Open. Useful expertise: Superconducting-qubit experimental physicist; Cryogenic microwave control engineer.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering dossier

### [Transmon control/readout and scaling budget](/playground/quantum/book/55-superconducting-qubits/#artifact-55-superconducting-qubits)

[Download fixture (.py)](/playground/quantum/artifacts/55-superconducting-qubits/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/55-superconducting-qubits/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Jens Koch et al.. Charge-insensitive qubit design derived from the Cooper pair box. Physical Review A. 2007](https://doi.org/10.1103/PhysRevA.76.042319) primary peer-reviewed theory and design paper

- [Google Quantum AI and Collaborators. Quantum error correction below the surface code threshold. Nature. 2025](https://doi.org/10.1038/s41586-024-08449-y) primary peer-reviewed experiment

- [Jingjing Niu et al.. Low-loss interconnects for modular superconducting quantum processors. Nature Electronics. 2023](https://doi.org/10.1038/s41928-023-00925-z) primary peer-reviewed experiment

- [Morten Kjaergaard et al.. Superconducting qubits: Current state of play. Annual Review of Condensed Matter Physics. 2020](https://doi.org/10.1146/annurev-conmatphys-031119-050605) peer-reviewed review

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=55-superconducting-qubits#report)

Dependency graph

## Prerequisites for this chapter

- [The Full Quantum Computer Stack Part VII. Hardware Architecture · Chapter 54](/playground/quantum/book/54-full-quantum-computer-stack/)

- [Decoherence and Error Channels Part VI. Reliability and Fault Tolerance · Chapter 45](/playground/quantum/book/45-decoherence-and-error-channels/)

- [Transpilation and Hardware-Aware Compilation Part V. Practical Software · Chapter 40](/playground/quantum/book/40-transpilation-and-hardware-aware-compilation/)

Continue the thread

## Next concepts from this chapter

- [Cryogenics, Control, Packaging, and Manufacturing Part VII. Hardware Architecture · Chapter 62](/playground/quantum/book/62-cryogenics-control-packaging-and-manufacturing/)

- [Hardware Modality Diligence Part IX. Company and Investing · Chapter 74](/playground/quantum/book/74-hardware-modality-diligence/)

- [Trapped Ions Part VII. Hardware Architecture · Chapter 56](/playground/quantum/book/56-trapped-ions/)

[Previous The Full Quantum Computer Stack](/playground/quantum/book/54-full-quantum-computer-stack/)[Next Trapped Ions](/playground/quantum/book/56-trapped-ions/)

In this chapter

- [The Josephson junction breaks equal spacing](#the-josephson-junction-breaks-equal-spacing)

- [Follow a transmon operation from circuit parameters to a classified bit](#transmon-pulse-to-bit)

- [Microwave envelopes become rotations](#microwave-envelopes-become-rotations)

- [Two-qubit gates are architecture-specific Hamiltonian engineering](#two-qubit-gates-are-architecture-specific-hamiltonian-engineering)

- [Entanglement depends on coupling architecture](#entanglement-depends-on-coupling-architecture)

- [Dispersive readout is an analog estimation problem](#dispersive-readout-is-an-analog-estimation-problem)

- [Dispersive readout returns a classified analog signal](#dispersive-readout-returns-a-classified-analog-signal)

- [Coherence numbers are conditional diagnostics](#coherence-numbers-are-conditional-diagnostics)

- [One nearest-neighbor workload spends the chip budget](#one-nearest-neighbor-workload-spends-the-chip-budget)

- [Route a five-qubit workload before quoting capacity](#route-a-five-qubit-workload-before-quoting-capacity)

- [Wiring, heat, crosstalk, and calibration scale together](#wiring-heat-crosstalk-and-calibration-scale-together)

- [Scaling is a cryogenic and operational problem](#scaling-is-a-cryogenic-and-operational-problem)

- [Build a parameter table that refuses false rankings](#superconducting-parameter-table)

- [Calibration is a dependency graph, not a checklist](#calibration-is-a-dependency-graph-not-a-checklist)

- [Transmon control/readout and scaling budget](#transmon-control-readout-and-scaling-budget)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=55-superconducting-qubits#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/55-superconducting-qubits/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/56-trapped-ions/ -->

# Trapped Ions

In a trapped-ion machine the qubits are atoms that nature manufactured identically, and the wiring is light. This chapter weighs what that buys — coherence and connectivity — against what it costs: gate speed, optics, and a scaling story built on moving ions around.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Internal atomic states store the qubit, laser or microwave fields drive single-qubit rotations, shared motional modes mediate entanglement, and fluorescence provides readout; flexible interaction graphs can reduce routing, but mode crowding, slower operations, optical stability, transport, and modular links determine scale.

An ion chain's apparent all-to-all interaction does not imply every pair can gate simultaneously or at constant quality as chain length grows. Gate time, coherence time, transport time, and end-to-end algorithm runtime are different units/scopes and must not be ranked independently of workload.

[Figure 56.1.](#fig-56-trapped-ions-1) Ion-chain connectivity and schedule comparison: The schedule makes motional-mode conflicts, fluorescence time, cooling, shuttling, and modular-link attempts explicit.

## Atomic levels provide reproducible qubit transitions

Define internal-state encoding, trapping environment, initialization, and protection assumptions.

A trapped-ion processor confines individual charged atoms in electromagnetic fields inside a vacuum chamber. The qubit lives in two internal electronic states of each ion, and single-qubit gates are laser or microwave pulses tuned to that transition. Because every ion of a given isotope is identical, the platform starts with zero manufacturing variance — no two qubits differ unless the environment makes them differ.

Trapped-ion qubits use internal atomic states with laser or microwave control and fluorescence readout. [ion-review] [trapped-ion-qccd]

### Connectivity is a control promise, not a graph shortcut

An ion qubit is stored in selected internal states and manipulated with optical or microwave fields. Entangling gates couple those states through shared motional modes. Within a chain, many pairs can interact without inserting the SWAP network required by a nearest-neighbor solid-state layout. But the shared modes are finite control resources: mode spectra crowd as the chain grows, heating and imperfect cooling reduce performance, and pulses on different pairs can interfere. “All-to-all connectivity” therefore means addressable pair interactions under stated conditions, not that every edge can run simultaneously at constant duration and fidelity.

A target description needs more than an edge list. Store allowed simultaneous operations, pair-dependent duration and calibration, motional-mode constraints, measurement zones, and whether an ion must be transported. The 98-qubit all-to-all experiment is primary evidence for a particular system and control stack, not a universal scheduling constant [trapped-ion-98-qubit]. A compiler should consume a dated target snapshot and report which constraints serialized the workload.

Control audit: Tie every scheduled entangler to a motional-mode and optical calibration record, then verify that simultaneous gates do not consume the same modeled resource. Include beam-steering latency, phase-reference updates, recooling, measurement collection, and ion reordering in the critical path. Replay the schedule after a modeled ion loss and state whether the machine reloads, remaps, or aborts. That recovery policy determines delivered throughput and is especially important for long repeated workloads.

## Collective motion is the entangling bus

Explain motion-mediated gates, mode participation, heating, and what flexible connectivity means operationally.

Entangling gates borrow the chain's shared motion: lasers couple the ions' internal states to their collective vibration, so any pair of ions in a chain can be entangled without a physical wire between them. Readout is fluorescence — the ion lights up or stays dark — which is naturally high-fidelity. The bill arrives as slower gate times and a control system full of lasers, optics, and precision timing hardware.

Collective motional modes mediate entangling interactions and introduce control/scaling considerations as chains grow. [ion-review]

### One entangling operation occupies a larger optical system

Laser sources, modulators, beam delivery, focusing optics, phase references, and control electronics jointly realize a gate. Frequency, amplitude, phase, polarization, and pointing errors can enter; spontaneous emission and motional excitation add physical channels. Calibration includes the addressed transition, mode frequencies, beam alignment, and pulse parameters. Record the gate's context: isolated pair, chain length, spectator state, cooling state, and simultaneous activity.

Long coherence times are valuable, but the scheduled circuit spends them on more than gates. State preparation, sympathetic or recooling steps, transport, measurement, reset, and classical decisions all consume time. Compare total critical-path duration with an operation-appropriate error budget. A slow operation can be entirely viable when coherence and error are favorable; a fast operation can be poor when crosstalk or transport dominates. Cross-modality speed rankings without a workload are not informative.

## Fluorescence turns state into photons

Trace detection, integration time, crosstalk, reset, and classifier errors.

Generous coherence tolerates slower layers — but not infinitely slow ones. Gate time, measurement, reset, ion transport, and feedback all draw from the same budget. The second formula prices the connectivity:

Hardware evaluation must include control, readout, connectivity, and architecture rather than isolated coherence or fidelity metrics. [trapped-ion-98-qubit] [trapped-ion-qccd]

### Measurement and reset can reshape the schedule

State-dependent fluorescence converts internal state into photon counts collected over a window. Classification depends on collection efficiency, background, bright-state decay, and the chosen threshold. Measurement light can disturb neighboring data unless ions are separated, hidden in other levels, or protected by the architecture. Store count distributions and a confusion matrix, and distinguish destructive from nondestructive procedures.

Mid-circuit measurement adds classical latency and may require moving ions to a detection zone. Reset or replacement then prepares ancillas for the next syndrome round. These operations can dominate a correction schedule even when entangling gates receive most attention. A fault-tolerant control experiment is especially valuable because it tests encoded logic, repeated detection, and control behavior together [trapped-ion-fault-tolerant-control].

## Map one nonlocal circuit onto an ion chain

Compare routing count, parallelism, durations, and total scheduled time against a line-connected target under matched circuit semantics.

Within a chain, interactions are flexible, so routing depth can stay near zero where a sparse chip would drown in swap gates. But scaling beyond one chain brings shuttling, splitting and merging, or photonic links between modules — routing returning in a different costume.

Fault-tolerance relevance depends on repeated operations and system overhead rather than favorable single-device properties. [trapped-ion-fault-tolerant-control]

### Scaling paths exchange one bottleneck for another

A longer chain preserves convenient pair reach but complicates mode control and parallelism. A quantum charge-coupled-device architecture divides ions into zones and physically shuttles, separates, and merges them. Modular approaches connect smaller registers with photonic links. Each route changes the resource account: transport time and heating for QCCD; entanglement generation probability, memory wait, and network scheduling for modules; mode crowding and optical complexity for long chains.

The demonstrated QCCD architecture establishes that transport, junctions, gates, and measurement can be integrated in a programmable trapped-ion system [trapped-ion-qccd]. A scaling claim still needs transport error distributions, junction throughput, parallel-zone operation, recooling policy, and calibration load at the proposed size. Count zones, ions, control channels, and usable simultaneous operations—not only trapped particles.

## Longer chains change the mode spectrum

Expose mode crowding, addressing, control/calibration, and simultaneous-gate limits.

Suppose the target workload needs repeated entangling gates among qubits that are not neighbors. On a sparsely connected chip, the compiler inserts swap chains and the effective depth balloons. On an ion chain, the same circuit maps almost directly — the connectivity advantage is real. Then the memo must keep going. Do the gate times support the target depth inside the coherence budget? Do the motional modes stay controllable as the chain lengthens? What are the crosstalk and the measurement latency? And what is the scaling architecture — longer chains, shuttling junctions, modular links — with what evidence behind each?

Current quantitative chain, transport, or modular demonstrations require additional primary papers beyond the registered review. [ion-review]

### Schedule the same circuit on two honest targets

For the six-qubit exercise, construct a dependency graph containing several nonlocal entanglers. On an ideal ion-chain fixture, assign declared pair durations and forbid conflicting gates that share a modeled mode or control resource. On a nearest-neighbor line, insert swaps and decompose them into the same logical entangler family. Validate that both schedules implement the same unitary or truth-table behavior before comparing time.

Report native entangling count, critical-path time, maximum parallel width, measurement time, and every idealization. The ion fixture may win by avoiding swaps but lose some of that advantage to serialization or slower per-gate duration. Vary one parameter at a time to find the crossover. The output is a conditional statement—under these duration and parallelism assumptions—not a declaration that connectivity alone selects a modality.

## Shuttling and photonic links create new machines

Separate single-chain, QCCD transport, and modular-network architectures with distinct evidence gates.

A strong proof gate here is not a longer chain. It is reliable multi-qubit operation as scale increases, with gate quality and control stability measured at every step.

Trapped-ion qubits use internal atomic states with laser or microwave control and fluorescence readout. [ion-review] [trapped-ion-qccd]

### Fault tolerance requires repeated, timed system behavior

An encoded demonstration should state code, rounds, physical locations, decoder, acceptance policy, and matched unencoded comparator. Ion loss or leakage can be detectable and potentially converted into erasure information, but only if detection and recovery are part of the protocol. Slow drift in laser phase or mode frequency can correlate errors across rounds; randomized single-gate summaries may not expose it.

Run-duration evidence matters. Show how performance changes across calibration age, repeated rounds, chain configurations, and simultaneous operations. Archive optical and control settings at an appropriate abstraction without implying that a paper's parameter transfers to a different apparatus. The full-stack review is useful for interface categories; modality-specific quantitative conclusions must remain grounded in ion experiments [ion-review] [full-stack-review].

### Preserve the assumptions that produce the connectivity advantage

- chain, zone, and participating-ion identifiers;

- pair-specific native operation and calibration;

- shared motional or optical resource conflicts;

- cooling, transport, measurement, reset, and feedback durations;

- loss, reload, remapping, and abort policy.

The schedule record must name chain length, participating ions, mode model, pair-specific gate times, simultaneous-operation exclusions, measurement and cooling duration, transport operations, and calibration timestamp. “All-to-all” belongs in a capability field; actual parallel width and critical path belong in measured fields. If the fixture idealizes constant pair duration or ignores heating, mark those cells hypothetical.

Run three variants: nonlocal gates concentrated on one shared ion, disjoint pair gates, and a pattern that requires transport or modular links. Their bottlenecks differ even at the same logical gate count. Validate logical equivalence, then compare native entanglers, serialization, and elapsed time. This shows whether connectivity helps the workload or merely reduces a graph-theoretic swap count.

Finally, repeat the representative schedule across the declared operating interval and include recalibration, ion loss, reload, and rejected runs in delivered throughput. Long coherence and high isolated fidelity remain important, but the procurement metric is completed validated schedules per wall-clock time with uncertainty.

### Schedule cooling, transport, and observation explicitly

Flexible pair selection does not imply unconstrained concurrency. Two entangling operations can share motional modes, laser power, optical paths, or control bandwidth, so the scheduler must declare the conflict rule that permits them to overlap. Add sympathetic cooling, recooling after transport, state preparation, fluorescence integration, and reset to the critical path. Their seconds can dominate a circuit whose logical diagram contains few entanglers.

For a QCCD architecture, every shuttle is an operation with endpoints, duration, heating contribution, junction constraints, and failure handling. A modular photonic link adds attempts, heralding probability, buffer occupancy, and coherence while waiting. Compare architectures on one logical interaction pattern and one success contract; do not compare an in-chain gate duration with a module-to-module entanglement rate.

The scale test asks whether modes and calibrations remain controllable as zones, ions, or modules grow. Publish the scheduled utilization of each shared resource and the tail of completion time under failed link attempts. A favorable median is insufficient when one stalled entanglement request blocks dependent logical work.

Claim-to-source ledger

Trapped-ion qubits use internal atomic states with laser or microwave control and fluorescence readout. [ion-review] [trapped-ion-qccd]

Collective motional modes mediate entangling interactions and introduce control/scaling considerations as chains grow. [ion-review]

Hardware evaluation must include control, readout, connectivity, and architecture rather than isolated coherence or fidelity metrics. [full-stack-review] [trapped-ion-qccd]

Fault-tolerance relevance depends on repeated operations and system overhead rather than favorable single-device properties. [trapped-ion-fault-tolerant-control]

Current quantitative chain, transport, or modular demonstrations require additional primary papers beyond the registered review. [ion-review]

### Ion-chain connectivity and schedule comparison

Format: Sourced modality table plus a small scheduler model comparing a nonlocal circuit on flexible and line connectivity with declared durations and parallelism.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
def schedule(workload, target):
    routing = sum(target["route_extra"])
    gates = len(workload["interactions"]) + routing
    layers = (gates + target["parallel"] - 1) // target["parallel"]
    return {"workload":workload["id"], "routing_gates":routing, "layers":layers, "seconds":layers * target["gate_s"] + target["reconfigure_s"]}
workload = {"id":"five-edge-v1", "interactions":[(0,1),(1,2),(2,3),(3,4),(0,4)]}
serial = {"route_extra":[0,0,0,0,0], "parallel":1, "gate_s":120e-6, "reconfigure_s":0.0, "protocol":"schedule-v1", "source":"synthetic", "date":"2026-01-01"}
parallel = {"route_extra":[0,1,0,1,0], "parallel":3, "gate_s":160e-6, "reconfigure_s":0.0, "protocol":"schedule-v1", "source":"synthetic", "date":"2026-01-01"}
baseline = schedule(workload, serial)
counterfactual = schedule(workload, parallel)
sensitivity = schedule(workload, {**parallel, "reconfigure_s":250e-6})
assert (baseline["routing_gates"], baseline["layers"]) == (0, 5) and abs(baseline["seconds"] - 600e-6) < 1e-15
assert abs(counterfactual["seconds"] - 480e-6) < 1e-15 and counterfactual["seconds"] < baseline["seconds"] < sensitivity["seconds"]
assert len({baseline["workload"], counterfactual["workload"], sensitivity["workload"]}) == 1
print(f"PASS: 56 ion evidence serial={baseline} parallel={counterfactual} reconfiguration_reverses={sensitivity['seconds'] > baseline['seconds']}")
```

Verification: The same logical circuit is used on both targets; totals separate routing gates, scheduled layers, and seconds; empirical parameters carry protocol/source/date and no universal winner is computed.

Commissioned exercise

Prompt: Schedule a six-qubit circuit with nonlocal entanglers on an ion-chain model and a nearest-neighbor line using declared per-operation durations and parallelism.

Deliverable: Two schedules, routing/depth/time table, assumptions, sourced parameter placeholders, and a scale-dependent reversal condition.

Pass condition: Logical operations match, seconds and layers remain distinct, parallelism is explicit, and the conclusion is conditioned on chain/module size.

Verifiable solution

Format: Reference schedules under hypothetical labeled parameters plus comparison-validity checklist.

Verification: Automated schedule validator checks dependencies, non-overlap constraints, and total duration.

Under the declared scheduler, five serial 120-microsecond interactions take 600 microseconds, whereas three flexible interactions executed in one 160-microsecond parallel layer take 160 microseconds. The conclusion is conditional on that parallelism and duration model, not on the word connectivity.

Limits and non-transfer conditions

An ion chain's apparent all-to-all interaction does not imply every pair can gate simultaneously or at constant quality as chain length grows. Gate time, coherence time, transport time, and end-to-end algorithm runtime are different units/scopes and must not be ranked independently of workload. Scheduler durations and parallelism are controlled inputs; measured ion-chain conclusions require protocol-bound primary data.

External review

Open. Useful expertise: Trapped-ion quantum computing experimentalist; Laser/optical control systems engineer.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering dossier

### [Ion-chain connectivity and schedule comparison](/playground/quantum/book/56-trapped-ions/#artifact-56-trapped-ions)

[Download fixture (.py)](/playground/quantum/artifacts/56-trapped-ions/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/56-trapped-ions/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [J. M. Pino et al.. Demonstration of the trapped-ion quantum CCD computer architecture. Nature. 2021](https://doi.org/10.1038/s41586-021-03318-4) primary peer-reviewed experiment

- [Laird Egan et al.. Fault-tolerant control of an error-corrected qubit. Nature. 2021](https://doi.org/10.1038/s41586-021-03928-y) primary peer-reviewed experiment

- [Anthony Ransford et al.. A 98-qubit trapped-ion quantum computer with all-to-all connectivity. Nature. 2026](https://doi.org/10.1038/s41586-026-10676-4) primary peer-reviewed experiment

- [H. Häffner, C. F. Roos, and R. Blatt. Quantum computing with trapped ions. Physics Reports. 2008](https://doi.org/10.1016/j.physrep.2008.09.003) peer-reviewed review

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=56-trapped-ions#report)

Dependency graph

## Prerequisites for this chapter

- [The Full Quantum Computer Stack Part VII. Hardware Architecture · Chapter 54](/playground/quantum/book/54-full-quantum-computer-stack/)

- [Transpilation and Hardware-Aware Compilation Part V. Practical Software · Chapter 40](/playground/quantum/book/40-transpilation-and-hardware-aware-compilation/)

Continue the thread

## Next concepts from this chapter

- [Cryogenics, Control, Packaging, and Manufacturing Part VII. Hardware Architecture · Chapter 62](/playground/quantum/book/62-cryogenics-control-packaging-and-manufacturing/)

- [Superconducting Qubits Part VII. Hardware Architecture · Chapter 55](/playground/quantum/book/55-superconducting-qubits/)

- [Neutral Atoms Part VII. Hardware Architecture · Chapter 57](/playground/quantum/book/57-neutral-atoms/)

[Previous Superconducting Qubits](/playground/quantum/book/55-superconducting-qubits/)[Next Neutral Atoms](/playground/quantum/book/57-neutral-atoms/)

In this chapter

- [Atomic levels provide reproducible qubit transitions](#atomic-levels-provide-reproducible-qubit-transitions)

- [Connectivity is a control promise, not a graph shortcut](#ion-schedule-account)

- [Collective motion is the entangling bus](#collective-motion-is-the-entangling-bus)

- [One entangling operation occupies a larger optical system](#one-entangling-operation-occupies-a-larger-optical-system)

- [Fluorescence turns state into photons](#fluorescence-turns-state-into-photons)

- [Measurement and reset can reshape the schedule](#measurement-and-reset-can-reshape-the-schedule)

- [Map one nonlocal circuit onto an ion chain](#map-one-nonlocal-circuit-onto-an-ion-chain)

- [Scaling paths exchange one bottleneck for another](#scaling-paths-exchange-one-bottleneck-for-another)

- [Longer chains change the mode spectrum](#longer-chains-change-the-mode-spectrum)

- [Schedule the same circuit on two honest targets](#schedule-the-same-circuit-on-two-honest-targets)

- [Shuttling and photonic links create new machines](#shuttling-and-photonic-links-create-new-machines)

- [Fault tolerance requires repeated, timed system behavior](#fault-tolerance-requires-repeated-timed-system-behavior)

- [Preserve the assumptions that produce the connectivity advantage](#ion-comparison-record)

- [Schedule cooling, transport, and observation explicitly](#schedule-cooling-transport-and-observation-explicitly)

- [Ion-chain connectivity and schedule comparison](#ion-chain-connectivity-and-schedule-comparison)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=56-trapped-ions#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/56-trapped-ions/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/57-neutral-atoms/ -->

# Neutral Atoms

Neutral-atom machines trap qubits in grids of light — hundreds or thousands of optical tweezers at a time. This chapter separates what those big arrays actually prove from what they still must: gates, loss control, and a credible path to logical qubits.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Optical tweezers trap and rearrange neutral atoms, internal states encode qubits, Rydberg blockade supplies conditional interactions, and imaging reads them out; array geometry and motion can reduce routing, while loading defects, atom loss, blockade errors, crosstalk, movement time, and analog-versus-digital evidence limit claims.

Analog many-body evolution, digital gate execution, and fault-tolerant logical computation are separate operating modes with separate success metrics. Atom count is an inventory measure; it is not comparable to usable gate qubits, logical qubits, circuit depth, or solution quality without a contract.

[Figure 57.1.](#fig-57-neutral-atoms-1) Neutral-atom mode and reconfiguration budget: The dossier keeps loaded atoms, prepared geometry, analog evolution, digital gates, loss, and accepted results separate.

## Load, image, and rearrange a defect-free array

Describe stochastic loading, detection, movement, loss, and the time/cost of preparing the computational geometry.

A neutral-atom processor holds uncharged atoms in optical tweezers — tightly focused laser beams that pin one atom each. The qubit lives in internal atomic states, single-qubit gates are laser or microwave pulses, and the arrays can be loaded in large, regular, reconfigurable patterns. Atoms can even be moved between traps in the middle of a computation.

Optical tweezers can arrange individually controlled neutral atoms and Rydberg interactions provide strong conditional many-body dynamics. [neutral-atoms-review]

### The machine begins by manufacturing its array

Optical tweezers are loaded stochastically, so the first usable computational state is produced by imaging occupied sites and rearranging atoms into a target geometry. The preparation record should state loading probability, number of reservoir atoms, moves, path conflicts, preparation time, loss during rearrangement, and probability of delivering the required defect-free pattern. A large camera image is not the same as a ready array. For repeated jobs, preparation and reload time enter throughput.

Rearrangement is both an advantage and a source of errors. Moving an atom can avoid a sequence of logical swaps, yet it consumes wall-clock time, may heat the atom, and can create collisions or loss if paths are poorly scheduled. Build a geometry-aware plan in which moves have origins, destinations, durations, and exclusion constraints. Validate that every requested interaction is legal after the move and that lost atoms are detected before execution.

Geometry stress test: Evaluate at least three interaction patterns with the same atom count: a local lattice, a sparse set of long-range pairs, and a dense pattern with conflicting blockade neighborhoods. For each, record rearrangement layers, travel distance, preparation survival, entangling layers, forbidden simultaneous operations, final atom loss, and accepted results. A reconfigurable array can excel on the sparse pattern and serialize on the dense one; the result should preserve that dependence. Repeat after injecting an empty trap and require the planner either to use a reservoir atom, remap the circuit, or fail explicitly. Then compare total job time with a fixed-layout routing baseline, including reload and imaging. This demonstrates whether mobility improves the delivered workload rather than only its interaction graph. Because analog evolution may use the same geometry without the same gate and validation contract, keep its timing and success record separate.

## Rydberg blockade creates a conditional operation

Explain excitation, interaction radius, native analog/digital uses, and dominant control assumptions.

Entanglement comes from Rydberg excitation: a laser briefly promotes an atom to a very high energy state whose strong interactions prevent the same excitation in its neighbors — the Rydberg blockade — and that conditional physics is a two-qubit gate. The same mechanism also supports analog simulation, where the array evolves as a many-body system instead of executing discrete gates. One hardware platform, two very different kinds of claim.

Neutral-atom platforms can support analog simulation and gate-model approaches whose evidence standards differ. [neutral-atoms-review] [neutral-atom-parallel-gates]

### Rydberg blockade supplies conditional dynamics within a radius

A laser couples a computational state to a highly excited Rydberg state. Strong interactions shift the joint excitation energy of nearby atoms, suppressing simultaneous excitation and enabling conditional operations. The useful interaction graph depends on spacing, Rydberg level, pulse sequence, and tolerable crosstalk; it is not a universal complete graph. Store pair geometry and the calibration context with every native entangler.

Dominant mechanisms can include spontaneous emission, laser phase and amplitude error, Doppler effects, imperfect blockade, atom motion, and leakage. Parallel gates must be tested as patterns because one excited atom can perturb more than its intended partner. The primary parallel-gate experiment supports high-fidelity simultaneous operations for a declared system, while a compiler still needs pattern-specific constraints [neutral-atom-parallel-gates].

## Analog evolution and digital gates answer different claims

Define state preparation, Hamiltonian/evolution or gate sequence, measurement, and validation separately.

Moving atoms can shrink routing depth where a fixed chip would insert swaps — but movement takes time, loses atoms, and complicates scheduling. The advantage is real, and it is not free. The second formula keeps abundance honest:

Hardware evaluation must include initialization, control, readout, error, topology, and scaling architecture. [divincenzo-criteria] [full-stack-review]

### Analog and digital modes have different contracts

In analog simulation, the programmed object is a Hamiltonian schedule and geometry; success is assessed through observables, calibration, symmetries, small-instance comparison, or other validation. In digital operation, the object is a gate sequence with state-preparation, operation, and measurement errors. A result showing a many-body phase or correlation under analog evolution does not establish digital gate fidelity, and a digital entangler does not validate a large analog simulation. Label datasets by mode at ingestion.

Logical processing adds another contract: code layout, repeated syndrome extraction, mid-circuit behavior, decoder, and logical observables. The reconfigurable-array logical processor is primary evidence that encoded operations can be assembled on this platform under its reported conditions [neutral-atom-logical-processor]. It does not turn atom count, analog simulation, and fault-tolerant capacity into interchangeable milestones.

## Reconfiguration trades SWAPs for motion

Compare routing layers against movement time, loss probability, and scheduling constraints for one circuit.

A vast array converts into logical qubits only through a code with measured gate fidelities underneath it. Physical abundance matters exactly when it is paired with reliable operations and an explicit error-correction path.

Fault-tolerant relevance requires explicit code and logical-operation assumptions beyond large physical arrays. [neutral-atom-logical-processor]

### Readout, loss, and reuse determine the cycle

Fluorescence imaging classifies atomic states and also reveals missing atoms. Loss is not automatically a conveniently located erasure: the system must establish when it occurred and whether prior operations propagated an error. Publish state-assignment and loss confusion separately. If measurement is destructive or slow, include replacement, rearrangement, and recooling before the next job.

Mid-circuit measurement is particularly consequential for error correction. It must avoid disturbing data atoms, return results within the feedback schedule, and supply ancillas for another round. An architecture that demonstrates excellent final imaging may still lack the measurement/reset path assumed by a logical resource estimate. Write this as an explicit blank rather than transferring the final-readout number.

## Loss is both an erasure signal and a system cost

Track when loss is detectable, replacement/reload requirements, and how it affects repeated computation.

A roadmap leads with a very large array. The weak memo concludes: near-useful computation. The strong memo asks what the atoms are doing. Storing qubits? Running high-fidelity digital gates? Evolving as an analog simulator? Participating in an error-correction experiment? Those are different evidence categories, and progress in one says little about the others.

Current quantitative reconfiguration, gate, loss, and logical demonstrations require primary sources beyond the registered modality review. [neutral-atoms-review]

### Compare movement with SWAP routing at matched semantics

For the exercise, fix six logical qubits and a set of nonlocal pair interactions. Strategy A keeps atoms fixed and inserts digital swaps along an allowed local graph. Strategy B schedules tweezer moves, performs the intended interactions, and optionally restores geometry. Count two-qubit operations, move distance, move layers, critical-path duration, loss exposure, and any recooling. Both strategies must return the same logical mapping or tell post-processing where the qubits ended.

The comparison changes with parameters. Fast, low-loss movement can reduce entangling depth; frequent remapping can instead dominate time or array survival. Parallel motion is limited by path and optical-control conflicts. Run a sweep over movement duration and loss, and mark the boundary at which fixed routing becomes preferable. This produces an engineering decision surface, not a slogan about reconfigurability.

## Array scale needs operation-scale evidence

Build a dated dossier that keeps active atoms, high-quality operations, readout, and logical relevance in separate columns.

The trace runs from the claimed workload through array layout, interaction mechanism, movement and reconfiguration, gate fidelity, readout, loss rates, and logical-encoding assumptions. The proof gate to demand is a repeatable logical building block — or an error-correction-relevant operation — at a scale where loss and crosstalk are measured and reported, not managed out of the plot.

Optical tweezers can arrange individually controlled neutral atoms and Rydberg interactions provide strong conditional many-body dynamics. [neutral-atoms-review]

### Array size is not usable problem size

Usable scale is reduced by loading reserve, defects, spacing constraints, control field of view, measurement regions, and atoms reserved for checks or replacement. Report loaded, detected, arranged, participating, and retained atom counts separately. For a logical architecture, count data and ancilla atoms and include repeated preparation losses. For an analog experiment, report the validated region and observable coverage.

Calibration and optics scale too. Individual addressing, beam steering, laser power, phase stability, imaging bandwidth, and waveform generation can bind before traps do. A full-stack account asks how many independent control patterns can be delivered, how often the geometry can be reconfigured, and how performance drifts across the array [full-stack-review].

### Record array delivery, not only array photographs

** Analog** : Hamiltonian, geometry, ramp, observable, and validation.

** Digital** : Native gates, simultaneous pattern, loss treatment, and circuit metric.

** Logical** : Code, correction rounds, measurement/reset, decoder, and logical comparator.

For every job, log traps requested, sites initially loaded, reservoir inventory, rearrangement moves, sites delivered, preparation time, atoms lost before and during execution, sites measured, and accepted output. Report distributions across many jobs. This separates source/loading capacity from usable computational geometry and shows whether reload or rearrangement limits throughput.

Evaluate one geometry under the three evidence contracts. The analog row specifies Hamiltonian, ramp, observables, and validation. The digital row specifies gates, simultaneous patterns, loss, and circuit metric. The logical row specifies code, rounds, mid-circuit operations, decoder, and comparator. Common hardware fields may be shared, but a success value never crosses rows without a derivation.

For the routing study, inspect not only whether movement reduces entangling count but whether it changes interaction crosstalk, calibration, or final measurement mapping. A movement schedule that saves swaps and loses one percent of atoms per layer may be unacceptable for a long circuit; a slower schedule with detected replacement may be valuable for shallow, sparse interactions. Preserve the crossover rather than selecting one favorable point.

### Treat preparation yield as part of every algorithm

Neutral-atom execution begins before the advertised evolution. Loading is stochastic; imaging identifies vacancies; rearrangement moves retained atoms into the target geometry; another image may verify the result. The preparation record should retain loaded sites, moves, elapsed seconds, losses, final occupancy, and the rule for accepting or repairing defects. A hundred-site array and a hundred-qubit computation are different claims if only a subset reaches the required geometry and survives the full schedule.

Loss during execution can be informative when the measurement distinguishes an empty site, but erasure information is useful only if the code, decoder, and timing path consume it. If a lost atom is reloaded, include cooling, movement, recalibration, and lost work. If the run is discarded, report attempted as well as accepted shots. Postselection can improve conditional fidelity while reducing throughput and changing the sampled population.

For digital operation, validate Rydberg pulses with the simultaneous neighborhood and geometry used by the workload. For analog evolution, publish the Hamiltonian calibration, state-preparation fidelity, observation set, and classical or theoretical validation range. Neither record automatically validates the other mode. A modality dossier earns a scale claim by connecting occupancy, operation quality, measurement, repetition rate, and accepted-result uncertainty in one experiment. The acceptance packet should also show the occupancy map before and after execution, so survivorship and spatial selection cannot disappear inside one aggregate fidelity.

Claim-to-source ledger

Optical tweezers can arrange individually controlled neutral atoms and Rydberg interactions provide strong conditional many-body dynamics. [neutral-atoms-review]

Neutral-atom platforms can support analog simulation and gate-model approaches whose evidence standards differ. [neutral-atoms-review] [neutral-atom-parallel-gates]

Hardware evaluation must include initialization, control, readout, error, topology, and scaling architecture. [divincenzo-criteria] [full-stack-review]

Fault-tolerant relevance requires explicit code and logical-operation assumptions beyond large physical arrays. [neutral-atom-logical-processor]

Current quantitative reconfiguration, gate, loss, and logical demonstrations require primary sources beyond the registered modality review. [neutral-atoms-review]

### Neutral-atom mode and reconfiguration budget

Format: Sourced modality dossier plus a routing-versus-motion model for one geometry-matched and one nonlocal circuit; separate analog and digital evidence sheets.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
def budget(loaded, moves, move_s, loss_per_move, operated, measured, mode):
    if not loaded >= operated >= measured >= 0 or not 0 <= loss_per_move <= 1:
        raise ValueError("invalid count or probability")
    retained = loaded * (1 - loss_per_move) ** moves
    return {"loaded":loaded, "retained":retained, "operated":operated, "measured":measured, "movement_s":moves * move_s, "claim":f"{mode}-observable"}
baseline = budget(100, 4, 250e-6, .003, 90, 85, "digital")
boundary = budget(100, 0, 250e-6, .003, 90, 85, "digital")
counterfactual = budget(100, 8, 250e-6, .003, 90, 85, "analog")
assert baseline["movement_s"] == .001 and boundary["retained"] == 100
assert counterfactual["retained"] < baseline["retained"] < boundary["retained"]
assert counterfactual["claim"] == "analog-observable" and counterfactual["claim"] != "logical-qubit"
print(f"PASS: 57 atom evidence counts={baseline} eight_move_retained={counterfactual['retained']:.3f} analog_claim={counterfactual['claim']}")
```

Verification: All counts label loaded/retained/operated/measured atoms; movement uses seconds and loss probabilities; no analog metric validates a digital or logical claim.

Commissioned exercise

Prompt: Compare SWAP routing with tweezer rearrangement for a six-atom nonlocal interaction pattern under declared movement time and loss assumptions.

Deliverable: Initial/final layouts, schedule, seconds/loss/depth table, analog-versus-digital claim label, and missing primary-evidence list.

Pass condition: All atom counts and modes are labeled, movement cost is included, and the same workload contract is used for both routing strategies.

Verifiable solution

Format: Reference geometry schedules with hypothetical labeled parameters and evidence-category rubric.

Verification: Validate interactions/layouts and recompute total movement time and survival probability under the declared independence model.

Four 250-microsecond rearrangement steps cost 1.000 millisecond. With independent movement loss 0.003 per step, retained survival is (0.997)^4=0.9881. That budget exposes the time/loss trade against SWAP routing and remains labeled as a synthetic digital-mode comparison.

Limits and non-transfer conditions

Analog many-body evolution, digital gate execution, and fault-tolerant logical computation are separate operating modes with separate success metrics. Atom count is an inventory measure; it is not comparable to usable gate qubits, logical qubits, circuit depth, or solution quality without a contract. Loading, movement, and loss parameters in the exercise are synthetic and cannot establish array-scale operation.

External review

Open. Useful expertise: Neutral-atom/Rydberg experimental physicist; Optical-tweezer control and scheduling engineer.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering dossier

### [Neutral-atom mode and reconfiguration budget](/playground/quantum/book/57-neutral-atoms/#artifact-57-neutral-atoms)

[Download fixture (.py)](/playground/quantum/artifacts/57-neutral-atoms/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/57-neutral-atoms/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Dolev Bluvstein et al.. Logical quantum processor based on reconfigurable atom arrays. Nature. 2024](https://doi.org/10.1038/s41586-023-06927-3) primary peer-reviewed experiment

- [Simon J. Evered et al.. High-fidelity parallel entangling gates on a neutral-atom quantum computer. Nature. 2023](https://doi.org/10.1038/s41586-023-06481-y) primary peer-reviewed experiment

- [David P. DiVincenzo. The physical implementation of quantum computation. Fortschritte der Physik. 2000](https://doi.org/10.1002/1521-3978(200009)48:9/11%3C771::AID-PROP771%3E3.0.CO;2-E) primary peer-reviewed perspective

- [Antoine Browaeys and Thierry Lahaye. Many-body physics with individually controlled Rydberg atoms. Nature Physics. 2020](https://doi.org/10.1038/s41567-019-0733-z) peer-reviewed review

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=57-neutral-atoms#report)

Dependency graph

## Prerequisites for this chapter

- [The Full Quantum Computer Stack Part VII. Hardware Architecture · Chapter 54](/playground/quantum/book/54-full-quantum-computer-stack/)

- [Hamiltonian Simulation Part IV. Protocols and Algorithms · Chapter 34](/playground/quantum/book/34-hamiltonian-simulation/)

- [Transpilation and Hardware-Aware Compilation Part V. Practical Software · Chapter 40](/playground/quantum/book/40-transpilation-and-hardware-aware-compilation/)

Continue the thread

## Next concepts from this chapter

- [Trapped Ions Part VII. Hardware Architecture · Chapter 56](/playground/quantum/book/56-trapped-ions/)

- [Photonics Part VII. Hardware Architecture · Chapter 58](/playground/quantum/book/58-photonics/)

- [Superconducting Qubits Part VII. Hardware Architecture · Chapter 55](/playground/quantum/book/55-superconducting-qubits/)

[Previous Trapped Ions](/playground/quantum/book/56-trapped-ions/)[Next Photonics](/playground/quantum/book/58-photonics/)

In this chapter

- [Load, image, and rearrange a defect-free array](#load-image-and-rearrange-a-defect-free-array)

- [The machine begins by manufacturing its array](#neutral-atom-operating-modes)

- [Rydberg blockade creates a conditional operation](#rydberg-blockade-creates-a-conditional-operation)

- [Rydberg blockade supplies conditional dynamics within a radius](#rydberg-blockade-supplies-conditional-dynamics-within-a-radius)

- [Analog evolution and digital gates answer different claims](#analog-evolution-and-digital-gates-answer-different-claims)

- [Analog and digital modes have different contracts](#analog-and-digital-modes-have-different-contracts)

- [Reconfiguration trades SWAPs for motion](#reconfiguration-trades-swaps-for-motion)

- [Readout, loss, and reuse determine the cycle](#readout-loss-and-reuse-determine-the-cycle)

- [Loss is both an erasure signal and a system cost](#loss-is-both-an-erasure-signal-and-a-system-cost)

- [Compare movement with SWAP routing at matched semantics](#compare-movement-with-swap-routing-at-matched-semantics)

- [Array scale needs operation-scale evidence](#array-scale-needs-operation-scale-evidence)

- [Array size is not usable problem size](#array-size-is-not-usable-problem-size)

- [Record array delivery, not only array photographs](#array-evidence-record)

- [Treat preparation yield as part of every algorithm](#treat-preparation-yield-as-part-of-every-algorithm)

- [Neutral-atom mode and reconfiguration budget](#neutral-atom-mode-and-reconfiguration-budget)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=57-neutral-atoms#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/57-neutral-atoms/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/58-photonics/ -->

# Photonics

Photons carry quantum information at the speed of light and barely interact with anything — which is exactly why they are hard to compute with. After this chapter you will evaluate any photonics claim by first asking which job the photons are doing: computing, networking, or supplying components.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Encode qubits in path, time-bin, polarization, or related optical modes; use indistinguishable-photon interference, phase control, detection, and classical feed-forward for operations; then budget source efficiency, coupling, propagation, switching, multiplexing, and detector loss across the complete path.

Photonic communication, interconnect, component, sampling, and universal-computing claims are separate roles and cannot validate one another automatically. Per-component transmission values are comparable only at matched wavelength, device definition, test conditions, architecture, and end-to-end path.

[Figure 58.1.](#fig-58-photonics-1) Photonic end-to-end loss and role ledger: The ledger combines optical survival with indistinguishability, conditional control timing, and role-specific evidence.

## Choose the optical mode that carries the qubit

Define path/time-bin/polarization encodings, state preparation, and conversion assumptions.

A photonic quantum computer stores information in properties of individual photons — which path a photon occupies, when it arrives, or how it is polarized — and processes that information by letting photons interfere in networks of beam splitters and phase shifters. Photons are appealing carriers for three reasons: they move fast, they barely notice their environment, and they travel down the same fibers and waveguides that classical communications already uses. A qubit that tolerates room temperature and rides existing optical infrastructure is a genuine engineering prize.

Photonic quantum technologies encode and process information in optical modes using interference, sources, circuits, and detectors. [photonic-review] [photonic-many-qubit-chip]

### Define the photon's role before pricing the path

A photon can carry a computational mode, distribute entanglement between modules, connect chips, or serve as the measured output of a sampler or sensor. Those roles impose different requirements. A networking photon may be valuable when it is heralded and its arrival time is known; a computational architecture may require many indistinguishable photons to survive a synchronized circuit. Write the role, encoding, success event, clock model, and validation rule before comparing components.

Encoding also changes the resource unit. A qubit may occupy path, polarization, time-bin, frequency-bin, or a more elaborate multimode code. Count occupied optical modes, vacuum and ancilla modes, sources, switches, delay lines, detectors, and feed-forward resources. Calling a spatial mode a “qubit” without its source and detector hides the components that determine delivered rate.

Sensitivity rule: Perturb every efficiency in both linear units and its native measurement uncertainty, then rank its effect on accepted results per second. Include repetition count and multiplicity, because a moderately lossy switch crossed ten times can matter more than the least efficient component crossed once. Check that the proposed improvement does not reduce indistinguishability, raise multiphoton noise, exceed detector rate, or lengthen feed-forward delay. Component optimization is valid only inside the complete path.

## Interference requires indistinguishable photons

Connect source purity, timing, spectral matching, phase stability, and beam-splitter operations.

The same aloofness is the catch. Photons do not interact with each other on their own, so two-qubit logic has to be engineered indirectly — typically through interference plus measurement, which makes gates probabilistic. And photons are easily lost: absorbed in a waveguide, missed by an inefficient detector, or filtered out by imperfect optics. A lost photon is not a flipped bit; it is missing information.

Weak direct photon-photon interaction motivates measurement, ancilla, multiplexing, or other architecture-specific resources for logic. [photonic-review]

### Multiply efficiencies in linear units

For a path with independent stages, one-photon survival is the product of source delivery, coupling, propagation, switching, filtering, and detector efficiencies. Convert a loss of \(L\) decibels to transmission \(10^{-L/10}\) before multiplying. If \(n\) photons must all arrive, a simple independent model raises the single-path factor to the relevant multiplicity. That exponent is why modest component loss becomes architectural.

Independence is an assumption. Source brightness can trade against multiphoton contamination; detector efficiency can trade against dark counts; switching loss can depend on route; thermal drift can correlate many modes. The budget should contain both component measurements and an end-to-end check. If their product predicts a success rate inconsistent with observation, investigate coupling definitions, conditional denominators, synchronization, and correlated loss rather than tuning an unexplained factor.

## Measurement and feed-forward make logic conditional

Trace detectors, success heralds, classical latency, switching, and multiplexing for a probabilistic primitive.

So the first diligence question about any photonics announcement is which role is being claimed. Photonics appears in the quantum world as a full computing platform, as a networking layer connecting other qubit types, as an interconnect inside a larger machine, as a sensing or communication system, or as a component business selling sources and detectors. Each role has its own evidence standard, and a strong demonstration in one role proves almost nothing about the others.

Loss and indistinguishability are central system variables whose component contributions compound along an optical path. [photonic-review] [full-stack-review]

### Indistinguishability is part of the interference primitive

Photons interfere only to the extent that their spectral, temporal, spatial, and polarization modes overlap. A source record should therefore include brightness, purity, multiphoton probability, indistinguishability under the relevant separation, repetition rate, and collection efficiency. Quoting the best value from each of different operating points constructs a source that was never operated.

Interferometer meshes add phase stability and calibration requirements. Small phase errors accumulate across depth, and thermal or electro-optic tuning consumes control channels and power. Validate the programmed transformation with coherent-light calibration where appropriate, then test the single-photon regime. Programmable many-photon chip experiments show substantial integrated control under specific devices and tasks [photonic-many-qubit-chip]; their evidence should not be generalized to an unreported source or detector stack.

## Multiply the complete transmission path

Build a dimensionally correct end-to-end survival budget and show the assumptions behind independent factors.

The right mental model for a photonic architecture is a compounding budget. If a computation needs many photons to survive generation, coupling into a chip, an interferometer mesh, switching, and detection, then the end-to-end success probability is roughly \(P_{\mathrm{success}}\approx\prod_g(1-\varepsilon_g)^{n_g}\), where \(\varepsilon_g\) is the loss or error per component of type \(g\) and \(n_g\) is how many such components sit in the path. Small per-component losses sound harmless until the exponents grow: a chain that loses two percent at each of one hundred stages keeps about thirteen percent of its photons.

A platform evaluation must distinguish computation, communication, and implementation criteria. [photonic-programmable-advantage] [photonic-review]

### Measurement-induced logic consumes probability and time

Because direct photon-photon interactions are weak, architectures often use interference, ancilla photons, measurement, and feed-forward to implement conditional operations. A successful detector pattern may herald the desired transformation. Count every attempted resource state, accepted event, discarded event, detector, and classical decision. Postselection can demonstrate a circuit relation but does not provide an on-demand gate unless the success mechanism is incorporated into the architecture.

Multiplexing trades hardware for delivery probability. Several sources or preparation attempts run in parallel; switches route a successful one onward; delay lines align it with other events. The resulting rate depends on source repetition, heralding latency, switch depth, storage loss, detector recovery, and controller schedule. Report accepted outputs per second and per consumed source attempt, not only conditional fidelity.

## Compute, network, and component evidence diverge

Create separate evidence contracts for delivered entanglement, integrated components, and computation.

This is why photonics people obsess over indistinguishability — photons must be identical in every degree of freedom or they fail to interfere — and over per-decibel loss numbers that engineers in other modalities never have to quote. It is also why many photonic computing schemes lean on feedforward: measure some photons early, compute the correction classically, and reconfigure later optics in real time. Feedforward turns a passive optical network into a computer, at the price of adding detectors, logic, and latency to the loss budget.

Fault-tolerant photonic-computing claims require an explicit loss/error model and correction architecture rather than component transmission alone. [photonic-manufacturable-platform] [photonic-review]

### Feed-forward makes the optical circuit a timed system

A detection event must be digitized, classified, processed, and converted into a switch or phase-setting command before the affected photon reaches the control point. The optical delay required to wait for that decision adds propagation loss and footprint. Trace detector timestamp to actuator settling and give a worst-case deadline. A demonstration with offline post-processing is not evidence for real-time feed-forward.

Detectors bring efficiency, dark counts, timing jitter, dead time, number resolution, and cryogenic requirements. Match each metric to the clock window and photon number expected by the protocol. A low dark-count rate integrated over a long or numerous set of windows can still matter. Detector saturation can cap throughput before source brightness does.

## A useful optical stack is an integrated result

Identify a proof experiment combining source, circuit, detector, and feed-forward rather than separate best components.

For memo discipline, score claims the way this book scores every hardware claim: decision score = claim quality + proof progress − risk − kill criteria pressure . The score forces a photonic pitch to declare which layer it has actually proven — sources, integrated optics, loss management, detection, networking value, or application-level utility — instead of letting a strong layer borrow credibility from a weak one.

Current quantitative source, detector, feed-forward, and integrated-system records need primary papers beyond the registered review. [photonic-review]

### Separate sampling evidence from universal-computing evidence

A programmable photonic processor can perform a sampling task whose validation and classical comparison are carefully defined [photonic-programmable-advantage]. That can be a major systems result without demonstrating a universal fault-tolerant gate set. Record whether the claim concerns sampling complexity, a logical operation, delivered entanglement, or component manufacture. Each needs a different baseline.

A manufacturable integrated platform addresses another layer: process design, component libraries, wafer-scale consistency, packaging, and a route to assembly [photonic-manufacturable-platform]. Manufacturing evidence does not by itself solve source yield, loss correction, or feed-forward, but it can remove an important scaling uncertainty. A good dossier gives credit at the demonstrated layer and leaves the remaining layers visible.

### Audit every conditional denominator

- pump pulses emitted;

- source events and heralds;

- photons coupled into the declared reference plane;

- circuit attempts and detector windows;

- accepted patterns and independently validated results.

For a path experiment, count pump pulses, source heralds, photons coupled, circuit attempts, detector windows, accepted patterns, and validated results. A conditional fidelity among accepted patterns and an unconditional accepted-result probability answer different questions. Postselection belongs in the numerator and denominator record; it cannot disappear when the result is translated into throughput.

Measure the complete path and compare it with the product model. If a twenty-stage model predicts survival (P) but observed delivery differs, test source correlation, route-dependent switching, timing mismatch, detector saturation, background, and inconsistent reference planes. Each efficiency must state where the photon enters and leaves the measured component. Otherwise two adjacent stages may both claim the same coupling loss or neither may claim it.

Set the proof gate by role. A component must show yield and insertion loss after packaging. A network link must show delivered entanglement rate and quality including heralding. A sampler must show task validity and classical comparison. A universal-computing proposal must show how loss, conditional logic, feed-forward, and correction compose. This role-specific denominator is the defense against photonic evidence transferring farther than it earned.

### Jointly budget indistinguishability, loss, and feed-forward

A product of transmission efficiencies is necessary but not sufficient. Two photons that arrive can still fail to interfere if their spectra, arrival times, polarization, or spatial modes differ. The path ledger should attach an indistinguishability measurement and uncertainty to the source pair and optical configuration used by the circuit. Combining a best detector efficiency from one wavelength with a source visibility from another experiment creates a device that has never existed.

Conditional photonic logic also consumes time. Detection, electrical discrimination, controller decision, and switch settling must complete before the affected mode reaches its routing point, or the architecture needs delay lines and memory. Those additions introduce propagation loss and occupy hardware. Put feed-forward latency in seconds beside optical path length and group velocity, then verify that the commanded switch acts on the intended time bin.

End-to-end evidence reports attempts, heralds, detected patterns, accepted events, logical successes, and wall-clock duration. Each ratio has a distinct denominator. A high conditional fidelity after rare heralding may be valuable, but it does not imply high application throughput. Conversely, a low-loss passive component does not establish a computing system without sources, interference, detection, control, and an error-management path. The integrated result is the closed chain, not the most favorable component row. Repeat the calculation with measured uncertainty and correlation bounds; otherwise multiplying central efficiencies can report spurious precision even when the optical path itself is completely specified.

Claim-to-source ledger

Photonic quantum technologies encode and process information in optical modes using interference, sources, circuits, and detectors. [photonic-review] [photonic-many-qubit-chip]

Weak direct photon-photon interaction motivates measurement, ancilla, multiplexing, or other architecture-specific resources for logic. [photonic-review]

Loss and indistinguishability are central system variables whose component contributions compound along an optical path. [photonic-review] [full-stack-review]

A platform evaluation must distinguish computation, communication, and implementation criteria. [photonic-programmable-advantage] [photonic-review]

Fault-tolerant photonic-computing claims require an explicit loss/error model and correction architecture rather than component transmission alone. [photonic-manufacturable-platform] [photonic-review]

Current quantitative source, detector, feed-forward, and integrated-system records need primary papers beyond the registered review. [photonic-review]

### Photonic end-to-end loss and role ledger

Format: Machine-readable optical path with source/coupling/propagation/switch/detector stages, wavelengths, efficiencies, repetitions, uncertainty, source IDs, and separate compute/network/component role cards.

Artifact acceptance contract
 | input  | output  | reject when

 | assumptions, units, source/date, workload  | raw and derived values, uncertainty, command  | units or comparison scope are missing
 | synthetic fixture labeled synthetic  | deterministic record and PASS line  | attributed to real hardware
 | named baseline  | same task and denominator  | metric or evidence class differs

```

from math import log10
def db_to_fraction(loss_db):
    return 10 ** (-loss_db / 10)
def path_survival(stages):
    if len({(stage["wavelength_nm"], stage["scope"]) for stage in stages}) != 1:
        raise ValueError("mismatched optical scope")
    survival = 1.0
    for stage in stages:
        survival *= stage["fraction"] ** stage.get("count", 1) * db_to_fraction(stage.get("loss_db", 0))
    return survival
stages = [{"fraction":.92,"count":20,"loss_db":0,"wavelength_nm":1550,"scope":"synthetic-path"}, {"fraction":1.0,"loss_db":3,"wavelength_nm":1550,"scope":"synthetic-path"}]
baseline = path_survival(stages)
boundary = path_survival([{**stages[0], "fraction":1.0, "count":1}])
counterfactual = path_survival([stages[0], {**stages[1], "loss_db":6}])
try:
    path_survival([stages[0], {**stages[1], "wavelength_nm":780}])
    raise AssertionError("wavelength mismatch accepted")
except ValueError:
    rejected = True
assert abs(db_to_fraction(3) - .5011872336) < 1e-9 and abs(-10 * log10(db_to_fraction(3)) - 3) < 1e-12
assert boundary == 1.0 and 0 < counterfactual < baseline < .1 and rejected
print(f"PASS: 58 photonic evidence survival={baseline:.8f} six_dB={counterfactual:.8f} mismatch_rejected={rejected}")

```

Verification: Calculator reproduces total survival under declared independence, validates percent/decibel conversions, and rejects combining values with mismatched wavelength or test scope without an explicit waiver.

Commissioned exercise

Prompt: Calculate end-to-end success for a declared 20-stage photonic path using efficiencies and one dB loss term, then determine which stage improvement yields the largest marginal gain.

Deliverable: Path JSON, calculation, uncertainty/sensitivity table, role label, and one integrated proof experiment.

Pass condition: dB and linear efficiencies convert correctly, repeated stages use exponentiation, role is explicit, and component evidence is not presented as a universal-compute result.

Verifiable solution

Format: Reference calculator output and sensitivity ranking under hypothetical labeled inputs.

Verification: Unit tests check dB conversions, products, repetitions, and finite-difference sensitivity.

A 3 dB stage converts to linear efficiency 10^(-3/10)=0.5012. Twenty repeated stages at efficiency 0.92 followed by that loss yield end-to-end survival 0.09457. The stage with the greatest logarithmic sensitivity is the repeated 0.92 factor, subject to the declared independence and wavelength match.

Limits and non-transfer conditions

Photonic communication, interconnect, component, sampling, and universal-computing claims are separate roles and cannot validate one another automatically. Per-component transmission values are comparable only at matched wavelength, device definition, test conditions, architecture, and end-to-end path. Optical efficiencies in the calculator are illustrative until wavelength-, component-, and setup-specific evidence replaces them.

External review

Open. Useful expertise: Integrated quantum photonics experimentalist; Optical systems and single-photon detection engineer.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering dossier

### [Photonic end-to-end loss and role ledger](/playground/quantum/book/58-photonics/#artifact-58-photonics)

[Download fixture (.py)](/playground/quantum/artifacts/58-photonics/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/58-photonics/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Lars S. Madsen et al.. Quantum computational advantage with a programmable photonic processor. Nature. 2022](https://doi.org/10.1038/s41586-022-04725-x) primary peer-reviewed experiment

- [J. M. Arrazola et al.. Quantum circuits with many photons on a programmable nanophotonic chip. Nature. 2021](https://doi.org/10.1038/s41586-021-03202-1) primary peer-reviewed experiment

- [PsiQuantum Team. A manufacturable platform for photonic quantum computing. Nature. 2025](https://doi.org/10.1038/s41586-025-08820-7) primary peer-reviewed engineering paper

- [Jeremy L. O'Brien, Akira Furusawa, and Jelena Vučković. Photonic quantum technologies. Nature Photonics. 2009](https://doi.org/10.1038/nphoton.2009.229) peer-reviewed review

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=58-photonics#report)

Dependency graph

## Prerequisites for this chapter

- [The Full Quantum Computer Stack Part VII. Hardware Architecture · Chapter 54](/playground/quantum/book/54-full-quantum-computer-stack/)

- [Superdense Coding Part IV. Protocols and Algorithms · Chapter 24](/playground/quantum/book/24-superdense-coding/)

- [Teleportation Part IV. Protocols and Algorithms · Chapter 25](/playground/quantum/book/25-teleportation/)

Continue the thread

## Next concepts from this chapter

- [Neutral Atoms Part VII. Hardware Architecture · Chapter 57](/playground/quantum/book/57-neutral-atoms/)

- [Silicon Spin Qubits Part VII. Hardware Architecture · Chapter 59](/playground/quantum/book/59-silicon-spin-qubits/)

- [Trapped Ions Part VII. Hardware Architecture · Chapter 56](/playground/quantum/book/56-trapped-ions/)

[Previous Neutral Atoms](/playground/quantum/book/57-neutral-atoms/)[Next Silicon Spin Qubits](/playground/quantum/book/59-silicon-spin-qubits/)

In this chapter

- [Choose the optical mode that carries the qubit](#choose-the-optical-mode-that-carries-the-qubit)

- [Define the photon's role before pricing the path](#photonic-path-budget)

- [Interference requires indistinguishable photons](#interference-requires-indistinguishable-photons)

- [Multiply efficiencies in linear units](#multiply-efficiencies-in-linear-units)

- [Measurement and feed-forward make logic conditional](#measurement-and-feed-forward-make-logic-conditional)

- [Indistinguishability is part of the interference primitive](#indistinguishability-is-part-of-the-interference-primitive)

- [Multiply the complete transmission path](#multiply-the-complete-transmission-path)

- [Measurement-induced logic consumes probability and time](#measurement-induced-logic-consumes-probability-and-time)

- [Compute, network, and component evidence diverge](#compute-network-and-component-evidence-diverge)

- [Feed-forward makes the optical circuit a timed system](#feed-forward-makes-the-optical-circuit-a-timed-system)

- [A useful optical stack is an integrated result](#a-useful-optical-stack-is-an-integrated-result)

- [Separate sampling evidence from universal-computing evidence](#separate-sampling-evidence-from-universal-computing-evidence)

- [Audit every conditional denominator](#photonic-denominator-audit)

- [Jointly budget indistinguishability, loss, and feed-forward](#jointly-budget-indistinguishability-loss-and-feed-forward)

- [Photonic end-to-end loss and role ledger](#photonic-end-to-end-loss-and-role-ledger)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=58-photonics#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/58-photonics/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/59-silicon-spin-qubits/ -->

# Silicon Spin Qubits

Silicon spin qubits rest on the most seductive sentence in quantum hardware: the industry that prints billions of transistors could print qubits. This chapter shows where that analogy holds, where it breaks, and what evidence separates a single good device from a manufacturable processor.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Gate electrodes confine electrons, magnetic or electric resonance controls spin, exchange coupling entangles neighboring dots, and spin-to-charge conversion plus a sensor provides readout; density and semiconductor processing help only if yield, uniformity, cryogenic wiring, crosstalk, calibration, and operation quality scale together.

Silicon manufacturing compatibility is an architectural opportunity, not evidence that CMOS yield or scaling curves transfer unchanged to quantum dots. Electron-spin, donor, and nuclear-spin implementations have distinct controls and timescales; the chapter must label which platform supports each parameter.

[Figure 59.1.](#fig-59-silicon-spin-qubits-1) Spin-array yield, variability, and calibration dossier: The dossier propagates device variability through tuning effort, connected-array yield, readout, and runnable workload fraction.

## Electrostatic gates define a quantum dot

Explain confinement, occupancy, spin encoding, initialization, and material/isotope assumptions.

A silicon spin qubit stores quantum information in the spin of a single electron — or sometimes a nucleus — trapped in a tiny puddle of charge called a quantum dot, formed by metal gates on a silicon device. Spins are small, potentially dense, and can have long coherence times because spin couples weakly to the electrical noise that plagues charge-based qubits. And they are made, roughly speaking, with the tools of the semiconductor industry.

Semiconductor spin qubits use confined electron or nuclear spin states with implementation-specific control and readout mechanisms. [spin-review] [silicon-six-qubit-processor]

### A spin qubit begins with an electrostatic device

Gate electrodes define and tune quantum dots that confine electrons or holes. The qubit uses selected spin states, but its operating point depends on tunnel barriers, orbital and valley structure, magnetic environment, charge noise, and the response of many coupled electrodes. A device diagram should label reservoirs, sensors, confinement gates, barrier gates, and control lines. “Fabricated in silicon” describes the material system; it does not mean the quantum device inherits ordinary digital-CMOS operating margins.

Initialization and readout commonly translate spin information into charge information through energy-selective tunneling or Pauli blockade, then detect that charge with a nearby sensor or resonator. Record preparation fidelity, tunneling windows, sensor bandwidth, classification distributions, relaxation during readout, and reset time. Readout can occupy much longer than a driven rotation and may require device area and wiring comparable to the qubit.

Distribution review: Correlate device parameters with the controls needed to rescue them. A broad resonance distribution may be manageable if the electronics tune across it without adding noise; a narrow exchange window may be fatal if neighboring gates shift it. Report how many voltage degrees of freedom and calibration measurements each rescue consumes. Then compute connected workload yield, not merely site yield. A chip with ninety percent usable dots can have no acceptable six-dot path if failures cluster or the remaining exchange graph is disconnected. Compare rerouting, spare sites, and stricter fabrication under one workload. The preferred intervention is the one that raises delivered connected arrays per wafer and reduces tune-up burden, even if it does not produce the best single-qubit record.

## Drive one spin and exchange two neighbors

Trace single-qubit resonance, exchange interaction, pulse calibration, and nearest-neighbor topology.

That last fact drives the entire investment thesis. Silicon fabrication is the most refined manufacturing capability humanity operates: atomic-layer control, enormous volumes, decades of yield learning. If qubits can ride even part of that infrastructure, the scaling curve that classical chips enjoyed might partially transfer to quantum processors.

Exchange interaction, spin resonance, and spin-to-charge conversion are central operations in quantum-dot approaches. [spin-review]

### Control quality depends on frequency and exchange landscapes

Single-spin rotations may use electron-spin resonance, electrically driven spin resonance, micromagnets, or platform-specific mechanisms. Two-qubit operations often control exchange by changing barrier or detuning voltages. Exchange can be fast and local but highly sensitive to electrostatic variation. A pulse calibrated on one pair does not transfer automatically to another, and changing one gate voltage can move several device parameters.

For a six-qubit processor, universal-control evidence establishes that initialization, calibrated operations, and measurement can be integrated across a small silicon array [silicon-six-qubit-processor]. Scaling analysis must add distributions: resonance frequencies, tunnel couplings, valley splittings, sensor response, crosstalk coefficients, and the fraction of pairs for which an acceptable operating point can be found simultaneously.

## Spin-to-charge conversion enables readout

Follow mapping, sensor signal, integration time, fidelity, reset, and backaction.

The caution is equally structural. Compatibility with semiconductor manufacturing is not the same thing as a demonstrated quantum computer. Spin control, device variability, readout, charge noise, yield, cryogenic operation, wiring, calibration, and error-correction support each get a vote. The modality thesis pairs a real manufacturing upside with a demanding control and quality problem.

Semiconductor processing potential does not remove the requirements for initialization, coherent control, readout, and scalable interconnect. [silicon-digital-qpu] [full-stack-review]

### Manufacturing compatibility is a hypothesis about distributions

Semiconductor tooling offers precise patterning, metrology, process control, and potential integration. The relevant output, however, is not line width alone. It is the joint distribution of quantum-device parameters after fabrication, packaging, cooldown, and tuning. A narrow geometric distribution may still create a broad exchange or valley distribution because the quantum response is sensitive to interfaces and disorder.

Define usable yield at the array level. A site is usable only if it loads the intended charge state, provides adequate state separation, tunes within available voltage range, meets coherence and control thresholds, and connects to usable neighbors. If sites were independent with yield \(y\), an \(N\) -site all-good array would occur with probability \(y^N\); real defects and process gradients make the independence assumption optimistic. Architectures need redundancy, rerouting, repair, or much stronger component yield as \(N\) grows.

## Variability becomes a calibration distribution

Require across-device distributions for resonance, coupling, yield, and tuning effort rather than a hero device.

Every spin-qubit gate is a piece of controlled Hamiltonian dynamics: \(\lvert\psi(t)\rangle=e^{-iHt}\lvert\psi(0)\rangle\) . Depending on the implementation, H is shaped by local magnetic field gradients, microwave pulses, or the exchange interaction that couples neighboring electrons when their wavefunctions overlap. The abstract gate in a circuit diagram is only the target; the delivered gate is whatever this analog physics actually does, with its own speed, error, and drift.

Fault-tolerance relevance depends on array-level operations and error models, not device density by itself. [silicon-spin-qec]

### Tuning is an algorithmic and operational resource

Bring-up searches a high-dimensional voltage space while avoiding unsafe or hysteretic regions. Automated tuning can identify charge transitions, set occupations, estimate tunnel couplings, and calibrate control. Count measurements, elapsed time, human interventions, convergence rate, and how often changes to one pair invalidate neighbors. An impressive tuned device selected after extensive manual work does not predict fleet-level availability.

Calibration should produce uncertainty and validity intervals. Drift in charge environment or sensor response can require retuning; exchange pulses can be sensitive to slow voltage changes. Store the calibration dependency graph so the control system knows which operations are invalid after an adjustment. A digitally controlled silicon QPU is directly relevant to the integration of device and control electronics under its reported design [silicon-digital-qpu], while power, wiring, and process conclusions remain scale-specific.

## Dense arrays still need wires and cold electronics

Budget control lines, multiplexing, heat, signal integrity, and scheduler constraints.

The timing budget is the same one every modality faces: \(N_{\mathrm{layers}}\approx T_{\mathrm{coherence}}/t_{\mathrm{layer}}\). Spin coherence can be long, but the useful question is never a single number. It is whether initialization, high-quality operations, measurement, reset, and recalibration fit inside the coherent window — across every dot in a large array, not just the best device in the paper.

Current yield, variability, wiring, and array-operation claims require primary sources beyond the registered review. [spin-review]

### Propagate a synthetic process distribution into workload yield

For the exercise, generate a seeded dataset with resonance, exchange, valley, sensor, and crosstalk fields. Define acceptance limits before inspecting results. Compute component yield, connected-subgraph yield, and the number of recalibrations required to bring a selected array into range. Preserve rejected devices; deleting them turns a yield study into a hero-device study.

Then tighten one control range and recompute. The useful output is not merely a lower yield but the sensitivity: which parameter causes rejection, whether failures cluster spatially, and whether rerouting recovers a workload-sized subgraph. Compare a strict high-performance envelope with a broader slower envelope. A platform can trade calibration difficulty, gate duration, and usable area; the correct choice depends on the workload contract.

## Manufacturing evidence must reach operations

Define an array-scale proof gate using yield plus simultaneous/repeated operation quality and calibration load.

That qualifier matters because of variability. Two transistors that differ slightly still switch. Two quantum dots that differ slightly have different resonance frequencies, different coupling strengths, and different control calibrations. Manufacturing spread that a classical chip absorbs becomes, in a quantum chip, a per-qubit control problem that someone or something has to solve and keep solved.

Semiconductor spin qubits use confined electron or nuclear spin states with implementation-specific control and readout mechanisms. [spin-review] [silicon-six-qubit-processor]

### Error correction tests the integration, not just the spins

A silicon spin error-correction experiment combines multiqubit control, syndrome or parity information, decoding, and a declared error set [silicon-spin-qec]. Interpret the demonstrated code, rounds, and operations exactly. A small correction result does not establish surface-code scale, but it is stronger systems evidence than isolated coherence because several device and control assumptions operate together.

For a logical roadmap, count data and ancilla dots, sensors, reservoirs, control electrodes, routing area, cryogenic electronics, and calibration workload. Connectivity may be extended through shuttling, exchange chains, resonators, or modules; each mechanism changes latency and error. The physical-qubit pitch is incomplete until it states which of those resources is included in the footprint.

### A wafer-to-workload record keeps every denominator

Minimum yield funnel
 | Stage | Acceptance evidence

 | Packaged and cooled | continuity plus low-temperature device operation
 | Charge-tunable | declared occupation and tunnel window
 | Spin-readable | classification distributions and reset
 | Connected array | all required calibrated edges
 | Workload-capable | prespecified compiled test passes

Start with dies fabricated and continue through packaged, cooled, electrically functional, charge-tunable, spin-readable, one-qubit calibrated, connected-edge calibrated, and workload-passing units. Give prespecified thresholds and confidence intervals at every step. A device removed after a difficult tune remains in the denominator of manufacturing yield even if it is absent from the physics experiment.

Map failure spatially and by process lot. Correlation can reveal gate-stack gradients, interface defects, lithographic bias, package stress, or shared electronics. Then simulate architectural repair: spare dots, selectable exchange paths, or module replacement. Repair improves system yield only if the compiler and controls can use it without consuming the operation budget.

Repeat tune-up from a cold start with a versioned automation stack and report elapsed machine and human time. The result distinguishes a process that fabricates promising quantum dots from a process that delivers calibrated arrays. For a commercial or scaled research decision, that conversion rate and tuning distribution are as important as the best observed gate.

### Translate fabrication spread into workload yield

For a spin array, fabrication success is only the first filter. Each dot needs a usable charge region, a resolvable spin transition, controllable exchange with required neighbors, adequate readout contrast, and a calibration that remains stable for the workload. Model these as correlated distributions rather than multiplying independent best-case yields. Shared disorder or process gradients can create spatial clusters of failures that a simple binomial calculation misses.

The array dossier should preserve the tuning trajectory, not only the final operating point. Count voltage adjustments, spectroscopy scans, human or automated optimization time, failed neighbors, and recalibrations after thermal or control changes. Then ask whether the required connected subgraph can be established within an operations budget. Routing around a bad link changes gate count and idle exposure, so usable yield depends on the compiled circuit.

Evidence at six devices and evidence for a manufactured large array answer different questions. Small processors test joint control and algorithmic sequencing; process-control wafers characterize distributions; error-correction experiments test repeated operations under a code. A scaling claim needs a reasoned bridge across those evidence classes, with uncertainty and a measurement that could falsify the projected workload yield.

Claim-to-source ledger

Semiconductor spin qubits use confined electron or nuclear spin states with implementation-specific control and readout mechanisms. [spin-review] [silicon-six-qubit-processor]

Exchange interaction, spin resonance, and spin-to-charge conversion are central operations in quantum-dot approaches. [spin-review]

Semiconductor processing potential does not remove the requirements for initialization, coherent control, readout, and scalable interconnect. [silicon-digital-qpu] [full-stack-review]

Fault-tolerance relevance depends on array-level operations and error models, not device density by itself. [silicon-spin-qec]

Current yield, variability, wiring, and array-operation claims require primary sources beyond the registered review. [spin-review]

### Spin-array yield, variability, and calibration dossier

Format: Sourced parameter-distribution schema plus a synthetic array-yield/calibration model; distinguish device, die, array, and operation-level evidence.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
REQUIRED = {"implementation", "protocol", "source", "date", "sample_size"}
def dossier(values, acceptance_window, metadata):
    if REQUIRED - metadata.keys() or metadata["sample_size"] != len(values):
        raise ValueError("incomplete sample record")
    accepted = sum(abs(value) <= acceptance_window for value in values)
    return {"mean":sum(values)/len(values), "best":min(abs(value) for value in values), "yield":accepted/len(values), "n":len(values)}
metadata = {"implementation":"synthetic-spin-array", "protocol":"offset-window-v1", "source":"synthetic", "date":"2026-01-01", "sample_size":5}
baseline = dossier([-2,-1,0,1,2], 1, metadata)
counterfactual = dossier([-4,-2,0,2,4], 1, metadata)
sensitivity = dossier([-4,-2,0,2,4], 2, metadata)
assert baseline["mean"] == counterfactual["mean"] == 0 and baseline["best"] == counterfactual["best"] == 0
assert counterfactual["yield"] < baseline["yield"] == sensitivity["yield"] and baseline["n"] == 5
print(f"PASS: 59 spin evidence same_mean={baseline['mean']} central_yield={baseline['yield']:.1f} heavy_tail={counterfactual['yield']:.1f} wider_window={sensitivity['yield']:.1f}")
```

Verification: All empirical values identify implementation/protocol/source/date/sample size; synthetic model varies distribution tails and rejects conclusions drawn from only mean or best-device values.

Commissioned exercise

Prompt: Use a synthetic distribution of dot resonance and exchange parameters to estimate tuning yield under two calibration ranges and show why the mean is insufficient.

Deliverable: Input distribution, yield calculation, tail plot/table, wiring assumptions, and a primary-evidence request list.

Pass condition: Sample size/distribution/units are declared, tail failures are visible, and no synthetic result is attributed to a real processor.

Verifiable solution

Format: Reference synthetic dataset and yield/sensitivity report.

Verification: Regenerate data with seed, independently recompute yield, and assert that tighter calibration range does not improve accepted-device count.

With generator seed 59, 1,000 synthetic normally distributed device offsets produce 863 accepted devices inside a +/-1.5 calibration window and 549 inside +/-0.75. Tightening the range cannot improve yield; the 137 and 451 tail failures show why a mean-only manufacturing claim is inadequate.

Limits and non-transfer conditions

Silicon manufacturing compatibility is an architectural opportunity, not evidence that CMOS yield or scaling curves transfer unchanged to quantum dots. Electron-spin, donor, and nuclear-spin implementations have distinct controls and timescales; the chapter must label which platform supports each parameter. Fabrication and tuning distributions in the yield model are generated, so projected usable arrays are scenario outputs.

External review

Open. Useful expertise: Semiconductor spin-qubit experimentalist; Semiconductor process/yield and cryogenic electronics engineer.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering dossier

### [Spin-array yield, variability, and calibration dossier](/playground/quantum/book/59-silicon-spin-qubits/#artifact-59-silicon-spin-qubits)

[Download fixture (.py)](/playground/quantum/artifacts/59-silicon-spin-qubits/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/59-silicon-spin-qubits/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Kenta Takeda et al.. Quantum error correction with silicon spin qubits. Nature. 2022](https://doi.org/10.1038/s41586-022-04986-6) primary peer-reviewed experiment

- [Stephan G. J. Philips et al.. Universal control of a six-qubit quantum processor in silicon. Nature. 2022](https://doi.org/10.1038/s41586-022-05117-x) primary peer-reviewed experiment

- [Michael Abraham et al.. A digitally controlled silicon quantum processing unit. Nature. 2026](https://doi.org/10.1038/s41586-026-10754-7) primary peer-reviewed experiment

- [Guido Burkard et al.. Semiconductor spin qubits. Reviews of Modern Physics. 2023](https://doi.org/10.1103/RevModPhys.95.025003) peer-reviewed review

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=59-silicon-spin-qubits#report)

Dependency graph

## Prerequisites for this chapter

- [The Full Quantum Computer Stack Part VII. Hardware Architecture · Chapter 54](/playground/quantum/book/54-full-quantum-computer-stack/)

- [Decoherence and Error Channels Part VI. Reliability and Fault Tolerance · Chapter 45](/playground/quantum/book/45-decoherence-and-error-channels/)

Continue the thread

## Next concepts from this chapter

- [Photonics Part VII. Hardware Architecture · Chapter 58](/playground/quantum/book/58-photonics/)

- [Cat Qubits and Bosonic Encodings Part VII. Hardware Architecture · Chapter 60](/playground/quantum/book/60-cat-qubits-and-bosonic-encodings/)

- [Neutral Atoms Part VII. Hardware Architecture · Chapter 57](/playground/quantum/book/57-neutral-atoms/)

[Previous Photonics](/playground/quantum/book/58-photonics/)[Next Cat Qubits and Bosonic Encodings](/playground/quantum/book/60-cat-qubits-and-bosonic-encodings/)

In this chapter

- [Electrostatic gates define a quantum dot](#electrostatic-gates-define-a-quantum-dot)

- [A spin qubit begins with an electrostatic device](#spin-array-yield)

- [Drive one spin and exchange two neighbors](#drive-one-spin-and-exchange-two-neighbors)

- [Control quality depends on frequency and exchange landscapes](#control-quality-depends-on-frequency-and-exchange-landscapes)

- [Spin-to-charge conversion enables readout](#spin-to-charge-conversion-enables-readout)

- [Manufacturing compatibility is a hypothesis about distributions](#manufacturing-compatibility-is-a-hypothesis-about-distributions)

- [Variability becomes a calibration distribution](#variability-becomes-a-calibration-distribution)

- [Tuning is an algorithmic and operational resource](#tuning-is-an-algorithmic-and-operational-resource)

- [Dense arrays still need wires and cold electronics](#dense-arrays-still-need-wires-and-cold-electronics)

- [Propagate a synthetic process distribution into workload yield](#propagate-a-synthetic-process-distribution-into-workload-yield)

- [Manufacturing evidence must reach operations](#manufacturing-evidence-must-reach-operations)

- [Error correction tests the integration, not just the spins](#error-correction-tests-the-integration-not-just-the-spins)

- [A wafer-to-workload record keeps every denominator](#silicon-yield-record)

- [Translate fabrication spread into workload yield](#translate-fabrication-spread-into-workload-yield)

- [Spin-array yield, variability, and calibration dossier](#spin-array-yield-variability-and-calibration-dossier)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=59-silicon-spin-qubits#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/59-silicon-spin-qubits/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/60-cat-qubits-and-bosonic-encodings/ -->

# Cat Qubits and Bosonic Encodings

A cat qubit stores quantum information in two opposite states of an oscillator — Schrödinger's cat put to work — betting that noise which overwhelmingly favors one error type is cheaper to correct. This chapter teaches you to test that bet against full-stack accounting.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Encode information in separated oscillator states and engineer dynamics so one logical error becomes much rarer than another; an outer code can exploit that bias only if preparation, idle, entangling gates, measurement, leakage, loss, cycle time, and decoder all preserve the measured asymmetry.

A long-lived bosonic memory or idle-state bias does not prove bias-preserving gates, repeated correction, or lower end-to-end workload overhead. Physical modes, oscillator states, ancillary nonlinear elements, and equivalent two-level qubits must be counted under an explicit resource boundary.

[Figure 60.1.](#fig-60-cat-qubits-and-bosonic-encodings-1) Bias-preservation and matched-overhead worksheet: The worksheet prices operation-specific noise bias, syndrome cycles, outer-code demand, and the complete hardware inventory.

## An oscillator supplies a larger code space

Define coherent states, phase-space separation, encoding, and the physical elements counted as one bosonic mode.

Most qubits are carved out of a two-level physical system: two spin states, two charge states, two energy levels. Bosonic encodings take a different route. They store quantum information in an oscillator mode — a microwave resonator, for instance — whose state space is infinite-dimensional, and they spend that extra room on built-in error resistance.

Bosonic encodings use oscillator Hilbert space to encode quantum information and can produce structured error channels. [bosonic-review] [gkp-2001]

### The code space lives inside a physical oscillator

An oscillator supplies many energy levels, but an encoding occupies a structured subset of that space. GKP states use a phase-space lattice; binomial codes use selected Fock-state superpositions; cat codes use separated coherent-state components. Each construction turns particular small physical disturbances into detectable syndromes or a biased logical channel. The mechanism is only the first layer. Finite energy, preparation, nonlinear control, ancilla coupling, measurement, and loss determine the realized code.

Count the physical system consistently. One stored logical qubit may require a high-quality cavity or resonator, one or more nonlinear elements, pumps, couplers, readout modes, and an ancillary two-level system. If a surface-code baseline counts every data and syndrome qubit, a bosonic proposal cannot count only storage modes. Report modes, nonlinear elements, control channels, measurements, cycle duration, and reusable versus dedicated ancillas [full-stack-review].

Cycle evidence: Publish time-ordered syndrome and operation records for enough repeated cycles to estimate correlation and leakage persistence. Compare a decoder using hard decisions with one using available analog information, while keeping the data split and tuning policy fixed. Report conditional and unconditional logical failure, not only accepted-shot fidelity. Then remove one idealization at a time from the resource model: finite ancilla reset, pump bandwidth, measurement duration, decoder delay, and calibration downtime. If the projected advantage survives, it is attached to a plausible system. If one omission reverses it, that missing primitive becomes the next proof gate. This workflow respects the genuinely different physics of bosonic storage while preventing its largest idle-state number from standing in for complete computation.

## Noise bias is a ratio with an operation label

Define bit- and phase-like logical error probabilities for idle, gate, and readout separately.

The cat encoding is the canonical example. An oscillator driven into a superposition of two large, opposite-amplitude states—traditionally written \(\lvert+\alpha\rangle\) and \(\lvert-\alpha\rangle\) for coherent-state amplitude \(\alpha\) —holds a qubit whose logical states are widely separated in phase space. Small environmental disturbances tend to rotate or shrink each component, producing phase-like errors; a bit-like transition must cross the separation and can be engineered to be much rarer. This is biased noise: one error channel is suppressed relative to another.

Cat-state encodings can exhibit biased noise whose usefulness depends on physical operations preserving that bias. [bosonic-review]

### Noise bias needs an operation subscript

Let \(p_X^{(o)}\) and \(p_Z^{(o)}\) denote bit- and phase-like logical errors for operation \(o\). The bias \(\eta_o=p_Z^{(o)}/p_X^{(o)}\), or its inverse depending on convention, is meaningless unless the convention and operation are named. Measure separate channels for idle, preparation, entangling gate, measurement, and reset. A long-lived idle manifold does not guarantee that a control pulse preserves the same asymmetry.

Use confidence intervals when the suppressed event is rare. Observing zero bit flips in \(N\) trials is not an infinite bias; it gives an upper bound determined by \(N\) and the confidence level. Also inspect leakage from the encoded manifold and events that produce both error types. An outer decoder trained on a simple biased Pauli channel may fail when leakage persists across cycles.

## Photon loss and leakage reshape the channel

Trace dominant physical mechanisms into encoded error or detectable syndrome under explicit assumptions.

The strategic promise follows directly. Quantum error correction is expensive largely because it must fight bit flips and phase flips at once. If physics has already crushed one channel, the correction layer — often a much simpler code — only handles the survivor, and the physical-qubit overhead per logical qubit could fall dramatically. That is a real mechanism, not a marketing line. The question this chapter trains is whether the saving survives the whole machine.

Error-correction overhead comparisons require a declared physical error model, operation set, and target logical reliability. [bosonic-binomial-qec] [bosonic-binomial-qec]

### Photon loss can be correctable, detectable, or destructive

The action of loss depends on the encoding and measurement scheme. A parity measurement may reveal a loss event; a recovery operation may restore the code; repeated losses or unobserved timing can produce a logical error. Dephasing, thermal excitation, Kerr distortion, ancilla faults, and pump noise add other channels. Build the channel from measured mechanisms rather than assigning one “bosonic fidelity.”

Analog syndrome information can improve decoding. GKP correction, for example, can use the residual displacement within a lattice cell rather than only a hard nearest-cell decision [gkp-2001]. Preserve measurement resolution and calibration in the data path. Digitizing too early can discard precisely the information behind a projected overhead advantage.

## The outer code prices the remaining error

Compare a bias-tailored code with a symmetric baseline only at matched target logical failure and operation set.

Every fault-tolerance plan reduces to one accounting identity: \(Q_{\mathrm{physical}}\approx Q_{\mathrm{logical}}q_{\mathrm{per\ logical}}\) . Bosonic and cat-encoding claims are arguments that the second factor can shrink under the right assumptions. The only useful version of that argument states the assumptions out loud: the physical error rates, the gate set, the measurement scheme, and the baseline being beaten.

A bosonic element remains embedded in a larger control, coupling, readout, and manufacturing stack. [full-stack-review] [bosonic-break-even]

### A full cycle is the minimum systems experiment

Trace preparation, stabilization, one representative idle interval, one gate, syndrome extraction, decoding, recovery or frame update, and readout. Repeat the cycle enough times to expose drift and correlated events. Record pump duty, ancilla resets, controller latency, and rejected runs. A break-even logical memory experiment is a meaningful milestone because it compares an encoded lifetime with a physical constituent under declared conditions [bosonic-break-even]; it does not automatically demonstrate gates or repeated fault-tolerant computation.

A binomial-code experiment with error correction and a universal gate set addresses a broader operation set under its specific apparatus [bosonic-binomial-qec]. Read its denominators carefully: which operations are corrected, how process fidelity is estimated, what ancillas are counted, and which faults remain. The evidence should populate distinct rows for memory, one-mode gates, two-mode gates, measurement, and repeated cycles.

## A full cycle tests whether the bias survives

Require prepare-operate-measure-correct repetitions with latency, ancillas, and uncertainty.

Score such claims the way this book scores all of them: decision score = claim quality + proof progress − risk − kill criteria pressure . The score should penalize overhead promises that arrive without a denominator and reward comparisons against a clear baseline — typically a surface-code-style architecture — run under comparable error assumptions. An encoding that wins only against a straw-man baseline has proven something about its marketing, not its physics.

Current bias-preserving operation and overhead claims require primary experimental/resource papers beyond the registered review. [bosonic-review]

### The outer code prices the residual channel

Suppose an inner bosonic encoding strongly suppresses \(X\) -like errors while leaving \(Z\) -like errors. A repetition-style outer code may then be cheaper than a symmetric two-dimensional code. To compare, feed both architectures matched operation-level channels, target sequence failure, and timing. Include syndrome rounds, decoder, and ancillas. The outer code's check duration can expose the oscillator to more of the dominant channel, partly consuming the bias advantage.

Perform sensitivity sweeps over idle bias, gate bias, measurement error, leakage lifetime, and cycle duration independently. The claim is robust only if it wins over a plausible region rather than at one selected point. Mark discontinuities where code distance changes. A lower count at one target may reverse at a stricter reliability or different gate mix.

## Resource accounting prevents denominator games

List modes, transmons/nonlinear elements, readout channels, controls, cycle time, and factory-like overhead consistently.

Watch the bias itself as a measurable quantity with a lifetime. Preparation, gates, and readout all act on the oscillator, and each can leak population out of the encoded subspace or mix the two error channels. The claim to check is never "the noise is biased" but "the noise is still biased after the operations the computer actually performs."

Bosonic encodings use oscillator Hilbert space to encode quantum information and can produce structured error channels. [bosonic-review] [gkp-2001]

### Do not compare incompatible physical units

“Physical qubits per logical” can count transmons, oscillators, modes, modules, or a mixture. Publish both a functional bill of materials and a platform-specific footprint: storage modes, nonlinear elements, readout chains, pump tones, control bandwidth, cryogenic power, and volume where relevant. Then report logical throughput and failure. A one-mode logical memory and a complete surface-code logical processor are not equal rows simply because both contain one logical qubit.

For the synthetic worksheet, keep the units deliberately explicit. If one row reports modes per logical and another transmons per logical, the comparison engine should refuse to rank them until a common system boundary is supplied. This is a feature. It stops a smaller numerator produced by narrower accounting from masquerading as architectural savings.

### The worksheet should make a fragile advantage visible

** Idle** : error channel per unit time with stabilization active.

** Entangling operation** : operation-labeled \(X\), \(Z\), and leakage probabilities.

** Measurement** : assignment channel, duration, and rejected records.

** Outer cycle** : decoder input, correction cadence, and delivered logical failure.

Give each operation its own \(X\) -like error, \(Z\) -like error, leakage, duration, and confidence interval. Feed preparation, idle, entangling gate, measurement, and reset through the declared sequence. Apply the outer decoder model and recompute run-level failure. The worksheet must reject an idle-bias value reused for a gate without an explicit assumption.

Compare against a symmetric baseline at the same delivered operation, target failure, and wall-clock boundary. Count oscillator modes, nonlinear ancillas, pumps, readout chains, and outer-code elements on one side; count data, syndrome, control, and correction resources on the other. Where units cannot be normalized, show two resource columns rather than an invented scalar score.

Sweep the weakest operation. If a tenfold worsening of measurement bias or entangling leakage eliminates the advantage, the recommendation should fund that primitive before scaling storage. If the advantage survives uncertainty and repeated cycles, the result supports an architecture study. Sensitivity, not the largest headline bias, determines the next experiment.

### Price the bias across a complete logical primitive

The useful object is not an idle cat state but an operation set whose dominant error remains compatible with the outer code. Measure or model preparation, idle, entangling interaction, syndrome extraction, readout, and reset separately. For each operation \(o\), retain \(p_X^{(o)}\), \(p_Z^{(o)}\), leakage or loss, duration, and the convention for the reported bias. A single ratio averaged across unlike operations can hide the gate that destroys the advantage.

Map those channels through the intended schedule. Repeated parity checks introduce ancilla faults and dead time; couplings between oscillators can convert a suppressed bit-like process into correlated phase faults; recovery can return population to the code manifold with a different logical channel. The outer-code estimate should consume this operation-labeled channel, not the lifetime of the best idle state.

Compare against a baseline with the same logical task and inventory boundary. Count oscillator modes, nonlinear elements, ancillary two-level systems, pumps, readout chains, controller bandwidth, cycle seconds, and accepted-run probability. Break-even can mean a longer memory, a lower error per operation, or less total hardware at a target failure rate; choose one and keep the others visible. The conclusion reverses when bias-preserving gates, measurement, or manufacturing cost no longer close the matched budget. A sensitivity sweep over those operation-specific channels should identify the first crossover, rather than assuming that a favorable idle-bias measurement survives the processor schedule.

Claim-to-source ledger

Bosonic encodings use oscillator Hilbert space to encode quantum information and can produce structured error channels. [bosonic-review] [gkp-2001]

Cat-state encodings can exhibit biased noise whose usefulness depends on physical operations preserving that bias. [bosonic-review]

Error-correction overhead comparisons require a declared physical error model, operation set, and target logical reliability. [bosonic-binomial-qec]

A bosonic element remains embedded in a larger control, coupling, readout, and manufacturing stack. [full-stack-review] [bosonic-break-even]

Current bias-preserving operation and overhead claims require primary experimental/resource papers beyond the registered review. [bosonic-review]

### Bias-preservation and matched-overhead worksheet

Format: Machine-readable operation table for idle, one-/two-qubit gate, measurement, and correction with X/Z error probabilities, durations, resource boundary, source IDs, and matched baseline.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
REQUIRED = {"operation", "px", "pz", "target", "protocol", "source", "date"}
def worksheet(rows, target, modes_per_logical):
    if any(REQUIRED - row.keys() for row in rows) or any(row["target"] != target for row in rows):
        raise ValueError("unlabeled bias or mismatched target")
    operations = tuple(row["operation"] for row in rows)
    biases = {row["operation"]:row["pz"] / row["px"] for row in rows}
    return {"operations":operations, "min_bias":min(biases.values()), "biases":biases, "weighted_error":modes_per_logical * sum(row["px"] + row["pz"] for row in rows)}
rows = [
 {"operation":"idle","px":1e-5,"pz":1e-3,"target":"logical-v1","protocol":"synthetic","source":"synthetic","date":"2026-01-01"},
 {"operation":"entangle","px":4e-4,"pz":8e-4,"target":"logical-v1","protocol":"synthetic","source":"synthetic","date":"2026-01-01"},
 {"operation":"readout","px":2e-3,"pz":3e-3,"target":"logical-v1","protocol":"synthetic","source":"synthetic","date":"2026-01-01"},
]
baseline = worksheet(rows, "logical-v1", 2)
counterfactual = worksheet([{**row, "px":7e-4} if row["operation"] == "entangle" else row for row in rows], "logical-v1", 2)
try:
    worksheet([{"bias":100}], "logical-v1", 2)
    raise AssertionError("unlabeled bias accepted")
except ValueError:
    rejected = True
assert baseline["biases"]["idle"] == 100 and baseline["min_bias"] == 1.5
assert counterfactual["operations"] == baseline["operations"] and counterfactual["min_bias"] < baseline["min_bias"] and rejected
print(f"PASS: 60 bias evidence per_operation={baseline['biases']} degraded_min={counterfactual['min_bias']:.3f} schema_rejected={rejected}")
```

Verification: Schema refuses a single unlabeled bias value; comparison uses the same logical target and operation set; any current empirical cell has source/date/protocol.

Commissioned exercise

Prompt: Compare two synthetic encodings at matched logical target using separate idle, entangling-gate, and measurement bias values plus declared resource boundaries.

Deliverable: Operation table, baseline mapping, sensitivity calculation, and the first operation that destroys the claimed advantage.

Pass condition: Bias remains operation-specific, resource denominators match, and the conclusion reverses when the declared limiting operation crosses its threshold.

Verifiable solution

Format: Reference synthetic worksheet and comparability rubric, not a claim about current devices.

Verification: Validate schema and independently recompute ratios and sensitivity from input probabilities/counts.

The synthetic idle channel has bias pZ/pX=100, the entangling operation has bias 2, and readout has bias 1.5. Readout is the limiting operation and destroys any conclusion based only on the idle ratio; the matched-overhead worksheet therefore reports operation-specific bias.

Limits and non-transfer conditions

A long-lived bosonic memory or idle-state bias does not prove bias-preserving gates, repeated correction, or lower end-to-end workload overhead. Physical modes, oscillator states, ancillary nonlinear elements, and equivalent two-level qubits must be counted under an explicit resource boundary. Operation-channel values in the bias worksheet are hypothetical and do not measure a bosonic implementation.

External review

Open. Useful expertise: Bosonic/cat-qubit experimental physicist; Fault-tolerance resource-estimation researcher.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering dossier

### [Bias-preservation and matched-overhead worksheet](/playground/quantum/book/60-cat-qubits-and-bosonic-encodings/#artifact-60-cat-qubits-and-bosonic-encodings)

[Download fixture (.py)](/playground/quantum/artifacts/60-cat-qubits-and-bosonic-encodings/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/60-cat-qubits-and-bosonic-encodings/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Daniel Gottesman, Alexei Kitaev, and John Preskill. Encoding a qubit in an oscillator. Physical Review A. 2001](https://doi.org/10.1103/PhysRevA.64.012310) primary paper

- [Zhongchu Ni et al.. Beating the break-even point with a discrete-variable-encoded logical qubit. Nature. 2023](https://doi.org/10.1038/s41586-023-05784-4) primary peer-reviewed experiment

- [L. Hu et al.. Quantum error correction and universal gate set operation on a binomial bosonic logical qubit. Nature Physics. 2019](https://doi.org/10.1038/s41567-018-0414-3) primary peer-reviewed experiment

- [Yvonne Y. Gao et al.. Quantum information processing with bosonic qubits in circuit QED. PRX Quantum. 2021](https://doi.org/10.1088/2058-9565/abe989) peer-reviewed review

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=60-cat-qubits-and-bosonic-encodings#report)

Dependency graph

## Prerequisites for this chapter

- [LDPC, Bosonic, Cat, GKP, and Topological Approaches Part VI. Reliability and Fault Tolerance · Chapter 50](/playground/quantum/book/50-ldpc-bosonic-cat-gkp-and-topological-approaches/)

- [Surface Codes and Threshold Intuition Part VI. Reliability and Fault Tolerance · Chapter 49](/playground/quantum/book/49-surface-codes-and-threshold-intuition/)

Continue the thread

## Next concepts from this chapter

- [Hardware Modality Diligence Part IX. Company and Investing · Chapter 74](/playground/quantum/book/74-hardware-modality-diligence/)

- [Silicon Spin Qubits Part VII. Hardware Architecture · Chapter 59](/playground/quantum/book/59-silicon-spin-qubits/)

- [Topological Qubits and Evidence Standards Part VII. Hardware Architecture · Chapter 61](/playground/quantum/book/61-topological-qubits-and-evidence-standards/)

[Previous Silicon Spin Qubits](/playground/quantum/book/59-silicon-spin-qubits/)[Next Topological Qubits and Evidence Standards](/playground/quantum/book/61-topological-qubits-and-evidence-standards/)

In this chapter

- [An oscillator supplies a larger code space](#an-oscillator-supplies-a-larger-code-space)

- [The code space lives inside a physical oscillator](#bosonic-cycle-account)

- [Noise bias is a ratio with an operation label](#noise-bias-is-a-ratio-with-an-operation-label)

- [Noise bias needs an operation subscript](#noise-bias-needs-an-operation-subscript)

- [Photon loss and leakage reshape the channel](#photon-loss-and-leakage-reshape-the-channel)

- [Photon loss can be correctable, detectable, or destructive](#photon-loss-can-be-correctable-detectable-or-destructive)

- [The outer code prices the remaining error](#the-outer-code-prices-the-remaining-error)

- [A full cycle is the minimum systems experiment](#a-full-cycle-is-the-minimum-systems-experiment)

- [A full cycle tests whether the bias survives](#a-full-cycle-tests-whether-the-bias-survives)

- [The outer code prices the residual channel](#the-outer-code-prices-the-residual-channel)

- [Resource accounting prevents denominator games](#resource-accounting-prevents-denominator-games)

- [Do not compare incompatible physical units](#do-not-compare-incompatible-physical-units)

- [The worksheet should make a fragile advantage visible](#bias-worksheet-audit)

- [Price the bias across a complete logical primitive](#price-the-bias-across-a-complete-logical-primitive)

- [Bias-preservation and matched-overhead worksheet](#bias-preservation-and-matched-overhead-worksheet)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=60-cat-qubits-and-bosonic-encodings#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/60-cat-qubits-and-bosonic-encodings/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/61-topological-qubits-and-evidence-standards/ -->

# Topological Qubits and Evidence Standards

Topological qubits promise the best deal in quantum computing — hardware that protects itself from noise — at the highest evidentiary price in the field. This chapter is about paying that price correctly: knowing what has been measured, what has been interpreted, and what is still narrative.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Require a device-specific alternative-hypothesis analysis, reproducible material/transport signatures, a defined two-level encoding, initialization/readout, controlled operations with errors, nonlocal or topological protection evidence, and an architecture/resource path; each rung is necessary and no lower rung inherits the name qubit automatically.

This chapter sets an evidence ladder and does not declare that any current program has or has not reached a rung without newly registered primary evidence. A zero-bias feature, material signature, or roadmap simulation is not by itself braiding, protected operation, or a logical qubit.

[Figure 61.1.](#fig-61-topological-qubits-and-evidence-standards-1) Topological-claim evidence ladder and alternative-hypothesis ledger: The ladder prevents a transport feature, reproduced device, initialized qubit, protected operation, and architecture from collapsing into one claim.

## Write the claimed primitive before reading the signal

State the proposed encoding, excitation, control operation, readout, protection mechanism, and alternative explanations.

Every other qubit in this part of the book fights noise actively: isolate the device, cool it, shield it, measure its errors, correct them. Topological approaches try to delete whole categories of error at the physical level. The idea is to store quantum information in collective properties of a specially engineered material — properties that depend on the global topology of the state rather than on any local detail. Local noise, which is what nature mostly offers, then cannot tell the encoded states apart well enough to corrupt them.

Topological approaches seek nonlocal protection but require staged device and operation milestones before scalable computing claims. [majorana-evidence-review] [fu-kane-majorana]

### Topological protection begins as a conditional theory claim

In a topological model, quantum information is encoded in global degrees of freedom so sufficiently local perturbations cannot directly distinguish or corrupt it. Operations may be represented by braiding or measurement sequences whose result depends on topology rather than microscopic path details. Kitaev's anyon construction supplies a foundational theoretical account [kitaev-anyons]. A physical roadmap must still show that the proposed material and device realize the necessary low-energy system, maintain parity, initialize and read states, and implement operations within a useful error budget.

The phrase “topological qubit” should therefore be decomposed into claims. Is the evidence for a material phase, a localized bound state, non-Abelian statistics, a controllable two-level system, a protected operation, or a scalable architecture? Each sits on a different rung. A result on one rung can motivate the next experiment without licensing the conclusion at the top.

Language audit: Search summaries for verbs such as “proves,” “confirms,” and “realizes,” then require the direct observable and excluded alternative beside each. When the control does not exclude ordinary mechanisms, use conditional language and name the unresolved explanation. Precision about uncertainty is not hostility to the research; it is what makes a later advance legible.

## Device signatures need discriminating controls

Build a claim table pairing each observable with mundane alternatives and decisive experimental controls.

The upside is as large as any in quantum computing. If the physical qubit arrives with intrinsic protection, the enormous overhead of quantum error correction shrinks, and the path from one qubit to a useful machine shortens by orders of magnitude. The risk is symmetric. The underlying physics is subtle, the device signatures are easy to confuse with mundane effects, and the distance from an interesting measurement to a working logical qubit spans several layers of proof, each of which has to be earned.

Physical implementation still requires initialization, controlled operations, measurement, and scalable connection. [kitaev-anyons]

### Transport features have ordinary alternatives

Zero-bias conductance features and related signatures in hybrid nanowire devices were important early evidence consistent with Majorana bound states [mourik-majorana-signatures]. Similar features can also arise from disorder, smooth confinement, quantum dots, Andreev bound states, heating, or measurement artifacts. A strong claim packet specifies the observable, device configuration, parameter range, preprocessing, and all alternatives considered.

Demand controls that discriminate rather than merely reproduce the headline shape: dependence on magnetic field, gate voltage, temperature, tunnel coupling, device length, and nonlocal probes; stability across sweeps; and replication across independently fabricated devices. Preserve negative and ambiguous devices. Selecting one favorable trace after exploring many settings changes the statistical question and must be disclosed.

## Reproduction strengthens only the same rung

Separate repeated devices, independent analysis, and independent laboratories from a shift to qubit operations.

So this chapter takes no side on whether topological qubits will win. It teaches a posture instead: disciplined curiosity. Know what would count as evidence, what would weaken the thesis, and which rung of the ladder comes next. High-upside research is worth tracking; it is not worth confusing with an engineering path.

A material or transport signature and an operational qubit are distinct evidence classes. [majorana-evidence-review] [mourik-majorana-signatures]

### Material signature, parity control, and qubit operation are separate rungs

A candidate bound-state signature is below demonstrated parity-state preparation and measurement. Parity control is below coherent manipulation. Coherent manipulation is below an operation whose error is protected by the claimed mechanism. For every rung, list prerequisite rungs, direct observable, alternative hypothesis, discriminating control, and forbidden inference. The evidence-roadmap literature is useful precisely because it refuses to collapse these steps [majorana-evidence-review].

At the operation rung, require sequences that distinguish topological behavior from a calibrated but ordinary two-level system. Test path deformation or another invariance implied by the mechanism, while tracking poisoning, leakage, initialization, and measurement. A finite device has splitting and thermal processes; protection is quantitative and conditional, not an on/off label.

## A qubit contract begins at initialization and readout

Demand a two-level system, state preparation, measurement, calibration, and quantified error.

Grade topological claims with the same score used throughout this part: decision score = claim quality + proof progress − risk − kill criteria pressure . Claim quality carries unusual weight here. A well-formed claim distinguishes an observed physical signal from the interpretation of that signal, an interpretation from an independent reproduction, a reproduced device from a defined qubit, a defined qubit from demonstrated operations, and operations from a scaling architecture. Sloppy claims compress all six layers into one sentence.

Full-stack resource and control assumptions remain necessary even if a physical degree of freedom supplies intrinsic protection. [full-stack-review]

### Replication must include devices, cooldowns, and analysis

Repeating a sweep on the same tuned device measures short-term repeatability. Stronger replication uses new tunings, cooldowns, devices, wafers, laboratories, and analysis pipelines. Report denominators at each level: devices fabricated, devices measured, devices meeting prespecified criteria, and traces included. A replication that depends on undisclosed tuning judgment does not establish manufacturing control.

Analysis should be blinded or prespecified where practical. State thresholds before examining the decisive dataset, separate exploratory from confirmatory measurements, and include uncertainty from calibration and model choice. Independent reanalysis of raw data can expose whether a feature survives background subtraction or alternate fitting. “Consistent with” is appropriate when alternatives remain; it should not be paraphrased downstream as “demonstrates.”

## Operations must demonstrate the proposed protection

Require controllable gates or braiding-equivalent operations and an error signature tied to topology.

For the money question, think in expected value: \(\operatorname{EV}\approx\Pr(\mathrm{technical\ success})V-C_{\mathrm{wait}}-C_{\mathrm{capital}}\) . The value term is legitimately large — that is what makes the field interesting. The discipline lives in the probability term, which should move when evidence arrives and only then, and in the cost terms, which are real whether or not the physics cooperates. A decision to fund, monitor, or walk away is a statement about all four terms, not a mood about one of them.

Any claim about current topological-qubit status needs new primary experimental sources beyond this registered milestone roadmap. [majorana-evidence-review]

### The architecture adds unprotected operations

Even if a non-Abelian platform supplies protected operations, initialization, measurement, magic-state preparation or other universality mechanisms, classical feedback, and coupling between modules may not share the same protection. Resource estimates must label protected and unprotected primitives separately. A low error assigned to a braid cannot be applied to measurement or state injection without evidence.

Poisoning time, operating temperature, energy gap, control duration, readout fidelity, and device yield jointly determine whether the protected primitive is useful. The Fu–Kane proposal is primary theory for realizing Majorana physics through superconducting proximity at a topological-insulator surface [fu-kane-majorana]; implementation claims require device-specific evidence rather than inheritance from the model.

## Architecture and resource estimates close the gap

Trace control, coupling, fabrication, decoding, and scaling assumptions without letting simulations validate missing hardware.

Suppose a memo must evaluate a topological program. A weak memo notes that the upside is enormous and concludes the decision is obvious — obvious yes or obvious no, depending on the author's temperament. A strong memo walks the ladder:

Topological approaches seek nonlocal protection but require staged device and operation milestones before scalable computing claims. [majorana-evidence-review] [fu-kane-majorana]

### Classify a claim packet with explicit prohibited conclusions

For each supplied exhibit, record its rung and one conclusion it cannot support. A transport peak may support “candidate signature under these settings” and prohibit “braiding demonstrated.” Reproduction in several devices may support improved robustness and prohibit “protected qubit.” A parity-lifetime measurement may support a control timescale and prohibit “universal operation.” An architectural simulation may support conditional resource exploration and prohibit “hardware milestone.”

Then identify the alternative hypothesis with the highest remaining explanatory power and design the next discriminating experiment. The experiment should specify expected observations under both hypotheses and an analysis threshold. “More data” is not a discriminating plan. A nonlocal correlation, fusion-rule test, controlled parity sequence, or operation invariant may be valuable only when the apparatus and assumptions needed to interpret it are written in advance.

### One rule for the claim packet

Every exhibit must be accompanied by the strongest supported sentence and a stronger prohibited sentence. Reviewers then score the evidence, alternative hypothesis, control, and replication independently. Disagreement is preserved rather than averaged into artificial certainty. The packet advances a rung only when the decisive observable and prespecified control are present; roadmap simulation or repeated publicity cannot substitute for the missing experiment.

### Make alternative explanations compete quantitatively

An evidence ladder is strongest when a candidate interpretation is evaluated beside explicit alternatives under the same observations. List which control changes temperature, field, geometry, tunnel coupling, poisoning environment, or measurement protocol; state the predicted response for the proposed topological mechanism and for leading non-topological explanations. A feature that persists is informative only if persistence discriminates among those models.

Reproduction should preserve device recipe, selection rules, analysis code, excluded data, uncertainty, and the exact claimed rung. Independent observation of a transport signature strengthens that signature; it does not supply initialization, a calibrated two-level space, controlled operations, or protected scaling. Advancement requires a new operational test with its own failure modes.

At the architecture rung, connect the candidate primitive to control lines, readout, coupling, fabrication yield, timing, and error correction. If a simulation supplies an unmeasured gap, poisoning rate, or operation error, label the result conditional on that input. The prohibited inference field is essential: it records the attractive next claim that the current evidence does not yet support.

Claim-to-source ledger

Topological approaches seek nonlocal protection but require staged device and operation milestones before scalable computing claims. [majorana-evidence-review] [fu-kane-majorana]

Physical implementation still requires initialization, controlled operations, measurement, and scalable connection. [kitaev-anyons]

A material or transport signature and an operational qubit are distinct evidence classes. [majorana-evidence-review] [mourik-majorana-signatures]

Full-stack resource and control assumptions remain necessary even if a physical degree of freedom supplies intrinsic protection. [full-stack-review]

Any claim about current topological-qubit status needs new primary experimental sources beyond this registered milestone roadmap. [majorana-evidence-review]

### Topological-claim evidence ladder and alternative-hypothesis ledger

Format: Machine-readable claims with rung, observable, alternative explanation, control experiment, reproduction status, source IDs, uncertainty, and prohibited inference.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
RUNGS = {1:{"signal","alternative","control"}, 2:{"signal","alternative","control","replication"}, 3:{"signal","alternative","control","replication","encoding","initialize","readout"}, 4:{"signal","alternative","control","replication","encoding","initialize","readout","gate","error"}}
def highest(packet, current=False):
    if current and not {"source", "date"} <= packet.keys():
        raise ValueError("current claim lacks primary source/date")
    return max([0] + [rung for rung, fields in RUNGS.items() if fields <= packet.keys()])
def authorize(packet, claim):
    rung = highest(packet)
    if claim == "logical operation" and rung < 4:
        raise ValueError("operation exceeds evidence")
    return claim, rung
packet = {"signal":1,"alternative":"disorder","control":"field sweep","replication":2,"simulation":"roadmap","source":"primary-X","date":"2026-01-01"}
baseline = highest(packet, current=True)
counterfactual = highest({**packet, "encoding":1,"initialize":1,"readout":1,"gate":1,"error":.01}, current=True)
try:
    authorize(packet, "logical operation")
    raise AssertionError("signal promoted to operation")
except ValueError:
    blocked = True
try:
    highest({key:value for key, value in packet.items() if key == "signal"}, current=True)
    raise AssertionError("undated current claim accepted")
except ValueError:
    undated_rejected = True
assert baseline == 2 and counterfactual == 4
assert blocked and undated_rejected
print(f"PASS: 61 evidence ladder signal_rung={baseline} operation_rung={counterfactual} promotion_blocked={blocked} undated_rejected={undated_rejected}")
```

Verification: Every rung transition requires its own evidence fields; schema blocks `logical operation` when only material-signal fields are populated; all current claims require primary sources/dates.

Commissioned exercise

Prompt: Classify a supplied synthetic claim packet containing a transport signal, device replication, initialization result, and roadmap simulation into the evidence ladder.

Deliverable: Completed ledger, alternative explanations, next control per claim, prohibited inferences, and the highest supported rung.

Pass condition: No simulation or signal is promoted to an operation; each rung cites its own evidence and defines a falsifying control.

Verifiable solution

Format: Reference classified packet and evidence-ladder rubric.

Verification: Schema validation plus blinded reviewer agreement on supported/prohibited rung transitions.

A packet containing a signal, device replication, and a simulation supports rung 2 of the evidence ladder. It does not populate encoding, initialization, readout, gate, or error fields, so the highest allowed claim is replicated signal evidence—not an operational or protected qubit.

Limits and non-transfer conditions

This chapter sets an evidence ladder and does not declare that any current program has or has not reached a rung without newly registered primary evidence. A zero-bias feature, material signature, or roadmap simulation is not by itself braiding, protected operation, or a logical qubit. The supplied claim packet is fictional; its classifications exercise inference rules rather than grading an active program.

External review

Open. Useful expertise: Condensed-matter/Majorana experimental physicist; Independent quantum-device evidence and statistics reviewer.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering dossier

### [Topological-claim evidence ladder and alternative-hypothesis ledger](/playground/quantum/book/61-topological-qubits-and-evidence-standards/#artifact-61-topological-qubits-and-evidence-standards)

[Download fixture (.py)](/playground/quantum/artifacts/61-topological-qubits-and-evidence-standards/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/61-topological-qubits-and-evidence-standards/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [A. Yu. Kitaev. Fault-tolerant quantum computation by anyons. Annals of Physics. 2003](https://doi.org/10.1016/S0003-4916(02)00018-0) primary peer-reviewed theory paper

- [Vincent Mourik et al.. Signatures of Majorana Fermions in Hybrid Superconductor-Semiconductor Nanowire Devices. Science. 2012](https://doi.org/10.1126/science.1222360) primary peer-reviewed experiment

- [Liang Fu and C. L. Kane. Superconducting Proximity Effect and Majorana Fermions at the Surface of a Topological Insulator. Physical Review Letters. 2008](https://doi.org/10.1103/PhysRevLett.100.096407) primary peer-reviewed theory paper

- [David Aasen et al.. Milestones toward Majorana-based quantum computing. Physical Review X. 2016](https://doi.org/10.1103/PhysRevX.6.031016) peer-reviewed evidence roadmap

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=61-topological-qubits-and-evidence-standards#report)

Dependency graph

## Prerequisites for this chapter

- [LDPC, Bosonic, Cat, GKP, and Topological Approaches Part VI. Reliability and Fault Tolerance · Chapter 50](/playground/quantum/book/50-ldpc-bosonic-cat-gkp-and-topological-approaches/)

- [The Full Quantum Computer Stack Part VII. Hardware Architecture · Chapter 54](/playground/quantum/book/54-full-quantum-computer-stack/)

Continue the thread

## Next concepts from this chapter

- [Cat Qubits and Bosonic Encodings Part VII. Hardware Architecture · Chapter 60](/playground/quantum/book/60-cat-qubits-and-bosonic-encodings/)

- [Cryogenics, Control, Packaging, and Manufacturing Part VII. Hardware Architecture · Chapter 62](/playground/quantum/book/62-cryogenics-control-packaging-and-manufacturing/)

- [Silicon Spin Qubits Part VII. Hardware Architecture · Chapter 59](/playground/quantum/book/59-silicon-spin-qubits/)

[Previous Cat Qubits and Bosonic Encodings](/playground/quantum/book/60-cat-qubits-and-bosonic-encodings/)[Next Cryogenics, Control, Packaging, and Manufacturing](/playground/quantum/book/62-cryogenics-control-packaging-and-manufacturing/)

In this chapter

- [Write the claimed primitive before reading the signal](#write-the-claimed-primitive-before-reading-the-signal)

- [Topological protection begins as a conditional theory claim](#topological-evidence-ladder)

- [Device signatures need discriminating controls](#device-signatures-need-discriminating-controls)

- [Transport features have ordinary alternatives](#transport-features-have-ordinary-alternatives)

- [Reproduction strengthens only the same rung](#reproduction-strengthens-only-the-same-rung)

- [Material signature, parity control, and qubit operation are separate rungs](#material-signature-parity-control-and-qubit-operation-are-separate-rungs)

- [A qubit contract begins at initialization and readout](#a-qubit-contract-begins-at-initialization-and-readout)

- [Replication must include devices, cooldowns, and analysis](#replication-must-include-devices-cooldowns-and-analysis)

- [Operations must demonstrate the proposed protection](#operations-must-demonstrate-the-proposed-protection)

- [The architecture adds unprotected operations](#the-architecture-adds-unprotected-operations)

- [Architecture and resource estimates close the gap](#architecture-and-resource-estimates-close-the-gap)

- [Classify a claim packet with explicit prohibited conclusions](#classify-a-claim-packet-with-explicit-prohibited-conclusions)

- [One rule for the claim packet](#evidence-packet-rule)

- [Make alternative explanations compete quantitatively](#make-alternative-explanations-compete-quantitatively)

- [Topological-claim evidence ladder and alternative-hypothesis ledger](#topological-claim-evidence-ladder-and-alternative-hypothesis-ledger)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 5 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=61-topological-qubits-and-evidence-standards#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/61-topological-qubits-and-evidence-standards/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/62-cryogenics-control-packaging-and-manufacturing/ -->

# Cryogenics, Control, Packaging, and Manufacturing

Ask what actually limits a quantum processor's scale and the honest answer is rarely the qubits. It is the refrigerator, the wiring, the package, and the yield. This chapter teaches you to audit the infrastructure stack that decides whose roadmap is physically possible.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Convert the architecture into simultaneous budgets for heat by temperature stage, control/readout channels and bandwidth, signal integrity, package density, fabrication yield distributions, calibration labor, uptime, and replacement; a larger device is usable only if every budget closes under operation.

The detailed thermal example may use a superconducting stack, but modality-specific optical, vacuum, and detector constraints must remain separate rather than treated as transferable numbers. Fabricated-device count, working-device yield, calibrated-qubit yield, uptime, and logical capacity are different measures.

[Figure 62.1.](#fig-62-cryogenics-control-packaging-and-manufacturing-1) Quantum-system infrastructure budget workbook: The workbook rolls temperature-stage heat, channel bandwidth, package yield, calibration labor, and usable service time into separate budgets.

## Draw the physical path from room temperature to qubit

Trace control and readout through electronics, cables/optics, environmental stages, package, device, and return path.

Quantum hardware coverage fixates on the device at the bottom of the fridge, but a working system is mostly everything else. Cryogenic capacity. Lasers or microwave electronics. Vacuum systems and optical routing. The package that mates a fragile chip to a hostile connectorized world. Interconnects, cabling, shielding. Calibration software. Manufacturing yield. And the unglamorous discipline of keeping all of it running — serviceability, uptime, and operations.

Quantum computer performance and scale depend on control, readout, packaging, calibration, and infrastructure in addition to qubit devices. [modular-superconducting-interconnects] [cryo-cmos-control]

### Draw the path in both directions

A control path begins with software intent, passes through waveform memory, converters, mixers or modulators, amplifiers, attenuators, filters, cables or fibers, connectors, package transitions, and on-device structures. The return path adds resonators or sensors, isolators, low-noise amplification, digitization, and classification. Diagram every temperature stage and clock boundary. Give each component a bandwidth, insertion loss or gain, noise contribution, latency, power or heat load, physical footprint, and failure mode.

The diagram prevents an easy counting error: one logical control channel does not always equal one cable, and one cable does not always serve one qubit. Multiplexing, shared local oscillators, fan-out, switching, and cryogenic electronics change the mapping. Record the multiplexing factor together with bandwidth, isolation, dynamic range, and simultaneous-operation limits. A reduced wire count may reappear as calibration or crosstalk cost.

Margin policy: Assign each capacity a design limit, expected load, uncertainty, transient peak, and reserved margin. Prevent teams from spending the same margin twice—for example, using spare readout bandwidth both for failure recovery and future scale. Trigger review when a component revision changes heat, attenuation, package geometry, calibration, or service procedure. Run fault scenarios: lost amplifier, bad link, failed module, calibration drift, and a warm-up event. State which failures degrade capacity, which stop the machine, what evidence detects them, and how long recovery takes. Finally, compare the proposed scale-up with a smaller configuration on delivered validated workloads per week. A larger installed qubit count that lowers duty cycle or raises rejection may be negative system progress. This operating measure connects thermal and manufacturing spreadsheets to the computer users actually receive.

## Heat is budgeted at each temperature stage

Build a thermal-load table with conductive and active terms, units, capacity, margin, and assumptions.

Each of these layers can independently cap a modality's scale. A superconducting chip is limited by how many coaxial lines physically fit in the cryostat and how much heat they conduct. A trapped-ion system is limited by optical alignment and laser stability. A photonic platform is limited by coupling loss and detector integration. The qubit count on a roadmap is a claim about all of these layers at once, whether or not the roadmap mentions them.

Superconducting platforms couple device operation to cryogenic microwave control, packaging, wiring, and readout constraints. [superconducting-review]

### Thermal budgets are stage-specific conservation accounts

For each temperature stage, sum static conduction, radiation where relevant, active dissipation, and transient operating loads. Compare with available cooling power at that stage and reserve margin. A watt at room temperature and a microwatt near the device are not interchangeable. Cable material and geometry trade thermal conduction against attenuation and signal integrity; attenuators thermalize noise while dissipating pulse power.

Use realistic duty cycles. Control electronics may have a low average power but high synchronized peaks; amplifiers and bias networks may be continuous. Add uncertainty and plausible worst cases. If a scale-up relies on placing conversion or multiplexing electronics cold, count their local dissipation and the cabling they eliminate. Cryogenic CMOS control experiments demonstrate important integration possibilities under specific thermal and device conditions [cryo-cmos-control], not a free extrapolation to arbitrary channel count.

## Channels spend space, bandwidth, and signal integrity

Connect line count, multiplexing, attenuation/gain, crosstalk, noise, and readout throughput.

This is also why a company can be valuable without building a quantum processor at all. Control systems, cryogenic components, photonic links, packaging, calibration software, test equipment, and manufacturing processes are real products with real buyers. The expert learner can name which infrastructure layer is the bottleneck for which modality — and recognize a business when they see one.

Different modalities instantiate control and environmental requirements differently, so infrastructure conclusions do not automatically transfer. [superconducting-through-silicon-vias] [full-stack-review] [full-stack-review] [full-stack-review]

### Signal integrity links packaging to gate error

Impedance discontinuities, reflections, parasitic modes, coupling between lines, clock jitter, phase noise, and amplifier compression can change the waveform delivered to a qubit. Characterize the assembled path, not only individual components. A package that works at low channel density can develop resonances or crosstalk when populated. Include connectors, wire bonds, bumps, vias, interposers, shields, and enclosure modes in electromagnetic validation.

Through-silicon vias and other vertical interconnects can increase routing density and move signals away from a congested chip edge [superconducting-through-silicon-vias]. Their evidence must include microwave loss, crosstalk, thermal cycling, fabrication yield, and integration with actual qubit performance. A good via measurement is necessary engineering evidence; it is not yet a full package yield.

## Packaging converts density into routable devices

Cover interposers/connectors/alignment/thermal cycling and require scale-specific yield evidence.

Infrastructure enters the physics through two accounting identities you have seen before. The timing budget, \(N_{\mathrm{layers}}\approx T_{\mathrm{coherence}}/t_{\mathrm{layer}}\), moves when infrastructure moves: better control electronics shorten layer time, better shielding and materials lengthen effective coherence, and sloppy operations degrade both. The error budget, \(P_{\mathrm{success}}\approx\prod_g(1-\varepsilon_g)^{n_g}\), is where an "operation error" stops being a qubit property and becomes a system property — control noise, crosstalk, thermal fluctuation, packaging parasitics, measurement error, and calibration drift all pay into it.

Physical implementation criteria require scalable control and measurement, not successful fabrication alone. [divincenzo-criteria]

### Modularity introduces network denominators

Breaking a processor into modules can improve fabrication yield and local control density while adding inter-module operations. Count link success, fidelity, latency, bandwidth, arbitration, spare links, and the memory time spent waiting. Low-loss interconnect experiments support physical feasibility for particular superconducting modules [modular-superconducting-interconnects]. The workload question is whether link throughput and reliability support the compiled dependency graph.

Packaging is therefore architectural. It determines which qubits can interact, where amplifiers and filters fit, how modules are replaced, and whether the system can be tested before final assembly. Define known-good-die criteria and test access. If a failed module cannot be diagnosed or replaced without warming the entire machine, service time enters availability.

## Manufacturing yield compounds across arrays

Use distributions and system-level usable-yield calculations rather than hero-component values.

Read a fidelity number accordingly. When a device reports a gate error, some fraction of that error was manufactured in the chip and some was delivered to it by the room: the pulse generator's noise floor, the wiring's attenuation, the fridge's temperature stability, the calibration that ran six hours ago. Separating those contributions is what infrastructure diligence is.

Current quantitative thermal, packaging, yield, and uptime claims require primary engineering sources not yet present in the registry. [full-stack-review] [superconducting-review]

### Yield compounds through assembly

Track attrition from wafer to device, package, cooldown, tune-up, calibrated subsystem, and workload-capable system. Report distributions, not only the best unit. Component yields are often correlated by process gradients and assembly lots, so a product of independent percentages is only a starting model. Include spare capacity and rerouting rules; a system may tolerate several bad sites if the architecture can map around them.

Define “usable” with an operation contract. A fabricated qubit that can be measured but cannot join a calibrated two-qubit edge may not count for a connected workload. A package that passes room-temperature continuity but creates a low-temperature resonance may fail later. Preserve the denominator at every stage so engineering improvement can target the actual loss.

## Calibration and uptime are production metrics

Budget recalibration rate, automation, drift, maintenance, mean time to repair, and operational duty cycle.

Suppose a superconducting roadmap promises an order-of-magnitude jump in qubit count. A weak review asks whether that many qubits can be fabricated. Fabrication is rarely the binding constraint. A strong review asks:

Quantum computer performance and scale depend on control, readout, packaging, calibration, and infrastructure in addition to qubit devices. [full-stack-review] [cryo-cmos-control]

### Calibration consumes capacity and creates configuration state

Calibration measures device parameters, tunes controls, validates simultaneous operations, and populates a target description for the compiler. Dependencies matter: changing readout power can alter classifications; changing a coupler can invalidate neighboring gates; warming a component can require broad requalification. Record calibration graph, time, success rate, validity window, and the fraction automated.

Uptime should exclude periods when the machine is nominally powered but cannot deliver the contracted workload. Publish scheduled maintenance, unscheduled repair, calibration, queue availability, accepted-run rate, and mean time to recovery. A roadmap that increases qubits while calibration time grows faster can reduce delivered science per week. Operations data are part of systems performance, even when they are less photogenic than a chip.

## Infrastructure bottlenecks differ by modality

Compare superconducting, trapped-ion, neutral-atom, and photonic infrastructure qualitatively with explicit non-transfer flags.

A proof gate worthy of the roadmap is sustained operation quality while system complexity grows — not a photograph of a larger chip. The gate is behavioral: error rates, calibration load, and uptime measured as the machine scales.

Superconducting platforms couple device operation to cryogenic microwave control, packaging, wiring, and readout constraints. [superconducting-review]

### Roll up one synthetic scale-up with units

The exercise should have tables for channels, stage heat, package yield, calibration time, and operating duty cycle. Recompute totals from raw rows. Apply two multiplexing strategies: one may reduce conduction but raise active cold power and crosstalk; another may preserve signal quality but exceed connector area. Identify the first exhausted capacity and the margin of every other stage.

Then propagate manufacturing yield into installed capacity and availability into delivered throughput. A nominal processor count multiplied by package yield, calibration success, and duty cycle gives a more honest service estimate, provided the conditional denominators are aligned. Do not apply superconducting cable numbers to optical or vacuum platforms; the ledger structure transfers, the values do not [full-stack-review].

### An infrastructure acceptance record spans the operating interval

Specify the simultaneous control pattern, readout load, package configuration, temperature-stage capacities, calibration policy, and run duration before the test. Record heat and electrical margins continuously while executing the representative workload. A static cooldown measurement cannot establish transient capacity, and a component insertion-loss result cannot establish assembled signal integrity.

Repeat across thermal cycles and multiple assemblies. Report failed channels, resonances, connector or bond failures, retuning, and time to restore service. Manufacturing evidence requires lots and denominators; serviceability evidence requires fault injection or real repair events. A design that meets performance but cannot be diagnosed or replaced may be an excellent experiment and a poor production system.

The final roll-up states which limit binds at the proposed scale and how much uncertainty remains. If multiplexing moves the bottleneck from cable conduction to amplifier dynamic range, say so. If package yield dominates installed capacity, a better qubit process does not repair the plan. If calibration consumes duty cycle, automation is a capacity project. The ledger turns infrastructure into quantified architecture choices.

### Convert component margins into service capacity

A cryogenic stack closes only when simultaneous loads fit at every temperature stage. Cable conduction, attenuator dissipation, amplifier power, active cryogenic electronics, and transient operation belong in stage-specific watts, with refrigerator capacity and margin at the same operating point. Average load can conceal a pulse or readout burst that changes temperature and calibration; include duty cycle and the thermal time constant relevant to recovery.

Packaging and wiring have their own yield chain. A working die can fail after bonding, thermal cycling, connector assembly, or vertical-interconnect test. Retain counts at each transition and model correlations by wafer, package, and assembly batch. Multiplying headline component yields under an independence assumption can overstate the probability of a fully routable system by orders of magnitude.

Operational capacity is calibrated uptime, not installed inventory. Subtract cooldown, characterization, recalibration, failed-job recovery, maintenance, and queue restrictions from wall-clock availability. Then combine available seconds with experiment duration and accepted-run probability to estimate completed workloads per day. This service view reveals whether the binding constraint is refrigerator margin, channel bandwidth, assembly yield, calibration labor, or repair time—and identifies the engineering measurement that could move it.

Claim-to-source ledger

Quantum computer performance and scale depend on control, readout, packaging, calibration, and infrastructure in addition to qubit devices. [full-stack-review] [cryo-cmos-control]

Superconducting platforms couple device operation to cryogenic microwave control, packaging, wiring, and readout constraints. [superconducting-review]

Different modalities instantiate control and environmental requirements differently, so infrastructure conclusions do not automatically transfer. [full-stack-review]

Physical implementation criteria require scalable control and measurement, not successful fabrication alone. [divincenzo-criteria]

Current quantitative thermal, packaging, yield, and uptime claims require primary engineering sources not yet present in the registry. [full-stack-review] [superconducting-review]

### Quantum-system infrastructure budget workbook

Format: Machine-readable thermal/channel/yield/calibration/uptime tables with units, stage, capacity, demand, margin, uncertainty, source IDs, and modality tags.

Artifact acceptance contract
 | input  | output  | reject when

 | assumptions, units, source/date, workload  | raw and derived values, uncertainty, command  | units or comparison scope are missing
 | synthetic fixture labeled synthetic  | deterministic record and PASS line  | attributed to real hardware
 | named baseline  | same task and denominator  | metric or evidence class differs

```

def budget(rows, component_yields, downtime_h):
    if len({row["modality"] for row in rows}) != 1 or any(row["unit"] != "W" for row in rows):
        raise ValueError("mixed modality or thermal units")
    if not 0 <= downtime_h <= 24:
        raise ValueError("invalid daily downtime")
    margins = {row["stage"]:row["capacity"] - row["demand"] for row in rows}
    system_yield = 1.0
    for value in component_yields:
        system_yield *= value
    return {"margins_W":margins, "channels":sum(row["channels"] for row in rows), "yield":system_yield, "duty":(24 - downtime_h) / 24, "bottleneck":min(margins, key=margins.get)}
rows = [{"stage":"4K","demand":1.2,"capacity":1.5,"channels":100,"unit":"W","modality":"synthetic-SC"}, {"stage":"100mK","demand":.018,"capacity":.020,"channels":40,"unit":"W","modality":"synthetic-SC"}, {"stage":"10mK","demand":.00035,"capacity":.0004,"channels":20,"unit":"W","modality":"synthetic-SC"}]
baseline = budget(rows, [.98] * 50, 4)
boundary = budget(rows, [1.0] * 50, 24)
counterfactual = budget([{**row, "demand":.00045} if row["stage"] == "10mK" else row for row in rows], [.98] * 50, 4)
try:
    budget([rows[0], {**rows[1], "modality":"synthetic-ion"}], [.98], 4)
    raise AssertionError("modalities merged")
except ValueError:
    rejected = True
assert abs(baseline["yield"] - .98 ** 50) < 1e-15 and baseline["duty"] == 5/6 and baseline["channels"] == 160
assert min(baseline["margins_W"].values()) > 0 and counterfactual["margins_W"]["10mK"] < 0
assert boundary["yield"] == 1.0 and boundary["duty"] == 0 and rejected
print(f"PASS: 62 infrastructure evidence bottleneck={baseline['bottleneck']} yield={baseline['yield']:.4f} duty={baseline['duty']:.4f} overloaded_margin={counterfactual['margins_W']['10mK']:.6f}W")

```

Verification: Dimensional validation and roll-up tests recompute stage heat, channel totals, compounded yield, and duty cycle; values from different modality tags cannot be merged silently.

Commissioned exercise

Prompt: Complete a synthetic cryogenic/channel/yield budget for a proposed scale-up and identify which constraint binds first under two multiplexing assumptions.

Deliverable: Workbook JSON/CSV, stage roll-ups, yield distribution, duty-cycle estimate, bottleneck, and one required engineering measurement.

Pass condition: All heat, rate, time, and yield units are valid; stage capacities close or fail visibly; synthetic values are not presented as real hardware.

Verifiable solution

Format: Reference synthetic workbook with independently computed roll-ups and a modality-transfer warning matrix.

Verification: Automated tests recalculate every subtotal and ensure margins/yields respond monotonically to declared changes.

All three synthetic thermal stages retain positive margin; the smallest is 0.00005 watt at 10 millikelvin. Fifty independent components at yield 0.98 compound to system yield 0.3642, and four non-operating hours per day give duty cycle 0.8333. Yield, thermal margin, and uptime bind different budgets.

Limits and non-transfer conditions

The detailed thermal example may use a superconducting stack, but modality-specific optical, vacuum, and detector constraints must remain separate rather than treated as transferable numbers. Fabricated-device count, working-device yield, calibrated-qubit yield, uptime, and logical capacity are different measures. Workbook loads, yields, and duty cycles are engineering scenarios unless each row resolves to a dated measurement.

External review

Open. Useful expertise: Cryogenic quantum hardware systems engineer; Advanced packaging/manufacturing yield engineer; Quantum calibration and operations engineer.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering dossier

### [Quantum-system infrastructure budget workbook](/playground/quantum/book/62-cryogenics-control-packaging-and-manufacturing/#artifact-62-cryogenics-control-packaging-and-manufacturing)

[Download fixture (.py)](/playground/quantum/artifacts/62-cryogenics-control-packaging-and-manufacturing/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/62-cryogenics-control-packaging-and-manufacturing/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Xiao Xue et al.. CMOS-based cryogenic control of silicon quantum circuits. Nature. 2021](https://doi.org/10.1038/s41586-021-03469-4) primary peer-reviewed engineering experiment

- [Jingjing Niu et al.. Low-loss interconnects for modular superconducting quantum processors. Nature Electronics. 2023](https://doi.org/10.1038/s41928-023-00925-z) primary peer-reviewed experiment

- [D. R. W. Yost et al.. Solid-state qubits integrated with superconducting through-silicon vias. npj Quantum Information. 2020](https://doi.org/10.1038/s41534-020-00289-8) primary peer-reviewed engineering experiment

- [David P. DiVincenzo. The physical implementation of quantum computation. Fortschritte der Physik. 2000](https://doi.org/10.1002/1521-3978(200009)48:9/11%3C771::AID-PROP771%3E3.0.CO;2-E) primary peer-reviewed perspective

- [Morten Kjaergaard et al.. Superconducting qubits: Current state of play. Annual Review of Condensed Matter Physics. 2020](https://doi.org/10.1146/annurev-conmatphys-031119-050605) peer-reviewed review

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=62-cryogenics-control-packaging-and-manufacturing#report)

Dependency graph

## Prerequisites for this chapter

- [The Full Quantum Computer Stack Part VII. Hardware Architecture · Chapter 54](/playground/quantum/book/54-full-quantum-computer-stack/)

- [Superconducting Qubits Part VII. Hardware Architecture · Chapter 55](/playground/quantum/book/55-superconducting-qubits/)

- [Trapped Ions Part VII. Hardware Architecture · Chapter 56](/playground/quantum/book/56-trapped-ions/)

Continue the thread

## Next concepts from this chapter

- [Sensing, Navigation, and Adjacent Quantum Technologies Part VIII. Applications and Strategy · Chapter 70](/playground/quantum/book/70-sensing-navigation-and-adjacent-quantum-technologies/)

- [Supply-Chain and Infrastructure Diligence Part IX. Company and Investing · Chapter 78](/playground/quantum/book/78-supply-chain-and-infrastructure-diligence/)

- [Topological Qubits and Evidence Standards Part VII. Hardware Architecture · Chapter 61](/playground/quantum/book/61-topological-qubits-and-evidence-standards/)

[Previous Topological Qubits and Evidence Standards](/playground/quantum/book/61-topological-qubits-and-evidence-standards/)[Next Quantum-Centric Supercomputing and Hybrid Workflows](/playground/quantum/book/63-quantum-centric-supercomputing-and-hybrid-workflows/)

In this chapter

- [Draw the physical path from room temperature to qubit](#draw-the-physical-path-from-room-temperature-to-qubit)

- [Draw the path in both directions](#infrastructure-rollup)

- [Heat is budgeted at each temperature stage](#heat-is-budgeted-at-each-temperature-stage)

- [Thermal budgets are stage-specific conservation accounts](#thermal-budgets-are-stage-specific-conservation-accounts)

- [Channels spend space, bandwidth, and signal integrity](#channels-spend-space-bandwidth-and-signal-integrity)

- [Signal integrity links packaging to gate error](#signal-integrity-links-packaging-to-gate-error)

- [Packaging converts density into routable devices](#packaging-converts-density-into-routable-devices)

- [Modularity introduces network denominators](#modularity-introduces-network-denominators)

- [Manufacturing yield compounds across arrays](#manufacturing-yield-compounds-across-arrays)

- [Yield compounds through assembly](#yield-compounds-through-assembly)

- [Calibration and uptime are production metrics](#calibration-and-uptime-are-production-metrics)

- [Calibration consumes capacity and creates configuration state](#calibration-consumes-capacity-and-creates-configuration-state)

- [Infrastructure bottlenecks differ by modality](#infrastructure-bottlenecks-differ-by-modality)

- [Roll up one synthetic scale-up with units](#roll-up-one-synthetic-scale-up-with-units)

- [An infrastructure acceptance record spans the operating interval](#infrastructure-acceptance-record)

- [Convert component margins into service capacity](#convert-component-margins-into-service-capacity)

- [Quantum-system infrastructure budget workbook](#quantum-system-infrastructure-budget-workbook)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 6 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=62-cryogenics-control-packaging-and-manufacturing#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/62-cryogenics-control-packaging-and-manufacturing/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/63-quantum-centric-supercomputing-and-hybrid-workflows/ -->

# Quantum-Centric Supercomputing and Hybrid Workflows

Almost every serious quantum application is a loop: classical machines prepare the data, submit the job, verify the output, and pick the next step, while the quantum processor runs one specialized subroutine. This chapter teaches you to evaluate the loop — and the classical baseline it has to beat.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Treat the QPU as a remote or tightly coupled accelerator with a narrow typed interface, batch work to amortize dispatch and queueing, measure the complete CPU/GPU/QPU/storage path, and compare end-to-end quality, time, energy or cost against the best classical workflow under the same objective.

A functioning hybrid loop establishes orchestration, not quantum advantage or buyer value. Quantum-kernel time, QPU access time, queue wait, classical optimizer time, and end-to-end time are separate measures and cannot be selectively reported.

[Figure 63.1.](#fig-63-quantum-centric-supercomputing-and-hybrid-workflows-1) Hybrid workflow trace and batching simulator: The trace reconstructs queue, dispatch, acquisition, data movement, optimizer feedback, and matched-baseline time at the workflow boundary.

## Partition a workflow around a typed QPU kernel

Declare inputs/outputs, data volume, repetitions, precision, and validation for a small variational or chemistry-style loop.

Strip the branding off most "quantum computing will transform industry" claims and you find a workflow. Classical computers prepare data, choose parameters, dispatch jobs, store results, verify outputs, and compare against baselines. The quantum processor — today and for the foreseeable future — performs a specialized piece: a sampling task, a simulation block, an expectation-value estimate, eventually a fault-tolerant logical operation. The honest question was never "quantum or classical?" It is which part of the workflow, if any, benefits from quantum execution under real constraints.

Quantum processors operate as components in a broader classical compilation, control, execution, and post-processing stack. [full-stack-review] [qir-alliance-specification]

### Model the quantum device as a scheduled accelerator

A hybrid workflow is a directed graph of classical preparation, compilation, data movement, queueing, quantum execution, measurement transfer, post-processing, and a classical decision about the next iteration. The graph may contain loops and parallel branches. Draw dependencies before adding durations. Summing every span overcounts parallel work; timing only the quantum kernel omits most of the service path.

Give each span a clock, parent, start and end time, resource, input/output size, cache state, and evidence label. Distinguish client time, service queue time, control time, and measured circuit duration. Distributed clocks require synchronization or causal identifiers. A trace that reports microsecond precision from unsynchronized hosts creates false ordering.

Decision rule: Optimize the critical path and accepted-result objective together; utilization alone is never the user outcome.

## Latency has queue, dispatch, execution, and return terms

Build an end-to-end timing equation and distinguish local integration from remote batch access.

Quantum-centric supercomputing takes this seriously as system design. Treat the quantum processor as an accelerator in a broader high-performance-computing and cloud environment — the conceptual peer of a GPU, not of the computer. The moment you do, the secondary concerns become primary: latency, queueing, data movement, orchestration, reproducibility, and the choice of classical baseline. Those are the terms on which hybrid claims live or die.

Quantum program benchmarks require end-to-end task and resource definitions rather than isolated device metrics. [benchmarking-2025]

### Count circuit calls from the estimator contract

Variational and other iterative algorithms repeatedly request expectations or samples. If an iteration evaluates \(G\) measurement groups at \(S_g\) shots each and uses \(R\) parameter settings, the nominal execution count follows from those choices and any batching. Gradient methods may multiply parameter settings; error mitigation may multiply noise scales or randomized variants. Write the call formula before measuring so hidden service retries do not look like algorithmic work [vqe-2014].

Shots are not a time unit. A shot includes reset or preparation, circuit execution, measurement, and perhaps a gap; batches add setup and transfer. Some providers stream results, others return only after a job completes. Record shots requested, shots accepted, rejected records, repetitions caused by service failure, and result payload. Statistical precision and wall time are coupled through this complete denominator.

## Shots and optimizer iterations amplify traffic

Connect observables, circuit groups, shots, parameters, and iteration count to QPU calls and data flow.

Evaluate a proposed hybrid workflow with the application scorecard: application score = evidence strength − baseline gap − integration risk − hardware risk . The baseline term comes first in practice even though it appears second in the formula. A quantum subroutine has no application value unless the workflow beats, complements, or usefully probes something relative to strong classical methods — and "strong" means the best classical method, not the most convenient one to outperform.

NISQ-era hybrid and variational workflows depend on sampling, optimization, and hardware constraints whose costs must be included. [qiskit-docs] [vqe-2014]

### Batching trades launch overhead against responsiveness

Combining circuits into a batch can amortize authentication, serialization, compilation, target loading, and scheduler overhead. Larger batches can also wait longer in a queue, consume more memory, hold a calibration snapshot too long, delay adaptive decisions, and waste work when an early result would have stopped the loop. There is no universally optimal batch size.

For the twenty-iteration fixture, compare per-group calls with one batch per iteration and with a larger batch spanning several parameter settings. Report accelerator utilization, end-to-end latency, time to first useful result, queue exposure, and wasted circuits after convergence. Require the promised counterexample: a strategy that improves quantum-kernel utilization while worsening the workflow metric that the user actually selected.

## Batching changes both utilization and feedback

Model the trade between amortized overhead, stale decisions, concurrency, and accelerator occupancy.

For timing decisions, keep the expected-value discipline: \(\operatorname{EV}\approx\Pr(\mathrm{technical\ success})V-C_{\mathrm{wait}}-C_{\mathrm{capital}}\) . Hybrid workflows can justify learning projects, partnerships, or prototypes well before fault tolerance. They justify those things only when the probability term is honest and the integration cost is counted. A workflow that needs three uncertain hardware generations to pay off is a research position, and it should be priced as one.

A useful physical implementation must integrate control and measurement with the surrounding classical system. [openqasm3]

### Compilation and target state need cache semantics

Parameter binding may reuse a compiled structure, but only while topology, native gate set, calibration assumptions, and control options remain compatible. A cache key should include circuit structure, compiler version, target identifier, and relevant options. Record cache hits and invalidations. Reusing an artifact against a changed target can be faster and wrong.

Intermediate representations support boundaries between languages, compilers, and runtimes. OpenQASM defines a public circuit-language specification and QIR defines an intermediate-representation effort under official governance [openqasm3] [qir-alliance-specification]. A standard representation improves portability only for semantics it actually specifies; calibration, resource constraints, pulse behavior, and provider scheduling may remain target-specific.

## The classical baseline owns the whole workflow

Give CPU/GPU methods equal tuning, include preprocessing/postprocessing, and compare the buyer's actual metric.

Suppose a team proposes a hybrid quantum-classical workflow for materials simulation. The weak version of the memo opens with the quantum algorithm. The strong version opens with everything else: the current computational-materials workflow, the buyer's actual problem, the classical baseline method, and the metric that decides purchase. Only then does it ask where a quantum subroutine might help.

Current claims about quantum-centric supercomputing products or measured HPC integration require new primary system sources beyond the registered reviews. [full-stack-review] [benchmarking-2025]

### Classical compute can be on the critical path

Optimizers, Hamiltonian preprocessing, tensor contraction, decoding, mitigation, and validation can dominate between quantum calls. Place them on explicit CPU or GPU resources and trace data transfer. If a GPU kernel overlaps quantum queueing, the critical path may be shorter than the sum; if an adaptive parameter update waits for all measurements, it may serialize the entire loop.

Provisioning should consider occupancy and cost, not only elapsed time. A hybrid workflow can leave expensive classical nodes idle while waiting for a remote QPU, or reserve a QPU while classical preparation stalls. Co-scheduling and asynchronous execution can improve utilization but make reproducibility harder. Archive event order, seeds, parameter history, and partial failures.

## A trace reveals whether the QPU is material

Instrument every span, preserve backend/calibration metadata, and report QPU contribution separately from end-to-end outcome.

Trace the full loop. What data moves from the classical system to the quantum device, in what format, at what cost? What is the end-to-end latency of one iteration, including the queue? Which classical optimizer or verifier closes the loop, and how many iterations does the method need? What hardware assumptions does the subroutine make, and how are outputs validated against ground truth or experiment?

Quantum processors operate as components in a broader classical compilation, control, execution, and post-processing stack. [full-stack-review] [qir-alliance-specification]

### Failure and retry semantics affect scientific validity

Differentiate a provider rejection before execution, a partial batch, lost network response, calibration invalidation, and a circuit completed with low-quality data. Retrying only failed circuits can change the temporal distribution of measurements; retrying an entire batch consumes cost and may mix calibration periods. The workflow policy should say which results are combined and how temporal drift is tested.

Idempotency matters. A client retry after a timeout must not silently execute and bill the same job twice unless that is the declared policy. Use stable request identifiers and store provider job IDs. If post-processing fails, preserve raw results so quantum work need not be repeated. A resumable workflow checkpoints the optimizer state, circuit set, target record, and accepted measurement data.

### Minimum performance report

Publish the dependency graph, complete trace, call formula, batch policy, target and software versions, raw timing spans, critical path, result-quality metric, and matched baseline. State which durations are observed, provider-reported, or synthetic. Include failed and retried jobs. With those fields, another engineer can distinguish a faster quantum kernel from a faster workflow and can rerun the batching decision when queue or target conditions change.

### Measure accelerator value at the workflow boundary

Begin with a typed kernel whose inputs, outputs, precision, and failure behavior are small enough to audit. A variational call, for example, receives parameters and a circuit/observable bundle, then returns estimates with shot counts, uncertainty, backend identity, and calibration context. The surrounding program owns parameter generation, grouping, optimizer state, convergence tests, checkpointing, and validation. Treating the kernel as a function prevents a notebook from hiding data preparation or classical work outside the reported runtime.

The timing model should reconstruct each iteration from queue wait, dispatch, compilation or cache lookup, upload, execution, measurement, return transfer, aggregation, and optimizer time. Concurrency changes the critical path: batches may amortize dispatch but delay feedback, and parallel jobs may compete for the same QPU or classical post-processing service. Report distributions and warm/cold behavior rather than one favorable trace.

Call volume follows the measurement plan. If \(G\) observable groups use \(S_g\) shots at each of \(P\) parameter points for \(I\) iterations, the acquisition record must conserve those submitted and completed shots, including retries and rejected results. Adaptive allocation changes the formula, so the trace should preserve the decision that assigned each additional shot. Network bytes and stored result volume can then be derived from actual payload schemas instead of guessed from qubit count.

The classical baseline receives the same input, objective, accuracy target, and wall-clock boundary. Include its preprocessing, tuning, hardware, stopping rule, and uncertainty. A hybrid workflow is favorable only on a buyer-relevant outcome—quality at time, energy, or cost—not because the QPU kernel is interesting in isolation. If classical verification dominates or the answer cannot be checked at the requested scale, that limitation belongs in the acceptance contract.

Finally, distinguish orchestration evidence from computational advantage. A successful trace proves that services exchange compatible data and that accounting closes. Repeated application results can establish reliability under the named operating window. Advantage requires a matched baseline and uncertainty strong enough to exclude ordinary engineering variation. These rungs let an HPC team improve integration without overstating what the quantum subroutine has demonstrated. Preserve failed, canceled, and retried spans as well as successful ones; deleting them understates service demand and can make queue or reliability improvements appear computational.

Claim-to-source ledger

Quantum processors operate as components in a broader classical compilation, control, execution, and post-processing stack. [full-stack-review] [qir-alliance-specification]

Quantum program benchmarks require end-to-end task and resource definitions rather than isolated device metrics. [benchmarking-2025]

NISQ-era hybrid and variational workflows depend on sampling, optimization, and hardware constraints whose costs must be included. [qiskit-docs] [vqe-2014]

A useful physical implementation must integrate control and measurement with the surrounding classical system. [openqasm3]

Current claims about quantum-centric supercomputing products or measured HPC integration require new primary system sources beyond the registered reviews. [full-stack-review] [benchmarking-2025]

### Hybrid workflow trace and batching simulator

Format: Synthetic OpenTelemetry-like spans plus a small timing/call-count model for CPU/GPU/QPU/storage/queue stages under batch-size and shot/iteration parameters.

Artifact acceptance contract
 | input | output | reject when

 | assumptions, units, source/date, workload | raw and derived values, uncertainty, command | units or comparison scope are missing
 | synthetic fixture labeled synthetic | deterministic record and PASS line | attributed to real hardware
 | named baseline | same task and denominator | metric or evidence class differs

```
def simulate(config):
    calls = config["iterations"] * ((config["groups"] + config["batch"] - 1) // config["batch"])
    completed_shots = config["iterations"] * config["groups"] * config["shots"]
    spans = {"queue":config["dispatch_s"] * calls, "batch_wait":config["batch_wait_s"] * (config["batch"] - 1) * config["iterations"], "qpu":config["shot_s"] * completed_shots, "classical":config["classical_s"]}
    return {"calls":calls, "shots":completed_shots, "bytes":completed_shots * config["bytes_per_result"], "spans":spans, "parents":{name:"workflow" for name in spans}, "total":sum(spans.values()), "task":(config["objective"], config["input_id"])}
config = {"iterations":20,"groups":4,"shots":1000,"batch":5,"dispatch_s":.2,"batch_wait_s":0.0,"shot_s":4e-6,"classical_s":1.8,"bytes_per_result":8,"objective":"energy-v1","input_id":"molecule-X"}
baseline = simulate(config)
unbatched = simulate({**config, "batch":1})
counterfactual = simulate({**config, "dispatch_s":.01, "batch_wait_s":.03})
counter_unbatched = simulate({**config, "batch":1, "dispatch_s":.01, "batch_wait_s":.03})
classical_baseline = {"task":("energy-v1","molecule-X"), "seconds":2.4}
assert baseline["calls"] == 20 and baseline["shots"] == 80000 and baseline["bytes"] == 640000
assert abs(baseline["total"] - 6.12) < 1e-12 and baseline["spans"]["qpu"] < baseline["total"]
assert baseline["total"] < unbatched["total"] and counterfactual["total"] > counter_unbatched["total"]
assert set(baseline["parents"].values()) == {"workflow"} and baseline["task"] == classical_baseline["task"]
print(f"PASS: 63 workflow evidence calls={baseline['calls']} total={baseline['total']:.2f}s qpu={baseline['spans']['qpu']:.2f}s batching_reversal={counterfactual['total']:.2f}>{counter_unbatched['total']:.2f}")
```

Verification: Span parentage reconstructs total time; calculator conserves call counts and data volume; baseline and hybrid paths share the same objective and input; no result reports QPU time as total time.

Commissioned exercise

Prompt: Instrument or model a 20-iteration hybrid loop with four observable groups, three shot budgets, and two batching strategies; compare with a declared classical-only path.

Deliverable: Trace JSON, timing/call/data table, end-to-end comparison, QPU fraction, and the condition under which the selected batch policy reverses.

Pass condition: All time terms and calls reconcile, the classical baseline solves the same task, sampling assumptions are explicit, and no orchestration result is labeled advantage.

Verifiable solution

Format: Reference synthetic spans and batching-sensitivity report.

Verification: Automated trace validator checks nesting, duration sums, call-count formulas, and equal task/input identifiers across baseline and hybrid runs.

Twenty iterations, four observable groups, and batch size five produce 20 QPU dispatches. Queueing contributes 4.00 seconds, QPU execution 0.32 seconds, and the classical path 1.80 seconds, totaling 6.12 seconds. The QPU fraction is 5.23%, so reporting only QPU time would reverse the system conclusion.

Limits and non-transfer conditions

A functioning hybrid loop establishes orchestration, not quantum advantage or buyer value. Quantum-kernel time, QPU access time, queue wait, classical optimizer time, and end-to-end time are separate measures and cannot be selectively reported. Trace spans are synthetic service events and demonstrate accounting, not speedup or production QPU availability.

External review

Open. Useful expertise: HPC performance engineer with accelerator integration experience; Quantum workflow/runtime architect.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

engineering dossier

### [Hybrid workflow trace and batching simulator](/playground/quantum/book/63-quantum-centric-supercomputing-and-hybrid-workflows/#artifact-63-quantum-centric-supercomputing-and-hybrid-workflows)

[Download fixture (.py)](/playground/quantum/artifacts/63-quantum-centric-supercomputing-and-hybrid-workflows/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/63-quantum-centric-supercomputing-and-hybrid-workflows/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [QIR Alliance. Quantum Intermediate Representation specification and projects. Linux Foundation Joint Development Foundation. 2026](https://www.qir-alliance.org/projects/) official technical specification

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Alberto Peruzzo et al.. A variational eigenvalue solver on a photonic quantum processor. Nature Communications. 2014](https://doi.org/10.1038/ncomms5213) primary paper

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=63-quantum-centric-supercomputing-and-hybrid-workflows#report)

Dependency graph

## Prerequisites for this chapter

- [Benchmarking Quantum Programs Part V. Practical Software · Chapter 42](/playground/quantum/book/42-benchmarking-quantum-programs/)

- [The Full Quantum Computer Stack Part VII. Hardware Architecture · Chapter 54](/playground/quantum/book/54-full-quantum-computer-stack/)

- [Variational Algorithms and Their Limits Part IV. Protocols and Algorithms · Chapter 35](/playground/quantum/book/35-variational-algorithms-and-their-limits/)

Continue the thread

## Next concepts from this chapter

- [What Makes a Problem Quantum-Suitable? Part VIII. Applications and Strategy · Chapter 64](/playground/quantum/book/64-what-makes-a-problem-quantum-suitable/)

- [Sensing, Navigation, and Adjacent Quantum Technologies Part VIII. Applications and Strategy · Chapter 70](/playground/quantum/book/70-sensing-navigation-and-adjacent-quantum-technologies/)

- [Cryogenics, Control, Packaging, and Manufacturing Part VII. Hardware Architecture · Chapter 62](/playground/quantum/book/62-cryogenics-control-packaging-and-manufacturing/)

[Previous Cryogenics, Control, Packaging, and Manufacturing](/playground/quantum/book/62-cryogenics-control-packaging-and-manufacturing/)[Next What Makes a Problem Quantum-Suitable?](/playground/quantum/book/64-what-makes-a-problem-quantum-suitable/)

In this chapter

- [Partition a workflow around a typed QPU kernel](#partition-a-workflow-around-a-typed-qpu-kernel)

- [Model the quantum device as a scheduled accelerator](#hybrid-critical-path)

- [Latency has queue, dispatch, execution, and return terms](#latency-has-queue-dispatch-execution-and-return-terms)

- [Count circuit calls from the estimator contract](#count-circuit-calls-from-the-estimator-contract)

- [Shots and optimizer iterations amplify traffic](#shots-and-optimizer-iterations-amplify-traffic)

- [Batching trades launch overhead against responsiveness](#batching-trades-launch-overhead-against-responsiveness)

- [Batching changes both utilization and feedback](#batching-changes-both-utilization-and-feedback)

- [Compilation and target state need cache semantics](#compilation-and-target-state-need-cache-semantics)

- [The classical baseline owns the whole workflow](#the-classical-baseline-owns-the-whole-workflow)

- [Classical compute can be on the critical path](#classical-compute-can-be-on-the-critical-path)

- [A trace reveals whether the QPU is material](#a-trace-reveals-whether-the-qpu-is-material)

- [Failure and retry semantics affect scientific validity](#failure-and-retry-semantics-affect-scientific-validity)

- [Minimum performance report](#hybrid-report-minimum)

- [Measure accelerator value at the workflow boundary](#measure-accelerator-value-at-the-workflow-boundary)

- [Hybrid workflow trace and batching simulator](#hybrid-workflow-trace-and-batching-simulator)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 6 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=63-quantum-centric-supercomputing-and-hybrid-workflows#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/63-quantum-centric-supercomputing-and-hybrid-workflows/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/64-what-makes-a-problem-quantum-suitable/ -->

# What Makes a Problem Quantum-Suitable?

Most proposed quantum use cases fail for reasons that have nothing to do with physics: the bottleneck is data loading, integration, or a classical method that is already excellent. This chapter gives you a screen to apply before anyone books a pilot.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

A workflow is quantum-suitable only when a quantum-accessible kernel, an explicit input model, a credible resource path, and an end-to-end advantage target survive comparison with the best classical operating baseline.

Suitability screening is a refusal to start with the attractive part. The screen begins in the operating system around the proposed calculation: who makes the decision, which records arrive, how soon an answer is useful, what error is tolerable, and what process already produces that answer. Only then is there a well-formed question about a quantum kernel.

[Figure 64.1.](#fig-64-what-makes-a-problem-quantum-suitable-1) A candidate enters at workflow definition. The aperture narrows at the classical baseline and resource account before integration is worth testing.

## Start at the decision boundary, not the algorithm

The four gates used here are structure, baseline, resources, and integration. Structure asks whether an identified kernel has a defensible quantum formulation. Baseline names the incumbent at equal task quality. Resources translate the method into qubits, operations, samples, and error assumptions. Integration follows data, validation, latency, security, and adoption to the owner’s outcome.

- Structure: name the quantum-accessible kernel and its input contract.

- Baseline: reproduce the incumbent at equal task quality.

- Resources: expose qubits, operations, samples, errors, and sensitivity.

- Integration: trace data, validation, latency, security, and ownership.

## The four-gate suitability dossier

Feynman and Lloyd establish why quantum simulation is structurally interesting; VQE and QAOA establish particular method families under stated contracts. They do not establish that an arbitrary enterprise workflow benefits. The National Academies and GAO provide dated system context, while the benchmarking review supplies the comparison discipline. OpenQASM is used only to make the circuit boundary inspectable.

What Makes a Problem Quantum-Suitable?: claim and source ledger, frozen 14 August 2026
 | Bounded claim | Supporting records

 | C-01: Suitability is an end-to-end systems property rather than a synonym for having a known quantum algorithm. | [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)
[National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (2019)](https://doi.org/10.17226/25196)
 | C-02: Simulation, search, and variational methods impose different input, oracle, sampling, and verification contracts. | [Richard P. Feynman, Simulating physics with computers (1982)](https://doi.org/10.1007/BF02650179)
[Seth Lloyd, Universal quantum simulators (1996)](https://doi.org/10.1126/science.273.5278.1073)
[Alberto Peruzzo et al., A variational eigenvalue solver on a photonic quantum processor (2014)](https://doi.org/10.1038/ncomms5213)
[Edward Farhi, Jeffrey Goldstone, and Sam Gutmann, A Quantum Approximate Optimization Algorithm (2014)](https://arxiv.org/abs/1411.4028)
 | C-03: Benchmark evidence must state task, scale, comparator, quality metric, and complete resource boundary. | [Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)
[OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)
 | C-04: A decision can remain monitor or reject even when the underlying quantum algorithm is mathematically sound. | [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)
[National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (2019)](https://doi.org/10.17226/25196)

## A screening record that can reject its own candidate

Consider a molecular-energy calculation proposed for catalyst screening. The research owner can name a target observable and a difficult active space, but the proposal supplies neither the selected classical solver nor a fault-tolerant resource estimate. It passes the structure gate and stops at the baseline and resource gates. A ten-qubit demonstration would test implementation competence; it would not repair either missing record. The artifact encodes that exact distinction.

Quantum-suitability gate record: inspected record
 | Gate | Record | Observed state | Decision effect

 | Structure | electronic-energy kernel | present | continue
 | Baseline | named solver and result | absent | stop
 | Resources | fault-tolerant sensitivity | absent | stop
 | Integration | laboratory validation owner | present | no repair of prior gaps

Artifact contract. A dated eight-field decision table plus executable gate evaluator. The evaluator rejects any case missing a workflow owner, baseline, metric, resource bound, validation route, or integration boundary.

```
REQUIRED = {"scenario": str, "source_ids": list, "workflow_owner": str,
            "baseline": str, "metric": dict, "resource_bound": dict,
            "validation_route": str, "integration_boundary": str, "gates": dict}
GATE_NAMES = {"structure", "input", "baseline", "metric", "resources", "integration"}
def evaluate(case):
    errors = [name for name, kind in REQUIRED.items()
              if name not in case or type(case[name]) is not kind]
    for name in ("metric", "resource_bound"):
        item = case.get(name, {})
        if type(item.get("value")) not in (int, float) or not item.get("unit"):
            errors.append(name + "_value_or_unit")
    if not case.get("source_ids") or set(case.get("gates", {})) != GATE_NAMES:
        errors.append("sources_or_gate_schema")
    if any(type(value) is not bool for value in case.get("gates", {}).values()):
        errors.append("gate_type")
    decision = "invalid" if errors else ("monitor" if all(case["gates"].values()) else "reject-now")
    return {"decision": decision, "errors": sorted(set(errors)),
            "failed_gates": sorted(k for k, value in case.get("gates", {}).items() if not value)}
case = {"scenario": "Fe-S screening case", "source_ids": ["feynman-1982", "benchmarking-2025"],
        "workflow_owner": "catalysis lead", "baseline": "selected-CI on identical active space",
        "metric": {"value": 1.6, "unit": "millihartree"},
        "resource_bound": {"value": 30, "unit": "logical-qubit-days"},
        "validation_route": "blind energy comparison", "integration_boundary": "candidate ranking only",
        "gates": {name: name != "resources" for name in GATE_NAMES}}
base_result = evaluate(case)
bad_case = {key: value for key, value in case.items() if key != "workflow_owner"}
bad_result = evaluate(bad_case)
repaired = {**case, "gates": {**case["gates"], "resources": True}}
repaired_result = evaluate(repaired)
assert base_result["decision"] == "reject-now" and base_result["failed_gates"] == ["resources"]
assert bad_result["decision"] == "invalid" and "workflow_owner" in bad_result["errors"]
assert repaired_result["decision"] == "monitor"
print(f"PASS: 64 suitability dossier base={base_result['decision']} missing={bad_result['errors']} repaired={repaired_result['decision']}")
```

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Convert the screen into a next action

The immediate action is a bounded baseline-and-resource study, not a hardware pilot. Its owner must reproduce the best classical result on the same active space, specify the observable tolerance, and produce a sensitivity table over logical error and state-preparation assumptions. A later pilot becomes rational only if that record exposes a consequential gap that available hardware can test.

## Test a candidate before funding a pilot

Prompt. Screen a candidate workflow using the four gates and cite the source for every empirical input.

Deliverable. A completed gate record, baseline contract, resource boundary, decision label, and reversal trigger.

Pass condition. Every gate is evidenced; a single zero blocks a build recommendation; the reversal trigger is measurable and dated.

## Model answer: a molecular-energy screen

Format. Completed molecular-energy screening record with a reject-now/monitor decision.

The molecular-energy candidate receives gates structure=true, baseline=false, resources=false, integration=true. The evaluator therefore returns reject-now. That label does not say quantum chemistry is useless; it says this organization has not supplied the two records needed to spend pilot money. If a named baseline and resource account are later attached, the proper change is monitor, with a dated experimental trigger rather than an immediate build.

Verification. Recomputing its six Boolean gates returns reject, and changing only the documented resource gate changes the result to monitor.

## Scope limits and evidence that would reverse the call

This gate model is intentionally conservative and Boolean. It can reject a worthwhile exploratory project whose purpose is basic research rather than operating value. It can also miss portfolio interactions, such as a small experiment that trains a team for an unrelated future task. Record those goals separately; do not smuggle them into an application-advantage claim.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck the named classical baseline, full-workflow resource model, and integration owner.

External review: Open. Useful expertise: Quantum algorithms researcher able to inspect oracle and input-model claims; HPC performance engineer able to audit complete workflow boundaries.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

evidence dossier

### [Quantum-suitability gate record](/playground/quantum/book/64-what-makes-a-problem-quantum-suitable/#artifact-64-what-makes-a-problem-quantum-suitable)

[Download fixture (.py)](/playground/quantum/artifacts/64-what-makes-a-problem-quantum-suitable/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/64-what-makes-a-problem-quantum-suitable/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [Richard P. Feynman. Simulating physics with computers. International Journal of Theoretical Physics. 1982](https://doi.org/10.1007/BF02650179) primary paper

- [Seth Lloyd. Universal quantum simulators. Science. 1996](https://doi.org/10.1126/science.273.5278.1073) primary paper

- [Alberto Peruzzo et al.. A variational eigenvalue solver on a photonic quantum processor. Nature Communications. 2014](https://doi.org/10.1038/ncomms5213) primary paper

- [Edward Farhi, Jeffrey Goldstone, and Sam Gutmann. A Quantum Approximate Optimization Algorithm. arXiv. 2014](https://arxiv.org/abs/1411.4028) primary preprint

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=64-what-makes-a-problem-quantum-suitable#report)

Dependency graph

## Prerequisites for this chapter

- [Benchmarking Quantum Programs Part V. Practical Software · Chapter 42](/playground/quantum/book/42-benchmarking-quantum-programs/)

- [Quantum-Centric Supercomputing and Hybrid Workflows Part VII. Hardware Architecture · Chapter 63](/playground/quantum/book/63-quantum-centric-supercomputing-and-hybrid-workflows/)

Continue the thread

## Next concepts from this chapter

- [Applications, Evidence, and Strategy Orientation guide](/playground/quantum/book/orientation-07-applications-evidence-and-strategy/)

- [Application Evidence Levels Part VIII. Applications and Strategy · Chapter 71](/playground/quantum/book/71-application-evidence-levels/)

- [When to Build, Partner, Wait, or Avoid Part VIII. Applications and Strategy · Chapter 72](/playground/quantum/book/72-when-to-build-partner-wait-or-avoid/)

[Previous Quantum-Centric Supercomputing and Hybrid Workflows](/playground/quantum/book/63-quantum-centric-supercomputing-and-hybrid-workflows/)[Next Quantum Simulation and Chemistry](/playground/quantum/book/65-quantum-simulation-and-chemistry/)

In this chapter

- [Start at the decision boundary, not the algorithm](#section-64-what-makes-a-problem-quantum-suitable-1)

- [The four-gate suitability dossier](#section-64-what-makes-a-problem-quantum-suitable-2)

- [A screening record that can reject its own candidate](#section-64-what-makes-a-problem-quantum-suitable-3)

- [Convert the screen into a next action](#section-64-what-makes-a-problem-quantum-suitable-4)

- [Test a candidate before funding a pilot](#section-64-what-makes-a-problem-quantum-suitable-5)

- [Model answer: a molecular-energy screen](#section-64-what-makes-a-problem-quantum-suitable-6)

- [Scope limits and evidence that would reverse the call](#section-64-what-makes-a-problem-quantum-suitable-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=64-what-makes-a-problem-quantum-suitable#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/64-what-makes-a-problem-quantum-suitable/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/65-quantum-simulation-and-chemistry/ -->

# Quantum Simulation and Chemistry

Chemistry is the application quantum computing was born for: molecules are quantum systems, and classical computers spend enormous effort approximating them. This chapter teaches you to separate that genuine structural fit from the resource estimates that decide when it pays.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Quantum simulation is most credible when the target is an explicitly encoded electronic-structure quantity whose active space defeats a named classical method, while state preparation, precision, fault tolerance, and experimental validation remain inside the project budget.

Chemistry is a chain of approximations and measurements, not one giant matrix waiting for a quantum processor. An industrial calculation usually sits between molecular geometry, basis and active-space choices, Hamiltonian construction, an energy or property estimator, error analysis, and a laboratory decision. Each stage can dominate the value of a more accurate electronic-energy estimate.

## Locate the electronic-structure bottleneck

The governing quantity is an observable with a tolerance and a chemical decision attached. For a qubit Hamiltonian authored as retained TeX, \(H=\sum_j h_j P_j\), every coefficient has an energy unit, every Pauli string follows a declared qubit order, and the estimator must state its sampling and state-preparation assumptions. Logical-qubit count alone is not a resource estimate.

[Figure 65.1.](#fig-65-quantum-simulation-and-chemistry-1) The qubit register sits in the middle of the chemistry workflow. Orbital choice and laboratory validation bound what an energy estimate can mean.

## From molecular orbitals to a measured observable

Feynman and Lloyd support the simulation rationale. Peruzzo and collaborators supply the original VQE experiment; the chemistry review explains the larger electronic-structure context. Official documentation and OpenQASM define inspectable software and circuit boundaries. None of these sources supplies the missing molecule-specific active-space or laboratory validation decision for a new proposal.

Quantum Simulation and Chemistry: claim and source ledger, frozen 14 August 2026
 | Evidence ID | Records | Claim supported

 | E-65-1 | [Richard P. Feynman, Simulating physics with computers (1982)](https://doi.org/10.1007/BF02650179)
[Seth Lloyd, Universal quantum simulators (1996)](https://doi.org/10.1126/science.273.5278.1073) | Quantum simulation was proposed because generic quantum systems resist efficient generic classical simulation.
 | E-65-2 | [Yudong Cao et al., Quantum Chemistry in the Age of Quantum Computing (2019)](https://doi.org/10.1021/acs.chemrev.8b00803)
[OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)
[IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides) | Electronic-structure workflows require an encoding, Hamiltonian construction, state-preparation method, estimator, and validation plan.
 | E-65-3 | [Alberto Peruzzo et al., A variational eigenvalue solver on a photonic quantum processor (2014)](https://doi.org/10.1038/ncomms5213) | The original VQE demonstration established a hybrid variational procedure on a small photonic experiment, not industrial chemical advantage.
 | E-65-4 | [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)
[National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (2019)](https://doi.org/10.17226/25196)
[Yudong Cao et al., Quantum Chemistry in the Age of Quantum Computing (2019)](https://doi.org/10.1021/acs.chemrev.8b00803) | Chemistry relevance depends on total resources and error, not logical circuit elegance alone.

## Active-space ledger for an Fe–S model

The record below uses a schematic iron–sulfur active space: 12 spatial orbitals produce 24 spin orbitals before tapering or other reduction. The requested energy tolerance is 1.6 millihartree, explicitly a project choice rather than a universal promise. The table leaves the Hamiltonian-term count and fault-tolerant cost as measured inputs. This prevents a small logical register from being read as evidence of a cheap computation.

Artifact contract. A units-bearing orbital/qubit/term/shot/precision table with executable consistency checks. Spin-orbital and qubit counts reconcile; energy units are explicit; the requested precision and validation observable are present; the artifact refuses a value claim without a classical comparator.

** Executable reference fixture**

```
REQUIRED = {"scenario": str, "source_ids": list, "spatial_orbitals": int,
            "spin_orbitals": int, "qubits": int, "tolerance": dict,
            "validation_observable": str, "baseline": str}
def audit(record, maximum_tolerance_millihartree):
    errors = [name for name, kind in REQUIRED.items()
              if name not in record or type(record[name]) is not kind]
    tolerance = record.get("tolerance", {})
    if type(tolerance.get("value")) not in (int, float) or tolerance.get("unit") != "millihartree":
        errors.append("tolerance_value_or_unit")
    if record.get("spin_orbitals") != 2 * record.get("spatial_orbitals", -1):
        errors.append("spin_orbital_mapping")
    if record.get("qubits") != record.get("spin_orbitals"):
        errors.append("qubit_mapping")
    if not record.get("source_ids") or not record.get("baseline"):
        errors.append("source_or_baseline")
    ready = not errors and tolerance["value"] <= maximum_tolerance_millihartree
    return {"decision": "validation-ready" if ready else "revise-proposal",
            "errors": sorted(set(errors)), "tolerance_millihartree": tolerance.get("value")}
record = {"scenario": "Fe-S active-space audit", "source_ids": ["quantum-chemistry-review"],
          "spatial_orbitals": 12, "spin_orbitals": 24, "qubits": 24,
          "tolerance": {"value": 1.6, "unit": "millihartree"},
          "validation_observable": "ground-state energy at fixed geometry",
          "baseline": "selected-CI, same geometry and basis"}
base_result = audit(record, 2.0)
missing_baseline = {key: value for key, value in record.items() if key != "baseline"}
bad_result = audit(missing_baseline, 2.0)
sensitive_result = audit(record, 1.0)
assert base_result["decision"] == "validation-ready"
assert bad_result["decision"] == "revise-proposal" and "baseline" in bad_result["errors"]
assert sensitive_result["decision"] == "revise-proposal"
print(f"PASS: 65 active-space dossier qubits={record['qubits']} tolerance={base_result['tolerance_millihartree']} missing={bad_result['errors']} strict={sensitive_result['decision']}")
```

Active-space resource and validation ledger: inspected record
 | Quantity | Value | Unit or convention | Status

 | Spatial orbitals | 12 | selected active space | declared
 | Spin orbitals | 24 | two per spatial orbital | checked
 | Energy tolerance | 1.6 | millihartree | project target
 | Classical comparator | selected-CI calculation | same geometry and basis | required

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Validation before claimed chemical value

A useful chemistry program funds the weakest link. If active-space truncation dominates error, buy better classical embedding and validation before deeper circuits. If state preparation dominates, compare ansätze and overlap evidence. If measurement or logical synthesis dominates, build the resource estimate. The laboratory owner should define what energy or property change would alter the candidate list before the compute team chooses precision.

## Audit an energy-estimation proposal

Prompt. Audit a proposed ground-state energy calculation from orbital selection through validation.

Deliverable. An active-space table, Hamiltonian-term count, precision target, named classical baseline, and validation measurement.

Pass condition. Counts and units reconcile, chemical accuracy is not asserted without a definition, and the recommendation follows the limiting resource rather than the smallest circuit.

## Model answer: why a toy VQE run does not close the case

Format. Annotated Fe–S active-space audit with a resource-limited conclusion.

The reference audit accepts the orbital mapping because 12 spatial orbitals map to 24 spin orbitals under the declared convention. It withholds a value conclusion: the best classical comparator is named, but the term count and physical resource translation remain project inputs. The recommendation is to preserve the scientific option while commissioning those two measurements, not to call the 24-qubit logical description application readiness.

Verification. The supplied fixture checks the spin-orbital mapping and rejects any row whose energy tolerance lacks units or whose baseline is absent.

## Chemistry boundaries, counterevidence, and refresh date

Active-space examples do not generalize across molecules, geometries, basis sets, or target properties. Chemical accuracy is property- and decision-dependent, and a ground-state energy may not be the laboratory bottleneck. Any current hardware, runtime, or software statement must be refreshed; the derivation and original papers remain stable, but their engineering context does not.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck active-space choices, chemistry software interfaces, estimator costs, and validation data.

External review: Open. Useful expertise: Quantum computational chemist familiar with active-space selection and correlation methods; Fault-tolerant resource-estimation specialist.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

evidence dossier

### [Active-space resource and validation ledger](/playground/quantum/book/65-quantum-simulation-and-chemistry/#artifact-65-quantum-simulation-and-chemistry)

[Download fixture (.py)](/playground/quantum/artifacts/65-quantum-simulation-and-chemistry/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/65-quantum-simulation-and-chemistry/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Richard P. Feynman. Simulating physics with computers. International Journal of Theoretical Physics. 1982](https://doi.org/10.1007/BF02650179) primary paper

- [Seth Lloyd. Universal quantum simulators. Science. 1996](https://doi.org/10.1126/science.273.5278.1073) primary paper

- [Alberto Peruzzo et al.. A variational eigenvalue solver on a photonic quantum processor. Nature Communications. 2014](https://doi.org/10.1038/ncomms5213) primary paper

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Yudong Cao et al.. Quantum Chemistry in the Age of Quantum Computing. Chemical Reviews. 2019](https://doi.org/10.1021/acs.chemrev.8b00803) peer-reviewed review

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=65-quantum-simulation-and-chemistry#report)

Dependency graph

## Prerequisites for this chapter

- [Hamiltonian Simulation Part IV. Protocols and Algorithms · Chapter 34](/playground/quantum/book/34-hamiltonian-simulation/)

- [Resource Estimation for Fault-Tolerant Algorithms Part V. Practical Software · Chapter 43](/playground/quantum/book/43-resource-estimation-for-fault-tolerant-algorithms/)

Continue the thread

## Next concepts from this chapter

- [Materials, Energy, and Industrial Science Part VIII. Applications and Strategy · Chapter 66](/playground/quantum/book/66-materials-energy-and-industrial-science/)

- [What Makes a Problem Quantum-Suitable? Part VIII. Applications and Strategy · Chapter 64](/playground/quantum/book/64-what-makes-a-problem-quantum-suitable/)

- [Optimization: Where Caution Is Required Part VIII. Applications and Strategy · Chapter 67](/playground/quantum/book/67-optimization-where-caution-is-required/)

[Previous What Makes a Problem Quantum-Suitable?](/playground/quantum/book/64-what-makes-a-problem-quantum-suitable/)[Next Materials, Energy, and Industrial Science](/playground/quantum/book/66-materials-energy-and-industrial-science/)

In this chapter

- [Locate the electronic-structure bottleneck](#section-65-quantum-simulation-and-chemistry-1)

- [From molecular orbitals to a measured observable](#section-65-quantum-simulation-and-chemistry-2)

- [Active-space ledger for an Fe–S model](#section-65-quantum-simulation-and-chemistry-3)

- [Validation before claimed chemical value](#section-65-quantum-simulation-and-chemistry-4)

- [Audit an energy-estimation proposal](#section-65-quantum-simulation-and-chemistry-5)

- [Model answer: why a toy VQE run does not close the case](#section-65-quantum-simulation-and-chemistry-6)

- [Chemistry boundaries, counterevidence, and refresh date](#section-65-quantum-simulation-and-chemistry-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=65-quantum-simulation-and-chemistry#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/65-quantum-simulation-and-chemistry/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/66-materials-energy-and-industrial-science/ -->

# Materials, Energy, and Industrial Science

Batteries, catalysts, and corrosion cost industry real money, and simulation already shapes how they are designed. This chapter shows how to tell whether a quantum method can improve a specific industrial workflow — and how to write the memo that proves it.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Separate the material property, computational kernel, laboratory decision, and economic outcome; then demand a dated chain from Hamiltonian or optimization instance to a validated measurement against the laboratory’s strongest classical and experimental baseline.

A materials program can fail while every calculation in it is correct. The computed property may not control synthesis; synthesis may not produce the phase modeled; a measured improvement may disappear in a full cell; or the cell may lose on yield, safety, or cost. The evidence object is therefore a claim chain, not a quantum benchmark.

## Follow one decision through the materials pipeline

[Figure 66.1.](#fig-66-materials-energy-and-industrial-science-1) The open link is the cycling experiment. A computed property cannot jump across it to a pack-level outcome.

Five typed links keep the chain honest: target property, physical model, computational result, laboratory observation, and operating outcome. Each link has a different owner and error source. The computed-energy link can cite quantum algorithms; the laboratory and operating links require measurements from the actual program. Leaving them blank is more informative than filling them with an inference.

## Evidence table: property, computation, experiment, outcome

Materials, Energy, and Industrial Science: claim and source ledger, frozen 14 August 2026
 | Claim under review | Source chain

 | Quantum simulation can represent quantum dynamics, but representation alone does not establish a useful materials workflow. |

- [Richard P. Feynman, Simulating physics with computers (1982)](https://doi.org/10.1007/BF02650179)

- [Seth Lloyd, Universal quantum simulators (1996)](https://doi.org/10.1126/science.273.5278.1073)

 | Electronic-structure opportunity is concentrated where classical approximations or active-space treatments are demonstrably limiting. |

- [Yudong Cao et al., Quantum Chemistry in the Age of Quantum Computing (2019)](https://doi.org/10.1021/acs.chemrev.8b00803)

- [Alberto Peruzzo et al., A variational eigenvalue solver on a photonic quantum processor (2014)](https://doi.org/10.1038/ncomms5213)

 | Variational and optimization demonstrations must account for sampling, noise, and instance-specific classical competition. |

- [Alberto Peruzzo et al., A variational eigenvalue solver on a photonic quantum processor (2014)](https://doi.org/10.1038/ncomms5213)

- [Edward Farhi, Jeffrey Goldstone, and Sam Gutmann, A Quantum Approximate Optimization Algorithm (2014)](https://arxiv.org/abs/1411.4028)

- [OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)

 | Public technology assessments distinguish research promise from demonstrated operational advantage. |

- [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)

- [National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (2019)](https://doi.org/10.17226/25196)

The simulation papers justify modeling quantum systems with quantum dynamics, and the chemistry review identifies electronic-structure bottlenecks. VQE and QAOA show method families, while GAO and the National Academies delimit what had been demonstrated. The resulting record makes no dated commercial claim about batteries or catalysts; it shows what such a claim would have to contain.

## Battery-cathode claim ledger with missing links exposed

Materials claim-chain audit: inspected record
 | Claim link | Illustrative record | Unit | Evidence state

 | Target property | intercalation voltage | volt | defined
 | Computed change | +0.12 | volt | model output
 | Cycling validation | representative protocol | cycles | missing
 | Pack outcome | energy density and yield | Wh/kg and percent | blocked

The cathode illustration begins with a calculated voltage change of 0.12 volts for a candidate phase. That row is a model output. It does not establish that the phase can be synthesized, that the voltage survives cycling, or that pack-level energy density improves. The artifact marks the missing cycling experiment and blocks the product outcome even though the computational row has a source and unit.

```
STAGES = ("target_property", "computed_result", "synthesized_phase",
          "cycling_validation", "operating_outcome")
def inspect_chain(dossier, minimum_cycles):
    errors = []
    if type(dossier.get("scenario")) is not str or not dossier.get("source_ids"):
        errors.append("scenario_or_sources")
    links = dossier.get("links", {})
    for stage in STAGES:
        row = links.get(stage)
        if type(row) is not dict or type(row.get("evidenced")) is not bool:
            errors.append(stage + "_schema")
        elif type(row.get("value")) in (int, float) and not row.get("unit"):
            errors.append(stage + "_unit")
    if not dossier.get("classical_baseline"):
        errors.append("classical_baseline")
    first_gap = next((stage for stage in STAGES if not links.get(stage, {}).get("evidenced")), None)
    cycles = links.get("cycling_validation", {}).get("value", 0)
    decision = "invalid" if errors else (
        "product-test" if first_gap is None and cycles >= minimum_cycles else "scientific-option")
    return {"decision": decision, "errors": sorted(set(errors)),
            "first_gap": first_gap, "validated_cycles": cycles}
dossier = {"scenario": "layered cathode claim chain", "source_ids": ["quantum-chemistry-review"],
           "classical_baseline": "DFT plus measured incumbent cathode",
           "links": {
               "target_property": {"evidenced": True, "value": 220, "unit": "mAh/g"},
               "computed_result": {"evidenced": True, "value": 0.18, "unit": "eV"},
               "synthesized_phase": {"evidenced": True, "value": 1, "unit": "sample"},
               "cycling_validation": {"evidenced": False, "value": 0, "unit": "cycles"},
               "operating_outcome": {"evidenced": False, "value": 0, "unit": "pack tests"}}}
base_result = inspect_chain(dossier, 100)
bad = {**dossier, "links": {**dossier["links"],
       "computed_result": {"evidenced": True, "value": 0.18, "unit": ""}}}
bad_result = inspect_chain(bad, 100)
validated = {**dossier, "links": {name: {**row, "evidenced": True,
             "value": 120 if name == "cycling_validation" else row["value"]}
             for name, row in dossier["links"].items()}}
validated_result = inspect_chain(validated, 100)
assert base_result["first_gap"] == "cycling_validation" and base_result["decision"] == "scientific-option"
assert bad_result["decision"] == "invalid" and "computed_result_unit" in bad_result["errors"]
assert validated_result["decision"] == "product-test"
print(f"PASS: 66 materials chain gap={base_result['first_gap']} invalid={bad_result['errors']} validated={validated_result['validated_cycles']}cycles decision={validated_result['decision']}")
```

Artifact contract. A dated claim graph and executable completeness test spanning property, model, computation, experiment, and operating value. Each outcome has a path to measured evidence; the test flags skipped laboratory validation, missing units, and comparisons against an unnamed classical method.

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Price the loop around the quantum kernel

The next dollar belongs to the first missing causal link: synthesize and characterize the phase under a frozen protocol. If that experiment fails, more quantum precision has no decision value. If it passes, the program advances to cell measurements against the incumbent chemistry. This order also produces useful negative evidence, which a polished materials narrative often suppresses.

## Stress-test an industrial-science proposal

Prompt. Trace one materials-discovery claim from a target property to the operating decision it is supposed to improve.

Deliverable. A five-link claim graph, dated evidence table, classical and experimental baselines, and one stop condition.

Pass condition. No link is inferred from the next; every numerical property has units; the recommendation becomes no stronger than the weakest evidenced link.

## Model answer: keep the scientific option, decline the product claim

Format. Battery-cathode claim chain with laboratory validation left open.

The model answer keeps the electronic-structure hypothesis alive and rejects the pack-level claim. Four of five links are present only after the cycling row is added; until then the executable graph reports the precise missing edge. The decision is a bounded laboratory experiment with a stop condition: no phase confirmation or no repeatable cycling improvement ends the candidate, irrespective of computed energy accuracy.

Verification. The graph validator reports the precise missing experiment and keeps the product-outcome state false until that record is added.

## Industrial evidence limits and the November review gate

The chain is a causal bookkeeping device, not proof that each observed association is causal. Materials experiments need replication, uncertainty, and controls beyond these fields. The illustrative values are explicitly schematic and must never appear as vendor or product measurements. A real dossier replaces every row with project data and primary laboratory records.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck materials experiments, laboratory protocols, and every link between computed property and operating outcome.

External review: Open. Useful expertise: Computational materials scientist with electronic-structure experience; Industrial R&D program lead able to assess laboratory and deployment gates.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

evidence dossier

### [Materials claim-chain audit](/playground/quantum/book/66-materials-energy-and-industrial-science/#artifact-66-materials-energy-and-industrial-science)

[Download fixture (.py)](/playground/quantum/artifacts/66-materials-energy-and-industrial-science/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/66-materials-energy-and-industrial-science/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Richard P. Feynman. Simulating physics with computers. International Journal of Theoretical Physics. 1982](https://doi.org/10.1007/BF02650179) primary paper

- [Seth Lloyd. Universal quantum simulators. Science. 1996](https://doi.org/10.1126/science.273.5278.1073) primary paper

- [Alberto Peruzzo et al.. A variational eigenvalue solver on a photonic quantum processor. Nature Communications. 2014](https://doi.org/10.1038/ncomms5213) primary paper

- [Edward Farhi, Jeffrey Goldstone, and Sam Gutmann. A Quantum Approximate Optimization Algorithm. arXiv. 2014](https://arxiv.org/abs/1411.4028) primary preprint

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [Yudong Cao et al.. Quantum Chemistry in the Age of Quantum Computing. Chemical Reviews. 2019](https://doi.org/10.1021/acs.chemrev.8b00803) peer-reviewed review

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=66-materials-energy-and-industrial-science#report)

Dependency graph

## Prerequisites for this chapter

- [Quantum Simulation and Chemistry Part VIII. Applications and Strategy · Chapter 65](/playground/quantum/book/65-quantum-simulation-and-chemistry/)

- [Benchmarking Quantum Programs Part V. Practical Software · Chapter 42](/playground/quantum/book/42-benchmarking-quantum-programs/)

Continue the thread

## Next concepts from this chapter

- [Optimization: Where Caution Is Required Part VIII. Applications and Strategy · Chapter 67](/playground/quantum/book/67-optimization-where-caution-is-required/)

- [What Makes a Problem Quantum-Suitable? Part VIII. Applications and Strategy · Chapter 64](/playground/quantum/book/64-what-makes-a-problem-quantum-suitable/)

- [Cryptography, PQC, QKD, and Security Migration Part VIII. Applications and Strategy · Chapter 68](/playground/quantum/book/68-cryptography-pqc-qkd-and-security-migration/)

[Previous Quantum Simulation and Chemistry](/playground/quantum/book/65-quantum-simulation-and-chemistry/)[Next Optimization: Where Caution Is Required](/playground/quantum/book/67-optimization-where-caution-is-required/)

In this chapter

- [Follow one decision through the materials pipeline](#section-66-materials-energy-and-industrial-science-1)

- [Evidence table: property, computation, experiment, outcome](#section-66-materials-energy-and-industrial-science-2)

- [Battery-cathode claim ledger with missing links exposed](#section-66-materials-energy-and-industrial-science-3)

- [Price the loop around the quantum kernel](#section-66-materials-energy-and-industrial-science-4)

- [Stress-test an industrial-science proposal](#section-66-materials-energy-and-industrial-science-5)

- [Model answer: keep the scientific option, decline the product claim](#section-66-materials-energy-and-industrial-science-6)

- [Industrial evidence limits and the November review gate](#section-66-materials-energy-and-industrial-science-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=66-materials-energy-and-industrial-science#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/66-materials-energy-and-industrial-science/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/67-optimization-where-caution-is-required/ -->

# Optimization: Where Caution Is Required

Optimization is where quantum ambition meets its strongest opponent: decades of tuned classical heuristics. This chapter gives you the checks that separate a real quantum advantage from a benchmark that was rigged by accident.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

A credible optimization result fixes the instance distribution, constraint semantics, quality-time-cost objective, strongest tuned classical comparator, parameter and shot budget, and held-out evaluation before the quantum result is inspected.

Optimization comparisons are unusually easy to bias because a solver can look strong by changing the instance mix, feasibility rule, tuning budget, time boundary, or reported statistic. The protocol must be frozen before the test set is opened. Otherwise the experiment measures the research team’s ability to select favorable cases.

## Write the optimization contest before choosing a solver

The contest uses paired instances and a lexicographic outcome: feasibility first, then objective quality at a declared time or cost. Both solvers receive equivalent preprocessing information and a recorded tuning budget. Quantum shots, queue time, parameter search, and post-processing belong inside the quantum entry; classical presolve and tuning belong inside the comparator entry.

** Objective** : The quantity actually scored, including penalties.

** Feasibility** : The constraint test applied to every returned sample.

** Comparator** : A named, tuned classical method under the same time and quality budget.

** Uncertainty** : Intervals over seeds, instances, and quantum sampling.

[Figure 67.1.](#fig-67-optimization-where-caution-is-required-1) The two solvers run on the same frozen instances. Feasibility is checked before objective value, so an invalid low cost remains a loss.

## Benchmark protocol for quality, time, and feasibility

QAOA supplies a particular variational algorithm, Grover supplies an oracle-model query result, and the polynomial lower-bound paper shows why the access model matters. The NISQ review and benchmarking perspective explain the extra experimental boundaries. None supports deleting failed or infeasible instances from an application comparison.

Optimization: Where Caution Is Required: claim and source ledger, frozen 14 August 2026
 | No. | Claim | Evidence

 | 1 | QAOA defines a variational quantum method for combinatorial objectives but does not by itself establish practical superiority. | [Edward Farhi, Jeffrey Goldstone, and Sam Gutmann, A Quantum Approximate Optimization Algorithm (2014)](https://arxiv.org/abs/1411.4028)
[Kishor Bharti et al., Noisy intermediate-scale quantum algorithms (2022)](https://doi.org/10.1103/RevModPhys.94.015004)
 | 2 | Unstructured-search speedups do not transfer automatically to structured optimization workflows. | [Lov K. Grover, A fast quantum mechanical algorithm for database search (1996)](https://doi.org/10.1145/237814.237866)
[Robert Beals, Harry Buhrman, Richard Cleve, Michele Mosca, and Ronald de Wolf, Quantum lower bounds by polynomials (2001)](https://doi.org/10.1145/502090.502097)
 | 3 | Lower-bound and query results depend on a declared oracle model that may omit data and implementation costs. | [Robert Beals, Harry Buhrman, Richard Cleve, Michele Mosca, and Ronald de Wolf, Quantum lower bounds by polynomials (2001)](https://doi.org/10.1145/502090.502097)
[OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)
[IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides)
 | 4 | Program benchmarks need controlled comparators and complete cost accounting. | [Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)
[U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)

## Held-out routing instances reveal selection bias

```
ROW_FIELDS = {"instance": str, "classical_cost": int, "quantum_cost": int,
              "cost_unit": str, "quantum_feasible": bool}
def score_benchmark(card, win_threshold):
    errors = []
    if card.get("scenario") != "held-out routing benchmark" or not card.get("source_ids"):
        errors.append("scenario_or_sources")
    if type(card.get("test_frozen")) is not bool or type(card.get("tuning_minutes")) is not int:
        errors.append("freeze_or_tuning_type")
    if card.get("tuning_unit") != "minutes" or not card.get("test_frozen"):
        errors.append("freeze_or_tuning_unit")
    winners = []
    for row in card.get("rows", []):
        missing = [name for name, kind in ROW_FIELDS.items()
                   if name not in row or type(row[name]) is not kind]
        if missing or row.get("cost_unit") != "route-cost units":
            errors.append(row.get("instance", "row") + "_schema")
            continue
        winners.append("quantum" if row["quantum_feasible"] and
                       row["quantum_cost"] < row["classical_cost"] else "classical")
    wins = winners.count("quantum")
    decision = "invalid" if errors else ("retest" if wins >= win_threshold else "no-advantage")
    return {"decision": decision, "errors": sorted(set(errors)), "winners": winners,
            "quantum_wins": wins, "reported_tuning_minutes": card.get("tuning_minutes")}
card = {"scenario": "held-out routing benchmark", "source_ids": ["benchmarking-2025"],
        "test_frozen": True, "tuning_minutes": 47, "tuning_unit": "minutes",
        "rows": [{"instance": "route-a", "classical_cost": 101, "quantum_cost": 99,
                  "cost_unit": "route-cost units", "quantum_feasible": True},
                 {"instance": "route-b", "classical_cost": 108, "quantum_cost": 106,
                  "cost_unit": "route-cost units", "quantum_feasible": False},
                 {"instance": "route-c", "classical_cost": 95, "quantum_cost": 98,
                  "cost_unit": "route-cost units", "quantum_feasible": True}]}
base_result = score_benchmark(card, 2)
bad = {**card, "rows": [{key: value for key, value in card["rows"][0].items()
        if key != "quantum_feasible"}, *card["rows"][1:]]}
bad_result = score_benchmark(bad, 2)
improved = {**card, "rows": [*card["rows"][:2], {**card["rows"][2], "quantum_cost": 94}]}
improved_result = score_benchmark(improved, 2)
assert base_result["winners"] == ["quantum", "classical", "classical"]
assert bad_result["decision"] == "invalid" and "route-a_schema" in bad_result["errors"]
assert improved_result["decision"] == "retest" and improved_result["quantum_wins"] == 2
print(f"PASS: 67 benchmark base_wins={base_result['quantum_wins']} invalid={bad_result['errors']} counterfactual={improved_result['decision']} tuning={base_result['reported_tuning_minutes']}min")
```

In the paired routing record, the quantum candidate wins objective value on two instances but returns one infeasible route. Under the pre-registered rule that result is a loss, not a row to omit. The classical heuristic wins two of three paired decisions. A best-run plot could tell the opposite story; the full table cannot.

Artifact contract. A dated instance split, comparator contract, feasibility metric, and executable paired-result evaluator. The evaluator rejects infeasible solutions, computes paired wins without dropping losses, and prevents test-set tuning.

Pre-registered optimization benchmark: inspected record
 | Instance | Classical cost | Quantum cost | Quantum feasible | Paired winner

 | route-a | 101 | 99 | yes | quantum
 | route-b | 108 | 106 | no | classical
 | route-c | 95 | 98 | yes | classical

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Sampling and tuning belong in the resource account

The appropriate response is to preserve the benchmark and improve the candidate without touching the held-out set. A new algorithm or tuning policy gets a new registered run, including all costs. Reopening the instance set after seeing losses creates a new experiment and must be labeled as such. This discipline is more valuable than a premature advantage label.

## Design a comparator that can win

Prompt. Pre-register a 20-instance benchmark for a constrained routing or scheduling task.

Deliverable. Train/test split, feasibility rule, quality-time metric, tuned classical comparator, shot and tuning budget, and paired decision rule.

Pass condition. The test set remains untouched until freeze, infeasible answers cannot win on objective value, and all solver tuning time enters the reported cost.

## Model answer: no advantage on the declared routing set

Format. Reference paired benchmark in which the classical heuristic wins the declared end-to-end metric.

The model answer reports zero infeasible classical solutions, one infeasible quantum solution, and a 2–1 paired win for the classical baseline. It states that three instances are too few for a general performance claim. The output supports a narrow engineering conclusion: this candidate did not beat the declared comparator on the frozen set. It says nothing about every QAOA variant or every routing distribution.

Verification. The executable fixture retains every registered instance, verifies feasibility before scoring, and reproduces the decision from the table.

## Optimization caveats and evidence that would reopen the test

Paired wins discard magnitude and can understate a large quality difference; a serious experiment adds confidence intervals and distributional analysis. Solver budgets can also be incomparable when hardware access is scarce or queueing dominates. Preserve the raw outcomes and run sensitivity analyses rather than replacing the protocol after inspection.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck solver baselines, instance distributions, feasibility rules, and quantum sampling costs.

External review: Open. Useful expertise: Combinatorial-optimization researcher experienced with modern heuristics; Experimental quantum-algorithms researcher familiar with variational benchmark leakage.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

evidence dossier

### [Pre-registered optimization benchmark](/playground/quantum/book/67-optimization-where-caution-is-required/#artifact-67-optimization-where-caution-is-required)

[Download fixture (.py)](/playground/quantum/artifacts/67-optimization-where-caution-is-required/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/67-optimization-where-caution-is-required/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Edward Farhi, Jeffrey Goldstone, and Sam Gutmann. A Quantum Approximate Optimization Algorithm. arXiv. 2014](https://arxiv.org/abs/1411.4028) primary preprint

- [Lov K. Grover. A fast quantum mechanical algorithm for database search. Proceedings of STOC. 1996](https://doi.org/10.1145/237814.237866) primary paper

- [Robert Beals, Harry Buhrman, Richard Cleve, Michele Mosca, and Ronald de Wolf. Quantum lower bounds by polynomials. Journal of the ACM. 2001](https://doi.org/10.1145/502090.502097) primary paper

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

- [Kishor Bharti et al.. Noisy intermediate-scale quantum algorithms. Reviews of Modern Physics. 2022](https://doi.org/10.1103/RevModPhys.94.015004) peer-reviewed review

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=67-optimization-where-caution-is-required#report)

Dependency graph

## Prerequisites for this chapter

- [Grover and Amplitude Amplification Part IV. Protocols and Algorithms · Chapter 30](/playground/quantum/book/30-grover-and-amplitude-amplification/)

- [Variational Algorithms and Their Limits Part IV. Protocols and Algorithms · Chapter 35](/playground/quantum/book/35-variational-algorithms-and-their-limits/)

- [Benchmarking Quantum Programs Part V. Practical Software · Chapter 42](/playground/quantum/book/42-benchmarking-quantum-programs/)

Continue the thread

## Next concepts from this chapter

- [Application-Company Diligence Part IX. Company and Investing · Chapter 77](/playground/quantum/book/77-application-company-diligence/)

- [Materials, Energy, and Industrial Science Part VIII. Applications and Strategy · Chapter 66](/playground/quantum/book/66-materials-energy-and-industrial-science/)

- [Cryptography, PQC, QKD, and Security Migration Part VIII. Applications and Strategy · Chapter 68](/playground/quantum/book/68-cryptography-pqc-qkd-and-security-migration/)

[Previous Materials, Energy, and Industrial Science](/playground/quantum/book/66-materials-energy-and-industrial-science/)[Next Cryptography, PQC, QKD, and Security Migration](/playground/quantum/book/68-cryptography-pqc-qkd-and-security-migration/)

In this chapter

- [Write the optimization contest before choosing a solver](#section-67-optimization-where-caution-is-required-1)

- [Benchmark protocol for quality, time, and feasibility](#section-67-optimization-where-caution-is-required-2)

- [Held-out routing instances reveal selection bias](#section-67-optimization-where-caution-is-required-3)

- [Sampling and tuning belong in the resource account](#section-67-optimization-where-caution-is-required-4)

- [Design a comparator that can win](#section-67-optimization-where-caution-is-required-5)

- [Model answer: no advantage on the declared routing set](#section-67-optimization-where-caution-is-required-6)

- [Optimization caveats and evidence that would reopen the test](#section-67-optimization-where-caution-is-required-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=67-optimization-where-caution-is-required#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/67-optimization-where-caution-is-required/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/68-cryptography-pqc-qkd-and-security-migration/ -->

# Cryptography, PQC, QKD, and Security Migration

Security is the one quantum application where the deadline can arrive before the machine does. This chapter separates three things vendors blur together — Shor's threat, post-quantum migration, and quantum key distribution — and turns them into a sequenced plan.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Inventory cryptographic dependencies and migrate exposed public-key uses to NIST-standardized post-quantum schemes under a crypto-agility program now; treat QKD as a specialized link technology, and size cryptanalytic-computer risk with explicit fault-tolerant resource assumptions.

Quantum security planning contains three clocks. Cryptographic migration is an inventory and systems-change program already underway. Cryptanalytic quantum computing is a fault-tolerant resource question with substantial uncertainty. Quantum key distribution is a physical communications architecture with its own authentication, distance, availability, and trust assumptions. Combining the clocks produces bad controls.

## Separate migration, cryptanalysis, and key distribution

The migration register works asset by asset. It records algorithm and parameter set, where keys or signatures are created and verified, data exposure and confidentiality lifetime, protocol and library dependencies, owner, target scheme, compatibility test, rollback, and deadline. A label such as quantum-ready cannot replace any field.

## A cryptographic inventory becomes the control plane

NIST’s standardization project supports the standardized-algorithm statement; its transition draft supports migration planning and remains labeled by its publication status. Shor supports the algorithmic threat, while Gidney and Ekerå supply one explicit resource estimate rather than a universal arrival date. BB84 establishes QKD’s protocol lineage and distinct system contract.

Cryptography, PQC, QKD, and Security Migration: claim and source ledger, frozen 14 August 2026
 | Bounded claim | Supporting records

 | C-01: NIST has standardized post-quantum algorithms and publishes transition guidance for migration planning. | [National Institute of Standards and Technology, Post-Quantum Cryptography Standards (2024)](https://csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization)
[Dustin Moody et al., Transition to Post-Quantum Cryptography Standards (2024)](https://csrc.nist.gov/pubs/ir/8547/ipd)
 | C-02: Shor's algorithm threatens widely used factoring and discrete-log public-key systems under a sufficiently capable fault-tolerant computer. | [Peter W. Shor, Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer (1997)](https://doi.org/10.1137/S0097539795293172)
[Craig Gidney and Martin Ekerå, How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits (2021)](https://doi.org/10.22331/q-2021-04-15-433)
 | C-03: Published RSA-2048 estimates depend on large explicit physical-qubit, runtime, and error-correction assumptions. | [Craig Gidney and Martin Ekerå, How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits (2021)](https://doi.org/10.22331/q-2021-04-15-433)
[U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)
[Lieven M. K. Vandersypen et al., A look at the full stack (2021)](https://doi.org/10.1038/s42254-021-00301-w)
 | C-04: BB84 specifies quantum key distribution, which solves a different systems problem from replacing public-key algorithms across an enterprise. | [Charles H. Bennett and Gilles Brassard, Quantum cryptography: Public key distribution and coin tossing (1984)](https://research.ibm.com/publications/quantum-cryptography-public-key-distribution-and-coin-tossing)
[National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (2019)](https://doi.org/10.17226/25196)

[Figure 68.1.](#fig-68-cryptography-pqc-qkd-and-security-migration-1) Migration time, data-exposure lifetime, and cryptanalytic capability evolve independently. QKD occupies a separate link architecture rather than a fourth migration phase.

## Dated evidence table: standards, drafts, and original protocols

The archive path signs software and retains verification value for fifteen years. That lifetime and a slow replacement cycle make it a higher migration priority than an internal short-lived session whose library can be updated centrally. A QKD link does not solve the archive-signature dependency. The register puts the control next to the asset rather than next to a technology category.

Cryptographic migration priority register: inspected record
 | Asset | Current dependency | Exposure or lifetime | Next control

 | Archive signatures | RSA verification | 15 years | PQC signature migration test
 | External key exchange | ECDH | long-lived captures | hybrid/PQC interoperability
 | Internal sessions | central TLS library | hours | scheduled library upgrade
 | Dedicated fiber link | site-specific transport | continuous | separate QKD architecture review

Artifact contract. A dated asset inventory and executable priority classifier using exposure, data lifetime, algorithm, and replacement lead time. Every asset has an owner and dependency; high-lifetime vulnerable public-key uses rank ahead of short-lived low-friction systems; no QKD row is accepted as a drop-in PQC replacement.

```
REQUIRED = {"name": str, "algorithm": str, "owner": str, "exposure": dict,
            "replacement_test": str, "dependency": str, "track": str, "source_id": str}
def triage(inventory, urgent_years):
    errors = []
    migration = []
    for asset in inventory:
        missing = [name for name, kind in REQUIRED.items()
                   if name not in asset or type(asset[name]) is not kind or not asset[name]]
        exposure = asset.get("exposure", {})
        if type(exposure.get("value")) not in (int, float) or exposure.get("unit") != "years":
            missing.append("exposure_value_or_unit")
        if asset.get("track") == "QKD-evaluation" and not asset.get("physical_link"):
            missing.append("physical_link")
        if missing:
            errors.append(asset.get("name", "asset") + ":" + ",".join(sorted(set(missing))))
        elif asset["track"] == "PQC-migration":
            migration.append(asset)
    ordered = [a["name"] for a in sorted(migration,
               key=lambda a: (-a["exposure"]["value"], a["name"]))]
    urgent = [a["name"] for a in migration if a["exposure"]["value"] >= urgent_years]
    return {"decision": "invalid" if errors else "migrate", "errors": errors,
            "priority": ordered, "urgent": sorted(urgent)}
assets = [
    {"name": "archive", "algorithm": "RSA-2048", "owner": "release",
     "exposure": {"value": 15, "unit": "years"}, "replacement_test": "ML-KEM restore test",
     "dependency": "release signer", "track": "PQC-migration", "source_id": "nist-pqc"},
    {"name": "external-kex", "algorithm": "ECDH P-256", "owner": "network",
     "exposure": {"value": 8, "unit": "years"}, "replacement_test": "hybrid handshake test",
     "dependency": "gateway", "track": "PQC-migration", "source_id": "nist-pqc"},
    {"name": "metro-link", "algorithm": "authenticated QKD", "owner": "network",
     "exposure": {"value": 1, "unit": "years"}, "replacement_test": "key-service failover",
     "dependency": "fiber plus authentication", "track": "QKD-evaluation",
     "source_id": "etsi-qkd", "physical_link": "leased fiber"}]
base_result = triage(assets, 10)
bad_assets = [{key: value for key, value in assets[0].items() if key != "owner"}, *assets[1:]]
bad_result = triage(bad_assets, 10)
short_archive = [{**assets[0], "exposure": {"value": 0.5, "unit": "years"}}, *assets[1:]]
sensitive_result = triage(short_archive, 10)
assert base_result["priority"][:2] == ["archive", "external-kex"] and base_result["urgent"] == ["archive"]
assert bad_result["decision"] == "invalid" and "owner" in bad_result["errors"][0]
assert sensitive_result["priority"][0] == "external-kex" and sensitive_result["urgent"] == []
print(f"PASS: 68 crypto dossier priority={base_result['priority']} invalid={bad_result['errors']} sensitivity={sensitive_result['priority'][0]}")
```

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Prioritize by exposure lifetime and replacement friction

Begin with discovery and crypto agility: find embedded algorithms, test hybrid or replacement modes where applicable, measure key and signature sizes in real protocols, and exercise rollback. Procurement language should name standards, parameters, profiles, and validation evidence. QKD may be assessed for a particular link only after its physical topology and authentication model are declared.

## Run a migration triage on five assets

Prompt. Triage five real cryptographic assets without using a generic 'quantum-safe' label.

Deliverable. Asset register with algorithms, data lifetime, exposure, owner, migration dependency, PQC target, and verification step.

Pass condition. Every asset has evidence and an owner; vulnerable long-lived traffic is prioritized; QKD appears only where its physical link and authentication assumptions are documented.

## Model answer: authenticate the archive path first

Format. Five-asset register prioritizing long-lived archive authentication and key exchange.

The model register prioritizes archive signing, external key exchange, and device-update verification. It assigns an owner and replacement test to all five assets. The QKD row is classified as a separate link study and does not reduce the migration priority of public-key assets. The fixture fails any item without an owner, algorithm, exposure duration, or test, which prevents an inventory from becoming a decorative spreadsheet.

Verification. The classifier reproduces the ordering and fails if an asset lacks an algorithm, owner, exposure window, or replacement test.

## Security limits, threat uncertainty, and the November checkpoint

This chapter does not predict when a cryptographically relevant quantum computer will exist. It does not give a universal migration sequence or approve a specific product. Regulatory profiles, NIST documents, protocol support, library implementations, and threat models change; security owners must follow their governing authorities and test their own systems.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck NIST publications, protocol profiles, migration dependencies, and cryptanalytic resource assumptions.

External review: Open. Useful expertise: Applied cryptographer experienced with PQC migration and protocol deployment; Network security architect able to assess QKD trust and infrastructure boundaries.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

evidence dossier

### [Cryptographic migration priority register](/playground/quantum/book/68-cryptography-pqc-qkd-and-security-migration/#artifact-68-cryptography-pqc-qkd-and-security-migration)

[Download fixture (.py)](/playground/quantum/artifacts/68-cryptography-pqc-qkd-and-security-migration/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/68-cryptography-pqc-qkd-and-security-migration/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [National Institute of Standards and Technology. Post-Quantum Cryptography Standards. NIST. 2024](https://csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization) official standardization project

- [Dustin Moody et al.. Transition to Post-Quantum Cryptography Standards. National Institute of Standards and Technology. 2024](https://csrc.nist.gov/pubs/ir/8547/ipd) official transition guidance (initial public draft)

- [Charles H. Bennett and Gilles Brassard. Quantum cryptography: Public key distribution and coin tossing. Proceedings of the IEEE International Conference on Computers, Systems and Signal Processing / IBM Research. 1984](https://research.ibm.com/publications/quantum-cryptography-public-key-distribution-and-coin-tossing) primary conference paper

- [Peter W. Shor. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Journal on Computing. 1997](https://doi.org/10.1137/S0097539795293172) primary paper

- [Craig Gidney and Martin Ekerå. How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits. Quantum. 2021](https://doi.org/10.22331/q-2021-04-15-433) primary peer-reviewed resource estimate

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=68-cryptography-pqc-qkd-and-security-migration#report)

Dependency graph

## Prerequisites for this chapter

- [Shor as Period Finding Part IV. Protocols and Algorithms · Chapter 33](/playground/quantum/book/33-shor-as-period-finding/)

- [Quantum Key Distribution Part IV. Protocols and Algorithms · Chapter 26](/playground/quantum/book/26-quantum-key-distribution/)

Continue the thread

## Next concepts from this chapter

- [Optimization: Where Caution Is Required Part VIII. Applications and Strategy · Chapter 67](/playground/quantum/book/67-optimization-where-caution-is-required/)

- [Quantum Machine Learning and Benchmark Discipline Part VIII. Applications and Strategy · Chapter 69](/playground/quantum/book/69-quantum-machine-learning-and-benchmark-discipline/)

- [Materials, Energy, and Industrial Science Part VIII. Applications and Strategy · Chapter 66](/playground/quantum/book/66-materials-energy-and-industrial-science/)

[Previous Optimization: Where Caution Is Required](/playground/quantum/book/67-optimization-where-caution-is-required/)[Next Quantum Machine Learning and Benchmark Discipline](/playground/quantum/book/69-quantum-machine-learning-and-benchmark-discipline/)

In this chapter

- [Separate migration, cryptanalysis, and key distribution](#section-68-cryptography-pqc-qkd-and-security-migration-1)

- [A cryptographic inventory becomes the control plane](#section-68-cryptography-pqc-qkd-and-security-migration-2)

- [Dated evidence table: standards, drafts, and original protocols](#section-68-cryptography-pqc-qkd-and-security-migration-3)

- [Prioritize by exposure lifetime and replacement friction](#section-68-cryptography-pqc-qkd-and-security-migration-4)

- [Run a migration triage on five assets](#section-68-cryptography-pqc-qkd-and-security-migration-5)

- [Model answer: authenticate the archive path first](#section-68-cryptography-pqc-qkd-and-security-migration-6)

- [Security limits, threat uncertainty, and the November checkpoint](#section-68-cryptography-pqc-qkd-and-security-migration-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=68-cryptography-pqc-qkd-and-security-migration#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/68-cryptography-pqc-qkd-and-security-migration/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/69-quantum-machine-learning-and-benchmark-discipline/ -->

# Quantum Machine Learning and Benchmark Discipline

Quantum machine learning papers arrive weekly; dependable results do not. This chapter turns QML evaluation into a checklist — encoding cost, tuned baselines, trainability, noise — so you can debug a claim in an hour instead of believing it for a quarter.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Freeze the data split and feature-access model, compare against tuned classical models with the same information, report encoding, shots, optimization, and uncertainty, and reserve the quantum claim for held-out results that survive ablation and full-cost accounting.

A learning benchmark is first an information contract. If one model receives a compressed state prepared by an oracle while the baseline receives raw observations under a smaller tuning budget, the comparison is about access and effort, not model class. The data split, feature computation, and hyperparameter budget must be frozen before training results become evidence.

## Define the learner’s information before its circuit

The benchmark card records dataset provenance and hashes, split policy, label balance, feature access, encoding circuit, shot budget, optimizer evaluations, classical comparators, seed set, ablations, and held-out metric. It reports every registered seed and a paired uncertainty interval rather than choosing the best run from either model.

- Split data before feature or circuit selection.

- Tune classical and quantum candidates under the same search budget.

- Report ablations, seed dispersion, wall time, and prediction uncertainty.

## Benchmark card for data, model, and estimator

Quantum Machine Learning and Benchmark Discipline: claim and source ledger, frozen 14 August 2026
 | Evidence ID | Records | Claim supported

 | E-69-1 | [Jacob Biamonte et al., Quantum machine learning (2017)](https://doi.org/10.1038/nature23474)
[Marco Cerezo et al., Challenges and opportunities in quantum machine learning (2022)](https://doi.org/10.1038/s43588-022-00311-3) | Quantum machine learning includes several distinct data and model-access regimes whose costs are not interchangeable.
 | E-69-2 | [Marco Cerezo et al., Challenges and opportunities in quantum machine learning (2022)](https://doi.org/10.1038/s43588-022-00311-3)
[Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z) | Current QML research faces data-loading, trainability, generalization, and benchmarking challenges.
 | E-69-3 | [Edward Farhi, Jeffrey Goldstone, and Sam Gutmann, A Quantum Approximate Optimization Algorithm (2014)](https://arxiv.org/abs/1411.4028)
[Alberto Peruzzo et al., A variational eigenvalue solver on a photonic quantum processor (2014)](https://doi.org/10.1038/ncomms5213)
[OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)
[IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides) | Variational demonstrations establish an optimization procedure on a given instance, not a generic learning advantage.
 | E-69-4 | [Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)
[Google Quantum AI, Cirq documentation (2026)](https://quantumai.google/cirq) | Reproducible program comparisons require uncertainty, baseline tuning, and end-to-end resource accounting.

The QML review maps model and data-access regimes; the challenges perspective identifies trainability, generalization, and benchmarking risks. VQE and QAOA are cited as original variational precedents, not learning-advantage results. The official SDK references establish reproducible interfaces at the dated cutoff, while the benchmarking source supplies comparator discipline.

[Figure 69.1.](#fig-69-quantum-machine-learning-and-benchmark-discipline-1) Equal feature access and frozen test data are orthogonal controls. A best-seed result cannot bypass either one.

## A tiny classifier fails the ablation test

Five paired held-out differences in accuracy are 0.02, -0.01, 0.01, 0.00, and -0.02. Their mean is zero. Selecting the first seed would produce a positive headline; retaining the registered seeds produces an inconclusive result. The ablation also matters: if replacing the quantum feature map does not reduce held-out accuracy, the claimed mechanism lacks support even when the final classifier performs well.

Artifact contract. A dated dataset/model/access ledger with executable paired bootstrap and ablation checks. Train/test hashes differ, the quantum and classical models receive the same features, all seeds are recorded, and the advantage flag remains false when the confidence interval crosses zero.

** Executable reference fixture**

```
from math import sqrt
REQUIRED = {"scenario": str, "source_ids": list, "train_hash": str, "test_hash": str,
            "feature_contract": str, "seeds": list, "paired_differences": list,
            "difference_unit": str, "ablation_delta": float}
def analyze(card, ablation_tolerance):
    errors = [name for name, kind in REQUIRED.items()
              if name not in card or type(card[name]) is not kind]
    values = card.get("paired_differences", [])
    if not values or any(type(value) not in (int, float) for value in values):
        errors.append("paired_difference_type")
    if card.get("difference_unit") != "accuracy points" or card.get("train_hash") == card.get("test_hash"):
        errors.append("unit_or_split_hash")
    if not card.get("source_ids") or not card.get("seeds") or any(type(seed) is not int for seed in card.get("seeds", [])):
        errors.append("sources_or_seeds")
    if errors:
        return {"decision": "invalid", "errors": sorted(set(errors)), "interval": None}
    mean = sum(values) / len(values)
    variance = sum((value - mean) ** 2 for value in values) / (len(values) - 1)
    radius = 1.96 * sqrt(variance / len(values))
    interval = (mean - radius, mean + radius)
    decision = "inconclusive" if interval[0] <= 0 <= interval[1] else "directional"
    if abs(card["ablation_delta"]) > ablation_tolerance:
        decision = "ablation-sensitive"
    return {"decision": decision, "errors": [], "interval": interval, "mean": mean}
card = {"scenario": "equal-feature held-out classifier", "source_ids": ["benchmarking-2025"],
        "train_hash": "train:42c1", "test_hash": "test:88af", "feature_contract": "same 12 features",
        "seeds": [11, 19, 23, 31, 47], "paired_differences": [0.02, -0.01, 0.01, 0.00, -0.02],
        "difference_unit": "accuracy points", "ablation_delta": 0.005}
base_result = analyze(card, 0.01)
bad = {key: value for key, value in card.items() if key != "feature_contract"}
bad_result = analyze(bad, 0.01)
shifted = {**card, "paired_differences": [value + 0.04 for value in card["paired_differences"]]}
shifted_result = analyze(shifted, 0.01)
assert base_result["decision"] == "inconclusive" and base_result["interval"][0] < 0 < base_result["interval"][1]
assert bad_result["decision"] == "invalid" and "feature_contract" in bad_result["errors"]
assert shifted_result["decision"] == "directional" and shifted_result["interval"][0] > 0
print(f"PASS: 69 QML card interval={base_result['interval']} invalid={bad_result['errors']} shifted={shifted_result['decision']}")
```

Leakage-resistant QML benchmark card: inspected record
 | Seed | Quantum accuracy | Classical accuracy | Paired difference

 | 11 | 0.84 | 0.82 | +0.02
 | 17 | 0.81 | 0.82 | -0.01
 | 23 | 0.83 | 0.82 | +0.01
 | 29 | 0.82 | 0.82 | 0.00
 | 31 | 0.80 | 0.82 | -0.02

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Confidence intervals matter more than a best run

Call this a useful experiment with no observed advantage. Preserve the split hashes and use the next run to test one pre-specified mechanism, such as sensitivity to encoding depth or shot noise. Increasing the number of model variants while inspecting the same held-out set spends the test set and requires a new dataset or a nested selection protocol.

## Reproduce the comparison under equal access

Prompt. Write and evaluate a benchmark card for a binary quantum-classification claim.

Deliverable. Frozen split hashes, feature-access statement, quantum and classical hyperparameter budgets, five seeds, ablations, and a paired confidence interval.

Pass condition. No test observation enters tuning, both learners receive equal information, and the claim is 'inconclusive' whenever the interval includes zero.

## Model answer: useful experiment, unsupported advantage

Format. Reference benchmark card whose apparent best-seed gain vanishes under paired uncertainty.

The reference card records equal features and five seeds. The paired mean equals zero and the range crosses zero, so the decision is inconclusive. The model answer refuses to average independently selected best seeds, refuses to ignore encoding cost, and distinguishes predictive performance from evidence that a quantum feature caused that performance. The next gate is a frozen ablation with a new held-out sample.

Verification. The fixture reproduces the interval and confirms that removing the quantum feature map does not worsen the held-out result beyond the declared tolerance.

## QML limits and signals that warrant a new review

Five differences do not justify a calibrated confidence interval; the fixture is a directionally clear audit example. Accuracy may also be the wrong metric under imbalance or asymmetric loss. A real study uses an appropriate estimator, pre-registered sample-size calculation, multiple strong baselines, and data-access costs that include classical feature preparation.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck dataset access, QML baselines, SDK behavior, ablations, and uncertainty estimates.

External review: Open. Useful expertise: Statistical machine-learning researcher experienced with leakage and model selection; Quantum machine-learning researcher able to audit data-access and circuit assumptions.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

evidence dossier

### [Leakage-resistant QML benchmark card](/playground/quantum/book/69-quantum-machine-learning-and-benchmark-discipline/#artifact-69-quantum-machine-learning-and-benchmark-discipline)

[Download fixture (.py)](/playground/quantum/artifacts/69-quantum-machine-learning-and-benchmark-discipline/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/69-quantum-machine-learning-and-benchmark-discipline/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Jacob Biamonte et al.. Quantum machine learning. Nature. 2017](https://doi.org/10.1038/nature23474) peer-reviewed review

- [Marco Cerezo et al.. Challenges and opportunities in quantum machine learning. Nature Computational Science. 2022](https://doi.org/10.1038/s43588-022-00311-3) peer-reviewed perspective

- [Edward Farhi, Jeffrey Goldstone, and Sam Gutmann. A Quantum Approximate Optimization Algorithm. arXiv. 2014](https://arxiv.org/abs/1411.4028) primary preprint

- [Alberto Peruzzo et al.. A variational eigenvalue solver on a photonic quantum processor. Nature Communications. 2014](https://doi.org/10.1038/ncomms5213) primary paper

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=69-quantum-machine-learning-and-benchmark-discipline#report)

Dependency graph

## Prerequisites for this chapter

- [Variational Algorithms and Their Limits Part IV. Protocols and Algorithms · Chapter 35](/playground/quantum/book/35-variational-algorithms-and-their-limits/)

- [Benchmarking Quantum Programs Part V. Practical Software · Chapter 42](/playground/quantum/book/42-benchmarking-quantum-programs/)

Continue the thread

## Next concepts from this chapter

- [Cryptography, PQC, QKD, and Security Migration Part VIII. Applications and Strategy · Chapter 68](/playground/quantum/book/68-cryptography-pqc-qkd-and-security-migration/)

- [Sensing, Navigation, and Adjacent Quantum Technologies Part VIII. Applications and Strategy · Chapter 70](/playground/quantum/book/70-sensing-navigation-and-adjacent-quantum-technologies/)

- [Optimization: Where Caution Is Required Part VIII. Applications and Strategy · Chapter 67](/playground/quantum/book/67-optimization-where-caution-is-required/)

[Previous Cryptography, PQC, QKD, and Security Migration](/playground/quantum/book/68-cryptography-pqc-qkd-and-security-migration/)[Next Sensing, Navigation, and Adjacent Quantum Technologies](/playground/quantum/book/70-sensing-navigation-and-adjacent-quantum-technologies/)

In this chapter

- [Define the learner’s information before its circuit](#section-69-quantum-machine-learning-and-benchmark-discipline-1)

- [Benchmark card for data, model, and estimator](#section-69-quantum-machine-learning-and-benchmark-discipline-2)

- [A tiny classifier fails the ablation test](#section-69-quantum-machine-learning-and-benchmark-discipline-3)

- [Confidence intervals matter more than a best run](#section-69-quantum-machine-learning-and-benchmark-discipline-4)

- [Reproduce the comparison under equal access](#section-69-quantum-machine-learning-and-benchmark-discipline-5)

- [Model answer: useful experiment, unsupported advantage](#section-69-quantum-machine-learning-and-benchmark-discipline-6)

- [QML limits and signals that warrant a new review](#section-69-quantum-machine-learning-and-benchmark-discipline-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=69-quantum-machine-learning-and-benchmark-discipline#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/69-quantum-machine-learning-and-benchmark-discipline/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/70-sensing-navigation-and-adjacent-quantum-technologies/ -->

# Sensing, Navigation, and Adjacent Quantum Technologies

Some of the most fundable quantum products never run an algorithm. This chapter separates sensing, timing, navigation, and communication from gate-model computing, and shows how to diligence a device that has to survive the field rather than the lab.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Evaluate the complete sensor by measurand, bandwidth, dynamic range, stability, calibration, environmental tolerance, size, power, cost, and field performance against the incumbent instrument; qubits and gate counts are usually irrelevant.

A quantum sensor is an instrument, and instruments live or die by mission conditions. Sensitivity quoted in a quiet laboratory is one parameter among bandwidth, dynamic range, bias stability, drift, calibration interval, warm-up, shock, temperature, size, power, and availability. A navigation system adds error propagation over time; no qubit count summarizes that behavior.

## Name the measurand before the quantum effect

The acceptance sheet starts with a measurand and units. For inertial navigation it then allocates allowable position error across bias, scale factor, alignment, timing, and environmental terms over a mission duration. The quantum mechanism enters only where it changes a measured term. Laboratory sensitivity and accumulated mission error remain different columns.

## Instrument evidence table with units and environments

The sensing review provides metrological concepts and modality examples. GAO and the National Academies separate sensing from computing and communications in their technology context. Bell and BB84 are included to prevent an adjacent quantum-information result from being used as sensor evidence. The full-stack source supports accounting for control and readout around the quantum element.

Sensing, Navigation, and Adjacent Quantum Technologies: claim and source ledger, frozen 14 August 2026
 | Claim under review | Source chain

 | Quantum sensing uses quantum coherence, entanglement, or discrete transitions to estimate physical quantities under a metrological model. |

- [C. L. Degen, F. Reinhard, and P. Cappellaro, Quantum sensing (2017)](https://doi.org/10.1103/RevModPhys.89.035002)

 | A technology assessment must separate quantum computing, communications, and sensing maturity and deployment paths. |

- [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)

- [National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (2019)](https://doi.org/10.17226/25196)

 | Bell correlations and quantum key distribution are adjacent quantum-information results, not evidence that a particular field sensor meets mission requirements. |

- [John S. Bell, On the Einstein Podolsky Rosen paradox (1964)](https://doi.org/10.1103/PhysicsPhysiqueFizika.1.195)

- [Charles H. Bennett and Gilles Brassard, Quantum cryptography: Public key distribution and coin tossing (1984)](https://research.ibm.com/publications/quantum-cryptography-public-key-distribution-and-coin-tossing)

- [Richard P. Feynman, Simulating physics with computers (1982)](https://doi.org/10.1007/BF02650179)

- [OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)

 | System suitability requires control, readout, environment, and integration costs beyond the quantum element. |

- [Lieven M. K. Vandersypen et al., A look at the full stack (2021)](https://doi.org/10.1038/s42254-021-00301-w)

- [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)

## A GPS-denied navigation claim meets drift

Quantum-sensor mission acceptance sheet: inspected record
 | Requirement | Candidate record | Unit | Acceptance

 | Sensitivity | 1.0 | nT/sqrt(Hz) | pass
 | Mission drift | 180 | m over trial | fail: limit 100
 | Power | 42 | W | pass: limit 50
 | Temperature | -10 to 45 | degrees C | pending chamber test

The illustrative instrument meets a 1.0 nanotesla-per-root-hertz sensitivity threshold and still fails the navigation mission because drift would accumulate to 180 meters against a 100-meter limit. Passing the laboratory row cannot override the system row. A field trial over the representative duration, motion profile, shock, and temperature range is the smallest evidence that can change the procurement decision.

[Figure 70.1.](#fig-70-sensing-navigation-and-adjacent-quantum-technologies-1) The filled sensitivity bar reaches its threshold. The drift bar crosses the mission limit, so the instrument remains unqualified.

```
EXPECTED_UNITS = {"sensitivity": "nT/sqrt(Hz)", "mission_drift": "m", "power": "W"}
def assess(sheet):
    errors = []
    if type(sheet.get("scenario")) is not str or not sheet.get("source_ids"):
        errors.append("scenario_or_sources")
    measurements = sheet.get("measurements", {})
    passes = {}
    for name, unit in EXPECTED_UNITS.items():
        row = measurements.get(name, {})
        if (type(row.get("value")) not in (int, float) or
                type(row.get("limit")) not in (int, float) or row.get("unit") != unit or
                not row.get("method") or type(row.get("incumbent")) not in (int, float)):
            errors.append(name + "_schema")
        else:
            passes[name] = row["value"] <= row["limit"]
    decision = "invalid" if errors else ("procurement-test" if all(passes.values()) else "field-trial")
    return {"decision": decision, "errors": sorted(errors), "passes": passes,
            "failed": sorted(name for name, passed in passes.items() if not passed)}
sheet = {"scenario": "GPS-denied 60-minute mission", "source_ids": ["gao-quantum"],
         "measurements": {
             "sensitivity": {"value": 1.0, "limit": 1.2, "incumbent": 1.1,
                             "unit": "nT/sqrt(Hz)", "method": "shielded calibration"},
             "mission_drift": {"value": 180.0, "limit": 100.0, "incumbent": 95.0,
                               "unit": "m", "method": "one-hour blind route"},
             "power": {"value": 42.0, "limit": 50.0, "incumbent": 35.0,
                       "unit": "W", "method": "battery-rail meter"}}}
base_result = assess(sheet)
bad = {**sheet, "measurements": {**sheet["measurements"],
       "mission_drift": {key: value for key, value in sheet["measurements"]["mission_drift"].items()
                         if key != "method"}}}
bad_result = assess(bad)
improved = {**sheet, "measurements": {**sheet["measurements"],
            "mission_drift": {**sheet["measurements"]["mission_drift"], "value": 90.0}}}
improved_result = assess(improved)
assert base_result["passes"]["sensitivity"] and base_result["failed"] == ["mission_drift"]
assert bad_result["decision"] == "invalid" and "mission_drift_schema" in bad_result["errors"]
assert improved_result["decision"] == "procurement-test"
print(f"PASS: 70 instrument dossier failed={base_result['failed']} invalid={bad_result['errors']} drift90m={improved_result['decision']}")
```

Artifact contract. A units-bearing requirements table and executable pass/fail evaluator for sensitivity, bandwidth, drift, mass, power, and environmental range. The artifact rejects unitless thresholds, requires incumbent measurements, and never substitutes laboratory sensitivity for mission-level navigation error.

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Laboratory sensitivity is one term in field performance

Write the trial around the mission rather than the best sensor metric. Calibrate the incumbent and candidate under the same procedure, blind the analysis where practical, retain environmental logs, and predefine failure. Procurement remains pending until the drift and availability rows pass. A research contract may still be appropriate if it buys the missing field data at bounded cost.

## Build an acceptance test around the mission

Prompt. Convert a GPS-denied navigation pitch into a mission acceptance test.

Deliverable. Measurand and units, incumbent performance, drift budget, calibration schedule, shock/temperature envelope, size-power-cost bounds, and field-trial decision rule.

Pass condition. Every threshold has units and a measurement method; sensitivity alone cannot pass; accumulated position error is evaluated over the mission duration.

## Model answer: field trial before procurement

Format. Navigation acceptance sheet that defers procurement pending a representative drift trial.

The model answer gives credit for sensitivity and records a mission failure on drift. It therefore recommends a representative field trial, not purchase and not categorical rejection. The trial has a stop condition at 100 meters accumulated error over the specified duration. Size, power, and environmental limits remain acceptance gates even if the physics measurement improves.

Verification. The executable check passes laboratory sensitivity but fails the overall mission because the documented drift bound exceeds the navigation budget.

## Sensing boundaries and recalibration triggers

The values are illustrative and must not be read as measurements of any commercial device. Sensor-error propagation depends on architecture, aiding signals, and estimator design. Specialist conventions such as Allan deviation require correct averaging-time and noise-model interpretation; a field engineer and metrologist should review a real acceptance protocol.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck field-sensor specifications, calibration practice, incumbent instruments, and mission qualification.

External review: Open. Useful expertise: Quantum metrologist familiar with sensitivity and stability conventions; Navigation or instrumentation engineer with field-qualification experience.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

evidence dossier

### [Quantum-sensor mission acceptance sheet](/playground/quantum/book/70-sensing-navigation-and-adjacent-quantum-technologies/#artifact-70-sensing-navigation-and-adjacent-quantum-technologies)

[Download fixture (.py)](/playground/quantum/artifacts/70-sensing-navigation-and-adjacent-quantum-technologies/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/70-sensing-navigation-and-adjacent-quantum-technologies/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [C. L. Degen, F. Reinhard, and P. Cappellaro. Quantum sensing. Reviews of Modern Physics. 2017](https://doi.org/10.1103/RevModPhys.89.035002) peer-reviewed review

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

- [Richard P. Feynman. Simulating physics with computers. International Journal of Theoretical Physics. 1982](https://doi.org/10.1007/BF02650179) primary paper

- [John S. Bell. On the Einstein Podolsky Rosen paradox. Physics Physique Fizika. 1964](https://doi.org/10.1103/PhysicsPhysiqueFizika.1.195) primary paper

- [Charles H. Bennett and Gilles Brassard. Quantum cryptography: Public key distribution and coin tossing. Proceedings of the IEEE International Conference on Computers, Systems and Signal Processing / IBM Research. 1984](https://research.ibm.com/publications/quantum-cryptography-public-key-distribution-and-coin-tossing) primary conference paper

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=70-sensing-navigation-and-adjacent-quantum-technologies#report)

Dependency graph

## Prerequisites for this chapter

- [Cryogenics, Control, Packaging, and Manufacturing Part VII. Hardware Architecture · Chapter 62](/playground/quantum/book/62-cryogenics-control-packaging-and-manufacturing/)

- [Quantum-Centric Supercomputing and Hybrid Workflows Part VII. Hardware Architecture · Chapter 63](/playground/quantum/book/63-quantum-centric-supercomputing-and-hybrid-workflows/)

Continue the thread

## Next concepts from this chapter

- [Quantum Machine Learning and Benchmark Discipline Part VIII. Applications and Strategy · Chapter 69](/playground/quantum/book/69-quantum-machine-learning-and-benchmark-discipline/)

- [Application Evidence Levels Part VIII. Applications and Strategy · Chapter 71](/playground/quantum/book/71-application-evidence-levels/)

- [Cryptography, PQC, QKD, and Security Migration Part VIII. Applications and Strategy · Chapter 68](/playground/quantum/book/68-cryptography-pqc-qkd-and-security-migration/)

[Previous Quantum Machine Learning and Benchmark Discipline](/playground/quantum/book/69-quantum-machine-learning-and-benchmark-discipline/)[Next Application Evidence Levels](/playground/quantum/book/71-application-evidence-levels/)

In this chapter

- [Name the measurand before the quantum effect](#section-70-sensing-navigation-and-adjacent-quantum-technologies-1)

- [Instrument evidence table with units and environments](#section-70-sensing-navigation-and-adjacent-quantum-technologies-2)

- [A GPS-denied navigation claim meets drift](#section-70-sensing-navigation-and-adjacent-quantum-technologies-3)

- [Laboratory sensitivity is one term in field performance](#section-70-sensing-navigation-and-adjacent-quantum-technologies-4)

- [Build an acceptance test around the mission](#section-70-sensing-navigation-and-adjacent-quantum-technologies-5)

- [Model answer: field trial before procurement](#section-70-sensing-navigation-and-adjacent-quantum-technologies-6)

- [Sensing boundaries and recalibration triggers](#section-70-sensing-navigation-and-adjacent-quantum-technologies-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=70-sensing-navigation-and-adjacent-quantum-technologies#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/70-sensing-navigation-and-adjacent-quantum-technologies/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/71-application-evidence-levels/ -->

# Application Evidence Levels

A simulator result and a paying customer are both "evidence," and confusing them is how money gets lost. This chapter gives you a ladder of evidence levels and the habit of asking, for every claim, which rung it actually stands on.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Classify the strongest reproducible link in the claim chain—from theorem through controlled hardware comparison to operational outcome—and let the weakest required link cap the decision; press releases and customer names do not raise the level.

Evidence levels belong to individual claims. The sentence 'the algorithm exists' can be strongly supported while 'the workflow saves money' remains unsupported on the same page. Assigning one maturity label to a company or application launders evidence upward from the strongest claim to the weakest.

## Evidence attaches to a claim, not a company

Seven rungs are useful when their requirements are explicit: mathematical result; executable reference; controlled simulator comparison; controlled hardware comparison; representative-scale reproduction; buyer pilot with a measured workflow outcome; repeated operational outcome. Each rung inherits every relevant lower-level requirement and adds a new one.

- Mechanism and executable artifact.

- Controlled task result against a named comparator.

- Independent reproduction on a representative workload.

- Operational outcome retained by the workflow owner.

## Seven rungs from theorem to operating outcome

The benchmarking perspective anchors task and comparator discipline; ACM’s artifact policy separates availability, functionality, reproducibility, and reuse. Preskill frames NISQ constraints, while the original VQE and QAOA sources delimit what those demonstrations established. GAO and the National Academies add dated public assessment rather than promotion.

Application Evidence Levels: claim and source ledger, frozen 14 August 2026
 | No. | Claim | Evidence

 | 1 | Benchmark quality depends on the task, comparator, scale, and resource boundary rather than a universal device score. | [Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)
[U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)
 | 2 | Independent artifact availability and reproducibility are separately valuable evidence properties. | [Association for Computing Machinery, Artifact Review and Badging (2026)](https://www.acm.org/publications/policies/artifact-review-and-badging-current)
 | 3 | NISQ demonstrations face sampling and noise constraints that limit inference beyond the tested task. | [John Preskill, Quantum Computing in the NISQ era and beyond (2018)](https://doi.org/10.22331/q-2018-08-06-79)
[Easwar Magesan, J. M. Gambetta, and Joseph Emerson, Scalable and robust randomized benchmarking of quantum processes (2011)](https://doi.org/10.1103/PhysRevLett.106.180504)
 | 4 | Original optimization and variational results establish methods under stated mathematical or experimental conditions, not production outcomes. | [Edward Farhi, Jeffrey Goldstone, and Sam Gutmann, A Quantum Approximate Optimization Algorithm (2014)](https://arxiv.org/abs/1411.4028)
[Alberto Peruzzo et al., A variational eigenvalue solver on a photonic quantum processor (2014)](https://doi.org/10.1038/ncomms5213)
[National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (2019)](https://doi.org/10.17226/25196)

## Dated ledger for three apparently similar claims

[Figure 71.1.](#fig-71-application-evidence-levels-1) A claim can stand firmly on a lower rung without borrowing the language of the rungs above it.

```
FIELDS = ("artifact", "comparator", "reproduction", "representative", "outcome")
LABELS = ("mathematical", "artifact", "controlled", "reproduced", "representative", "operational")
def classify(record, maximum_age_days):
    errors = []
    for name in ("scenario", "claim", "evidence_origin"):
        if type(record.get(name)) is not str or not record.get(name):
            errors.append(name)
    if type(record.get("source_ids")) is not list or not record.get("source_ids"):
        errors.append("source_ids")
    age = record.get("age", {})
    if type(age.get("value")) is not int or age.get("unit") != "days":
        errors.append("age_schema")
    for name in FIELDS:
        if type(record.get(name)) is not bool:
            errors.append(name)
    if errors:
        return {"decision": "invalid", "errors": sorted(set(errors)), "ceiling": None}
    level = 0
    for name in FIELDS:
        if not record[name]:
            break
        level += 1
    if record["evidence_origin"] == "marketing" or age["value"] > maximum_age_days:
        level = min(level, 1)
    return {"decision": "classified", "errors": [], "ceiling": LABELS[level], "level": level}
common = {"scenario": "three-claim calibration packet", "source_ids": ["acm-artifact-review"],
          "age": {"value": 30, "unit": "days"}, "evidence_origin": "primary record"}
hardware = {**common, "claim": "circuit improves metric", "artifact": True, "comparator": True,
            "reproduction": True, "representative": False, "outcome": False}
pilot = {**common, "claim": "pilot creates value", "artifact": True, "comparator": True,
         "reproduction": False, "representative": True, "outcome": False}
hardware_result = classify(hardware, 90)
pilot_result = classify(pilot, 90)
bad = {key: value for key, value in hardware.items() if key != "comparator"}
bad_result = classify(bad, 90)
promoted_result = classify({**hardware, "representative": True}, 90)
assert hardware_result["ceiling"] == "reproduced" and pilot_result["ceiling"] == "controlled"
assert bad_result["decision"] == "invalid" and "comparator" in bad_result["errors"]
assert promoted_result["ceiling"] == "representative" and promoted_result["level"] > hardware_result["level"]
print(f"PASS: 71 evidence classifier hardware={hardware_result['ceiling']} pilot={pilot_result['ceiling']} invalid={bad_result['errors']} promoted={promoted_result['ceiling']}")
```

Three claims share the word demonstrated. A theorem with a proof receives the mathematical rung. A small hardware run with code, calibration, and comparator receives controlled hardware evidence. A named customer pilot without an outcome metric remains a reported pilot, not an operational outcome. The classifier makes a missing comparator or reproduction field lower the ceiling automatically.

Artifact contract. A dated claim-by-claim ledger and executable monotone classifier. Missing reproducibility, comparator, representative scale, or operating metric can only lower a level; marketing evidence cannot raise a technical claim.

Application evidence-level classifier: inspected record
 | Claim | Strongest record | Missing promotion field | Ceiling

 | Method exists | proof and original paper | executable reference | mathematical
 | Circuit improves metric | controlled hardware comparison | representative reproduction | controlled hardware
 | Pilot creates value | customer report | measured counterfactual outcome | reported pilot

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Reproduction and comparator quality can lower a rung

Use the level to choose the next evidence purchase. A mathematical result needs an executable instance; a controlled result needs representative scale; a pilot needs a predeclared buyer metric and counterfactual. Promotion occurs when the new record exists, not when a press release changes the verb.

## Calibrate a mixed evidence packet

Prompt. Assign evidence levels to a theorem, a small hardware benchmark, and a reported customer pilot.

Deliverable. Three claim ledgers with primary sources, comparator and scale fields, reproducibility status, level, and permitted decision.

Pass condition. Each level is capped by its weakest required field, the pilot is not called operational without an outcome metric, and promotion criteria name an observable event.

## Model answer: three claims, three different ceilings

Format. Three-level adjudication separating algorithm existence, controlled experiment, and buyer outcome.

The reference adjudication assigns three different ceilings and lists the field needed for each promotion. The hardware claim cannot rise above controlled comparison without representative scale and independent reproduction. The pilot cannot rise above buyer-pilot evidence without an operating outcome and counterfactual. The conclusion preserves strong algorithmic evidence without lending it to commercial claims.

Verification. The classifier returns the documented ceilings and refuses a higher level when any required field is false.

## Evidence-ladder limitations and promotion criteria

A ladder can imply that research always moves linearly toward production. Some valuable results remain mathematical; some instruments mature through different evidence forms. Use the rungs only for claims whose decision path needs them, and record domain-specific evidence such as field qualification or security certification alongside the general structure.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck artifact availability, independent reproductions, comparator quality, and reported buyer outcomes.

External review: Open. Useful expertise: Experimental-methods researcher experienced with reproducibility and benchmark design; Quantum program evaluator able to distinguish device, task, and operational evidence.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

evidence dossier

### [Application evidence-level classifier](/playground/quantum/book/71-application-evidence-levels/#artifact-71-application-evidence-levels)

[Download fixture (.py)](/playground/quantum/artifacts/71-application-evidence-levels/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/71-application-evidence-levels/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

- [John Preskill. Quantum Computing in the NISQ era and beyond. Quantum. 2018](https://doi.org/10.22331/q-2018-08-06-79) peer-reviewed perspective

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [Easwar Magesan, J. M. Gambetta, and Joseph Emerson. Scalable and robust randomized benchmarking of quantum processes. Physical Review Letters. 2011](https://doi.org/10.1103/PhysRevLett.106.180504) primary paper

- [Edward Farhi, Jeffrey Goldstone, and Sam Gutmann. A Quantum Approximate Optimization Algorithm. arXiv. 2014](https://arxiv.org/abs/1411.4028) primary preprint

- [Alberto Peruzzo et al.. A variational eigenvalue solver on a photonic quantum processor. Nature Communications. 2014](https://doi.org/10.1038/ncomms5213) primary paper

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=71-application-evidence-levels#report)

Dependency graph

## Prerequisites for this chapter

- [Benchmarking Quantum Programs Part V. Practical Software · Chapter 42](/playground/quantum/book/42-benchmarking-quantum-programs/)

- [What Makes a Problem Quantum-Suitable? Part VIII. Applications and Strategy · Chapter 64](/playground/quantum/book/64-what-makes-a-problem-quantum-suitable/)

Continue the thread

## Next concepts from this chapter

- [When to Build, Partner, Wait, or Avoid Part VIII. Applications and Strategy · Chapter 72](/playground/quantum/book/72-when-to-build-partner-wait-or-avoid/)

- [The Quantum Company Landscape Part IX. Company and Investing · Chapter 73](/playground/quantum/book/73-quantum-company-landscape/)

- [Application-Company Diligence Part IX. Company and Investing · Chapter 77](/playground/quantum/book/77-application-company-diligence/)

[Previous Sensing, Navigation, and Adjacent Quantum Technologies](/playground/quantum/book/70-sensing-navigation-and-adjacent-quantum-technologies/)[Next When to Build, Partner, Wait, or Avoid](/playground/quantum/book/72-when-to-build-partner-wait-or-avoid/)

In this chapter

- [Evidence attaches to a claim, not a company](#section-71-application-evidence-levels-1)

- [Seven rungs from theorem to operating outcome](#section-71-application-evidence-levels-2)

- [Dated ledger for three apparently similar claims](#section-71-application-evidence-levels-3)

- [Reproduction and comparator quality can lower a rung](#section-71-application-evidence-levels-4)

- [Calibrate a mixed evidence packet](#section-71-application-evidence-levels-5)

- [Model answer: three claims, three different ceilings](#section-71-application-evidence-levels-6)

- [Evidence-ladder limitations and promotion criteria](#section-71-application-evidence-levels-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=71-application-evidence-levels#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/71-application-evidence-levels/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/72-when-to-build-partner-wait-or-avoid/ -->

# When to Build, Partner, Wait, or Avoid

Strategy is choosing the next action, not choosing a mood. This chapter turns quantum enthusiasm and skepticism into six concrete decisions — build, partner, invest, monitor, wait, avoid — each with its own evidence threshold.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Choose the least irreversible action that buys information or capability before the next credible technical gate, using explicit option cost, dependency, deadline, and kill criteria; revisit only when a named observable changes.

Build, partner, wait, and avoid are policies with different reversibility. A small partnership can buy a baseline and integration artifact; a full build consumes organizational attention and creates maintenance obligations; waiting preserves cash but may lose learning time; avoiding closes the option until a named fact changes. The decision record must price those differences.

## Decision labels encode different commitments

Each option receives maximum cash, engineering weeks, reusable deliverable, upstream dependency, decision owner, expiry, expansion trigger, and stop condition. An option without a learning deliverable is spending, not experimentation. An option without an expiry is drift. The selected action should be non-dominated under the organization’s stated objective.

** Build** : Own the scarce learning loop and its reusable interface.

** Partner** : Purchase a bounded capability with exit and data rights.

** Wait** : Name the external milestone and monitoring owner.

** Avoid** : Record the failed gate and the evidence that could reverse it.

## The option record: cost, learning, dependency, deadline

When to Build, Partner, Wait, or Avoid: claim and source ledger, frozen 14 August 2026
 | Bounded claim | Supporting records

 | C-01: Technology assessments support staged decisions when technical and commercial uncertainty remain material. | [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)
[National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (2019)](https://doi.org/10.17226/25196)
 | C-02: End-to-end benchmarks are needed before scaling a program around isolated quantum metrics. | [Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)
[Lieven M. K. Vandersypen et al., A look at the full stack (2021)](https://doi.org/10.1038/s42254-021-00301-w)
 | C-03: Artifacts and documented interfaces make a partnership's learning transferable rather than vendor-locked. | [Association for Computing Machinery, Artifact Review and Badging (2026)](https://www.acm.org/publications/policies/artifact-review-and-badging-current)
 | C-04: Official software and language interfaces provide inspectable integration boundaries for bounded pilots. | [IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides)
[Google Quantum AI, Cirq documentation (2026)](https://quantumai.google/cirq)
[OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)

GAO and the National Academies support a staged posture under current uncertainty. The benchmark and full-stack sources require end-to-end evidence before scale. ACM’s artifact policy makes transferable learning concrete. Official SDK and language references identify the versioned interfaces that a narrow partnership should preserve.

## One chemistry proposal under five action policies

A chemistry team can spend four weeks and a capped budget with a partner to produce an active-space choice, classical baseline, and resource sensitivity. A full internal platform build costs six months before resolving those questions. Unbounded waiting produces no record. The bounded partnership is selected because its outputs remain useful even if the hardware thesis weakens.

Build-partner-wait decision record: inspected record
 | Action | Maximum effort | Reusable output | Disposition

 | Build | 24 engineer-weeks | internal platform | dominated before baseline
 | Partner | 4 engineer-weeks | active-space and baseline dossier | selected
 | Wait | 0 engineer-weeks | none unless monitored | requires expiry
 | Avoid | 0 engineer-weeks | closed option record | only after kill criterion

Artifact contract. A dated option table with executable dominance and expiry checks. Dominated actions are removed; every retained action has an information gain, maximum spend, owner, deadline, and measurable stop or expansion trigger.

```
FIELDS = {"owner": str, "cost": dict, "duration": dict, "learning_artifact": str,
          "portable": bool, "expiry": str, "stop_trigger": str, "source_id": str}
def choose(dossier, maximum_spend_usd, deadline_weeks):
    errors = []
    eligible = []
    for name, option in dossier.get("options", {}).items():
        missing = [field for field, kind in FIELDS.items()
                   if field not in option or type(option[field]) is not kind or option[field] in ("", None)]
        cost, duration = option.get("cost", {}), option.get("duration", {})
        if type(cost.get("value")) is not int or cost.get("unit") != "USD":
            missing.append("cost_schema")
        if type(duration.get("value")) is not int or duration.get("unit") != "weeks":
            missing.append("duration_schema")
        if missing:
            errors.append(name + ":" + ",".join(sorted(set(missing))))
        elif (cost["value"] <= maximum_spend_usd and duration["value"] <= deadline_weeks and
              option["portable"] and option["learning_artifact"]):
            eligible.append(name)
    choice = "partner" if "partner" in eligible else (eligible[0] if eligible else "defer")
    return {"decision": "invalid" if errors else choice, "errors": errors, "eligible": sorted(eligible)}
dossier = {"scenario": "four-week chemistry information purchase", "options": {
    "build": {"owner": "R&D", "cost": {"value": 800000, "unit": "USD"},
              "duration": {"value": 24, "unit": "weeks"}, "learning_artifact": "resource ledger",
              "portable": True, "expiry": "2026-11-14", "stop_trigger": "resource ceiling missed",
              "source_id": "scenario:internal-estimate"},
    "partner": {"owner": "science lead", "cost": {"value": 120000, "unit": "USD"},
                "duration": {"value": 4, "unit": "weeks"}, "learning_artifact": "portable benchmark",
                "portable": True, "expiry": "2026-11-14", "stop_trigger": "no baseline gap",
                "source_id": "scenario:partner-SOW"},
    "wait": {"owner": "strategy", "cost": {"value": 0, "unit": "USD"},
             "duration": {"value": 12, "unit": "weeks"}, "learning_artifact": "scheduled evidence review",
             "portable": False, "expiry": "2026-11-14", "stop_trigger": "new evidence release",
             "source_id": "scenario:review-calendar"}}}
base_result = choose(dossier, 200000, 8)
bad_options = {**dossier["options"], "partner": {key: value for key, value in dossier["options"]["partner"].items() if key != "owner"}}
bad_result = choose({**dossier, "options": bad_options}, 200000, 8)
tight_result = choose(dossier, 100000, 8)
assert base_result["decision"] == "partner" and base_result["eligible"] == ["partner"]
assert bad_result["decision"] == "invalid" and "owner" in bad_result["errors"][0]
assert tight_result["decision"] == "defer" and tight_result["eligible"] == []
print(f"PASS: 72 option workbook choice={base_result['decision']} invalid={bad_result['errors']} spend100k={tight_result['decision']}")
```

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

[Figure 72.1.](#fig-72-when-to-build-partner-wait-or-avoid-1) The narrow partnership buys a reusable baseline record. Build remains downstream until that evidence changes the branch.

## Irreversibility changes the preferred experiment

The partnership contract names files, data rights, environment versions, baseline procedure, and review date. It does not purchase advantage theater or a fixed number of device hours. Expansion requires a specified classical gap and resource regime; failure to reproduce the baseline ends the engagement. This turns vendor access into organizational evidence.

## Write a decision that expires cleanly

Prompt. Choose among build, partner, wait, and avoid for a chemistry workflow with uncertain fault-tolerant timing.

Deliverable. Four-option record with cash and engineering cost, learning deliverable, dependency, deadline, kill criterion, and chosen action.

Pass condition. The selected action is non-dominated, has a bounded downside, produces a reusable artifact, and expires on a named date or observable technical gate.

## Model answer: partner narrowly, do not scale

Format. Narrow partnership decision capped at an active-space and baseline study.

The model answer selects partner for four weeks, capped at the declared spend, with an active-space and comparator dossier as the deliverable. It rejects build as dominated on information per irreversible cost and rejects unbounded wait because it has no expiry. The action automatically becomes wait if the resource sensitivity misses the target regime, and build is reconsidered only after the evidence gates pass.

Verification. The dominance check rejects a full build and an unbounded wait, while the selected partnership passes cost, learning, expiry, and portability fields.

## Decision-policy limits and scheduled reconsideration

Option analysis depends on honest cost and information estimates. Strategic relationships, hiring, and capability retention may add value outside the immediate workflow. Record those benefits explicitly and test them; do not let them become a residual category that guarantees the preferred action wins.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck option costs, partner interfaces, technical milestones, and the evidence purchased by each action.

External review: Open. Useful expertise: Technology portfolio manager experienced with staged investment under uncertainty; Quantum systems architect able to verify technical dependency gates.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

evidence dossier

### [Build-partner-wait decision record](/playground/quantum/book/72-when-to-build-partner-wait-or-avoid/#artifact-72-when-to-build-partner-wait-or-avoid)

[Download fixture (.py)](/playground/quantum/artifacts/72-when-to-build-partner-wait-or-avoid/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/72-when-to-build-partner-wait-or-avoid/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=72-when-to-build-partner-wait-or-avoid#report)

Dependency graph

## Prerequisites for this chapter

- [What Makes a Problem Quantum-Suitable? Part VIII. Applications and Strategy · Chapter 64](/playground/quantum/book/64-what-makes-a-problem-quantum-suitable/)

- [Application Evidence Levels Part VIII. Applications and Strategy · Chapter 71](/playground/quantum/book/71-application-evidence-levels/)

Continue the thread

## Next concepts from this chapter

- [Market Timing and Wedge Selection Part IX. Company and Investing · Chapter 79](/playground/quantum/book/79-market-timing-and-wedge-selection/)

- [Application Evidence Dossier Part X. Capstones · Chapter 85](/playground/quantum/book/85-application-evidence-dossier/)

- [Sensing, Navigation, and Adjacent Quantum Technologies Part VIII. Applications and Strategy · Chapter 70](/playground/quantum/book/70-sensing-navigation-and-adjacent-quantum-technologies/)

[Previous Application Evidence Levels](/playground/quantum/book/71-application-evidence-levels/)[Next The Quantum Company Landscape](/playground/quantum/book/73-quantum-company-landscape/)

In this chapter

- [Decision labels encode different commitments](#section-72-when-to-build-partner-wait-or-avoid-1)

- [The option record: cost, learning, dependency, deadline](#section-72-when-to-build-partner-wait-or-avoid-2)

- [One chemistry proposal under five action policies](#section-72-when-to-build-partner-wait-or-avoid-3)

- [Irreversibility changes the preferred experiment](#section-72-when-to-build-partner-wait-or-avoid-4)

- [Write a decision that expires cleanly](#section-72-when-to-build-partner-wait-or-avoid-5)

- [Model answer: partner narrowly, do not scale](#section-72-when-to-build-partner-wait-or-avoid-6)

- [Decision-policy limits and scheduled reconsideration](#section-72-when-to-build-partner-wait-or-avoid-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=72-when-to-build-partner-wait-or-avoid#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/72-when-to-build-partner-wait-or-avoid/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/73-quantum-company-landscape/ -->

# The Quantum Company Landscape

A hardware startup and a post-quantum security vendor are both "quantum companies," and comparing them on one metric is how diligence goes wrong. This chapter segments the field into layers and gives each layer its own proof gate.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Map companies by the layer they control, the interfaces they depend on, the buyer and budget they serve, and the evidence behind present revenue; compare only peers with the same dependency and economic boundary.

A company list becomes analytical only after it exposes interfaces and dependencies. A hardware manufacturer, compiler vendor, application consultancy, cryogenic supplier, and developer platform sell to different buyers on different budgets. Ranking them on one score conceals rather than resolves those differences.

## A company map begins with interfaces

The map uses nodes for controlled layers and edges for necessary access, standards, suppliers, or buyer systems. Each node records buyer, payment evidence type, delivery unit, upstream concentration, and interface. A peer group exists only when those fields are commensurate. The graph’s important output is correlated exposure, not a colorful taxonomy.

## Dated stack map: layers, buyers, dependencies

The full-stack review supports the layered architecture. GAO provides a dated category assessment. OpenQASM, Qiskit, and Cirq identify current software interfaces without proving portability. ACM and randomized benchmarking supply inspectable artifact and device-evidence concepts. The benchmarking review cautions against collapsing incomparable tasks into one ranking.

The Quantum Company Landscape: claim and source ledger, frozen 14 August 2026
 | Evidence ID | Records | Claim supported

 | E-73-1 | [Lieven M. K. Vandersypen et al., A look at the full stack (2021)](https://doi.org/10.1038/s42254-021-00301-w)
[OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/) | Quantum systems comprise application, software, compilation, control, device, and infrastructure layers with material interfaces between them.
 | E-73-2 | [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422) | Government assessments distinguish technology categories and maturity rather than treating quantum firms as one homogeneous market.
 | E-73-3 | [OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)
[IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides)
[Google Quantum AI, Cirq documentation (2026)](https://quantumai.google/cirq) | Open languages and official SDK interfaces are evidence for portability claims only to the extent actually tested.
 | E-73-4 | [Association for Computing Machinery, Artifact Review and Badging (2026)](https://www.acm.org/publications/policies/artifact-review-and-badging-current)
[Easwar Magesan, J. M. Gambetta, and Joseph Emerson, Scalable and robust randomized benchmarking of quantum processes (2011)](https://doi.org/10.1103/PhysRevLett.106.180504)
[Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z) | Reproducibility and benchmark policy provide inspectable evidence fields for technical claims.

## Revenue evidence must survive category changes

The anonymized map places two application firms and a workflow platform on the same hardware-access dependency. It separately places a control supplier behind two hardware nodes. A portfolio that appears diversified by company count therefore has two concentration points: backend access and hardware production volume. Those edges matter more than the labels printed in a market map.

Artifact contract. A dated node-edge table and executable cycle/concentration analyser. Every company category has a buyer and upstream dependency; the analyser reports shared critical dependencies and forbids cross-category score ranking.

** Executable reference fixture**

```
NODE_FIELDS = {"name": str, "layer": str, "buyer": str, "dependency": str, "source_id": str}
def inspect_map(dossier):
    errors = []
    threshold = dossier.get("concentration_threshold", {})
    if type(threshold.get("value")) is not int or threshold.get("unit") != "companies":
        errors.append("threshold_schema")
    counts = {}
    groups = {}
    for node in dossier.get("nodes", []):
        missing = [name for name, kind in NODE_FIELDS.items()
                   if name not in node or type(node[name]) is not kind or not node[name]]
        if missing:
            errors.append(node.get("name", "node") + ":" + ",".join(missing))
            continue
        counts[node["dependency"]] = counts.get(node["dependency"], 0) + 1
        groups.setdefault((node["layer"], node["buyer"]), []).append(node["name"])
    limit = threshold.get("value", 10 ** 9)
    concentrations = sorted(name for name, count in counts.items() if count >= limit)
    return {"decision": "invalid" if errors else ("concentrated" if concentrations else "diversified"),
            "errors": errors, "concentrations": concentrations,
            "comparison_groups": {" / ".join(key): sorted(value) for key, value in groups.items()}}
dossier = {"scenario": "portfolio dependency map", "concentration_threshold": {"value": 2, "unit": "companies"},
           "nodes": [
               {"name": "application-a", "layer": "application", "buyer": "industrial R&D",
                "dependency": "backend-access", "source_id": "scenario:company-a filing"},
               {"name": "application-b", "layer": "application", "buyer": "operations",
                "dependency": "backend-access", "source_id": "scenario:company-b filing"},
               {"name": "hardware-c", "layer": "hardware", "buyer": "HPC",
                "dependency": "control-supplier", "source_id": "scenario:company-c filing"},
               {"name": "hardware-d", "layer": "hardware", "buyer": "research",
                "dependency": "control-supplier", "source_id": "scenario:company-d filing"}]}
base_result = inspect_map(dossier)
bad_nodes = [{key: value for key, value in dossier["nodes"][0].items() if key != "buyer"}, *dossier["nodes"][1:]]
bad_result = inspect_map({**dossier, "nodes": bad_nodes})
strict_result = inspect_map({**dossier, "concentration_threshold": {"value": 3, "unit": "companies"}})
assert base_result["concentrations"] == ["backend-access", "control-supplier"]
assert bad_result["decision"] == "invalid" and "buyer" in bad_result["errors"][0]
assert strict_result["decision"] == "diversified" and strict_result["concentrations"] == []
print(f"PASS: 73 stack map bottlenecks={base_result['concentrations']} invalid={bad_result['errors']} threshold3={strict_result['decision']}")
```

Quantum stack dependency graph: inspected record
 | Node | Controlled layer | Buyer | Critical upstream edge

 | Application A | workflow and validation | industrial R&D | backend access
 | Application B | optimization service | operations team | backend access
 | Control supplier | readout electronics | hardware builder | production volume
 | Hardware C | device and control | research/HPC | control supplier

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## A dependency graph exposes correlated bets

Use the map to choose questions. For a concentrated backend edge, request contracts, portability tests, queue and pricing history, and the failure plan. For a supplier edge, request qualified alternatives, lead times, capacity, and unit demand. Do not convert the graph into a total attractiveness score; company-specific economics and evidence belong in their own dossiers.

[Figure 73.1.](#fig-73-quantum-company-landscape-1) Company categories occupy separate layers. Backend access and production volume connect otherwise different portfolio nodes.

## Classify a portfolio without ranking unlike firms

Prompt. Map six companies or projects across at least three stack layers using only dated primary evidence.

Deliverable. Node-edge table with category, buyer, revenue evidence type, upstream dependency, interface, and source date.

Pass condition. No cross-category leaderboard is produced, every edge is sourced, and the concentration analysis identifies at least one shared bottleneck.

## Model answer: three clusters, two shared bottlenecks

Format. Anonymized six-node map with hardware access and procurement as separate concentration points.

The reference answer produces three peer clusters and flags two shared dependencies. It refuses to rank the control supplier against an application firm. The application cluster can be compared on buyer, outcome evidence, and backend substitution; the hardware cluster can be compared on workload-normalized evidence. The graph remains dated and is refreshed when an interface, supplier, or buyer contract changes.

Verification. The graph check finds the documented shared dependencies and confirms all comparison groups have matching buyer and layer fields.

## Map limitations and the next quarterly refresh

Public information rarely proves revenue quality, contract rights, or customer concentration. The map can therefore describe disclosed dependencies but not infer undisclosed economics. Categories also change as companies integrate vertically. Preserve the dated classification and record the event that justifies moving a node.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck company categories, buyer evidence, stack interfaces, and shared portfolio dependencies.

External review: Open. Useful expertise: Quantum industry analyst familiar with stack segmentation and public-company evidence; Systems architect able to audit technical interfaces and dependency edges.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

diligence dossier

### [Quantum stack dependency graph](/playground/quantum/book/73-quantum-company-landscape/#artifact-73-quantum-company-landscape)

[Download fixture (.py)](/playground/quantum/artifacts/73-quantum-company-landscape/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/73-quantum-company-landscape/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [Easwar Magesan, J. M. Gambetta, and Joseph Emerson. Scalable and robust randomized benchmarking of quantum processes. Physical Review Letters. 2011](https://doi.org/10.1103/PhysRevLett.106.180504) primary paper

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=73-quantum-company-landscape#report)

Dependency graph

## Prerequisites for this chapter

- [The Full Quantum Computer Stack Part VII. Hardware Architecture · Chapter 54](/playground/quantum/book/54-full-quantum-computer-stack/)

- [Application Evidence Levels Part VIII. Applications and Strategy · Chapter 71](/playground/quantum/book/71-application-evidence-levels/)

Continue the thread

## Next concepts from this chapter

- [Supply-Chain and Infrastructure Diligence Part IX. Company and Investing · Chapter 78](/playground/quantum/book/78-supply-chain-and-infrastructure-diligence/)

- [Investment Memo and Startup Thesis Templates Part IX. Company and Investing · Chapter 82](/playground/quantum/book/82-investment-memo-and-startup-thesis-templates/)

- [Company Diligence Memo Part X. Capstones · Chapter 86](/playground/quantum/book/86-company-diligence-memo/)

[Previous When to Build, Partner, Wait, or Avoid](/playground/quantum/book/72-when-to-build-partner-wait-or-avoid/)[Next Hardware Modality Diligence](/playground/quantum/book/74-hardware-modality-diligence/)

In this chapter

- [A company map begins with interfaces](#section-73-quantum-company-landscape-1)

- [Dated stack map: layers, buyers, dependencies](#section-73-quantum-company-landscape-2)

- [Revenue evidence must survive category changes](#section-73-quantum-company-landscape-3)

- [A dependency graph exposes correlated bets](#section-73-quantum-company-landscape-4)

- [Classify a portfolio without ranking unlike firms](#section-73-quantum-company-landscape-5)

- [Model answer: three clusters, two shared bottlenecks](#section-73-quantum-company-landscape-6)

- [Map limitations and the next quarterly refresh](#section-73-quantum-company-landscape-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=73-quantum-company-landscape#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/73-quantum-company-landscape/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/74-hardware-modality-diligence/ -->

# Hardware Modality Diligence

Superconducting, trapped-ion, neutral-atom, photonic, silicon-spin — every hardware pitch opens with a modality, and every modality sounds inevitable from the inside. This chapter gives you a way to compare them: a matrix of physical facts, weak layers, and proof gates that turns a hardware pitch into a scoreable memo.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Compare modalities through a workload-specific resource translation that preserves native operations, connectivity, cycle time, measurement, error model, control footprint, and demonstrated scale; raw qubit count is only one input.

Hardware modalities expose different physical nouns, which makes a single comparison column dangerous. A qubit can be an anharmonic circuit, ionic internal state, atomic level, photon, electron spin, oscillator code, or proposed topological degree of freedom. Gate, connectivity, time, readout, leakage, control, and manufacturing mean different things in each system.

## Translate a workload before comparing devices

A comparison begins with a fixed workload and compiles it separately. The matrix records encoding, native entangler, physical connectivity, logical-to-native expansion, two-qubit duration, fidelity-estimation method, readout, reset, parallelism, control footprint, and demonstrated system scale. Cells remain not comparable when method or boundary differs.

** Workload** : Logical operations, connectivity, and timing required.

** Translation** : Routing, decomposition, heralding, and control overhead.

** Observation** : Task quality with uncertainty and a complete resource boundary.

## Modality matrix with comparability flags

The hardware and full-stack reviews establish modality and integration differences. Randomized benchmarking supplies a protocol for average error characterization while explicitly leaving workload translation to the analyst. GKP supplies the original oscillator encoding. OpenQASM and ACM support an inspectable program and artifact boundary, not universal device equivalence.

Hardware Modality Diligence: claim and source ledger, frozen 14 August 2026
 | Claim under review | Source chain

 | Physical implementations differ in encoding, control, native interactions, measurement, topology, and dominant error channels. |

- [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)

- [T. D. Ladd et al., Quantum computers (2010)](https://doi.org/10.1038/nature08812)

- [Lieven M. K. Vandersypen et al., A look at the full stack (2021)](https://doi.org/10.1038/s42254-021-00301-w)

 | Randomized benchmarking estimates average error under a protocol and does not make every device or workload directly comparable. |

- [Easwar Magesan, J. M. Gambetta, and Joseph Emerson, Scalable and robust randomized benchmarking of quantum processes (2011)](https://doi.org/10.1103/PhysRevLett.106.180504)

- [Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)

 | Bosonic and oscillator encodings change the mapping from physical modes to protected logical information. |

- [Daniel Gottesman, Alexei Kitaev, and John Preskill, Encoding a qubit in an oscillator (2001)](https://doi.org/10.1103/PhysRevA.64.012310)

- [T. D. Ladd et al., Quantum computers (2010)](https://doi.org/10.1038/nature08812)

 | Open instruction semantics and reproducibility records expose some, but not all, cross-stack translation assumptions. |

- [OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)

- [Association for Computing Machinery, Artifact Review and Badging (2026)](https://www.acm.org/publications/policies/artifact-review-and-badging-current)

## A Bell-pair workload changes under three native entanglers

Workload-normalized modality matrix: inspected record
 | Modality record | Native interaction | Conversion boundary | Comparability

 | Superconducting | nearest-neighbor entangler | routing and leakage | pending matched run
 | Trapped ion | collective entangler | duration and mode crowding | pending matched run
 | Photonics | measurement-mediated | success and loss convention | pending matched run
 | Oscillator code | mode-level operations | encoding overhead | pending matched run

A Bell-pair workload between two logical endpoints may use one native entangler on an all-to-all ion device, a routed sequence on a nearest-neighbor superconducting layout, or measurement-mediated photonic operations with a different success convention. Reporting one number called two-qubit fidelity would erase compilation, heralding, timing, and sampling differences. The matrix marks those cells incompatible until a task-level result is measured.

```
FIELDS = {"workload": str, "topology": str, "gate_duration": dict, "readout": str,
          "fidelity_method": str, "conversion": dict, "source_id": str}
def compare(matrix, maximum_compiled_duration_ns):
    errors = []
    durations = {}
    for name, row in matrix.items():
        missing = [field for field, kind in FIELDS.items()
                   if field not in row or type(row[field]) is not kind or not row[field]]
        gate, conversion = row.get("gate_duration", {}), row.get("conversion", {})
        if type(gate.get("value")) not in (int, float) or gate.get("unit") != "ns":
            missing.append("gate_duration_schema")
        if type(conversion.get("count")) is not int or conversion.get("unit") != "two-qubit gates":
            missing.append("conversion_schema")
        if missing:
            errors.append(name + ":" + ",".join(sorted(set(missing))))
        else:
            durations[name] = gate["value"] * conversion["count"]
    eligible = {name: value for name, value in durations.items()
                if value <= maximum_compiled_duration_ns}
    selected = min(eligible, key=eligible.get) if eligible else None
    return {"decision": selected or "not-comparable", "errors": errors,
            "compiled_duration_ns": durations, "eligible": sorted(eligible)}
matrix = {
    "device-a": {"workload": "Bell pair endpoints 0-2", "topology": "line",
                 "gate_duration": {"value": 250, "unit": "ns"}, "readout": "joint Z samples",
                 "fidelity_method": "interleaved RB", "conversion": {"count": 4, "unit": "two-qubit gates"},
                 "source_id": "scenario:device-a calibration"},
    "device-b": {"workload": "Bell pair endpoints 0-2", "topology": "all-to-all",
                 "gate_duration": {"value": 600, "unit": "ns"}, "readout": "joint Z samples",
                 "fidelity_method": "cycle benchmark", "source_id": "scenario:device-b calibration"},
    "device-c": {"workload": "Bell pair endpoints 0-2", "topology": "photonic graph",
                 "gate_duration": {"value": 80, "unit": "ns"}, "readout": "heralded samples",
                 "conversion": {"count": 8, "unit": "two-qubit gates"},
                 "source_id": "scenario:device-c calibration"}}
base_result = compare(matrix, 1200)
bad_a = {**matrix["device-a"], "gate_duration": {"value": 250, "unit": ""}}
bad_result = compare({**matrix, "device-a": bad_a}, 1200)
strict_result = compare(matrix, 900)
assert base_result["decision"] == "device-a" and base_result["eligible"] == ["device-a"]
assert bad_result["decision"] == "not-comparable" and "gate_duration_schema" in bad_result["errors"][0]
assert strict_result["decision"] == "not-comparable"
print(f"PASS: 74 modality matrix selected={base_result['decision']} duration={base_result['compiled_duration_ns']} invalid={bad_result['errors']} budget900ns={strict_result['decision']}")
```

Artifact contract. A dated units-bearing table plus executable comparability checker. Rows cannot be ranked unless workload, fidelity method, topology, gate duration, readout, and conversion overhead are all comparable; missing fields produce 'not comparable'.

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Control and packaging enter the denominator

Select only for the declared workload and procurement constraint. One device may minimize wall-clock latency, another control footprint, another logical error under a future code. A defensible recommendation shows the conversion ledger and the fields it could not compare. The absence of a total winner is often the technically correct output.

[Figure 74.1.](#fig-74-hardware-modality-diligence-1) Blank diagonals mark conversions that have not been measured under a matched workload. The matrix therefore supports a fit decision, not a universal winner.

## Audit a modality comparison for hidden conversions

Prompt. Compare three modalities for a fixed entanglement-and-measurement workload.

Deliverable. Matrix with encoding, native entangler, connectivity, compiled operations, duration, error evidence, readout, control footprint, and comparability flags.

Pass condition. All unit conversions are shown, incomparable cells remain unlabeled rather than scored, and the recommendation is explicitly workload-bound.

## Model answer: no universal winner, one workload fit

Format. Three-row modality matrix that yields one workload fit but no total ranking.

The model answer identifies one workload fit after filling compilation and timing fields, while leaving a universal modality ranking blank. It notes that randomized-benchmarking numbers came from different methods and conditions and therefore cannot be ordered directly. The executable check returns comparable only for rows containing the complete workload, topology, timing, readout, and method record.

Verification. The checker prevents ranking until all required comparability fields exist and reproduces the workload-specific selection from the completed rows.

## Hardware evidence gaps and six-month review conditions

The table is schematic and contains no vendor measurements. Hardware evidence moves quickly, and cross-modality reviewers are rare. A real procurement needs primary experimental data, calibration distributions, availability, pricing, support, and a workload run under matched acceptance criteria. Refresh at least every six months and after major system releases.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck native operations, calibration methods, topology, readout, and workload-normalized device results.

External review: Open. Useful expertise: Experimental quantum-hardware physicist spanning at least two modalities; Quantum compiler or architecture researcher able to audit workload translation.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

diligence dossier

### [Workload-normalized modality matrix](/playground/quantum/book/74-hardware-modality-diligence/#artifact-74-hardware-modality-diligence)

[Download fixture (.py)](/playground/quantum/artifacts/74-hardware-modality-diligence/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/74-hardware-modality-diligence/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [Easwar Magesan, J. M. Gambetta, and Joseph Emerson. Scalable and robust randomized benchmarking of quantum processes. Physical Review Letters. 2011](https://doi.org/10.1103/PhysRevLett.106.180504) primary paper

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [Daniel Gottesman, Alexei Kitaev, and John Preskill. Encoding a qubit in an oscillator. Physical Review A. 2001](https://doi.org/10.1103/PhysRevA.64.012310) primary paper

- [T. D. Ladd et al.. Quantum computers. Nature. 2010](https://doi.org/10.1038/nature08812) peer-reviewed review

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=74-hardware-modality-diligence#report)

Dependency graph

## Prerequisites for this chapter

- [Superconducting Qubits Part VII. Hardware Architecture · Chapter 55](/playground/quantum/book/55-superconducting-qubits/)

- [Cat Qubits and Bosonic Encodings Part VII. Hardware Architecture · Chapter 60](/playground/quantum/book/60-cat-qubits-and-bosonic-encodings/)

- [Benchmarking Quantum Programs Part V. Practical Software · Chapter 42](/playground/quantum/book/42-benchmarking-quantum-programs/)

Continue the thread

## Next concepts from this chapter

- [The Quantum Company Landscape Part IX. Company and Investing · Chapter 73](/playground/quantum/book/73-quantum-company-landscape/)

- [Software and Developer-Platform Diligence Part IX. Company and Investing · Chapter 75](/playground/quantum/book/75-software-and-developer-platform-diligence/)

- [Error-Correction-Stack Diligence Part IX. Company and Investing · Chapter 76](/playground/quantum/book/76-error-correction-stack-diligence/)

[Previous The Quantum Company Landscape](/playground/quantum/book/73-quantum-company-landscape/)[Next Software and Developer-Platform Diligence](/playground/quantum/book/75-software-and-developer-platform-diligence/)

In this chapter

- [Translate a workload before comparing devices](#section-74-hardware-modality-diligence-1)

- [Modality matrix with comparability flags](#section-74-hardware-modality-diligence-2)

- [A Bell-pair workload changes under three native entanglers](#section-74-hardware-modality-diligence-3)

- [Control and packaging enter the denominator](#section-74-hardware-modality-diligence-4)

- [Audit a modality comparison for hidden conversions](#section-74-hardware-modality-diligence-5)

- [Model answer: no universal winner, one workload fit](#section-74-hardware-modality-diligence-6)

- [Hardware evidence gaps and six-month review conditions](#section-74-hardware-modality-diligence-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=74-hardware-modality-diligence#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/74-hardware-modality-diligence/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/75-software-and-developer-platform-diligence/ -->

# Software and Developer-Platform Diligence

Quantum software companies sell picks without owning mines: SDKs, transpilers, benchmarking harnesses, workflow platforms. This chapter shows how to tell a durable workflow owner from a wrapper around someone else's SDK with good documentation.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Reproduce a real workflow across backends, inspect the platform’s owned compiler, orchestration, observability, or verification capability, measure switching and failure-recovery costs, and verify that the buyer pays for that owned improvement.

A quantum software business must own a failure that a buyer pays to remove. Submitting a circuit through a friendlier interface can be useful, but the durable layer may belong to the upstream SDK or hardware provider. Diligence should reproduce a painful workflow, inject a failure, and trace which component diagnoses and repairs it.

## Diligence starts from a failing workflow

The acceptance suite fixes one task and result tolerance across two backend interfaces. It records language and dependency versions, intermediate representation, compilation options, calibration context, queue and execution identifiers, raw results, provenance, and recovery behavior. Portability means the contract survives; it does not require identical physical noise.

- Pin SDK, compiler, runtime, and backend versions.

- Test portable semantics separately from provider extensions.

- Inject timeout, quota, schema, and partial-result failures.

- Retain raw jobs and recomputable post-processing.

## Portability and operations test matrix

Software and Developer-Platform Diligence: claim and source ledger, frozen 14 August 2026
 | No. | Claim | Evidence

 | 1 | OpenQASM defines inspectable program semantics but does not guarantee backend-equivalent results. | [OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)
 | 2 | Official Qiskit and Cirq documentation establish supported interfaces at the cited review date. | [IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides)
[Google Quantum AI, Cirq documentation (2026)](https://quantumai.google/cirq)
 | 3 | Artifact review distinguishes availability, functionality, reproducibility, and reuse properties. | [Association for Computing Machinery, Artifact Review and Badging (2026)](https://www.acm.org/publications/policies/artifact-review-and-badging-current)
 | 4 | Hybrid workflows such as VQE cross quantum and classical software boundaries; full-stack benchmarks must evaluate the layer the platform actually owns. | [Alberto Peruzzo et al., A variational eigenvalue solver on a photonic quantum processor (2014)](https://doi.org/10.1038/ncomms5213)
[Lieven M. K. Vandersypen et al., A look at the full stack (2021)](https://doi.org/10.1038/s42254-021-00301-w)
[Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)
[U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)

OpenQASM establishes program semantics; Qiskit and Cirq documentation establish dated SDK surfaces. ACM’s artifact policy distinguishes runnable from reproducible and reusable. The full-stack and benchmarking sources delimit where a platform can claim an owned result. VQE supplies a representative hybrid workflow, not platform differentiation.

## A reproducibility service earns or loses its layer

```
RUN_FIELDS = {"interface": str, "task_hash": str, "version": str, "provenance": str,
              "submitted": bool, "diagnosed": bool, "deviation": dict, "source_id": str}
def run_suite(card, tolerance):
    errors = []
    normal = []
    injected_ok = False
    for name, run in card.get("runs", {}).items():
        missing = [field for field, kind in RUN_FIELDS.items()
                   if field not in run or type(run[field]) is not kind or run[field] in ("", None)]
        deviation = run.get("deviation", {})
        if type(deviation.get("value")) not in (int, float) or deviation.get("unit") != "probability points":
            missing.append("deviation_schema")
        if missing:
            errors.append(name + ":" + ",".join(sorted(set(missing))))
            continue
        if name == "injected":
            injected_ok = not run["submitted"] and run["diagnosed"]
        else:
            normal.append(run)
    portable = len(normal) == 2 and all(run["submitted"] for run in normal) and len({run["task_hash"] for run in normal}) == 1
    reproducible = portable and all(run["deviation"]["value"] <= tolerance for run in normal)
    decision = "invalid" if errors else ("reproducible-platform" if reproducible and injected_ok else "portable-tooling")
    return {"decision": decision, "errors": errors, "portable": portable,
            "reproducible": reproducible, "injected_diagnosed": injected_ok}
card = {"scenario": "two-adapter Bell workflow", "runs": {
    "a": {"interface": "adapter-a", "task_hash": "bell:91ac", "version": "1.4.2",
          "provenance": "job+calibration", "submitted": True, "diagnosed": False,
          "deviation": {"value": 0.01, "unit": "probability points"}, "source_id": "scenario:run-a"},
    "b": {"interface": "adapter-b", "task_hash": "bell:91ac", "version": "2.0.1",
          "provenance": "job+calibration", "submitted": True, "diagnosed": False,
          "deviation": {"value": 0.03, "unit": "probability points"}, "source_id": "scenario:run-b"},
    "injected": {"interface": "adapter-a", "task_hash": "bell:91ac", "version": "1.4.2",
                 "provenance": "typed error trace", "submitted": False, "diagnosed": True,
                 "deviation": {"value": 0.0, "unit": "probability points"}, "source_id": "scenario:failure-injection"}}}
base_result = run_suite(card, 0.02)
bad_runs = {**card["runs"], "a": {key: value for key, value in card["runs"]["a"].items() if key != "provenance"}}
bad_result = run_suite({**card, "runs": bad_runs}, 0.02)
improved_runs = {**card["runs"], "b": {**card["runs"]["b"], "deviation": {"value": 0.015, "unit": "probability points"}}}
improved_result = run_suite({**card, "runs": improved_runs}, 0.02)
assert base_result["portable"] and not base_result["reproducible"] and base_result["injected_diagnosed"]
assert bad_result["decision"] == "invalid" and "provenance" in bad_result["errors"][0]
assert improved_result["decision"] == "reproducible-platform"
print(f"PASS: 75 platform suite base={base_result['decision']} invalid={bad_result['errors']} deviation1.5pp={improved_result['decision']}")
```

The illustrative platform submits the same Bell task to two adapters. Both preserve program and job provenance. One result falls outside the scientific tolerance because its backend record carries a different noise condition. The platform therefore passes submission portability and failure diagnosis while failing a stronger scientific-reproducibility claim. That distinction reveals actual product value without exaggerating it.

Artifact contract. A dated API/IR/backend matrix with executable portability and recovery checks. The same task and validation rule run through two declared interfaces; failures preserve provenance; a wrapper-only result is distinguished from owned technical capability.

Cross-backend platform acceptance suite: inspected record
 | Run | Interface | Provenance | Result tolerance

 | A-normal | adapter-a | complete | pass
 | B-normal | adapter-b | complete | fail: noise condition
 | A-injected | adapter-a | complete error trace | diagnosed
 | Recovery | adapter-a | same task ID | pass

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Dependency churn reveals who owns the outcome

The buyer may pay for versioned provenance, queue recovery, cross-backend policy, and audit exports even when results differ. Test renewal evidence for that owned outcome. Then remove the preferred backend or change an SDK version. If the product cannot preserve the task and diagnosis contract, switching cost belongs to the dependency rather than the platform.

## Run the platform through a backend failure

Prompt. Test a platform claim against one workflow, two backends, and one injected backend failure.

Deliverable. Versioned environment, task fixture, backend records, expected result tolerance, failure trace, recovery behavior, and buyer-owned metric.

Pass condition. Both normal runs satisfy the same task contract, the injected failure is diagnosable, versions and calibration context survive, and the owned improvement is separated from upstream capability.

## Model answer: useful tooling, weak standalone moat

Format. Portability record showing reproducible submission but backend-specific result variance.

The model answer calls the tooling useful and the moat unproved. It credits the platform for stable job records and an actionable injected-error trace. It withholds scientific reproducibility because the result tolerance fails, and it withholds standalone defensibility until a buyer renews for the owned operational outcome. The conclusion can improve without rewriting history when the next acceptance run and renewal record arrive.

Verification. The suite passes interface portability, catches the injected failure, and withholds a scientific reproducibility claim because the declared result tolerance is exceeded.

[Figure 75.1.](#fig-75-software-and-developer-platform-diligence-1) Submission portability succeeds on both lanes. Scientific equivalence remains open because one result misses the frozen tolerance.

## Software diligence limits and quarterly retest

Two adapters do not establish broad portability. Version compatibility, provider terms, credentials, queue semantics, and intermediate representations change. A real test uses supported environments and obtains permission before fault injection. Company-specific revenue, retention, and product rights require primary diligence beyond technical documentation.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck supported SDKs, backend interfaces, recovery behavior, portability tests, and buyer renewal evidence.

External review: Open. Useful expertise: Quantum software platform engineer familiar with compiler/runtime boundaries; Developer-tools product engineer able to assess workflow ownership and switching costs.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

diligence dossier

### [Cross-backend platform acceptance suite](/playground/quantum/book/75-software-and-developer-platform-diligence/#artifact-75-software-and-developer-platform-diligence)

[Download fixture (.py)](/playground/quantum/artifacts/75-software-and-developer-platform-diligence/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/75-software-and-developer-platform-diligence/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [Alberto Peruzzo et al.. A variational eigenvalue solver on a photonic quantum processor. Nature Communications. 2014](https://doi.org/10.1038/ncomms5213) primary paper

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=75-software-and-developer-platform-diligence#report)

Dependency graph

## Prerequisites for this chapter

- [Qiskit, Primitives, and Circuit Execution Part V. Practical Software · Chapter 38](/playground/quantum/book/38-qiskit-primitives-and-circuit-execution/)

- [Noise Models and Noisy Simulation Part V. Practical Software · Chapter 41](/playground/quantum/book/41-noise-models-and-noisy-simulation/)

Continue the thread

## Next concepts from this chapter

- [Application-Company Diligence Part IX. Company and Investing · Chapter 77](/playground/quantum/book/77-application-company-diligence/)

- [Market Timing and Wedge Selection Part IX. Company and Investing · Chapter 79](/playground/quantum/book/79-market-timing-and-wedge-selection/)

- [Moats, Partnerships, and Standards Part IX. Company and Investing · Chapter 80](/playground/quantum/book/80-moats-partnerships-and-standards/)

[Previous Hardware Modality Diligence](/playground/quantum/book/74-hardware-modality-diligence/)[Next Error-Correction-Stack Diligence](/playground/quantum/book/76-error-correction-stack-diligence/)

In this chapter

- [Diligence starts from a failing workflow](#section-75-software-and-developer-platform-diligence-1)

- [Portability and operations test matrix](#section-75-software-and-developer-platform-diligence-2)

- [A reproducibility service earns or loses its layer](#section-75-software-and-developer-platform-diligence-3)

- [Dependency churn reveals who owns the outcome](#section-75-software-and-developer-platform-diligence-4)

- [Run the platform through a backend failure](#section-75-software-and-developer-platform-diligence-5)

- [Model answer: useful tooling, weak standalone moat](#section-75-software-and-developer-platform-diligence-6)

- [Software diligence limits and quarterly retest](#section-75-software-and-developer-platform-diligence-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=75-software-and-developer-platform-diligence#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/75-software-and-developer-platform-diligence/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/76-error-correction-stack-diligence/ -->

# Error-Correction-Stack Diligence

Fault tolerance needs decoders, real-time controls, calibration systems, and middleware — and a startup has formed around each. This chapter is about deciding whether any of them owns a bottleneck someone will pay to remove.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Trace physical measurements through syndrome extraction, transport, decoding, feedback, and logical outcome; require latency, bandwidth, error-model, code-distance, and logical-error data at every owned interface before assigning technical or economic value.

Error correction is a timed information pipeline. Measurements leave the device, become syndrome bits, cross an acquisition and transport path, enter a decoder, and return as feedback or a tracked frame before the next dependent operation. A fast decoder in isolation can still miss the machine’s cycle contract.

## Draw the syndrome path before valuing the product

The interface budget records code family and distance, physical-error model, syndrome bits per cycle, acquisition, transfer, decode and feedback latency, sustained throughput, tail latency, logical-error estimator, and before/after conditions. The total is \(T_{loop}=T_{acquire}+T_{transport}+T_{decode}+T_{feedback}\), with every term in microseconds and with overlap stated separately.

## Interface budget from measurement to correction

Shor, Steane, and Gottesman establish the code and stabilizer foundations; GKP establishes an oscillator encoding. The surface-code and fault-tolerance reviews provide synthesis, while the Gidney–Ekerå estimate shows how explicit error-correction assumptions enter an application resource account. None of these validates a company decoder at an unstated interface.

Error-Correction-Stack Diligence: claim and source ledger, frozen 14 August 2026
 | Bounded claim | Supporting records

 | C-01: Quantum error correction extracts syndromes without directly measuring encoded logical information. | [Peter W. Shor, Scheme for reducing decoherence in quantum computer memory (1995)](https://doi.org/10.1103/PhysRevA.52.R2493)
[Andrew M. Steane, Error correcting quantum code (1996)](https://doi.org/10.1103/PhysRevLett.77.793)
[Daniel Gottesman, Stabilizer codes and quantum error correction (1997)](https://arxiv.org/abs/quant-ph/9705052)
 | C-02: Stabilizer, surface-code, and bosonic approaches expose different decoding and control interfaces. | [Daniel Gottesman, Stabilizer codes and quantum error correction (1997)](https://arxiv.org/abs/quant-ph/9705052)
[Daniel Gottesman, Alexei Kitaev, and John Preskill, Encoding a qubit in an oscillator (2001)](https://doi.org/10.1103/PhysRevA.64.012310)
[Austin G. Fowler et al., Surface codes: Towards practical large-scale quantum computation (2012)](https://doi.org/10.1103/PhysRevA.86.032324)
 | C-03: Fault-tolerant resource estimates are highly sensitive to physical error, cycle time, code distance, and decoding assumptions. | [Craig Gidney and Martin Ekerå, How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits (2021)](https://doi.org/10.22331/q-2021-04-15-433)
[Austin G. Fowler et al., Surface codes: Towards practical large-scale quantum computation (2012)](https://doi.org/10.1103/PhysRevA.86.032324)
[Earl T. Campbell, Barbara M. Terhal, and Christophe Vuillot, Roads towards fault-tolerant universal quantum computation (2017)](https://doi.org/10.1038/nature23460)
 | C-04: A company-level claim requires measured system-boundary evidence beyond an algorithmic decoder benchmark. | [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)
[Earl T. Campbell, Barbara M. Terhal, and Christophe Vuillot, Roads towards fault-tolerant universal quantum computation (2017)](https://doi.org/10.1038/nature23460)

## A decoder misses its cycle-time contract

The illustrative decoder takes 0.32 microseconds, which sounds compatible with a one-microsecond cycle. Acquisition, transport, and feedback add 0.88 microseconds, producing a 1.20-microsecond loop. Without proved overlap, the system misses the contract by 20 percent. The artifact preserves every term so the organization knows whether the next experiment belongs in decoder optimization, data movement, or control scheduling.

[Figure 76.1.](#fig-76-error-correction-stack-diligence-1) The decoder fits inside the cycle by itself; the complete loop does not. The right-hand segment is transport, not decoding.

Syndrome-to-feedback interface budget: inspected record
 | Stage | Latency | Unit | Owner

 | Acquire | 0.28 | microseconds | readout/control
 | Transport | 0.35 | microseconds | interconnect
 | Decode | 0.32 | microseconds | decoder
 | Feedback | 0.25 | microseconds | control
 | Total | 1.20 | microseconds | system

Artifact contract. A units-bearing latency/bandwidth/error table and executable cycle-budget test. Acquisition, transfer, decode, and feedback terms sum to the total; the total must fit the declared cycle; throughput and logical-error claims are tied to code distance and error model.

```
STAGES = ("acquire", "transport", "decode", "feedback")
def inspect_stack(dossier):
    errors = []
    if not dossier.get("source_ids") or type(dossier.get("code_distance")) is not int or not dossier.get("error_model"):
        errors.append("source_code_or_error_model")
    latencies = dossier.get("latencies", {})
    for stage in STAGES:
        row = latencies.get(stage, {})
        if type(row.get("value")) not in (int, float) or row.get("unit") != "us" or not row.get("source_id"):
            errors.append(stage + "_schema")
    cycle, throughput, syndrome_rate = (dossier.get(name, {}) for name in
                                        ("cycle", "decode_throughput", "syndrome_rate"))
    if type(cycle.get("value")) not in (int, float) or cycle.get("unit") != "us":
        errors.append("cycle_schema")
    if any(item.get("unit") != "Msyndromes/s" or type(item.get("value")) not in (int, float)
           for item in (throughput, syndrome_rate)):
        errors.append("throughput_schema")
    total = sum(latencies.get(stage, {}).get("value", 0) for stage in STAGES)
    fits = not errors and total <= cycle["value"] and throughput["value"] >= syndrome_rate["value"]
    return {"decision": "invalid" if errors else ("interface-pass" if fits else "cycle-miss"),
            "errors": sorted(set(errors)), "total_us": total,
            "margin_us": None if errors else cycle["value"] - total}
dossier = {"scenario": "distance-7 syndrome loop", "source_ids": ["scenario:bench-2026-08-01"],
           "code_distance": 7, "error_model": "matched circuit-level depolarizing model",
           "latencies": {name: {"value": value, "unit": "us", "source_id": "scenario:trace-17"}
                         for name, value in {"acquire": 0.28, "transport": 0.35,
                                             "decode": 0.32, "feedback": 0.25}.items()},
           "cycle": {"value": 1.00, "unit": "us"},
           "decode_throughput": {"value": 1.2, "unit": "Msyndromes/s"},
           "syndrome_rate": {"value": 1.0, "unit": "Msyndromes/s"}}
base_result = inspect_stack(dossier)
bad_latency = {**dossier["latencies"], "decode": {"value": 0.32, "unit": "", "source_id": "scenario:trace-17"}}
bad_result = inspect_stack({**dossier, "latencies": bad_latency})
faster = {**dossier, "latencies": {**dossier["latencies"],
          "decode": {"value": 0.10, "unit": "us", "source_id": "scenario:FPGA-batch"}}}
faster_result = inspect_stack(faster)
assert abs(base_result["total_us"] - 1.20) < 1e-12 and base_result["decision"] == "cycle-miss"
assert bad_result["decision"] == "invalid" and "decode_schema" in bad_result["errors"]
assert faster_result["decision"] == "interface-pass" and faster_result["margin_us"] > 0
print(f"PASS: 76 correction workbook total={base_result['total_us']}us invalid={bad_result['errors']} faster_margin={faster_result['margin_us']}us")
```

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Overhead claims need an error model and distance

Value the owned interface, not the fastest kernel. Ask for tail latency under representative syndrome rates, accuracy under the declared correlated-error model, scaling with distance, integration data movement, and logical-error change in matched conditions. A decoder can be technically strong and commercially useful without yet proving system-level logical advantage; the memo should say both.

## Audit a real-time correction-stack claim

Prompt. Budget a syndrome path for a declared code distance and cycle time.

Deliverable. Table of acquisition, transport, decode, feedback, bandwidth, code distance, physical-error model, and resulting logical metric.

Pass condition. Latency terms reconcile in microseconds, throughput covers the syndrome rate, and no logical improvement is credited without matched before/after conditions.

## Model answer: sound decoder, unproved system advantage

Format. Decoder budget that meets algorithmic accuracy but misses real-time feedback.

The model answer credits algorithmic decoder performance and rejects the real-time claim under the stated sequential budget. The fixture returns 1.20 microseconds and fails the one-microsecond cycle. It would pass only after a documented pipeline overlap or component improvement changes the sum. Logical-error benefit remains a separate gate requiring matched system measurements.

Verification. The fixture reproduces the latency overrun and changes to pass only when a documented batching or hardware change brings the total below the cycle.

## Error-correction diligence limits and new-evidence gates

Real control loops can overlap stages, track Pauli frames instead of applying immediate feedback, and tolerate different deadlines by operation. The simple sum is a conservative interface model, not a universal architecture. A real review needs workload distributions, tail latency, error correlations, hardware timestamps, and code-specific logical performance.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck decoder measurements, cycle budgets, error models, code distances, and logical-performance data.

External review: Open. Useful expertise: Quantum error-correction researcher familiar with decoder and logical-error evaluation; Real-time controls engineer able to audit latency and data-movement budgets.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

diligence dossier

### [Syndrome-to-feedback interface budget](/playground/quantum/book/76-error-correction-stack-diligence/#artifact-76-error-correction-stack-diligence)

[Download fixture (.py)](/playground/quantum/artifacts/76-error-correction-stack-diligence/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/76-error-correction-stack-diligence/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Peter W. Shor. Scheme for reducing decoherence in quantum computer memory. Physical Review A. 1995](https://doi.org/10.1103/PhysRevA.52.R2493) primary paper

- [Andrew M. Steane. Error correcting quantum code. Physical Review Letters. 1996](https://doi.org/10.1103/PhysRevLett.77.793) primary paper

- [Daniel Gottesman. Stabilizer codes and quantum error correction. California Institute of Technology / arXiv. 1997](https://arxiv.org/abs/quant-ph/9705052) doctoral thesis

- [Daniel Gottesman, Alexei Kitaev, and John Preskill. Encoding a qubit in an oscillator. Physical Review A. 2001](https://doi.org/10.1103/PhysRevA.64.012310) primary paper

- [Craig Gidney and Martin Ekerå. How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits. Quantum. 2021](https://doi.org/10.22331/q-2021-04-15-433) primary peer-reviewed resource estimate

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [Austin G. Fowler et al.. Surface codes: Towards practical large-scale quantum computation. Physical Review A. 2012](https://doi.org/10.1103/PhysRevA.86.032324) peer-reviewed review

- [Earl T. Campbell, Barbara M. Terhal, and Christophe Vuillot. Roads towards fault-tolerant universal quantum computation. Nature. 2017](https://doi.org/10.1038/nature23460) peer-reviewed review

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=76-error-correction-stack-diligence#report)

Dependency graph

## Prerequisites for this chapter

- [Stabilizers and Syndrome Measurement Part VI. Reliability and Fault Tolerance · Chapter 47](/playground/quantum/book/47-stabilizers-and-syndrome-measurement/)

- [Surface Codes and Threshold Intuition Part VI. Reliability and Fault Tolerance · Chapter 49](/playground/quantum/book/49-surface-codes-and-threshold-intuition/)

- [Decoders and Real-Time Classical Control Part VI. Reliability and Fault Tolerance · Chapter 51](/playground/quantum/book/51-decoders-and-real-time-classical-control/)

Continue the thread

## Next concepts from this chapter

- [Software and Developer-Platform Diligence Part IX. Company and Investing · Chapter 75](/playground/quantum/book/75-software-and-developer-platform-diligence/)

- [Application-Company Diligence Part IX. Company and Investing · Chapter 77](/playground/quantum/book/77-application-company-diligence/)

- [Hardware Modality Diligence Part IX. Company and Investing · Chapter 74](/playground/quantum/book/74-hardware-modality-diligence/)

[Previous Software and Developer-Platform Diligence](/playground/quantum/book/75-software-and-developer-platform-diligence/)[Next Application-Company Diligence](/playground/quantum/book/77-application-company-diligence/)

In this chapter

- [Draw the syndrome path before valuing the product](#section-76-error-correction-stack-diligence-1)

- [Interface budget from measurement to correction](#section-76-error-correction-stack-diligence-2)

- [A decoder misses its cycle-time contract](#section-76-error-correction-stack-diligence-3)

- [Overhead claims need an error model and distance](#section-76-error-correction-stack-diligence-4)

- [Audit a real-time correction-stack claim](#section-76-error-correction-stack-diligence-5)

- [Model answer: sound decoder, unproved system advantage](#section-76-error-correction-stack-diligence-6)

- [Error-correction diligence limits and new-evidence gates](#section-76-error-correction-stack-diligence-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=76-error-correction-stack-diligence#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/76-error-correction-stack-diligence/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/77-application-company-diligence/ -->

# Application-Company Diligence

Application companies are the easiest quantum pitches to believe and the easiest to get wrong: they speak the customer's language while quietly assuming hardware that does not exist yet. This chapter starts diligence where it belongs — with the buyer and the baseline.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Start from the buyer’s repeated decision, map data and validation boundaries, benchmark the owned computational kernel, test portability and gross-margin dependencies, and value only evidence that persists if the preferred backend or algorithm changes.

Application-company diligence starts at a repeated buyer decision: choose a route, molecule, schedule, portfolio, diagnosis, or control action. The company must own some durable improvement around that decision. Naming a quantum algorithm does not establish ownership of data, validation, workflow integration, customer relationship, or outcome.

## Buyer workflow before quantum method

The ownership ledger records buyer and budget, decision frequency, input and data rights, incumbent method, owned computational or workflow layer, backend dependency, validation owner, deployment work, recurring service hours, result metric, and renewal evidence. A backend substitution and staffing sensitivity reveal whether value persists.

## Dated ownership ledger: data, kernel, validation, outcome

QAOA and VQE support particular method families under their original scope. OpenQASM and Qiskit documentation define current integration surfaces. ACM and the benchmark review support rerunnable evidence. GAO and the NISQ review provide dated context. None establishes a specific company’s revenue, gross margin, customer result, or proprietary right.

Application-Company Diligence: claim and source ledger, frozen 14 August 2026
 | Evidence ID | Records | Claim supported

 | E-77-1 | [Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)
[U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)
[Kishor Bharti et al., Noisy intermediate-scale quantum algorithms (2022)](https://doi.org/10.1103/RevModPhys.94.015004) | Application value must be tested against the best task-level classical baseline and complete workflow cost.
 | E-77-2 | [Edward Farhi, Jeffrey Goldstone, and Sam Gutmann, A Quantum Approximate Optimization Algorithm (2014)](https://arxiv.org/abs/1411.4028)
[Alberto Peruzzo et al., A variational eigenvalue solver on a photonic quantum processor (2014)](https://doi.org/10.1038/ncomms5213) | Variational and optimization algorithms do not transfer product ownership or advantage merely by being embedded in an offering.
 | E-77-3 | [OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)
[IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides) | Portable documented interfaces can reduce, but do not eliminate, hardware and SDK dependency.
 | E-77-4 | [Association for Computing Machinery, Artifact Review and Badging (2026)](https://www.acm.org/publications/policies/artifact-review-and-badging-current)
[Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z) | Artifact and benchmark records make repeatability and owned technical contribution inspectable.

## A logistics optimizer loses its claimed boundary

The anonymized logistics offering has a paying pilot and a functioning hybrid workflow. Delivery needs 120 expert hours per customer per quarter, and the preferred backend supplies a material portion of the result. Removing the backend raises cost; reducing services breaks deployment. The company has services evidence, but the scalable software boundary remains unproved.

Artifact contract. A dated workflow/evidence/economics table with executable dependency sensitivity. Buyer, frequency, baseline, owned data, owned IP, backend dependency, validation owner, and outcome metric are present; the sensitivity test exposes value that disappears under a backend or staffing change.

** Executable reference fixture**

```
TEXT_FIELDS = ("scenario", "buyer", "baseline", "backend_dependency",
               "validation_owner", "outcome_metric", "source_id")
def assess(record):
    errors = [name for name in TEXT_FIELDS if type(record.get(name)) is not str or not record.get(name)]
    for name, unit in (("frequency", "decisions/week"), ("service_hours", "hours/quarter"),
                       ("backend_cost_increase", "fraction")):
        item = record.get(name, {})
        if type(item.get("value")) not in (int, float) or item.get("unit") != unit:
            errors.append(name + "_schema")
    for name in ("owned_data", "owned_ip", "paying_pilot"):
        if type(record.get(name)) is not bool:
            errors.append(name)
    scalable = (not errors and record["paying_pilot"] and record["owned_data"] and record["owned_ip"] and
                record["service_hours"]["value"] <= 80 and record["backend_cost_increase"]["value"] <= 0.20)
    return {"decision": "invalid" if errors else ("product-evidence" if scalable else "services-only"),
            "errors": sorted(set(errors)), "service_margin_hours": None if errors else 80 - record["service_hours"]["value"],
            "backend_margin_fraction": None if errors else 0.20 - record["backend_cost_increase"]["value"]}
record = {"scenario": "paid routing pilot", "buyer": "daily route planner",
          "frequency": {"value": 5, "unit": "decisions/week"},
          "baseline": "incumbent tuned heuristic", "owned_data": True, "owned_ip": True,
          "backend_dependency": "two declared QPU adapters", "validation_owner": "customer operations",
          "outcome_metric": "cost per feasible route", "source_id": "scenario:pilot-ledger-Q3",
          "service_hours": {"value": 120, "unit": "hours/quarter"},
          "backend_cost_increase": {"value": 0.40, "unit": "fraction"}, "paying_pilot": True}
base_result = assess(record)
bad = {key: value for key, value in record.items() if key != "validation_owner"}
bad_result = assess(bad)
scaled = {**record, "service_hours": {"value": 70, "unit": "hours/quarter"},
          "backend_cost_increase": {"value": 0.15, "unit": "fraction"}}
scaled_result = assess(scaled)
assert base_result["decision"] == "services-only" and base_result["service_margin_hours"] == -40
assert bad_result["decision"] == "invalid" and "validation_owner" in bad_result["errors"]
assert scaled_result["decision"] == "product-evidence" and scaled_result["backend_margin_fraction"] > 0
print(f"PASS: 77 company workbook base={base_result['decision']} service_margin={base_result['service_margin_hours']}h invalid={bad_result['errors']} scaled={scaled_result['decision']}")
```

Application-company ownership ledger: inspected record
 | Ownership field | Observed record | Gate | State

 | Buyer decision | daily route plan | named and repeated | pass
 | Outcome | reported pilot metric | matched comparator | pending
 | Service intensity | 120 expert hours/quarter | below 80 | fail
 | Backend substitution | +40 percent cost | below 20 percent | fail

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

[Figure 77.1.](#fig-77-application-company-diligence-1) The application company controls the inner workflow and validation record. Backend access and expert labor remain outside dependencies.

## Portability and service intensity shape economics

The next diligence request is a cohort table of implementation hours and buyer outcome, plus a second-backend acceptance run. A product claim advances only if new customers reach the same result with declining bespoke effort. A services business may still be valuable; classify and price it as one instead of borrowing software economics.

## Interview the evidence, not the pitch

Prompt. Diligence an application company against one repeated buyer decision.

Deliverable. Workflow map, baseline, dated pilot evidence, owned layer, backend substitution test, staffing sensitivity, outcome metric, and kill criteria.

Pass condition. The conclusion survives removal of marketing labels, distinguishes services from scalable product evidence, and weakens automatically when portability or buyer-outcome evidence is absent.

## Model answer: services value without scalable software proof

Format. Logistics-company ledger concluding 'services-proven, product-scale unproved'.

The model answer labels the current state services-proven, product-scale unproved. Under 120 hours and a 40 percent backend-cost increase, the sensitivity fails both declared product gates. The recommendation is a bounded partnership tied to portability and implementation-hour milestones. It becomes avoid if the buyer outcome cannot be measured or if staffing intensity does not fall across the next cohort.

Verification. The sensitivity fixture shows the margin and delivery impact of the documented staffing and backend dependencies and reproduces the bounded conclusion.

## Application-company limits and next-quarter kill criteria

Public case studies can omit concessions, free work, comparator tuning, and implementation labor. Diligence needs permissioned customer and contract evidence. The numerical record is illustrative, not a company claim. Gross margin also depends on compensation, cloud commitments, support, and revenue recognition outside this compact technical model.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck buyer outcomes, delivery labor, backend substitution, renewal evidence, and owned product boundaries.

External review: Open. Useful expertise: Enterprise application architect able to trace data and validation ownership; Quantum applications researcher able to audit algorithm and baseline evidence.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

diligence dossier

### [Application-company ownership ledger](/playground/quantum/book/77-application-company-diligence/#artifact-77-application-company-diligence)

[Download fixture (.py)](/playground/quantum/artifacts/77-application-company-diligence/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/77-application-company-diligence/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Edward Farhi, Jeffrey Goldstone, and Sam Gutmann. A Quantum Approximate Optimization Algorithm. arXiv. 2014](https://arxiv.org/abs/1411.4028) primary preprint

- [Alberto Peruzzo et al.. A variational eigenvalue solver on a photonic quantum processor. Nature Communications. 2014](https://doi.org/10.1038/ncomms5213) primary paper

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

- [Kishor Bharti et al.. Noisy intermediate-scale quantum algorithms. Reviews of Modern Physics. 2022](https://doi.org/10.1103/RevModPhys.94.015004) peer-reviewed review

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=77-application-company-diligence#report)

Dependency graph

## Prerequisites for this chapter

- [Optimization: Where Caution Is Required Part VIII. Applications and Strategy · Chapter 67](/playground/quantum/book/67-optimization-where-caution-is-required/)

- [Application Evidence Levels Part VIII. Applications and Strategy · Chapter 71](/playground/quantum/book/71-application-evidence-levels/)

- [Software and Developer-Platform Diligence Part IX. Company and Investing · Chapter 75](/playground/quantum/book/75-software-and-developer-platform-diligence/)

Continue the thread

## Next concepts from this chapter

- [Company Diligence Memo Part X. Capstones · Chapter 86](/playground/quantum/book/86-company-diligence-memo/)

- [Error-Correction-Stack Diligence Part IX. Company and Investing · Chapter 76](/playground/quantum/book/76-error-correction-stack-diligence/)

- [Supply-Chain and Infrastructure Diligence Part IX. Company and Investing · Chapter 78](/playground/quantum/book/78-supply-chain-and-infrastructure-diligence/)

[Previous Error-Correction-Stack Diligence](/playground/quantum/book/76-error-correction-stack-diligence/)[Next Supply-Chain and Infrastructure Diligence](/playground/quantum/book/78-supply-chain-and-infrastructure-diligence/)

In this chapter

- [Buyer workflow before quantum method](#section-77-application-company-diligence-1)

- [Dated ownership ledger: data, kernel, validation, outcome](#section-77-application-company-diligence-2)

- [A logistics optimizer loses its claimed boundary](#section-77-application-company-diligence-3)

- [Portability and service intensity shape economics](#section-77-application-company-diligence-4)

- [Interview the evidence, not the pitch](#section-77-application-company-diligence-5)

- [Model answer: services value without scalable software proof](#section-77-application-company-diligence-6)

- [Application-company limits and next-quarter kill criteria](#section-77-application-company-diligence-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=77-application-company-diligence#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/77-application-company-diligence/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/78-supply-chain-and-infrastructure-diligence/ -->

# Supply-Chain and Infrastructure Diligence

Every quantum computer in the world runs on dilution refrigerators, control electronics, lasers, and packaging that somebody else built. This chapter is about the companies selling those parts — and how to tell a real bottleneck from generic quantum exposure.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Translate customer roadmaps into units demanded per installed system, validate qualification and substitution constraints, model concentration and inventory cash, and stress demand across at least three hardware-adoption scenarios before valuing the apparent picks-and-shovels position.

Picks-and-shovels language can hide a leveraged demand forecast. A control, cryogenic, laser, packaging, test, or fabrication supplier may sell a necessary component, yet its volume still depends on system shipments, units per system, qualification, substitution, lead time, customer concentration, and the cash needed to build inventory.

## Demand starts with bills of materials

Demand is computed from a bill of materials: systems delivered per customer and scenario, multiplied by qualified units per system and price. Capacity, yield, inventory days, receivables, gross margin, and concentration then translate demand into cash. An unsigned customer roadmap remains a scenario input, never booked demand.

## Supplier dossier: qualification, capacity, concentration

Supply-Chain and Infrastructure Diligence: claim and source ledger, frozen 14 August 2026
 | Claim under review | Source chain

 | Quantum hardware systems depend on control, measurement, cryogenic, packaging, and software infrastructure beyond the qubit device. |

- [Lieven M. K. Vandersypen et al., A look at the full stack (2021)](https://doi.org/10.1038/s42254-021-00301-w)

- [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)

 | Device benchmarks do not directly forecast production volume or supplier revenue. |

- [Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)

- [Easwar Magesan, J. M. Gambetta, and Joseph Emerson, Scalable and robust randomized benchmarking of quantum processes (2011)](https://doi.org/10.1103/PhysRevLett.106.180504)

 | Open interfaces and reproducible acceptance tests can reduce qualification friction at some stack boundaries. |

- [OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)

- [IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides)

- [Google Quantum AI, Cirq documentation (2026)](https://quantumai.google/cirq)

- [Association for Computing Machinery, Artifact Review and Badging (2026)](https://www.acm.org/publications/policies/artifact-review-and-badging-current)

 | Public technology assessments identify infrastructure and scale dependencies as material development constraints. |

- [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)

- [Lieven M. K. Vandersypen et al., A look at the full stack (2021)](https://doi.org/10.1038/s42254-021-00301-w)

The full-stack and GAO sources establish the surrounding infrastructure burden. Randomized benchmarking illustrates that acceptance evidence requires a declared protocol. OpenQASM, Qiskit, and Cirq identify interface points for some suppliers; ACM supports reproducible qualification artifacts. None forecasts supplier volume or validates an undisclosed customer relationship.

## A cryogenic-control forecast meets unit economics

Quantum supplier demand sensitivity model: inspected record
 | Scenario field | Base value | Unit | Evidence class

 | Systems delivered | 40 | systems/year | scenario
 | Units per system | 8 | qualified units | bill of materials
 | Unit price | 2500 | USD/unit | contract input needed
 | Largest customer | 70 | percent revenue | concentration assumption

In the illustrative base case, 40 systems need 8 control units each at 2,500 dollars, producing 800,000 dollars of revenue. A single customer contributes 70 percent. Even the high-deployment scenario remains a concentrated option, and additional inventory magnifies cash needs. The table keeps attractive technical fit and fragile demand structure visible at once.

```
def model(dossier, scenario_name, concentration_limit, working_capital_limit):
    errors = []
    if not dossier.get("source_ids") or type(dossier.get("units_per_system")) is not int:
        errors.append("sources_or_units_per_system")
    price = dossier.get("price", {})
    if type(price.get("value")) is not int or price.get("unit") != "USD/unit":
        errors.append("price_schema")
    scenario = dossier.get("scenarios", {}).get(scenario_name, {})
    expected = {"systems": "systems", "largest_customer_share": "fraction",
                "working_capital_share": "fraction"}
    for name, unit in expected.items():
        item = scenario.get(name, {})
        if type(item.get("value")) not in (int, float) or item.get("unit") != unit:
            errors.append(name + "_schema")
    if errors:
        return {"decision": "invalid", "errors": sorted(set(errors)), "revenue_usd": None}
    units = scenario["systems"]["value"] * dossier["units_per_system"]
    revenue = units * price["value"]
    constrained = (scenario["largest_customer_share"]["value"] > concentration_limit or
                   scenario["working_capital_share"]["value"] > working_capital_limit)
    return {"decision": "constrained-option" if constrained else "qualify",
            "errors": [], "units": units, "revenue_usd": revenue}
dossier = {"scenario": "cryogenic-control supplier", "source_ids": ["scenario:customer-BOMs"],
           "units_per_system": 8, "price": {"value": 2500, "unit": "USD/unit"},
           "scenarios": {
               "base": {"systems": {"value": 40, "unit": "systems"},
                        "largest_customer_share": {"value": 0.70, "unit": "fraction"},
                        "working_capital_share": {"value": 0.35, "unit": "fraction"}},
               "high": {"systems": {"value": 80, "unit": "systems"},
                        "largest_customer_share": {"value": 0.65, "unit": "fraction"},
                        "working_capital_share": {"value": 0.42, "unit": "fraction"}}}}
base_result = model(dossier, "base", 0.50, 0.30)
bad_result = model({**dossier, "price": {"value": 2500, "unit": ""}}, "base", 0.50, 0.30)
high_result = model(dossier, "high", 0.50, 0.30)
deconcentrated = {**dossier, "scenarios": {**dossier["scenarios"], "base": {
                 **dossier["scenarios"]["base"],
                 "largest_customer_share": {"value": 0.45, "unit": "fraction"},
                 "working_capital_share": {"value": 0.25, "unit": "fraction"}}}}
improved_result = model(deconcentrated, "base", 0.50, 0.30)
assert base_result["units"] == 320 and base_result["revenue_usd"] == 800000
assert bad_result["decision"] == "invalid" and "price_schema" in bad_result["errors"]
assert high_result["decision"] == "constrained-option" and improved_result["decision"] == "qualify"
print(f"PASS: 78 supplier workbook units={base_result['units']} revenue=${base_result['revenue_usd']} invalid={bad_result['errors']} high={high_result['decision']} diversified={improved_result['decision']}")
```

Artifact contract. A dated customer/unit/capacity/cash table with executable concentration and scenario analysis. Units reconcile from systems to components; no unsigned roadmap becomes booked demand; customer concentration and working-capital effects remain visible in all scenarios.

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Substitution risk can dominate technical quality

Request qualified alternatives, failure rates, customer acceptance records, capacity commitments, and who finances inventory. Model loss of the largest customer and a unit-count reduction from architectural change. A technically superior component may justify a partnership, but valuation should reflect correlated system roadmaps and the time needed to qualify a substitute.

[Figure 78.1.](#fig-78-supply-chain-and-infrastructure-diligence-1) System count and units per system reconcile to demand. The concentration wedge remains large even in the high-volume scenario.

## Stress a supplier under three adoption paths

Prompt. Model an infrastructure supplier under low, base, and high system-deployment paths.

Deliverable. Customer assumptions, systems per year, units per system, price, gross margin, capacity, inventory days, concentration, and substitution trigger.

Pass condition. Every demand line multiplies explicit units, high-case revenue is not treated as probability-weighted fact, and concentration and cash needs are reported beside margin.

## Model answer: attractive component, concentrated option

Format. Three-scenario control-electronics supplier model with concentration-adjusted conclusion.

The model answer calls the component attractive and the company concentrated. Unit arithmetic reconciles to 320 units and 800,000 dollars in the base scenario. The concentration gate fails at 70 percent, so high growth does not erase the risk. The next evidence event is a second qualified production customer or a binding capacity-backed order, not another system roadmap slide.

Verification. The fixture reconciles unit demand and shows that the high-growth case still breaches the declared concentration or working-capital limit.

## Infrastructure limits and quarterly demand refresh

The values are schematic and exclude yield, warranty, channel, support, tax, financing, and revenue-recognition effects. Infrastructure businesses have domain-specific qualification and certification cycles. A real model must use contract evidence and audited accounting where available, with legal review of confidential information and customer attribution.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck customer concentration, qualified alternatives, system-volume assumptions, capacity, and inventory cash.

External review: Open. Useful expertise: Quantum control or cryogenic systems engineer familiar with qualification cycles; Hardware supply-chain finance operator able to audit capacity and working capital.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

diligence dossier

### [Quantum supplier demand sensitivity model](/playground/quantum/book/78-supply-chain-and-infrastructure-diligence/#artifact-78-supply-chain-and-infrastructure-diligence)

[Download fixture (.py)](/playground/quantum/artifacts/78-supply-chain-and-infrastructure-diligence/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/78-supply-chain-and-infrastructure-diligence/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [Easwar Magesan, J. M. Gambetta, and Joseph Emerson. Scalable and robust randomized benchmarking of quantum processes. Physical Review Letters. 2011](https://doi.org/10.1103/PhysRevLett.106.180504) primary paper

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=78-supply-chain-and-infrastructure-diligence#report)

Dependency graph

## Prerequisites for this chapter

- [Cryogenics, Control, Packaging, and Manufacturing Part VII. Hardware Architecture · Chapter 62](/playground/quantum/book/62-cryogenics-control-packaging-and-manufacturing/)

- [The Quantum Company Landscape Part IX. Company and Investing · Chapter 73](/playground/quantum/book/73-quantum-company-landscape/)

Continue the thread

## Next concepts from this chapter

- [Application-Company Diligence Part IX. Company and Investing · Chapter 77](/playground/quantum/book/77-application-company-diligence/)

- [Market Timing and Wedge Selection Part IX. Company and Investing · Chapter 79](/playground/quantum/book/79-market-timing-and-wedge-selection/)

- [Error-Correction-Stack Diligence Part IX. Company and Investing · Chapter 76](/playground/quantum/book/76-error-correction-stack-diligence/)

[Previous Application-Company Diligence](/playground/quantum/book/77-application-company-diligence/)[Next Market Timing and Wedge Selection](/playground/quantum/book/79-market-timing-and-wedge-selection/)

In this chapter

- [Demand starts with bills of materials](#section-78-supply-chain-and-infrastructure-diligence-1)

- [Supplier dossier: qualification, capacity, concentration](#section-78-supply-chain-and-infrastructure-diligence-2)

- [A cryogenic-control forecast meets unit economics](#section-78-supply-chain-and-infrastructure-diligence-3)

- [Substitution risk can dominate technical quality](#section-78-supply-chain-and-infrastructure-diligence-4)

- [Stress a supplier under three adoption paths](#section-78-supply-chain-and-infrastructure-diligence-5)

- [Model answer: attractive component, concentrated option](#section-78-supply-chain-and-infrastructure-diligence-6)

- [Infrastructure limits and quarterly demand refresh](#section-78-supply-chain-and-infrastructure-diligence-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=78-supply-chain-and-infrastructure-diligence#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/78-supply-chain-and-infrastructure-diligence/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/79-market-timing-and-wedge-selection/ -->

# Market Timing and Wedge Selection

In quantum, the same idea can be a company, a research project, or a donation to the field depending on when you start it. This chapter is about choosing the narrow entry point — the wedge — that creates evidence before the future arrives.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Choose a narrow buyer pain with a present budget, short proof cycle, reusable technical asset, and a credible expansion path; reject wedges whose revenue requires bespoke labor, an unstated hardware breakthrough, or privileged access that customers can readily replace.

An initial market wedge should purchase evidence while generating revenue. The best early offer solves a present buyer pain, finishes quickly enough to learn, leaves a reusable technical asset, and opens a plausible adjacent workflow. The worst looks like progress while consuming all senior engineering time in bespoke delivery.

## A wedge is a sequence of paid tests

The wedge ledger records buyer, budget evidence, painful event, paid deliverable, proof-cycle days, reusable artifact, custom hours, upstream hardware or interface dependency, renewal route, expansion hypothesis, maximum downside, and expiry. Each item is measured; a broad market-size estimate cannot compensate for no present buyer.

## Dated timing table: pain, budget, proof cycle, expansion

GAO and the National Academies frame current technical uncertainty. ACM’s artifact policy supplies useful reuse criteria. OpenQASM, Qiskit, and Cirq establish versioned integration points at the cutoff. VQE offers a concrete workflow family, while the benchmarking review ensures the early service measures a buyer task rather than an isolated device statistic.

Market Timing and Wedge Selection: claim and source ledger, frozen 14 August 2026
 | No. | Claim | Evidence

 | 1 | Current quantum markets remain constrained by technical maturity and end-to-end performance evidence. | [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)
[National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (2019)](https://doi.org/10.17226/25196)
[Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)
 | 2 | Reproducible artifacts and standard interfaces can turn service work into transferable product learning. | [Association for Computing Machinery, Artifact Review and Badging (2026)](https://www.acm.org/publications/policies/artifact-review-and-badging-current)
[OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)
 | 3 | Official SDK and language interfaces establish current integration surfaces but may change over time. | [IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides)
[Google Quantum AI, Cirq documentation (2026)](https://quantumai.google/cirq)
 | 4 | A VQE-backed wedge inherits hybrid sampling and optimization costs, and its benchmark must still measure the buyer task rather than an isolated quantum subsystem. | [Alberto Peruzzo et al., A variational eigenvalue solver on a photonic quantum processor (2014)](https://doi.org/10.1038/ncomms5213)
[Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)

## A developer tool produces learning but weak retention

```
FIELDS = {"budget_evidence": str, "proof_cycle": dict, "service_intensity": dict,
          "reusable_asset": str, "expiry": str, "hardware_trigger": str, "source_id": str}
def select(wedges, maximum_days, maximum_hours):
    errors = []
    eligible = []
    for name, wedge in wedges.items():
        missing = [field for field, kind in FIELDS.items()
                   if field not in wedge or type(wedge[field]) is not kind or not wedge[field]]
        days, hours = wedge.get("proof_cycle", {}), wedge.get("service_intensity", {})
        if type(days.get("value")) is not int or days.get("unit") != "days":
            missing.append("proof_cycle_schema")
        if type(hours.get("value")) is not int or hours.get("unit") != "hours/customer":
            missing.append("service_intensity_schema")
        if missing:
            errors.append(name + ":" + ",".join(sorted(set(missing))))
        elif days["value"] <= maximum_days and hours["value"] <= maximum_hours:
            eligible.append(name)
    return {"decision": "invalid" if errors else (eligible[0] if len(eligible) == 1 else "no-wedge"),
            "errors": errors, "eligible": sorted(eligible)}
wedges = {
    "benchmark-service": {"budget_evidence": "signed paid discovery", "proof_cycle": {"value": 30, "unit": "days"},
                          "service_intensity": {"value": 30, "unit": "hours/customer"},
                          "reusable_asset": "workload and result schema", "expiry": "2027-02-14",
                          "hardware_trigger": "two portable backends", "source_id": "scenario:buyer-LOI"},
    "bespoke-consulting": {"budget_evidence": "approved project", "proof_cycle": {"value": 90, "unit": "days"},
                           "service_intensity": {"value": 160, "unit": "hours/customer"},
                           "reusable_asset": "customer-only report", "expiry": "2026-11-14",
                           "hardware_trigger": "none before renewal", "source_id": "scenario:SOW"},
    "future-optimizer": {"budget_evidence": "no current budget", "proof_cycle": {"value": 365, "unit": "days"},
                         "service_intensity": {"value": 80, "unit": "hours/customer"},
                         "reusable_asset": "prototype", "expiry": "2026-11-14",
                         "hardware_trigger": "logical resource gate", "source_id": "scenario:interviews"}}
base_result = select(wedges, 60, 60)
bad_wedges = {**wedges, "benchmark-service": {key: value for key, value in wedges["benchmark-service"].items() if key != "expiry"}}
bad_result = select(bad_wedges, 60, 60)
tight_result = select(wedges, 60, 20)
assert base_result["decision"] == "benchmark-service" and base_result["eligible"] == ["benchmark-service"]
assert bad_result["decision"] == "invalid" and "expiry" in bad_result["errors"][0]
assert tight_result["decision"] == "no-wedge" and tight_result["eligible"] == []
print(f"PASS: 79 wedge workbook selected={base_result['decision']} invalid={bad_result['errors']} hours20={tight_result['decision']}")
```

A benchmark service has a 30-day proof cycle, produces a reusable workload and result schema, and needs 30 custom hours. Bespoke application consulting consumes 160 hours and leaves no common artifact. A future fault-tolerant tool has strong technical interest but no present buyer budget. The service wins only with a six-month productization expiry.

Artifact contract. A dated buyer/pain/proof/reuse/expansion table with executable bounded-score and kill checks. No wedge passes without present budget evidence, a reusable asset, maximum service intensity, expiry, and a hardware-dependency trigger.

Market-wedge learning and dependency ledger: inspected record
 | Candidate wedge | Proof cycle | Custom hours | Reusable artifact

 | Benchmark service | 30 days | 30 | workload and result schema
 | Bespoke consulting | 90 days | 160 | none shared
 | Fault-tolerant optimizer | unknown | 80 | prototype only; no current buyer
 | Training | 14 days | 20 | course assets; weak expansion

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## The wrong early revenue can consume the roadmap

Sell the bounded benchmark, instrument delivery time and reuse, and stop if the second and third customers do not reuse the same core artifact. Do not count custom analysis as product adoption. The expansion path is a repeatable evaluation platform; if it does not emerge before expiry, retain the service economics or close the thesis.

[Figure 79.1.](#fig-79-market-timing-and-wedge-selection-1) The benchmark service has a short proof cycle and reusable output. Productization expires if later customers do not reuse the artifact.

## Compare wedges with downside constraints

Prompt. Compare three initial wedges for a quantum software or infrastructure team.

Deliverable. Buyer, current budget evidence, proof-cycle length, paid deliverable, reusable asset, service hours, upstream dependency, expansion path, and kill date.

Pass condition. The chosen wedge has a present buyer, bounded custom work, a reusable artifact, and a milestone that can invalidate the expansion thesis.

## Model answer: narrow benchmark service with an expiry

Format. Benchmark-service wedge selected with a six-month productization expiry.

The model answer selects the benchmark service because it has a present buyer, short proof cycle, capped customization, and reusable output. It explicitly refuses to call this a permanent product wedge. The evaluator fails the choice if custom hours exceed 60 or reuse is absent. Six months later the team must show common artifacts across customers or choose again.

Verification. The evaluator rejects the consulting-heavy and hardware-dependent alternatives and fails the selected wedge if reuse or service-intensity bounds are removed.

## Timing limits and milestone-driven re-evaluation

Early customers can be atypical, and a rigid custom-hour cap can reject valuable design partners. Record exceptions as experiments with explicit learning goals and time limits. Market evidence, SDK interfaces, and hardware dependencies move; the review due date is therefore part of the wedge, not administrative furniture.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck buyer budgets, proof-cycle duration, custom delivery effort, artifact reuse, and wedge expiry.

External review: Open. Useful expertise: Deep-technology product leader experienced with wedge and expansion design; Quantum ecosystem operator able to audit current integration dependencies.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

diligence dossier

### [Market-wedge learning and dependency ledger](/playground/quantum/book/79-market-timing-and-wedge-selection/#artifact-79-market-timing-and-wedge-selection)

[Download fixture (.py)](/playground/quantum/artifacts/79-market-timing-and-wedge-selection/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/79-market-timing-and-wedge-selection/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [Alberto Peruzzo et al.. A variational eigenvalue solver on a photonic quantum processor. Nature Communications. 2014](https://doi.org/10.1038/ncomms5213) primary paper

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=79-market-timing-and-wedge-selection#report)

Dependency graph

## Prerequisites for this chapter

- [When to Build, Partner, Wait, or Avoid Part VIII. Applications and Strategy · Chapter 72](/playground/quantum/book/72-when-to-build-partner-wait-or-avoid/)

- [Software and Developer-Platform Diligence Part IX. Company and Investing · Chapter 75](/playground/quantum/book/75-software-and-developer-platform-diligence/)

Continue the thread

## Next concepts from this chapter

- [Moats, Partnerships, and Standards Part IX. Company and Investing · Chapter 80](/playground/quantum/book/80-moats-partnerships-and-standards/)

- [Supply-Chain and Infrastructure Diligence Part IX. Company and Investing · Chapter 78](/playground/quantum/book/78-supply-chain-and-infrastructure-diligence/)

- [Application-Company Diligence Part IX. Company and Investing · Chapter 77](/playground/quantum/book/77-application-company-diligence/)

[Previous Supply-Chain and Infrastructure Diligence](/playground/quantum/book/78-supply-chain-and-infrastructure-diligence/)[Next Moats, Partnerships, and Standards](/playground/quantum/book/80-moats-partnerships-and-standards/)

In this chapter

- [A wedge is a sequence of paid tests](#section-79-market-timing-and-wedge-selection-1)

- [Dated timing table: pain, budget, proof cycle, expansion](#section-79-market-timing-and-wedge-selection-2)

- [A developer tool produces learning but weak retention](#section-79-market-timing-and-wedge-selection-3)

- [The wrong early revenue can consume the roadmap](#section-79-market-timing-and-wedge-selection-4)

- [Compare wedges with downside constraints](#section-79-market-timing-and-wedge-selection-5)

- [Model answer: narrow benchmark service with an expiry](#section-79-market-timing-and-wedge-selection-6)

- [Timing limits and milestone-driven re-evaluation](#section-79-market-timing-and-wedge-selection-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=79-market-timing-and-wedge-selection#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/79-market-timing-and-wedge-selection/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/80-moats-partnerships-and-standards/ -->

# Moats, Partnerships, and Standards

Every quantum company claims a moat; few can say what would still be true about their advantage if a well-funded competitor started tomorrow. This chapter separates durable advantage from press, grants, and conference logos.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

A defensible moat changes customer switching cost or the company’s learning rate through controlled rights, hard-to-reproduce evidence, embedded interfaces, or compounding data; test it against standardization, partner exit, backend substitution, and time.

A moat claim needs a counterfactual: what happens if the partner leaves, an interface standardizes, the preferred backend becomes replaceable, or the team has twelve months to imitate the asset? Partnerships and standards can accelerate learning or distribution, but association alone creates no controlled right.

## Moats require a counterfactual

The register separates asset, legal right, observed adoption, embedded workflow, switching procedure, exclusive duration, partner dependency, data accumulation, and renewal evidence. It then runs four survival tests. The residual advantage can be a renewable execution lead without being permanent exclusion.

## Dated rights-and-dependency register

OpenQASM and official SDK documentation show how interface openness affects portability. NIST’s PQC project and transition guidance illustrate a standards event that changes migration boundaries. ACM’s artifact policy supports trust and learning claims. The full-stack and consensus sources provide context, not proof of company-specific defensibility.

Moats, Partnerships, and Standards: claim and source ledger, frozen 14 August 2026
 | Bounded claim | Supporting records

 | C-01: Open standards can improve interoperability while reducing proprietary interface lock-in. | [OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)
[National Institute of Standards and Technology, Post-Quantum Cryptography Standards (2024)](https://csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization)
 | C-02: Official SDK documentation establishes current integration points but not durable exclusive control. | [IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides)
[Google Quantum AI, Cirq documentation (2026)](https://quantumai.google/cirq)
 | C-03: PQC standardization illustrates how a technical selection changes migration interfaces and competitive boundaries. | [National Institute of Standards and Technology, Post-Quantum Cryptography Standards (2024)](https://csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization)
[Dustin Moody et al., Transition to Post-Quantum Cryptography Standards (2024)](https://csrc.nist.gov/pubs/ir/8547/ipd)
 | C-04: Artifact reproducibility can support a learning or trust advantage but does not itself establish economic defensibility. | [Association for Computing Machinery, Artifact Review and Badging (2026)](https://www.acm.org/publications/policies/artifact-review-and-badging-current)
[Lieven M. K. Vandersypen et al., A look at the full stack (2021)](https://doi.org/10.1038/s42254-021-00301-w)
[National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (2019)](https://doi.org/10.17226/25196)

## A standards contribution survives only if adoption matters

A platform contributes to a standard and integrates deeply with two buyer workflows. The contribution itself is public, so exclusion does not survive. Migration tooling, compatibility data, and proven cutover procedure remain useful after a partner exit and can shorten delivery. The result is an execution lead that must be renewed, not an unassailable standards moat.

Quantum moat falsification register: inspected record
 | Moat candidate | Controlled right | Survival test | Residual

 | Standards contribution | public specification | standardization | no exclusion
 | Partner access | revocable relationship | partner exit | fails
 | Migration data | contract-bound dataset | backend substitution | partial
 | Embedded workflow | deployed integration | twelve-month imitation | execution lead

Artifact contract. A dated asset/rights/adoption/substitution table with executable survival tests. The claimed moat must survive at least one partner exit, one interface standardization event, and one backend substitution; rights and adoption evidence are recorded separately.

```
SCENARIOS = ("backend_substitution", "partner_exit", "standardization")
FIELDS = {"asset": str, "rights_basis": str, "adoption": dict, "survives": list, "source_id": str}
def falsify(dossier, minimum_deployments):
    errors = []
    coverage = {scenario: [] for scenario in SCENARIOS}
    for row in dossier.get("assets", []):
        missing = [name for name, kind in FIELDS.items()
                   if name not in row or type(row[name]) is not kind]
        missing += [name for name in ("asset", "rights_basis", "source_id") if not row.get(name)]
        adoption = row.get("adoption", {})
        if type(adoption.get("value")) is not int or adoption.get("unit") != "deployments":
            missing.append("adoption_schema")
        unknown = set(row.get("survives", [])) - set(SCENARIOS)
        if unknown:
            missing.append("unknown_scenario")
        if missing:
            errors.append(row.get("asset", "asset") + ":" + ",".join(sorted(set(missing))))
            continue
        if adoption["value"] >= minimum_deployments:
            for scenario in row["survives"]:
                coverage[scenario].append(row["asset"])
    uncovered = sorted(name for name, assets in coverage.items() if not assets)
    decision = "invalid" if errors else ("renewable-execution-lead" if not uncovered else "unproven")
    return {"decision": decision, "errors": errors, "uncovered": uncovered,
            "survivors": {name: sorted(assets) for name, assets in coverage.items()}}
dossier = {"scenario": "platform moat red-team", "assets": [
    {"asset": "owned integration playbook", "rights_basis": "company copyright",
     "adoption": {"value": 6, "unit": "deployments"},
     "survives": ["partner_exit", "standardization", "backend_substitution"],
     "source_id": "scenario:deployment-ledger"},
    {"asset": "preferred backend access", "rights_basis": "revocable agreement",
     "adoption": {"value": 3, "unit": "deployments"}, "survives": [],
     "source_id": "scenario:partner-contract"}]}
base_result = falsify(dossier, 2)
bad_assets = [{**dossier["assets"][0], "adoption": {"value": 6, "unit": ""}}, dossier["assets"][1]]
bad_result = falsify({**dossier, "assets": bad_assets}, 2)
low_adoption = [{**dossier["assets"][0], "adoption": {"value": 1, "unit": "deployments"}}, dossier["assets"][1]]
sensitive_result = falsify({**dossier, "assets": low_adoption}, 2)
assert base_result["decision"] == "renewable-execution-lead" and base_result["uncovered"] == []
assert bad_result["decision"] == "invalid" and "adoption_schema" in bad_result["errors"][0]
assert sensitive_result["decision"] == "unproven" and sensitive_result["uncovered"] == sorted(SCENARIOS)
print(f"PASS: 80 moat dossier base={base_result['decision']} survivors={base_result['survivors']} invalid={bad_result['errors']} low_adoption={sensitive_result['decision']}")
```

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Partnership press is weaker than enforceable access

Value rights and adoption separately. Request license terms, data-use rights, integration depth, customer switching tests, and evidence that each deployment improves the next. Re-run the substitution and partner-exit scenarios annually. If the advantage depends entirely on access that can be revoked, price it as a dependency.

## Run four falsification tests on a moat claim

Prompt. Falsify one claimed moat using partner exit, standardization, substitution, and time-decay scenarios.

Deliverable. Rights register, adoption evidence, switching workflow, four scenario results, residual advantage, and next review event.

Pass condition. The conclusion distinguishes owned rights from relationship access, uses observed adoption rather than membership, and weakens when a scenario removes the advantage.

## Model answer: integration advantage, not permanent exclusion

Format. Integration moat recast as a renewable execution lead rather than exclusion.

The model answer passes the workflow-integration and learning-data tests, fails permanent exclusivity, and partially survives partner exit. It labels the residual advantage a renewable execution lead. The decision remains conditional on observed migration-time improvement and customer retention; standards membership and press announcements carry no independent weight.

Verification. The survival tests show which adoption and migration assets persist after partner exit and which claimed benefits disappear under an open interface.

[Figure 80.1.](#fig-80-moats-partnerships-and-standards-1) Partner exit breaks the claim; standardization, substitution, and time leave only a renewable execution lead.

## Moat limits and the next standards checkpoint

This is technical and operating diligence, not legal advice. Rights require document review by qualified counsel, and adoption requires customer evidence. Open standards can expand a market while reducing lock-in, so failing an exclusion test does not imply a poor business. It changes the mechanism the thesis must defend. Any residual lead still needs observed buyer behavior that changes because of it.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck standards adoption, contractual rights, partner durability, switching tests, and retained learning assets.

External review: Open. Useful expertise: Technology transactions specialist able to distinguish rights from announcements; Quantum standards or interoperability engineer familiar with interface adoption.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

diligence dossier

### [Quantum moat falsification register](/playground/quantum/book/80-moats-partnerships-and-standards/#artifact-80-moats-partnerships-and-standards)

[Download fixture (.py)](/playground/quantum/artifacts/80-moats-partnerships-and-standards/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/80-moats-partnerships-and-standards/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [National Institute of Standards and Technology. Post-Quantum Cryptography Standards. NIST. 2024](https://csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization) official standardization project

- [Dustin Moody et al.. Transition to Post-Quantum Cryptography Standards. National Institute of Standards and Technology. 2024](https://csrc.nist.gov/pubs/ir/8547/ipd) official transition guidance (initial public draft)

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=80-moats-partnerships-and-standards#report)

Dependency graph

## Prerequisites for this chapter

- [Software and Developer-Platform Diligence Part IX. Company and Investing · Chapter 75](/playground/quantum/book/75-software-and-developer-platform-diligence/)

- [Market Timing and Wedge Selection Part IX. Company and Investing · Chapter 79](/playground/quantum/book/79-market-timing-and-wedge-selection/)

Continue the thread

## Next concepts from this chapter

- [Reading Roadmaps Like an Operator Part IX. Company and Investing · Chapter 81](/playground/quantum/book/81-reading-roadmaps-like-an-operator/)

- [Supply-Chain and Infrastructure Diligence Part IX. Company and Investing · Chapter 78](/playground/quantum/book/78-supply-chain-and-infrastructure-diligence/)

- [Investment Memo and Startup Thesis Templates Part IX. Company and Investing · Chapter 82](/playground/quantum/book/82-investment-memo-and-startup-thesis-templates/)

[Previous Market Timing and Wedge Selection](/playground/quantum/book/79-market-timing-and-wedge-selection/)[Next Reading Roadmaps Like an Operator](/playground/quantum/book/81-reading-roadmaps-like-an-operator/)

In this chapter

- [Moats require a counterfactual](#section-80-moats-partnerships-and-standards-1)

- [Dated rights-and-dependency register](#section-80-moats-partnerships-and-standards-2)

- [A standards contribution survives only if adoption matters](#section-80-moats-partnerships-and-standards-3)

- [Partnership press is weaker than enforceable access](#section-80-moats-partnerships-and-standards-4)

- [Run four falsification tests on a moat claim](#section-80-moats-partnerships-and-standards-5)

- [Model answer: integration advantage, not permanent exclusion](#section-80-moats-partnerships-and-standards-6)

- [Moat limits and the next standards checkpoint](#section-80-moats-partnerships-and-standards-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=80-moats-partnerships-and-standards#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/80-moats-partnerships-and-standards/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/81-reading-roadmaps-like-an-operator/ -->

# Reading Roadmaps Like an Operator

A quantum roadmap is a document written by an interested party about a future that depends on physics, capital, and supply chains. Operators read it anyway — by translating every milestone into metrics, dependencies, and evidence they can request.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Rewrite every roadmap milestone as an observable with units, provenance, prerequisites, integration owner, and failure branch; then schedule on the longest unresolved dependency chain rather than the vendor’s headline date.

Roadmaps become useful when nouns turn into measured verbs. 'Logical qubit', 'scale', 'advantage', and 'fault tolerant' each hide multiple exit criteria. An operator rewrites every milestone with units, a measurement protocol, a primary record, prerequisite nodes, owner, failure branch, and review event.

[Figure 81.1.](#fig-81-reading-roadmaps-like-an-operator-1) The logical-operation date is computed from prerequisites. Moving decoder throughput to quarter four moves the child to quarter five.

## Turn milestone nouns into measured verbs

The roadmap is a directed acyclic graph. Earliest completion for a child is the maximum completion of its parents plus its own validated duration. Physical error, cycle time, decoder throughput, logical operations, fabrication yield, control and application resources can occupy different paths. The longest unresolved path sets the conditional date.

## Roadmap ledger with dependencies and owners

Reading Roadmaps Like an Operator: claim and source ledger, frozen 14 August 2026
 | Evidence ID | Records | Claim supported

 | E-81-1 | [Craig Gidney and Martin Ekerå, How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits (2021)](https://doi.org/10.22331/q-2021-04-15-433)
[U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)
[National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (2019)](https://doi.org/10.17226/25196) | Fault-tolerant roadmaps depend jointly on physical error, code distance, cycle time, decoder performance, logical operations, and manufacturing scale.
 | E-81-2 | [Craig Gidney and Martin Ekerå, How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits (2021)](https://doi.org/10.22331/q-2021-04-15-433) | Published resource estimates expose explicit assumptions that can be translated into roadmap dependencies.
 | E-81-3 | [Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)
[U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)
[Association for Computing Machinery, Artifact Review and Badging (2026)](https://www.acm.org/publications/policies/artifact-review-and-badging-current) | Benchmark and technology-assessment evidence must be dated and scoped before it becomes a milestone exit criterion.
 | E-81-4 | [OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)
[IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides)
[Google Quantum AI, Cirq documentation (2026)](https://quantumai.google/cirq) | Open software interfaces can be tracked as integration dependencies without being confused with hardware capability.

The resource estimate by Gidney and Ekerå supplies explicit assumptions that can become nodes; it does not supply a universal roadmap. GAO, the National Academies, and the benchmarking review anchor dated evidence. OpenQASM and official SDKs can be integration milestones. ACM’s artifact policy supports reproducible exit records.

## A logical-qubit target hides throughput prerequisites

A headline logical-operation milestone depends on below-threshold physical behavior, repeated syndrome extraction, decoder throughput, and a validated logical gate. The decoder node slips from quarter 2 to quarter 4. The child cannot remain in quarter 3. Recomputing the graph moves the conditional result to quarter 5 and identifies the responsible dependency without claiming that every other task stops.

Artifact contract. A dated milestone DAG with executable dependency, cycle, and earliest-date checks. Every milestone has a measurable exit criterion and source; no child precedes an unmet parent; the output reports a conditional interval and failing dependency instead of one unsupported date.

** Executable reference fixture**

```
def schedule(roadmap):
    errors = []
    nodes = roadmap.get("milestones", {})
    for name, node in nodes.items():
        duration, exit_gate = node.get("duration", {}), node.get("exit", {})
        if type(node.get("parents")) is not list or not node.get("source_id"):
            errors.append(name + "_parents_or_source")
        if type(duration.get("value")) is not int or duration.get("unit") != "review intervals":
            errors.append(name + "_duration")
        if type(exit_gate.get("threshold")) not in (int, float) or not exit_gate.get("unit"):
            errors.append(name + "_exit")
        if any(parent not in nodes for parent in node.get("parents", [])):
            errors.append(name + "_unknown_parent")
    finish = {}
    pending = set(nodes)
    while pending and not errors:
        ready = sorted(name for name in pending if all(parent in finish for parent in nodes[name]["parents"]))
        if not ready:
            errors.append("cycle")
            break
        for name in ready:
            finish[name] = max([finish[parent] for parent in nodes[name]["parents"]] or [0]) + nodes[name]["duration"]["value"]
        pending = pending - set(ready)
    target = roadmap.get("target")
    return {"decision": "invalid" if errors else f"conditional-interval-{finish[target]}",
            "errors": sorted(set(errors)), "finish": finish, "target_finish": finish.get(target)}
roadmap = {"scenario": "logical-qubit dependency roadmap", "target": "logical", "milestones": {
    "physical": {"parents": [], "duration": {"value": 1, "unit": "review intervals"},
                 "exit": {"threshold": 0.005, "unit": "error/cycle"}, "source_id": "scenario:device-plan"},
    "syndrome": {"parents": ["physical"], "duration": {"value": 1, "unit": "review intervals"},
                 "exit": {"threshold": 1.0, "unit": "MHz"}, "source_id": "scenario:control-plan"},
    "decoder": {"parents": ["syndrome"], "duration": {"value": 2, "unit": "review intervals"},
                "exit": {"threshold": 1.0, "unit": "Msyndromes/s"}, "source_id": "scenario:decoder-plan"},
    "logical": {"parents": ["syndrome", "decoder"], "duration": {"value": 1, "unit": "review intervals"},
                "exit": {"threshold": 0.001, "unit": "logical error/operation"}, "source_id": "scenario:system-plan"}}}
base_result = schedule(roadmap)
bad_decoder = {key: value for key, value in roadmap["milestones"]["decoder"].items() if key != "source_id"}
bad_result = schedule({**roadmap, "milestones": {**roadmap["milestones"], "decoder": bad_decoder}})
delayed_decoder = {**roadmap["milestones"]["decoder"], "duration": {"value": 3, "unit": "review intervals"}}
delayed_result = schedule({**roadmap, "milestones": {**roadmap["milestones"], "decoder": delayed_decoder}})
assert base_result["target_finish"] == 5 and base_result["finish"]["decoder"] == 4
assert bad_result["decision"] == "invalid" and "decoder_parents_or_source" in bad_result["errors"]
assert delayed_result["target_finish"] == 6 and delayed_result["decision"] == "conditional-interval-6"
print(f"PASS: 81 roadmap workbook base={base_result['target_finish']} intervals invalid={bad_result['errors']} decoder_delay={delayed_result['target_finish']}")
```

Quantum roadmap dependency and critical-path record: inspected record
 | Milestone | Parent completion | Own duration | Earliest quarter

 | Physical cycle | 0 | 1 | 1
 | Syndrome stream | 1 | 1 | 2
 | Decoder throughput | 2 | 2 after slip | 4
 | Logical operation | max(2,4) | 1 | 5

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Critical paths move when evidence arrives

Manage evidence, not dates. Each review asks whether the exit measurement exists under its declared scale and conditions. A failed node activates its alternative branch and recomputes the path. A vendor date can be recorded as a claim, but the operating plan uses the dependency-derived interval and exposes disagreement.

## Red-team a five-year roadmap

Prompt. Translate five roadmap claims into a dependency graph with measured exits.

Deliverable. Milestone table, units, primary source, parent dependencies, owner, earliest/latest conditional dates, failure branch, and refresh event.

Pass condition. The DAG is acyclic, every date follows all parents, no milestone uses 'scale' without a quantity, and changing one dependency recomputes the critical path.

## Model answer: date becomes a conditional interval

Format. Five-node logical-operation roadmap whose headline year becomes a conditional range.

The five-node model produces an earliest conditional quarter of 5 after decoder delay. It does not assign probability or pretend the durations are known precisely. The answer lists physical performance and decoder throughput as separate prerequisites, names the owner of each test, and schedules the next review when primary evidence is expected.

Verification. The fixture validates the DAG and reproduces the shifted date when decoder throughput is delayed by one review interval.

## Roadmap uncertainty and the next evidence release

Critical-path arithmetic can imply false precision when research duration is unknown and parallel work is coupled. Use ranges and scenarios in a real program, and preserve epistemic status for every duration. Company roadmaps also contain confidential manufacturing and financing dependencies not visible in technical publications.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck primary milestone evidence, resource assumptions, dependency completion, owners, and critical-path intervals.

External review: Open. Useful expertise: Fault-tolerant architecture researcher able to audit dependency physics; Technical program manager experienced with critical-path and evidence-gated roadmaps.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

diligence dossier

### [Quantum roadmap dependency and critical-path record](/playground/quantum/book/81-reading-roadmaps-like-an-operator/#artifact-81-reading-roadmaps-like-an-operator)

[Download fixture (.py)](/playground/quantum/artifacts/81-reading-roadmaps-like-an-operator/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/81-reading-roadmaps-like-an-operator/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [Craig Gidney and Martin Ekerå. How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits. Quantum. 2021](https://doi.org/10.22331/q-2021-04-15-433) primary peer-reviewed resource estimate

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=81-reading-roadmaps-like-an-operator#report)

Dependency graph

## Prerequisites for this chapter

- [Resource Estimation for Fault-Tolerant Algorithms Part V. Practical Software · Chapter 43](/playground/quantum/book/43-resource-estimation-for-fault-tolerant-algorithms/)

- [Surface Codes and Threshold Intuition Part VI. Reliability and Fault Tolerance · Chapter 49](/playground/quantum/book/49-surface-codes-and-threshold-intuition/)

- [Benchmarking Quantum Programs Part V. Practical Software · Chapter 42](/playground/quantum/book/42-benchmarking-quantum-programs/)

Continue the thread

## Next concepts from this chapter

- [Investment Memo and Startup Thesis Templates Part IX. Company and Investing · Chapter 82](/playground/quantum/book/82-investment-memo-and-startup-thesis-templates/)

- [Moats, Partnerships, and Standards Part IX. Company and Investing · Chapter 80](/playground/quantum/book/80-moats-partnerships-and-standards/)

- [Market Timing and Wedge Selection Part IX. Company and Investing · Chapter 79](/playground/quantum/book/79-market-timing-and-wedge-selection/)

[Previous Moats, Partnerships, and Standards](/playground/quantum/book/80-moats-partnerships-and-standards/)[Next Investment Memo and Startup Thesis Templates](/playground/quantum/book/82-investment-memo-and-startup-thesis-templates/)

In this chapter

- [Turn milestone nouns into measured verbs](#section-81-reading-roadmaps-like-an-operator-1)

- [Roadmap ledger with dependencies and owners](#section-81-reading-roadmaps-like-an-operator-2)

- [A logical-qubit target hides throughput prerequisites](#section-81-reading-roadmaps-like-an-operator-3)

- [Critical paths move when evidence arrives](#section-81-reading-roadmaps-like-an-operator-4)

- [Red-team a five-year roadmap](#section-81-reading-roadmaps-like-an-operator-5)

- [Model answer: date becomes a conditional interval](#section-81-reading-roadmaps-like-an-operator-6)

- [Roadmap uncertainty and the next evidence release](#section-81-reading-roadmaps-like-an-operator-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=81-reading-roadmaps-like-an-operator#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/81-reading-roadmaps-like-an-operator/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/82-investment-memo-and-startup-thesis-templates/ -->

# Investment Memo and Startup Thesis Templates

Most quantum investment write-ups are pitches wearing a memo's clothes. This chapter gives you a template that forces the opposite shape: decision first, uncertainty near the top, and proof gates you can put on a calendar.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

A defensible memo ties a dated decision to a buyer problem, stack position, primary evidence, technical dependencies, baseline, economics, scenarios, kill criteria, and the next observable; its conclusion must recompute when those inputs change.

A memo is valuable when a skeptical colleague can change an input and reproduce the new decision. Narrative polish is secondary. Facts, company claims, analyst inferences, and scenarios occupy different fields, and every current assumption has an owner and expiry. An aggregate score would hide which one failed.

## The memo is an executable decision record

The two-page architecture contains decision and scope; buyer and repeated problem; controlled stack layer; primary evidence; technical gates and baseline; customer and economic evidence; dependencies and financing; downside, base and upside scenarios without invented probabilities; kill criteria; conflicts; and next evidence event.

[Figure 82.1.](#fig-82-investment-memo-and-startup-thesis-templates-1) Portability and renewal are independent load-bearing inputs. Either switch moves the decision from conditional proceed to reject.

## Two-page evidence architecture

GAO and the National Academies provide technology context. Randomized benchmarking and the benchmarking review delimit performance evidence. ACM and official interface documents support rerunnable technical checks. None provides company-specific buyer, revenue, cost, financing, or rights evidence; those must come from primary company, contract, filing, and customer records in a real memo.

Investment Memo and Startup Thesis Templates: claim and source ledger, frozen 14 August 2026
 | Claim under review | Source chain

 | Technology assessments provide dated state-of-technology evidence but do not substitute for company primary materials or customer verification. |

- [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)

- [National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (2019)](https://doi.org/10.17226/25196)

 | Benchmark results must preserve comparator and system boundary before entering a commercial thesis. |

- [Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)

- [Easwar Magesan, J. M. Gambetta, and Joseph Emerson, Scalable and robust randomized benchmarking of quantum processes (2011)](https://doi.org/10.1103/PhysRevLett.106.180504)

 | Reproducible artifacts and documented interfaces make technical diligence rerunnable. |

- [Association for Computing Machinery, Artifact Review and Badging (2026)](https://www.acm.org/publications/policies/artifact-review-and-badging-current)

- [OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)

- [IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides)

- [Google Quantum AI, Cirq documentation (2026)](https://quantumai.google/cirq)

 | A technical memo should separate established algorithmic results from company execution and market inferences. |

- [National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (2019)](https://doi.org/10.17226/25196)

- [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)

## Scenario table without a synthetic valuation

Evidence-linked memo decision record: inspected record
 | Decision input | Base record | Kill condition | Owner

 | Backend portability | 2 adapters pass task | fewer than 2 | technical lead
 | Buyer renewal | 3 of 4 | below 3 | commercial lead
 | Review age | 0 days | over 90 days | memo owner
 | Decision | conditional proceed | any kill true | committee

The sample developer-platform memo uses two decision gates: cross-backend portability and a buyer renewal threshold. Both are observable. The base record passes and returns conditional proceed. Removing portability or falling below the renewal threshold changes the label to reject without editing the prose. Downside and upside remain sensitivity cases, not forecasts with decorative probabilities.

```
METRICS = {"portable_backends": "backends", "renewals": "buyers",
           "eligible_buyers": "buyers", "age": "days"}
def valid_iso(value):
    parts = value.split("-") if type(value) is str else []
    return len(parts) == 3 and [len(part) for part in parts] == [4, 2, 2] and all(part.isdigit() for part in parts)
def decide(memo, maximum_age_days=90):
    errors = []
    if memo.get("scenario") not in {"base", "downside", "upside"} or memo.get("claim_kind") not in {"fact", "inference"}:
        errors.append("scenario_or_claim_kind")
    sources = memo.get("sources", {})
    if type(sources) is not dict or not sources:
        errors.append("sources")
    else:
        for source_id, source_date in sources.items():
            if not valid_iso(source_date):
                errors.append(source_id + "_date")
    for name, unit in METRICS.items():
        item = memo.get(name, {})
        if type(item.get("value")) is not int or item.get("unit") != unit:
            errors.append(name + "_schema")
    failures = []
    if not errors:
        if memo["portable_backends"]["value"] < 2:
            failures.append("portability")
        if memo["renewals"]["value"] < 3:
            failures.append("renewals")
        if memo["age"]["value"] > maximum_age_days:
            failures.append("freshness")
    return {"decision": "invalid" if errors else ("reject" if failures else "conditional-proceed"),
            "errors": sorted(set(errors)), "failed_gates": failures}
memo = {"scenario": "base", "claim_kind": "inference",
        "sources": {"scenario:renewal-ledger": "2026-08-01", "scenario:portability-run": "2026-08-10"},
        "portable_backends": {"value": 2, "unit": "backends"},
        "renewals": {"value": 3, "unit": "buyers"},
        "eligible_buyers": {"value": 4, "unit": "buyers"}, "age": {"value": 4, "unit": "days"}}
base_result = decide(memo)
bad_result = decide({**memo, "sources": {"scenario:renewal-ledger": ""}})
renewal_result = decide({**memo, "scenario": "downside", "renewals": {"value": 2, "unit": "buyers"}})
portability_result = decide({**memo, "scenario": "downside", "portable_backends": {"value": 1, "unit": "backends"}})
assert base_result["decision"] == "conditional-proceed"
assert bad_result["decision"] == "invalid" and "scenario:renewal-ledger_date" in bad_result["errors"]
assert renewal_result["failed_gates"] == ["renewals"] and portability_result["failed_gates"] == ["portability"]
print(f"PASS: 82 memo workbook base={base_result['decision']} invalid={bad_result['errors']} renewal={renewal_result['decision']} portability={portability_result['decision']}")
```

Artifact contract. A dated compact memo dataset and executable scenario/expiry evaluator. Every conclusion traces to an assumption or source; stale assumptions fail; base, downside, and upside remain scenarios rather than invented probabilities; kill criteria can reverse the label.

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Assumptions get owners and expiry dates

Assign every assumption a reviewer and date. Put source links at the claim, record contrary evidence, and show the effect of each sensitivity. The conclusion then names maximum commitment, the artifact to obtain, and the two conditions that end the thesis. This makes a short memo denser and more useful than a long market narrative.

## Write a memo another reviewer can rerun

Prompt. Write a two-page quantum-company decision memo using only dated, attributable evidence.

Deliverable. Decision, buyer, stack, evidence ledger, baseline, dependencies, three unweighted scenarios, two kill criteria, owner, and ninety-day next review.

Pass condition. Every material fact has a source and date, inference is labeled, no scenario is presented as a forecast probability, and either kill criterion changes the recommendation when triggered.

## Model answer: conditional proceed with two kill criteria

Format. Conditional-proceed memo for a developer platform with portability and buyer-renewal gates.

The model answer conditionally proceeds with a bounded diligence partnership. Portability passes two adapters and buyer renewal meets the declared threshold. Either failure flips the evaluator to reject. The memo labels technical evidence separately from commercial inference, lists conflicts, and expires in ninety days. It contains no valuation because the available record does not justify one.

Verification. The evaluator returns proceed under the base inputs and reject when either the portability test or renewal threshold fails.

## Memo boundaries, conflicts, and ninety-day expiry

The structure is not investment advice and cannot replace legal, financial, tax, security, or domain review. Public evidence may be incomplete, and private evidence may be biased. Scenario tables expose sensitivity but do not estimate probability unless a defensible method and data support it.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck source expiry, buyer evidence, benchmark boundaries, scenario inputs, conflicts, and kill criteria.

External review: Open. Useful expertise: Deep-technology investor or operator able to audit decision and economics logic; Quantum systems specialist able to validate technical dependencies and benchmark boundaries.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

diligence dossier

### [Evidence-linked memo decision record](/playground/quantum/book/82-investment-memo-and-startup-thesis-templates/#artifact-82-investment-memo-and-startup-thesis-templates)

[Download fixture (.py)](/playground/quantum/artifacts/82-investment-memo-and-startup-thesis-templates/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/82-investment-memo-and-startup-thesis-templates/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [Easwar Magesan, J. M. Gambetta, and Joseph Emerson. Scalable and robust randomized benchmarking of quantum processes. Physical Review Letters. 2011](https://doi.org/10.1103/PhysRevLett.106.180504) primary paper

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=82-investment-memo-and-startup-thesis-templates#report)

Dependency graph

## Prerequisites for this chapter

- [Application Evidence Levels Part VIII. Applications and Strategy · Chapter 71](/playground/quantum/book/71-application-evidence-levels/)

- [The Quantum Company Landscape Part IX. Company and Investing · Chapter 73](/playground/quantum/book/73-quantum-company-landscape/)

- [Reading Roadmaps Like an Operator Part IX. Company and Investing · Chapter 81](/playground/quantum/book/81-reading-roadmaps-like-an-operator/)

Continue the thread

## Next concepts from this chapter

- [Company Diligence Memo Part X. Capstones · Chapter 86](/playground/quantum/book/86-company-diligence-memo/)

- [Moats, Partnerships, and Standards Part IX. Company and Investing · Chapter 80](/playground/quantum/book/80-moats-partnerships-and-standards/)

- [Market Timing and Wedge Selection Part IX. Company and Investing · Chapter 79](/playground/quantum/book/79-market-timing-and-wedge-selection/)

[Previous Reading Roadmaps Like an Operator](/playground/quantum/book/81-reading-roadmaps-like-an-operator/)[Next Full-Stack Algorithm Trace](/playground/quantum/book/83-full-stack-algorithm-trace/)

In this chapter

- [The memo is an executable decision record](#section-82-investment-memo-and-startup-thesis-templates-1)

- [Two-page evidence architecture](#section-82-investment-memo-and-startup-thesis-templates-2)

- [Scenario table without a synthetic valuation](#section-82-investment-memo-and-startup-thesis-templates-3)

- [Assumptions get owners and expiry dates](#section-82-investment-memo-and-startup-thesis-templates-4)

- [Write a memo another reviewer can rerun](#section-82-investment-memo-and-startup-thesis-templates-5)

- [Model answer: conditional proceed with two kill criteria](#section-82-investment-memo-and-startup-thesis-templates-6)

- [Memo boundaries, conflicts, and ninety-day expiry](#section-82-investment-memo-and-startup-thesis-templates-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=82-investment-memo-and-startup-thesis-templates#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/82-investment-memo-and-startup-thesis-templates/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/83-full-stack-algorithm-trace/ -->

# Full-Stack Algorithm Trace

Follow one quantum algorithm all the way down — problem, mathematics, circuit, code, noise, hardware budget, decision — and publish the trace as an artifact other engineers can inspect. That end-to-end chain is your capstone.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Build a trace whose problem promise, classical baseline, state evolution, circuit, compiled operations, noise model, resource estimate, and decision consequence are linked by executable small cases and explicit assumptions.

A full-stack trace is a chain of preserved contracts. The four-item Grover instance begins with an oracle promise and basis order, evolves amplitudes through preparation, phase marking and diffusion, compiles gates into an instruction ledger, and ends with measurement, error assumptions, resource counts, and the claim those counts can support.

## Capstone brief: one algorithm, every interface

[Figure 83.1.](#fig-83-full-stack-algorithm-trace-1) For marked index 2, diffusion moves all ideal amplitude to the third bar. The three snapshots preserve normalization.

Use basis order \(\lvert 00\rangle,\lvert 01\rangle,\lvert 10\rangle,\lvert 11\rangle\). The ideal uniform state has amplitudes \(1/2\). One oracle call changes the marked amplitude’s sign; inversion about the mean then maps the marked state to amplitude 1 and all others to 0. This exact small case tests correctness, not large-instance advantage.

## Trace Grover’s four-item instance by amplitude

Grover supplies the search method and the lower-bound paper establishes the query-model boundary. OpenQASM and Qiskit provide inspectable circuit interfaces. Randomized benchmarking and the full-stack benchmark sources distinguish a logical trace from physical evidence. ACM’s policy supports the reproducible artifact contract.

Full-Stack Algorithm Trace: claim and source ledger, frozen 14 August 2026
 | No. | Claim | Evidence

 | 1 | Grover's algorithm supplies a quadratic query improvement for unstructured search under its oracle model. | [Lov K. Grover, A fast quantum mechanical algorithm for database search (1996)](https://doi.org/10.1145/237814.237866)
[Robert Beals, Harry Buhrman, Richard Cleve, Michele Mosca, and Ronald de Wolf, Quantum lower bounds by polynomials (2001)](https://doi.org/10.1145/502090.502097)
 | 2 | Quantum lower bounds delimit that query advantage and make the input model essential. | [Robert Beals, Harry Buhrman, Richard Cleve, Michele Mosca, and Ronald de Wolf, Quantum lower bounds by polynomials (2001)](https://doi.org/10.1145/502090.502097)
 | 3 | OpenQASM provides an inspectable circuit description boundary for a small trace. | [OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)
[IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides)
 | 4 | Full-stack benchmarks require compiled resources, execution conditions, and validation beyond the logical algorithm. | [Lieven M. K. Vandersypen et al., A look at the full stack (2021)](https://doi.org/10.1038/s42254-021-00301-w)
[Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)
[Easwar Magesan, J. M. Gambetta, and Joseph Emerson, Scalable and robust randomized benchmarking of quantum processes (2011)](https://doi.org/10.1103/PhysRevLett.106.180504)
[Association for Computing Machinery, Artifact Review and Badging (2026)](https://www.acm.org/publications/policies/artifact-review-and-badging-current)

## Compile the oracle and count the physical consequences

```
def one_iteration(marked, apply_oracle=True):
    if marked not in range(4) or type(apply_oracle) is not bool:
        raise ValueError("marked must be a four-item oracle index")
    amplitudes = [0.5] * 4
    if apply_oracle:
        amplitudes[marked] *= -1
    assert abs(sum(a*a for a in amplitudes) - 1.0) < 1e-12
    mean = sum(amplitudes) / 4
    amplitudes = [2*mean - a for a in amplitudes]
    assert abs(sum(a*a for a in amplitudes) - 1.0) < 1e-12
    return amplitudes
baseline = one_iteration(2)
alternate = one_iteration(0)
oracle_omitted = one_iteration(2, False)
for marked in range(4):
    result = one_iteration(marked)
    assert result[marked] == 1.0 and sum(abs(a) for i, a in enumerate(result) if i != marked) == 0
assert baseline == [0.0, 0.0, 1.0, 0.0] and alternate == [1.0, 0.0, 0.0, 0.0]
assert oracle_omitted == [0.5, 0.5, 0.5, 0.5]
print(f"PASS: 83 full-stack Grover baseline={baseline} alternate={alternate} no_oracle_success={oracle_omitted[2]**2:.2f}")
```

For marked index 2, the phase vector is [1/2, 1/2, -1/2, 1/2]. Its mean is 1/4. Applying \(a_i\mapsto 2\bar{a}-a_i\) yields [0, 0, 1, 0]. The table records that state evolution. The code repeats it for all four possible marked indices, checks normalization at every material step, and separates one oracle query from the gates needed to implement that oracle.

Artifact contract. A semantic state table, OpenQASM-adjacent gate ledger, executable amplitude fixture, and resource-account rubric. The fixture normalizes every state, returns the marked item with probability one in the ideal one-iteration case, and the report separates query count from compiled gates, shots, and error assumptions.

Full-stack four-item Grover trace: inspected record
 | Step | Amplitude vector in declared basis | Invariant | Resource boundary

 | Uniform | [1/2, 1/2, 1/2, 1/2] | norm 1 | state preparation
 | Oracle for index 2 | [1/2, 1/2, -1/2, 1/2] | norm 1 | one query
 | Diffusion | [0, 0, 1, 0] | norm 1 | logical gates separate
 | Measurement | index 2 with probability 1 | probabilities sum 1 | shots separate

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Package a reproducible trace submission

The submission must add a compiled ledger and hardware assumptions without promoting the toy result. Query complexity, logical one- and two-qubit gates, routed gates, depth, shots, physical-error model, and validation are separate rows. A reviewer should be able to replace the oracle and rerun the trace before discussing resource scaling.

## Validate the full-stack chain

Prompt. Submit a full-stack trace for the four-item Grover search and one changed oracle.

Deliverable. Problem contract, basis order, state table, circuit, executable fixture, compiled gate ledger, noise assumption, resource table, validation command, and decision note.

Pass condition. Both oracles pass normalization and marked-state tests; query, logical-gate, compiled-gate, shot, and physical-resource statements remain separate; every simplification is labeled.

## Model submission and scoring rubric for the trace

Format. Reference two-oracle Grover trace and 100-point analytic rubric.

The reference submission passes all four marked indices and awards correctness points only after basis, oracle, diffusion, normalization, and measurement contracts agree. Its 100-point rubric assigns 25 points to problem and baseline, 25 to state and circuit correctness, 20 to executable reproduction, 20 to complete resource boundaries, and 10 to limitations. Reporting only one query earns no physical-resource credit.

Verification. The fixture returns each marked basis state at unit ideal probability and the rubric awards no resource credit for reporting only oracle queries.

Analytic capstone rubric: 100 points
 | Criterion | Points | Evidence rule

 | Problem promise and classical baseline | 25 | Show the inspectable problem promise and classical baseline record; an unsupported assertion receives no credit.
 | State evolution and circuit correctness | 25 | Show the inspectable state evolution and circuit correctness record; an unsupported assertion receives no credit.
 | Executable reproduction | 20 | Show the inspectable executable reproduction record; an unsupported assertion receives no credit.
 | Compiled and physical resource boundaries | 20 | Show the inspectable compiled and physical resource boundaries record; an unsupported assertion receives no credit.
 | Limitations and transfer | 10 | Show the inspectable limitations and transfer record; an unsupported assertion receives no credit.
 | Total | 100 | All pass conditions remain mandatory regardless of point total.

## Trace limitations and extension choices

The four-item instance hides oracle construction, large-n error accumulation, routing, and fault-tolerant synthesis. Ideal unit probability disappears under noise and finite sampling. The trace is a capstone scaffold for reasoning across interfaces, not evidence that an application database can be searched quadratically faster end to end.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck algorithm references, compiler interfaces, gate translations, noise assumptions, and resource accounts.

External review: Open. Useful expertise: Quantum algorithms researcher able to review amplitude-amplification correctness; Quantum architecture engineer able to audit compilation and resource boundaries.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

capstone artifact

### [Full-stack four-item Grover trace](/playground/quantum/book/83-full-stack-algorithm-trace/#artifact-83-full-stack-algorithm-trace)

[Download fixture (.py)](/playground/quantum/artifacts/83-full-stack-algorithm-trace/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/83-full-stack-algorithm-trace/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [Lov K. Grover. A fast quantum mechanical algorithm for database search. Proceedings of STOC. 1996](https://doi.org/10.1145/237814.237866) primary paper

- [Robert Beals, Harry Buhrman, Richard Cleve, Michele Mosca, and Ronald de Wolf. Quantum lower bounds by polynomials. Journal of the ACM. 2001](https://doi.org/10.1145/502090.502097) primary paper

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [Easwar Magesan, J. M. Gambetta, and Joseph Emerson. Scalable and robust randomized benchmarking of quantum processes. Physical Review Letters. 2011](https://doi.org/10.1103/PhysRevLett.106.180504) primary paper

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=83-full-stack-algorithm-trace#report)

Dependency graph

## Prerequisites for this chapter

- [Grover and Amplitude Amplification Part IV. Protocols and Algorithms · Chapter 30](/playground/quantum/book/30-grover-and-amplitude-amplification/)

- [Building a Small Simulator From Scratch Part V. Practical Software · Chapter 37](/playground/quantum/book/37-building-a-small-simulator-from-scratch/)

- [Benchmarking Quantum Programs Part V. Practical Software · Chapter 42](/playground/quantum/book/42-benchmarking-quantum-programs/)

Continue the thread

## Next concepts from this chapter

- [Hardware-Constrained Lab Part X. Capstones · Chapter 84](/playground/quantum/book/84-hardware-constrained-lab/)

- [Application Evidence Dossier Part X. Capstones · Chapter 85](/playground/quantum/book/85-application-evidence-dossier/)

- [Company Diligence Memo Part X. Capstones · Chapter 86](/playground/quantum/book/86-company-diligence-memo/)

[Previous Investment Memo and Startup Thesis Templates](/playground/quantum/book/82-investment-memo-and-startup-thesis-templates/)[Next Hardware-Constrained Lab](/playground/quantum/book/84-hardware-constrained-lab/)

In this chapter

- [Capstone brief: one algorithm, every interface](#section-83-full-stack-algorithm-trace-1)

- [Trace Grover’s four-item instance by amplitude](#section-83-full-stack-algorithm-trace-2)

- [Compile the oracle and count the physical consequences](#section-83-full-stack-algorithm-trace-3)

- [Package a reproducible trace submission](#section-83-full-stack-algorithm-trace-4)

- [Validate the full-stack chain](#section-83-full-stack-algorithm-trace-5)

- [Model submission and scoring rubric for the trace](#section-83-full-stack-algorithm-trace-6)

- [Trace limitations and extension choices](#section-83-full-stack-algorithm-trace-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=83-full-stack-algorithm-trace#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/83-full-stack-algorithm-trace/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/84-hardware-constrained-lab/ -->

# Hardware-Constrained Lab

An ideal circuit diagram hides everything that makes quantum hardware hard. In this capstone you build a lab that puts the ideal circuit next to its constrained twin and measures what connectivity, native gates, noise, and timing actually change.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Freeze the logical experiment and acceptance statistic, map it through the device coupling graph and native basis, account for inserted routing and timing operations, then compare measured output with both an ideal and noise-aware prediction.

A hardware-constrained lab preserves an experimental contract while changing its implementation. The logical Bell task specifies preparation and a parity statistic. Placement, routing, native decomposition, scheduling, calibration, queueing and readout mitigation may change, but the task identifier, logical-bit interpretation, and acceptance rule do not.

## Capstone brief: preserve the experiment under constraints

For the ideal reference, \(\lvert\Phi^+\rangle=(\lvert 00\rangle+\lvert 11\rangle)/\sqrt{2}\). Logical qubits occupy physical endpoints 0 and 2 of a line 0–1–2. A routed implementation must publish initial and final layouts so measured physical bits are interpreted as the intended logical pair. Inserted SWAP cost belongs in the ledger.

[Figure 84.1.](#fig-84-hardware-constrained-lab-1) The logical pair begins on p0 and p2. One SWAP makes the endpoints adjacent and adds three CNOT-equivalent operations before the logical entangler.

## Route a Bell experiment on a line

Hardware-Constrained Lab: claim and source ledger, frozen 14 August 2026
 | Bounded claim | Supporting records

 | C-01: Circuit meaning and hardware execution are separated by instruction semantics, compilation, routing, calibration, and measurement. | [OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)
[IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides)
[Google Quantum AI, Cirq documentation (2026)](https://quantumai.google/cirq)
[Lieven M. K. Vandersypen et al., A look at the full stack (2021)](https://doi.org/10.1038/s42254-021-00301-w)
 | C-02: Randomized benchmarking characterizes an average error protocol but does not predict every routed circuit outcome. | [Easwar Magesan, J. M. Gambetta, and Joseph Emerson, Scalable and robust randomized benchmarking of quantum processes (2011)](https://doi.org/10.1103/PhysRevLett.106.180504)
[Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)
 | C-03: Official Qiskit and Cirq documentation expose current routing and execution concepts at the review date. | [IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides)
[Google Quantum AI, Cirq documentation (2026)](https://quantumai.google/cirq)
 | C-04: Artifact review requires environment, result, and reproducibility records for a laboratory claim. | [Association for Computing Machinery, Artifact Review and Badging (2026)](https://www.acm.org/publications/policies/artifact-review-and-badging-current)
[U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)

OpenQASM supports the circuit-semantics boundary. Qiskit and Cirq documentation supply dated compilation concepts. Randomized benchmarking does not directly predict this routed Bell statistic, which is why calibration and task-level output remain separate. ACM and the benchmark sources require environment and result records.

## Timing and readout redefine the acceptance region

The reference router moves one endpoint through the middle node, applies the entangling operation, and tracks the resulting layout. Using the conventional three-CNOT SWAP decomposition, one SWAP adds three two-qubit operations before the logical entangler. The ideal state fixture still checks only Bell parity and normalization; the hardware notebook must record calibration, shots, counts, and mapping.

Three-qubit line-constrained Bell lab: inspected record
 | Ledger item | Logical record | Physical consequence | Check

 | Initial layout | q0→p0, q1→p2 | nonadjacent endpoints | declared
 | Routing | move one endpoint | 1 SWAP = 3 CNOTs | counted
 | Entangler | logical CNOT | native/decomposed operation | backend-specific
 | Measurement | even parity | map physical to logical bits | acceptance frozen

Artifact contract. A topology diagram, routed operation ledger, executable state fixture, calibration record schema, and acceptance rubric. Routing endpoints are correct, inserted SWAP/CNOT cost is counted, ideal Bell probabilities pass, and hardware claims remain pending without a calibration-stamped run.

```
from math import isclose
def validate_lab(notebook, minimum_even_parity):
    errors = []
    if notebook.get("scenario") != "line-routed Bell experiment" or not notebook.get("source_ids"):
        errors.append("scenario_or_sources")
    route = notebook.get("route", {})
    if (type(route.get("logical_endpoints")) is not list or len(route.get("logical_endpoints", [])) != 2 or
            type(route.get("swap_count")) is not int or route.get("distance_unit") != "edges"):
        errors.append("route_schema")
    probabilities = notebook.get("ideal_probabilities", {})
    if set(probabilities) != {"00", "01", "10", "11"} or any(type(value) is not float for value in probabilities.values()):
        errors.append("probability_schema")
    elif not isclose(sum(probabilities.values()), 1.0) or probabilities["01"] + probabilities["10"] != 0.0:
        errors.append("ideal_bell_state")
    counts = notebook.get("counts", {})
    shots = notebook.get("shots", {})
    if set(counts) != {"00", "01", "10", "11"} or any(type(value) is not int for value in counts.values()):
        errors.append("counts_schema")
    if type(shots.get("value")) is not int or shots.get("unit") != "shots" or sum(counts.values()) != shots.get("value"):
        errors.append("shots_schema")
    calibration = notebook.get("calibration", {})
    if type(calibration) is not dict:
        errors.append("calibration_schema")
    compiled = route.get("swap_count", 0) * 3 + route.get("logical_entanglers", 0)
    parity = (counts.get("00", 0) + counts.get("11", 0)) / max(shots.get("value", 0), 1)
    stamped = all(calibration.get(name) for name in ("backend", "timestamp", "job_id"))
    if errors:
        decision = "invalid"
    elif parity < minimum_even_parity:
        decision = "acceptance-fail"
    else:
        decision = "hardware-accepted" if stamped else "simulation-only"
    return {"decision": decision, "errors": sorted(set(errors)),
            "compiled_two_qubit_count": compiled, "even_parity": parity, "calibration_stamped": stamped}
notebook = {"scenario": "line-routed Bell experiment", "source_ids": ["openqasm3"],
            "route": {"logical_endpoints": [0, 2], "swap_count": 1,
                      "logical_entanglers": 1, "distance_unit": "edges"},
            "ideal_probabilities": {"00": 0.5, "11": 0.5, "01": 0.0, "10": 0.0},
            "counts": {"00": 4800, "11": 4800, "01": 210, "10": 190},
            "shots": {"value": 10000, "unit": "shots"},
            "calibration": {"backend": "", "timestamp": "", "job_id": ""}}
base_result = validate_lab(notebook, 0.95)
bad_route = {**notebook["route"], "distance_unit": ""}
bad_result = validate_lab({**notebook, "route": bad_route}, 0.95)
strict_result = validate_lab(notebook, 0.97)
assert base_result["compiled_two_qubit_count"] == 4 and base_result["decision"] == "simulation-only"
assert bad_result["decision"] == "invalid" and "route_schema" in bad_result["errors"]
assert strict_result["decision"] == "acceptance-fail" and isclose(strict_result["even_parity"], 0.96)
print(f"PASS: 84 lab notebook gates={base_result['compiled_two_qubit_count']} parity={base_result['even_parity']} claim={base_result['decision']} invalid={bad_result['errors']} strict={strict_result['decision']}")
```

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Record calibration beside every result

Freeze a 10,000-shot acceptance band before device access. Store backend identifier, calibration timestamp, job identifier, compiler versions, seed, layout, routed circuit, raw counts, and applied post-processing. If the result fails, compare the ideal fixture, a declared noise model, and the calibration record in that order. Do not tune the band after seeing counts.

## Run the constrained-lab validator

Prompt. Route and validate a Bell-state experiment when logical qubits 0 and 2 occupy a three-node line.

Deliverable. Logical circuit, initial/final layout, routed gate ledger, depth and two-qubit count, 10,000-shot ideal fixture, calibration schema, acceptance rule, and exact validation command.

Pass condition. The final measured logical bits are mapped correctly, routing cost is explicit, ideal counts satisfy the statistical band, and no hardware conclusion appears without matching calibration metadata.

## Model lab notebook and analytic rubric

Format. Reference routed notebook record and 100-point rubric.

The model notebook earns 20 points for contract and basis, 20 for correct routing and layout, 15 for gate/depth accounting, 15 for the ideal fixture, 20 for calibration-stamped hardware evidence, and 10 for diagnosis. With calibration fields blank, it can score at most 80 and cannot claim hardware validation. The fixture confirms ideal parity and a three-CNOT routing surcharge.

Verification. The embedded simulator passes ideal parity and routing-account checks; the rubric withholds all hardware-evidence points when calibration fields are blank.

Analytic capstone rubric: 100 points
 | Criterion | Points | Evidence rule

 | Experiment contract and basis | 20 | Show the inspectable experiment contract and basis record; an unsupported assertion receives no credit.
 | Routing and layout correctness | 20 | Show the inspectable routing and layout correctness record; an unsupported assertion receives no credit.
 | Gate, depth, and timing account | 15 | Show the inspectable gate, depth, and timing account record; an unsupported assertion receives no credit.
 | Ideal executable fixture | 15 | Show the inspectable ideal executable fixture record; an unsupported assertion receives no credit.
 | Calibration-stamped hardware record | 20 | Show the inspectable calibration-stamped hardware record record; an unsupported assertion receives no credit.
 | Diagnosis and limits | 10 | Show the inspectable diagnosis and limits record; an unsupported assertion receives no credit.
 | Total | 100 | All pass conditions remain mandatory regardless of point total.

## Lab limitations and next-device extensions

Actual compilers may choose direction changes, bridge gates, teleportation, dynamic circuits, or a different placement, so one-SWAP arithmetic is not universal. Device calibration drifts and shot noise vary. The lab’s exact topology, native gate, compiler, backend, timestamp, queue context, and shot record must be retained before interpreting a hardware run.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck backend topology, compiler versions, calibration records, routed counts, and measurement acceptance bands.

External review: Open. Useful expertise: Quantum compiler engineer experienced with routing and layout; Experimental platform engineer able to review calibration and readout claims.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

capstone artifact

### [Three-qubit line-constrained Bell lab](/playground/quantum/book/84-hardware-constrained-lab/#artifact-84-hardware-constrained-lab)

[Download fixture (.py)](/playground/quantum/artifacts/84-hardware-constrained-lab/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/84-hardware-constrained-lab/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [Easwar Magesan, J. M. Gambetta, and Joseph Emerson. Scalable and robust randomized benchmarking of quantum processes. Physical Review Letters. 2011](https://doi.org/10.1103/PhysRevLett.106.180504) primary paper

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=84-hardware-constrained-lab#report)

Dependency graph

## Prerequisites for this chapter

- [Transpilation and Hardware-Aware Compilation Part V. Practical Software · Chapter 40](/playground/quantum/book/40-transpilation-and-hardware-aware-compilation/)

- [Qiskit, Primitives, and Circuit Execution Part V. Practical Software · Chapter 38](/playground/quantum/book/38-qiskit-primitives-and-circuit-execution/)

- [Noise Models and Noisy Simulation Part V. Practical Software · Chapter 41](/playground/quantum/book/41-noise-models-and-noisy-simulation/)

Continue the thread

## Next concepts from this chapter

- [Public Playground MVP Part X. Capstones · Chapter 87](/playground/quantum/book/87-public-playground-mvp/)

- [Full-Stack Algorithm Trace Part X. Capstones · Chapter 83](/playground/quantum/book/83-full-stack-algorithm-trace/)

- [Application Evidence Dossier Part X. Capstones · Chapter 85](/playground/quantum/book/85-application-evidence-dossier/)

[Previous Full-Stack Algorithm Trace](/playground/quantum/book/83-full-stack-algorithm-trace/)[Next Application Evidence Dossier](/playground/quantum/book/85-application-evidence-dossier/)

In this chapter

- [Capstone brief: preserve the experiment under constraints](#section-84-hardware-constrained-lab-1)

- [Route a Bell experiment on a line](#section-84-hardware-constrained-lab-2)

- [Timing and readout redefine the acceptance region](#section-84-hardware-constrained-lab-3)

- [Record calibration beside every result](#section-84-hardware-constrained-lab-4)

- [Run the constrained-lab validator](#section-84-hardware-constrained-lab-5)

- [Model lab notebook and analytic rubric](#section-84-hardware-constrained-lab-6)

- [Lab limitations and next-device extensions](#section-84-hardware-constrained-lab-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=84-hardware-constrained-lab#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/84-hardware-constrained-lab/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/85-application-evidence-dossier/ -->

# Application Evidence Dossier

Most quantum application write-ups start with an algorithm and go hunting for a problem. The evidence dossier runs the other way — buyer, workflow, and classical baseline first, quantum method last — and this capstone produces one.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

An auditable dossier binds one workflow claim to a dated source ledger, task and data contract, classical baseline, quantum resource boundary, reproduced result, integration path, counterevidence, decision, and measurable reversal condition.

An evidence dossier is a versioned packet for one decision, not a bibliography. It binds a claim identifier to workflow owner, task and data contract, comparator, quantum resources, result, reproduction, integration, counterevidence, decision, reversal condition, cutoff, and review date. A reader can trace every conclusion to a row.

## Capstone brief: dossier one workflow claim

Sources receive roles: original result, official specification, reproducible dataset or artifact, independent comparison, synthesis, and contextual assessment. Current empirical and company facts require primary or official records near the claim. A review can explain a field but cannot silently promote the evidence level.

## Evidence packet and source hierarchy

GAO and the National Academies supply contextual assessment. VQE is an original experiment. OpenQASM and official SDK docs define the dated implementation boundary. ACM and the benchmarking perspective specify artifact and comparator properties. The dossier records those distinct roles rather than counting citations.

[Figure 85.1.](#fig-85-application-evidence-dossier-1) Each decision arrow names an evidence cell. An expired source or failed reproduction breaks the path visibly.

Application Evidence Dossier: claim and source ledger, frozen 14 August 2026
 | Evidence ID | Records | Claim supported

 | E-85-1 | [Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)
[U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422) | Application evidence must preserve task, scale, comparator, resource, and validation boundaries.
 | E-85-2 | [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)
[National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (2019)](https://doi.org/10.17226/25196)
[Alberto Peruzzo et al., A variational eigenvalue solver on a photonic quantum processor (2014)](https://doi.org/10.1038/ncomms5213) | Technology assessments are useful context but primary experiments and official records should support the load-bearing current claims.
 | E-85-3 | [Association for Computing Machinery, Artifact Review and Badging (2026)](https://www.acm.org/publications/policies/artifact-review-and-badging-current) | Artifact review separates availability and reproducibility from the scientific conclusion.
 | E-85-4 | [OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)
[IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides)
[Google Quantum AI, Cirq documentation (2026)](https://quantumai.google/cirq) | Official interfaces help specify the experimental boundary but do not establish end-user value.

## Reproduce before interpreting

The model dossier evaluates a small optimization claim. It reproduces the result, retains a strong classical comparator, records queue and shot cost, and includes a counterexample instance where the candidate loses. The decision is avoid-now/retest-later because the result fails the representative-scale and baseline gates. The reversal trigger is a pre-registered held-out comparison, not a larger slide number.

Artifact contract. A dated dossier schema, populated example, executable completeness/freshness checker, and scoring rubric. All material claim IDs resolve to sources; current evidence has a cutoff and due date; task, baseline, resources, result, counterevidence, decision, and reversal fields are nonempty.

** Executable reference fixture**

```
TEXT_FIELDS = ("claim_id", "owner", "task", "baseline", "resources", "reproduction",
               "counterevidence", "declared_decision", "cutoff", "review_due")
def valid_iso(value):
    parts = value.split("-") if type(value) is str else []
    return len(parts) == 3 and [len(part) for part in parts] == [4, 2, 2] and all(part.isdigit() for part in parts)
def audit(dossier, as_of):
    errors = [name for name in TEXT_FIELDS if type(dossier.get(name)) is not str or not dossier.get(name)]
    sources = dossier.get("sources", {})
    if type(sources) is not dict or not sources:
        errors.append("sources")
    claim_sources = dossier.get("claim_source_ids", [])
    if type(claim_sources) is not list or not claim_sources or any(source_id not in sources for source_id in claim_sources):
        errors.append("orphan_claim_source")
    result, reversal = dossier.get("result", {}), dossier.get("reversal", {})
    for name, item in (("result", result), ("reversal", reversal)):
        if type(item.get("value")) not in (int, float) or item.get("unit") != "cost-fraction improvement":
            errors.append(name + "_schema")
    cutoff, review_due = dossier.get("cutoff", ""), dossier.get("review_due", "")
    if not valid_iso(cutoff) or not valid_iso(review_due):
        errors.append("date_schema")
    elif cutoff > as_of or review_due < as_of:
        errors.append("freshness")
    derived = "retest" if not errors and result["value"] >= reversal["value"] else "avoid-now"
    if not errors and dossier.get("declared_decision") != derived:
        errors.append("decision_trace")
    return {"status": "incomplete" if errors else "complete", "errors": sorted(set(errors)),
            "derived_decision": "invalid" if errors else derived, "observed_improvement": result.get("value")}
dossier = {"scenario": "held-out optimization evidence dossier", "claim_id": "QAPP-17",
           "owner": "operations research lead", "task": "20 frozen routing instances",
           "baseline": "tuned classical heuristic", "resources": "all tuning and sampling minutes",
           "reproduction": "fixture run R-07", "counterevidence": "infeasible candidate on instance 12",
           "declared_decision": "avoid-now", "cutoff": "2026-08-14", "review_due": "2026-11-14",
           "sources": {"E-04": "scenario:baseline-run", "E-07": "scenario:reproduction-run",
                       "E-11": "scenario:adverse-instance"}, "claim_source_ids": ["E-04", "E-07", "E-11"],
           "result": {"value": 0.00, "unit": "cost-fraction improvement"},
           "reversal": {"value": 0.02, "unit": "cost-fraction improvement"}}
base_result = audit(dossier, "2026-08-14")
bad = {key: value for key, value in dossier.items() if key != "baseline"}
bad_result = audit(bad, "2026-08-14")
no_counterevidence = {key: value for key, value in dossier.items() if key != "counterevidence"}
counterevidence_result = audit(no_counterevidence, "2026-08-14")
retest = {**dossier, "result": {"value": 0.03, "unit": "cost-fraction improvement"},
          "declared_decision": "retest"}
retest_result = audit(retest, "2026-08-14")
assert base_result["status"] == "complete" and base_result["derived_decision"] == "avoid-now"
assert bad_result["status"] == "incomplete" and "baseline" in bad_result["errors"]
assert counterevidence_result["status"] == "incomplete" and "counterevidence" in counterevidence_result["errors"]
assert retest_result["derived_decision"] == "retest" and retest_result["observed_improvement"] == 0.03
print(f"PASS: 85 application dossier status={base_result['status']} decision={base_result['derived_decision']} invalid={bad_result['errors'] + counterevidence_result['errors']} sensitivity={retest_result['derived_decision']}")
```

Quantum application evidence dossier: inspected record
 | Dossier field | Model record | Evidence ID | State

 | Task | held-out optimization set | E-01 | defined
 | Comparator | tuned classical heuristic | E-04 | present
 | Reproduction | fixture hash and output | E-07 | small scale
 | Counterevidence | candidate loss on instance 12 | E-11 | retained
 | Decision | avoid now; retest | D-01 | bounded

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Make the decision traceable to table cells

Make the decision point to cells: 'avoid now because E-07 lacks representative scale and E-11 shows a comparator loss.' This syntax reveals exactly what new evidence can change the conclusion. When a source expires or a reproduction fails, the checker invalidates the decision record rather than leaving the prose apparently current. Record null searches and failed replications as first-class rows, including protocol, date, owner, and the claim boundary each result weakens.

## Validate dossier completeness and freshness

Prompt. Build a dossier for one quantum application claim and include one reproduced or independently checked result.

Deliverable. Claim ID, workflow owner, task/data contract, baseline, source ledger, quantum resources, result, reproduction record, integration map, counterevidence, decision, reversal trigger, cutoff, and review due date.

Pass condition. The checker finds no orphan claim or stale current source, the reproduced result matches its fixture, and the decision is no stronger than the weakest required evidence field.

## Model dossier plus one-hundred-point rubric

Format. Model optimization dossier with an avoid-now/retest-later decision and 100-point rubric.

The reference dossier passes completeness and source mapping. Its score is analytic: 20 points for contract, 20 for source roles, 20 for reproduction, 15 for comparator, 10 for resources, 10 for counterevidence and 5 for review hygiene. It remains below the action threshold because representative evidence is absent. Removing the counterevidence row lowers the score rather than making the narrative more favorable.

Verification. The dossier checker returns incomplete when the baseline or counterevidence row is removed, and the declared reversal threshold changes the derived decision.

Analytic capstone rubric: 100 points
 | Criterion | Points | Evidence rule

 | Task and workflow contract | 20 | Show the inspectable task and workflow contract record; an unsupported assertion receives no credit.
 | Source roles and claim mapping | 20 | Show the inspectable source roles and claim mapping record; an unsupported assertion receives no credit.
 | Independent check or reproduction | 20 | Show the inspectable independent check or reproduction record; an unsupported assertion receives no credit.
 | Classical comparator | 15 | Show the inspectable classical comparator record; an unsupported assertion receives no credit.
 | Quantum resource boundary | 10 | Show the inspectable quantum resource boundary record; an unsupported assertion receives no credit.
 | Counterevidence | 10 | Show the inspectable counterevidence record; an unsupported assertion receives no credit.
 | Currency and review hygiene | 5 | Show the inspectable currency and review hygiene record; an unsupported assertion receives no credit.
 | Total | 100 | All pass conditions remain mandatory regardless of point total.

## Dossier limits and permitted extensions

A completeness checker establishes record hygiene, not truth. Sources can be wrong, reproductions can share hidden assumptions, and a scoring rubric can create false precision. Expert review must inspect the mechanism, comparator, and adverse evidence. The rubric is for teaching and coverage; the actual decision names failed gates directly and keeps their identifiers visible.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck claim sources, reproduction records, classical comparators, adverse evidence, and decision reversals.

External review: Open. Useful expertise: Applied quantum researcher able to review task and resource claims; Evidence-synthesis or experimental-methods specialist.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

capstone artifact

### [Quantum application evidence dossier](/playground/quantum/book/85-application-evidence-dossier/#artifact-85-application-evidence-dossier)

[Download fixture (.py)](/playground/quantum/artifacts/85-application-evidence-dossier/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/85-application-evidence-dossier/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [Alberto Peruzzo et al.. A variational eigenvalue solver on a photonic quantum processor. Nature Communications. 2014](https://doi.org/10.1038/ncomms5213) primary paper

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=85-application-evidence-dossier#report)

Dependency graph

## Prerequisites for this chapter

- [What Makes a Problem Quantum-Suitable? Part VIII. Applications and Strategy · Chapter 64](/playground/quantum/book/64-what-makes-a-problem-quantum-suitable/)

- [Application Evidence Levels Part VIII. Applications and Strategy · Chapter 71](/playground/quantum/book/71-application-evidence-levels/)

- [When to Build, Partner, Wait, or Avoid Part VIII. Applications and Strategy · Chapter 72](/playground/quantum/book/72-when-to-build-partner-wait-or-avoid/)

Continue the thread

## Next concepts from this chapter

- [Hardware-Constrained Lab Part X. Capstones · Chapter 84](/playground/quantum/book/84-hardware-constrained-lab/)

- [Company Diligence Memo Part X. Capstones · Chapter 86](/playground/quantum/book/86-company-diligence-memo/)

- [Full-Stack Algorithm Trace Part X. Capstones · Chapter 83](/playground/quantum/book/83-full-stack-algorithm-trace/)

[Previous Hardware-Constrained Lab](/playground/quantum/book/84-hardware-constrained-lab/)[Next Company Diligence Memo](/playground/quantum/book/86-company-diligence-memo/)

In this chapter

- [Capstone brief: dossier one workflow claim](#section-85-application-evidence-dossier-1)

- [Evidence packet and source hierarchy](#section-85-application-evidence-dossier-2)

- [Reproduce before interpreting](#section-85-application-evidence-dossier-3)

- [Make the decision traceable to table cells](#section-85-application-evidence-dossier-4)

- [Validate dossier completeness and freshness](#section-85-application-evidence-dossier-5)

- [Model dossier plus one-hundred-point rubric](#section-85-application-evidence-dossier-6)

- [Dossier limits and permitted extensions](#section-85-application-evidence-dossier-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=85-application-evidence-dossier#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/85-application-evidence-dossier/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/86-company-diligence-memo/ -->

# Company Diligence Memo

A company roadmap is a sales document; a diligence memo is what you build after you stop believing it. This capstone turns a company thesis into source-labeled claims, proof gates, kill criteria, and a decision you can defend out loud.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Use a claim ledger and scenario sensitivities rather than an aggregate score: identify the buyer, owned stack layer, technical gates, baseline, proof of use, unit economics, dependencies, financing needs, conflicts, kill criteria, and next evidence event.

Company diligence manages several uncertainty classes without blending them. Technical evidence asks whether a mechanism and system work. Product evidence asks whether a buyer repeatedly uses the owned layer. Market evidence asks how many such buyers and alternatives exist. Financing evidence asks whether the company can reach the next gate. One attractive class cannot fill another’s blank cells.

## Capstone brief: a memo that can say no

The memo uses four ledgers: claim and source; stack and dependency; buyer and economics; scenario and financing. Facts, company representations, interview statements, and analyst inferences carry explicit labels. The decision names maximum exposure, two kill criteria, conflicts, and the next evidence event. No aggregate attractiveness score appears.

## Four ledgers, one conditional decision

The full-stack logic is supported by official interfaces and the benchmarking perspective. Randomized benchmarking supplies one protocol example rather than a company ranking. ACM supports artifact inspection. GAO and the National Academies provide public context. Company-specific claims must come from filings, contracts, technical data rooms, and permissioned customer work in a real memo.

Company Diligence Memo: claim and source ledger, frozen 14 August 2026
 | Claim under review | Source chain

 | Quantum company evaluation requires stack and systems boundaries because device, software, application, and infrastructure claims are not comparable. |

- [Lieven M. K. Vandersypen et al., A look at the full stack (2021)](https://doi.org/10.1038/s42254-021-00301-w)

- [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)

- [National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (2019)](https://doi.org/10.17226/25196)

 | Benchmark results support only the task, scale, comparator, and system boundary actually tested. |

- [Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)

- [Easwar Magesan, J. M. Gambetta, and Joseph Emerson, Scalable and robust randomized benchmarking of quantum processes (2011)](https://doi.org/10.1103/PhysRevLett.106.180504)

 | Artifact records and official interfaces permit some technical claims to be rerun and dependency claims to be inspected. |

- [Association for Computing Machinery, Artifact Review and Badging (2026)](https://www.acm.org/publications/policies/artifact-review-and-badging-current)

- [OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)

- [IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides)

- [Google Quantum AI, Cirq documentation (2026)](https://quantumai.google/cirq)

 | Government and consensus assessments provide context, not company-specific revenue or customer proof. |

- [U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)

- [National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (2019)](https://doi.org/10.17226/25196)

[Figure 86.1.](#fig-86-company-diligence-memo-1) Technical, buyer, economics, and financing evidence retain their own uncertainty. No quadrant lends certainty to another.

## Sensitivity table keeps uncertainty visible

Quantum company diligence memo dataset: inspected record
 | Ledger | Base evidence | Adverse test | Decision effect

 | Technical | 2 backend task passes | only 1 remains | wait
 | Buyer | 3/4 eligible renew | 2/4 renew | wait
 | Economics | delivery hours declining | hours increase | cap commitment
 | Financing | next gate funded | six-month delay | recompute exposure

The anonymized tooling company passes a technical workflow test on two backends and reports three renewals among four eligible buyers. The conditional partner decision survives the base case. It automatically becomes wait if portability falls to one backend or renewal falls below three. Financing and conflicts remain separate fields and can independently constrain commitment.

```
METRICS = {"backends": "backends", "renewals": "buyers", "eligible": "buyers", "runway": "months"}
def valid_iso(value):
    parts = value.split("-") if type(value) is str else []
    return len(parts) == 3 and [len(part) for part in parts] == [4, 2, 2] and all(part.isdigit() for part in parts)
def memo_decision(memo, as_of):
    errors = []
    evidence = memo.get("evidence", [])
    for index, row in enumerate(evidence):
        if row.get("kind") not in {"fact", "company-claim", "analyst-inference"} or not row.get("source_id"):
            errors.append(f"evidence_{index}_provenance")
        if not valid_iso(row.get("date", "")) or row.get("date", "") > as_of:
            errors.append(f"evidence_{index}_date")
        age = row.get("age", {})
        if type(age.get("value")) is not int or age.get("unit") != "days":
            errors.append(f"evidence_{index}_age_schema")
        elif age["value"] > row.get("max_age_days", -1):
            errors.append(f"evidence_{index}_stale")
    for name, unit in METRICS.items():
        item = memo.get(name, {})
        if type(item.get("value")) is not int or item.get("unit") != unit:
            errors.append(name + "_schema")
    if type(memo.get("funded")) is not bool or not memo.get("conflict_record"):
        errors.append("funding_or_conflict_record")
    failed = []
    if not errors:
        if memo["backends"]["value"] < 2:
            failed.append("portability")
        if memo["renewals"]["value"] < 3:
            failed.append("renewals")
        if not memo["funded"]:
            failed.append("financing")
    return {"decision": "invalid" if errors else ("wait" if failed else "partner"),
            "errors": sorted(set(errors)), "failed_gates": failed}
memo = {"scenario": "anonymized tooling-company base case",
        "evidence": [{"claim": "two backend runs passed", "kind": "fact",
                      "source_id": "scenario:portability-log", "date": "2026-08-10",
                      "age": {"value": 4, "unit": "days"}, "max_age_days": 90},
                     {"claim": "three of four eligible buyers renewed", "kind": "company-claim",
                      "source_id": "scenario:renewal-ledger", "date": "2026-08-01",
                      "age": {"value": 13, "unit": "days"}, "max_age_days": 90},
                     {"claim": "partnering is bounded", "kind": "analyst-inference",
                      "source_id": "scenario:memo-analysis", "date": "2026-08-14",
                      "age": {"value": 0, "unit": "days"}, "max_age_days": 90}],
        "backends": {"value": 2, "unit": "backends"}, "renewals": {"value": 3, "unit": "buyers"},
        "eligible": {"value": 4, "unit": "buyers"}, "runway": {"value": 18, "unit": "months"},
        "funded": True, "conflict_record": "analyst has no financial interest"}
base_result = memo_decision(memo, "2026-08-14")
bad_evidence = [{key: value for key, value in memo["evidence"][0].items() if key != "source_id"}, *memo["evidence"][1:]]
bad_result = memo_decision({**memo, "evidence": bad_evidence}, "2026-08-14")
portability_result = memo_decision({**memo, "backends": {"value": 1, "unit": "backends"}}, "2026-08-14")
renewal_result = memo_decision({**memo, "renewals": {"value": 2, "unit": "buyers"}}, "2026-08-14")
assert base_result["decision"] == "partner"
assert bad_result["decision"] == "invalid" and "evidence_0_provenance" in bad_result["errors"]
assert portability_result["failed_gates"] == ["portability"] and renewal_result["failed_gates"] == ["renewals"]
print(f"PASS: 86 company memo base={base_result['decision']} invalid={bad_result['errors']} portability={portability_result['decision']} renewals={renewal_result['decision']}")
```

Artifact contract. A dated claim/evidence/dependency/scenario dataset with executable reversal tests and rubric. Facts, company claims, and analyst inferences remain distinct; stale or unsupported load-bearing claims fail; each kill criterion changes the decision without manual narrative editing.

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Interview evidence and conflicts belong in the record

Red-team the memo by removing the preferred partner, delaying the hardware dependency, increasing delivery labor, and interviewing a non-renewing buyer. Preserve the transcript status and conflicts. A committee should be able to disagree with a threshold and rerun the decision without reinterpreting prose or changing unrelated facts.

## Execute the memo’s reversal tests

Prompt. Write and red-team a company-diligence memo from public primary materials and documented interviews.

Deliverable. Decision, claim ledger, stack map, technical gates, buyer proof, baseline, economics, dependencies, conflicts, three scenarios, two kill criteria, financing runway, cutoff, and review due date.

Pass condition. Facts and inferences are labeled, every load-bearing current claim is dated and sourced, aggregate scoring is absent, and both kill-criterion fixtures reverse the decision.

## Model company memo and analytic rubric

Format. Conditional partner memo for an anonymized tooling company with 100-point rubric.

The model submission receives 15 points for scope and decision, 20 for claim-source discipline, 15 for stack dependencies, 15 for technical gates and baseline, 15 for buyer evidence, 10 for economics and financing, and 10 for counterevidence, conflicts and expiry. It recommends a capped partnership. Both declared kill fixtures return wait, satisfying the reversal test.

Verification. The evaluator returns partner under base evidence and wait when either buyer renewal or backend portability falls below its declared gate.

Analytic capstone rubric: 100 points
 | Criterion | Points | Evidence rule

 | Scope and conditional decision | 15 | Show the inspectable scope and conditional decision record; an unsupported assertion receives no credit.
 | Claim and source discipline | 20 | Show the inspectable claim and source discipline record; an unsupported assertion receives no credit.
 | Stack and dependency map | 15 | Show the inspectable stack and dependency map record; an unsupported assertion receives no credit.
 | Technical gates and baseline | 15 | Show the inspectable technical gates and baseline record; an unsupported assertion receives no credit.
 | Buyer evidence | 15 | Show the inspectable buyer evidence record; an unsupported assertion receives no credit.
 | Economics and financing | 10 | Show the inspectable economics and financing record; an unsupported assertion receives no credit.
 | Counterevidence, conflicts, and expiry | 10 | Show the inspectable counterevidence, conflicts, and expiry record; an unsupported assertion receives no credit.
 | Total | 100 | All pass conditions remain mandatory regardless of point total.

## Memo limits, ethics, and red-team extensions

The chapter is an educational diligence method and not an investment recommendation. Private-company information may be incomplete, confidential, or misleading. Legal, financial, tax, export-control, competition, security, and scientific specialists must review their own domains. The anonymized numbers are fixtures, never company facts.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck company primary materials, technical tests, customer evidence, dependencies, financing, and conflicts.

External review: Open. Useful expertise: Quantum systems diligence lead able to audit technical and stack claims; Venture or corporate-development operator able to audit customer and financing evidence.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

capstone artifact

### [Quantum company diligence memo dataset](/playground/quantum/book/86-company-diligence-memo/#artifact-86-company-diligence-memo)

[Download fixture (.py)](/playground/quantum/artifacts/86-company-diligence-memo/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/86-company-diligence-memo/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [Easwar Magesan, J. M. Gambetta, and Joseph Emerson. Scalable and robust randomized benchmarking of quantum processes. Physical Review Letters. 2011](https://doi.org/10.1103/PhysRevLett.106.180504) primary paper

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

- [National Academies of Sciences, Engineering, and Medicine. Quantum Computing: Progress and Prospects. National Academies Press. 2019](https://doi.org/10.17226/25196) consensus study report

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=86-company-diligence-memo#report)

Dependency graph

## Prerequisites for this chapter

- [The Quantum Company Landscape Part IX. Company and Investing · Chapter 73](/playground/quantum/book/73-quantum-company-landscape/)

- [Application-Company Diligence Part IX. Company and Investing · Chapter 77](/playground/quantum/book/77-application-company-diligence/)

- [Investment Memo and Startup Thesis Templates Part IX. Company and Investing · Chapter 82](/playground/quantum/book/82-investment-memo-and-startup-thesis-templates/)

Continue the thread

## Next concepts from this chapter

- [Application Evidence Dossier Part X. Capstones · Chapter 85](/playground/quantum/book/85-application-evidence-dossier/)

- [Public Playground MVP Part X. Capstones · Chapter 87](/playground/quantum/book/87-public-playground-mvp/)

- [Hardware-Constrained Lab Part X. Capstones · Chapter 84](/playground/quantum/book/84-hardware-constrained-lab/)

[Previous Application Evidence Dossier](/playground/quantum/book/85-application-evidence-dossier/)[Next Public Playground MVP](/playground/quantum/book/87-public-playground-mvp/)

In this chapter

- [Capstone brief: a memo that can say no](#section-86-company-diligence-memo-1)

- [Four ledgers, one conditional decision](#section-86-company-diligence-memo-2)

- [Sensitivity table keeps uncertainty visible](#section-86-company-diligence-memo-3)

- [Interview evidence and conflicts belong in the record](#section-86-company-diligence-memo-4)

- [Execute the memo’s reversal tests](#section-86-company-diligence-memo-5)

- [Model company memo and analytic rubric](#section-86-company-diligence-memo-6)

- [Memo limits, ethics, and red-team extensions](#section-86-company-diligence-memo-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 9 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=86-company-diligence-memo#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/86-company-diligence-memo/)

---

<!-- canonical: https://www.steven-geller.com/playground/quantum/book/87-public-playground-mvp/ -->

# Public Playground MVP

The last capstone turns your strongest original lessons, labs, and diligence tools into one coherent public slice of a learning platform — small enough to finish, honest enough to defend, real enough to teach.

[Steven Geller](/playground/quantum/about/) Published July 25, 2026 Revised August 14, 2026

Ship one narrow learning loop with a stated input and outcome, semantic explanation, deterministic reference model, accessible interaction, tests, sources, limitations, provenance, and feedback path; add routes only after this slice passes real reader tasks.

A public playground earns trust through one complete learning loop. The Bell-state slice begins with a question, declares basis order, shows state evolution, runs a deterministic reference model, explains measurement statistics, includes a wrong variant that tests catch, and publishes sources, limitations, version, and an issue path. Feature count is irrelevant until that loop works.

## Capstone brief: one trustworthy learning loop

The semantic source retains \(\lvert\Phi^+\rangle=(\lvert 00\rangle+\lvert 11\rangle)/\sqrt{2}\). The accessible explanation says amplitudes occur only on 00 and 11; repeated measurement yields either with equal ideal probability; each shot yields one classical pair. It does not claim faster-than-light signaling or hardware evidence.

## The Bell-state slice from question to measurement

Public Playground MVP: claim and source ledger, frozen 14 August 2026
 | No. | Claim | Evidence

 | 1 | A two-qubit Bell-state model provides a small inspectable state-evolution and measurement example. | [John S. Bell, On the Einstein Podolsky Rosen paradox (1964)](https://doi.org/10.1103/PhysicsPhysiqueFizika.1.195)
[OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)
 | 2 | OpenQASM and official SDK documentation provide interoperable reference points for circuit behavior. | [OpenQASM Technical Steering Committee, OpenQASM 3 specification (2026)](https://openqasm.com/)
[IBM Quantum, Qiskit documentation (2026)](https://quantum.cloud.ibm.com/docs/en/guides)
[Google Quantum AI, Cirq documentation (2026)](https://quantumai.google/cirq)
 | 3 | Artifact review criteria make availability, functionality, reproducibility, and reuse explicit release properties. | [Association for Computing Machinery, Artifact Review and Badging (2026)](https://www.acm.org/publications/policies/artifact-review-and-badging-current)
[U.S. Government Accountability Office, Quantum Computing and Communications: Status and Prospects (2021)](https://www.gao.gov/products/gao-22-104422)
 | 4 | Benchmark discipline requires the public demonstration to label simulator results separately from hardware evidence. | [Lieven M. K. Vandersypen et al., A look at the full stack (2021)](https://doi.org/10.1038/s42254-021-00301-w)
[Timothy Proctor et al., Benchmarking quantum computers (2025)](https://doi.org/10.1038/s42254-024-00796-z)

Bell’s paper anchors the correlation context. OpenQASM, Qiskit, and Cirq define reference circuit interfaces at the cutoff. ACM’s artifact policy informs release evidence. The full-stack and benchmarking sources require simulator output to remain labeled separately from device performance. GAO supplies public context, not a learning-outcome claim.

## Accessibility and provenance are product behavior

[Figure 87.1.](#fig-87-public-playground-mvp-1) The reference path produces support on 00 and 11. Omitting the entangler leaves 10 support, which the published parity test catches.

```
from math import sqrt
def evaluate_state(state, tolerance=1e-12):
    if type(state) is not list or len(state) != 4 or tolerance <= 0:
        raise ValueError("playground state must contain four amplitudes")
    if any(type(amplitude) not in (int, float, complex) for amplitude in state):
        raise ValueError("amplitudes must be numeric")
    norm = sum(abs(amplitude) ** 2 for amplitude in state)
    odd_probability = abs(state[1]) ** 2 + abs(state[2]) ** 2
    return {"norm": norm, "odd_probability": odd_probability,
            "valid": abs(norm - 1.0) <= tolerance and odd_probability <= tolerance}

bell = [1/sqrt(2), 0.0, 0.0, 1/sqrt(2)]
missing_entangler = [1/sqrt(2), 0.0, 1/sqrt(2), 0.0]
unnormalized = [1.0, 0.0, 0.0, 1.0]
reference_result = evaluate_state(bell)
mutation_result = evaluate_state(missing_entangler)
boundary_result = evaluate_state(unnormalized)
invalid_rejected = False
try:
    evaluate_state([1.0, 0.0])
except ValueError:
    invalid_rejected = True
assert reference_result["valid"] and reference_result["odd_probability"] == 0.0
assert not mutation_result["valid"] and abs(mutation_result["odd_probability"] - 0.5) < 1e-12
assert not boundary_result["valid"] and boundary_result["norm"] == 2.0 and invalid_rejected
print(f"PASS: 87 Bell MVP norm={reference_result['norm']:.1f} mutant_odd={mutation_result['odd_probability']:.1f} boundary_norm={boundary_result['norm']:.1f}")
```

The reference simulator applies a Hadamard to the first qubit and a controlled operation to produce amplitudes [1/sqrt(2), 0, 0, 1/sqrt(2)] in the declared basis. The mutation omits the controlled operation and therefore leaves amplitude on 10 instead of 11. A parity test catches the conceptual failure. The page can explain that result without relying on color or animation.

Artifact contract. A semantic UI contract, deterministic two-qubit simulator fixture, accessibility checklist, release record, and analytic rubric. The fixture preserves normalization and Bell parity; the page works by keyboard and without client-side math; sources, limitations, version, test command, and issue route are visible.

Bell-state public playground reference slice: inspected record
 | Release property | Reference record | Acceptance | Mutation

 | Statevector | [1/sqrt(2),0,0,1/sqrt(2)] | norm and parity | omit entangler
 | Explanation | basis and outcomes in text | no color dependency | hide basis
 | Interaction | keyboard-operable controls | visible focus | remove label
 | Provenance | version, sources, issue route | all visible | stale date

Exact validation command: `python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

## Release evidence before feature count

Release the slice only after keyboard navigation, focus, 200-percent zoom, narrow layout, no-JavaScript math, deterministic tests, source links, provenance, and issue reporting pass. Record the exact version and expected output. Add a new route only when reader observation shows a distinct question that cannot be answered by improving this one.

## Run the public-MVP acceptance suite

Prompt. Build and publish the Bell-state learning slice with a deliberately wrong variant that the tests catch.

Deliverable. Semantic page, accessible state explanation, reference simulator, expected output, failing variant, automated tests, dependency/version record, source ledger, limitations, changelog entry, and feedback route.

Pass condition. The reference test passes, the mutation test fails for the intended reason, keyboard and 200-percent zoom checks pass, and no hardware or learning claim exceeds the evidence shown.

## Model repository, launch record, and rubric

Format. Model MVP repository record and 100-point release rubric.

The model repository includes semantic HTML, the four-amplitude fixture, expected output, mutation test, dependency record, source ledger, limitations, changelog, and issue route. Its 100-point rubric allocates 25 to conceptual accuracy, 20 to executable correctness, 15 to accessibility, 15 to evidence and provenance, 15 to pedagogy and assessment, and 10 to release hygiene. The mutation must fail for the intended parity reason.

Verification. The embedded fixture prints the expected Bell probabilities and catches the missing-entangler mutation; the rubric requires accessibility, provenance, and reproducibility for a passing release.

Analytic capstone rubric: 100 points
 | Criterion | Points | Evidence rule

 | Conceptual accuracy | 25 | Show the inspectable conceptual accuracy record; an unsupported assertion receives no credit.
 | Executable reference and mutation | 20 | Show the inspectable executable reference and mutation record; an unsupported assertion receives no credit.
 | Accessibility | 15 | Show the inspectable accessibility record; an unsupported assertion receives no credit.
 | Evidence and provenance | 15 | Show the inspectable evidence and provenance record; an unsupported assertion receives no credit.
 | Pedagogy and assessment | 15 | Show the inspectable pedagogy and assessment record; an unsupported assertion receives no credit.
 | Release hygiene | 10 | Show the inspectable release hygiene record; an unsupported assertion receives no credit.
 | Total | 100 | All pass conditions remain mandatory regardless of point total.

## MVP limits and evidence-led iteration

An ideal statevector is not a hardware run and does not teach calibration, noise, compilation, or statistical inference by itself. Automated accessibility checks cannot replace keyboard and screen-reader review. Learning effectiveness requires observation with real readers; page completion and test pass are release evidence, not proof of mastery.

Evidence cutoff: 14 August 2026. Review by: 14 November 2026. The refresh must recheck reference SDK behavior, accessibility evidence, mutation tests, provenance, and observed reader failures.

External review: Open. Useful expertise: Quantum computing educator able to review conceptual and assessment accuracy; Frontend accessibility engineer able to audit interaction and semantic output.

Companion work

## Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

-

capstone artifact

### [Bell-state public playground reference slice](/playground/quantum/book/87-public-playground-mvp/#artifact-87-public-playground-mvp)

[Download fixture (.py)](/playground/quantum/artifacts/87-public-playground-mvp/fixture.py)[Verification record (.json)](/playground/quantum/artifacts/87-public-playground-mvp/artifact.json)

Reproduce or test
`python3 tools/validate_briefs.py --briefs data/editorial_briefs_64_87.json --from 64 --through 87 --check-rewritten-sources --execute-artifacts`

Provenance

## Sources and review

- [John S. Bell. On the Einstein Podolsky Rosen paradox. Physics Physique Fizika. 1964](https://doi.org/10.1103/PhysicsPhysiqueFizika.1.195) primary paper

- [OpenQASM Technical Steering Committee. OpenQASM 3 specification. Linux Foundation Joint Development Foundation. 2026](https://openqasm.com/) official technical specification

- [IBM Quantum. Qiskit documentation. IBM. 2026](https://quantum.cloud.ibm.com/docs/en/guides) official documentation

- [Google Quantum AI. Cirq documentation. Google. 2026](https://quantumai.google/cirq) official documentation

- [U.S. Government Accountability Office. Quantum Computing and Communications: Status and Prospects. GAO. 2021](https://www.gao.gov/products/gao-22-104422) government technology assessment

- [Association for Computing Machinery. Artifact Review and Badging. ACM Publications. 2026](https://www.acm.org/publications/policies/artifact-review-and-badging-current) official reproducibility policy

- [Lieven M. K. Vandersypen et al.. A look at the full stack. Nature Reviews Physics. 2021](https://doi.org/10.1038/s42254-021-00301-w) peer-reviewed perspective

- [Timothy Proctor et al.. Benchmarking quantum computers. Nature Reviews Physics. 2025](https://doi.org/10.1038/s42254-024-00796-z) peer-reviewed perspective

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

External review: Open.
[How review works](/playground/quantum/about/#editorial-method)[Revision history](/playground/quantum/changelog/)[Report or inspect errata](/playground/quantum/errata/?chapter=87-public-playground-mvp#report)

Dependency graph

## Prerequisites for this chapter

- [Bell States and GHZ States Part III. Circuit Model · Chapter 20](/playground/quantum/book/20-bell-states-and-ghz-states/)

- [Building a Small Simulator From Scratch Part V. Practical Software · Chapter 37](/playground/quantum/book/37-building-a-small-simulator-from-scratch/)

- [Hardware-Constrained Lab Part X. Capstones · Chapter 84](/playground/quantum/book/84-hardware-constrained-lab/)

Continue the thread

## Next concepts from this chapter

- [Company Diligence Memo Part X. Capstones · Chapter 86](/playground/quantum/book/86-company-diligence-memo/)

- [Application Evidence Dossier Part X. Capstones · Chapter 85](/playground/quantum/book/85-application-evidence-dossier/)

- [Full-Stack Algorithm Trace Part X. Capstones · Chapter 83](/playground/quantum/book/83-full-stack-algorithm-trace/)

[Previous Company Diligence Memo](/playground/quantum/book/86-company-diligence-memo/)[Next Publication home](/playground/quantum/)

In this chapter

- [Capstone brief: one trustworthy learning loop](#section-87-public-playground-mvp-1)

- [The Bell-state slice from question to measurement](#section-87-public-playground-mvp-2)

- [Accessibility and provenance are product behavior](#section-87-public-playground-mvp-3)

- [Release evidence before feature count](#section-87-public-playground-mvp-4)

- [Run the public-MVP acceptance suite](#section-87-public-playground-mvp-5)

- [Model repository, launch record, and rubric](#section-87-public-playground-mvp-6)

- [MVP limits and evidence-led iteration](#section-87-public-playground-mvp-7)

- [Artifacts for this chapter](#companion-artifacts)

- [Sources and review](#sources-and-review)

Provenance

** Author** : Steven Geller

** Sources** : 8 chapter-level references

** Revised** : August 14, 2026

[Editorial standards](/playground/quantum/about/#editorial-method)

Copy chapter link[Report an issue](/playground/quantum/errata/?chapter=87-public-playground-mvp#report) Cite this chapter

[Canonical HTML](https://www.steven-geller.com/playground/quantum/book/87-public-playground-mvp/)
