DiracDirac

Part IV · Learning with Amplitudes · Chapter 17

The Honest Scorecard

The capstone. Not every claimed quantum speedup survives contact with the best classical algorithm — and the tool that tells you which will is the same one that draws the boundary of the whole field: entanglement, measured as a bond dimension.

Sources: Tang 2019 · Huang et al. 2021 · Orús 2014

This book has been an argument by construction: nothing on authority, every claim handed to a referee. This last chapter turns that habit on the field's biggest promise — that quantum machines will learn better than classical ones. The honest answer has three parts. First, a warning: dequantization, the shock of watching claimed exponential speedups collapse when someone finally wrote the best classical algorithm. Second, a place where the ground is firmer: learning from quantum data. And third, the ruler that measures both — tensor networks, which make precise the intuition that a quantum computation is only hard to fake when it is highly entangled. We build a matrix product state simulator from scratch, watch its fidelity climb as we pay for entanglement one bond dimension at a time, and end with the honest scorecard: what is proven, what is merely believed, what is plausible, and what has already been dequantized.

What this chapter covers

  • 17.1The dequantization shock. Ewin Tang's 2018–19 classical algorithm for recommendation systems, the wave of dequantized linear-algebra QML, and the rule it taught: compare to the best classical method, never a strawman.
  • 17.2Where advantage is firmer. Learning from quantum states and processes directly (Huang et al.): provable separations when the data itself is quantum, and why that is harder to dequantize.
  • 17.3The price of entanglement. Matrix product states and bond dimension χ; χ as the Schmidt rank of Chapter 3; the area law; and why low-entanglement circuits are classically simulable — and therefore dequantizable.
  • 17.4The Lab. An MPS simulator with SVD truncation, refereed against a full state-vector engine: exactness at sufficient χ, the required-χ table cut by cut, the monotone fidelity tradeoff, and a compression the referees certify is real.
  • 17.5The honest scorecard. The book's meta-lesson made into a table — proven wins, believed-but-unproven giants, plausible conditionals, dequantized losses, open questions — and a closing word.

Start with the cautionary tale, because it is the one most often left out. Around 2016 a celebrated result — the Kerenidis–Prakash quantum recommendation-system algorithm — claimed an exponential speedup: given sparse ratings data structured as a low-rank matrix, a quantum computer could suggest a good product in time polynomial in the log of the matrix dimensions, where the known classical methods ran in time polynomial in the dimensions themselves. It was one of the flagship examples of “quantum machine learning,” a whole family of algorithms built on quantum linear algebra — solving linear systems (HHL), principal component analysis, support-vector machines — all promising exponential gains on low-rank problems.

In 2018, an eighteen-year-old undergraduate named Ewin Tang was handed the recommendation problem as a challenge to prove a matching classical lower bound — to show it could not be done classically. She proved the opposite. By importing the quantum algorithm's own assumption — fast, structured -norm sampling access to the data — into a classical algorithm, she matched the quantum runtime up to polynomial factors. The exponential speedup was an illusion: it had been measured against a classical algorithm denied the same data-access model, not the best one. This is dequantization.

What followed was a cascade. The same “quantum-inspired” sampling technique dequantized much of low-rank linear-algebra QML: regression, PCA, supervised clustering, the low-rank cases of the matrix problems that had anchored the field. The polynomial exponents were often large — these classical algorithms are not necessarily fast — but the exponential separation was gone. The lesson is not that quantum computing failed; it is a rule of evidence, and it is the rule this entire book has followed:

(17.1)

where the second term means the best classical algorithm that exists, granted every resource the quantum one is granted — not the textbook default that happens to be easy to beat. A speedup measured against a strawman is not a speedup.

If low-rank linear-algebra QML dequantizes, where does a durable learning advantage live? The clearest answer of the last few years is: where the data itself is quantum. Every algorithm in Part IV so far assumed classical inputs — feature vectors, images, ratings — that had to be loaded into amplitudes, and it is exactly that loading, that classical description, which lets a classical algorithm sample its way to the same answer. Take the classical description away.

Suppose the data are physical quantum states — the outputs of a quantum sensor, a chemistry experiment, or another quantum device — handed to the learner coherently, without ever being measured into a classical list. A learner that can hold several copies at once and entangle them before measuring can extract properties that any learner restricted to single-copy measurements provably cannot, with an exponential gap in the number of samples required. Huang, Kueng, Preskill and collaborators (2021–2022) proved separations of exactly this shape, and demonstrated some on real hardware. The intuition is clean: measurement is the lossy keyhole of Chapter 1, and if your data are born quantum, forcing them through that keyhole one copy at a time throws away information that a coherent quantum memory keeps.

This is a narrower promise than the early hype — it needs quantum-native data, not spreadsheets — but it is a firmer one, because there is no classical description to sample from in the first place. It sits beside Hamiltonian simulation (Chapter 9) as an advantage grounded in the physics rather than in an accounting trick. Keep the distinction sharp: quantum data, plausibly yes; classical data dressed in amplitudes, usually dequantizable. The tool that explains why is next.

Here is the unifying idea, and it reaches all the way back to Chapter 3. An -qubit amplitude vector has entries, but most physically relevant states do not use that space fully — they are only lightly entangled. A matrix product state (MPS) is the data structure that cashes low entanglement into low cost. It rewrites each amplitude as a product of small matrices, one per site:

(17.2)

where each is a matrix selected by the physical bit (the boundary matrices are row and column vectors, so the product lands on a number). The internal indices contracted between neighbours are the bond indices, and their size — the bond dimension — is the one number that controls everything. Store the chain and the cost is

(17.3)

When is small this is a colossal saving, and the schematic below shows why it is possible at all: the physical legs carry the qubits, and the horizontal bonds carry the correlations between one side of a cut and the other.

one amplitude vector = a train of small tensorsψ2ⁿdense=1χχχχ1q0Aq1Aq2Aq3Aq4Aphysical legs (dimension 2 each)horizontal bonds carry the entanglement — dimension χ = Schmidt rank across each cutcost ≈ n · 2 · χ² numbers instead of 2ⁿ — small when χ is small, i.e. when entanglement is low
Figure 17.1. A matrix product state as a tensor train. The dense 2ⁿ amplitude vector (left) is factored into a chain of rank-3 tensors, one per qubit. Each tensor has a physical leg (down, dimension 2) and horizontal bond legs of dimension χ joining it to its neighbours; the two boundary bonds are trivial (χ = 1). The bonds are where entanglement is stored, so the whole cost — n·2·χ² numbers — is set by how large χ must be.

Now the exact link to Chapter 3. Cut the chain between sites and and write the Schmidt decomposition across that bipartition,

(17.4)

the very object of Chapter 3. The number of nonzero Schmidt coefficients is the Schmidt rank, and the bond dimension the MPS needs on that cut is exactly that rank. A product state has Schmidt rank 1 everywhere, so suffices; a Bell or GHZ state has rank 2, so suffices; a maximally entangled cut of a half-chain needs the full , and the saving evaporates. The entanglement entropy makes the bound quantitative. Since is the Shannon entropy of a distribution on outcomes, it can be at most , so

(17.5)

A state whose entanglement entropy across every cut is bounded by a constant (an area law, typical of ground states of local, gapped Hamiltonians) needs only a constant — it is classically tractable. This is the engine behind the density-matrix renormalization group and the classical simulation of a great deal of quantum many-body physics. And it is the boundary of quantum advantage stated as a theorem: if a quantum circuit keeps its entanglement low — bounded throughout — then a tensor network tracks it in polynomial time, and whatever that circuit was doing is dequantized. A variational quantum model that never leaves the low-entanglement regime cannot be beating a classical one; a genuine quantum advantage must spend entanglement the network cannot afford. Turn the knob and watch the price:

Loading /data/ch17/tensor.json… (run cargo run --release in Rust-QML/ch17-tensor)

The slider tells the whole story in one gesture. At small the MPS is cheap but wrong — it has thrown away Schmidt components the state actually carries — and the fidelity sits well below 1. Raise and the discarded components return, the fidelity climbs monotonically, and at the reconstruction is exact. Low entanglement, cheap; high entanglement, expensive; and never a free lunch in between.

The lab builds an MPS engine from scratch and checks it against a from-scratch full state-vector simulator (the workhorse of Chapter 2, rebuilt here with real amplitudes so a real SVD suffices). The construction is the canonical left-to-right sweep: reshape the state into a matrix at each bond, take its singular value decomposition, keep the largest singular values, and carry the remainder forward. The truncation — the one place fidelity can be lost — is a single call:

ch17-tensor/src/main.rs — the SVD truncation
1/// Truncated SVD of `m`: keep the `chi_max` largest singular values (and, if
2/// `tol > 0`, drop any singular value below `tol · σ_max` as numerically zero).
3/// Returns (U_k [rows×k], σ_k [k], Vᵀ_k [k×cols]) with σ sorted descending.
4fn trunc_svd(m: &DMatrix<f64>, chi_max: usize, tol: f64) -> (DMatrix<f64>, Vec<f64>, DMatrix<f64>) {
5 let svd = m.clone().svd(true, true);
6 let u = svd.u.expect("U");
7 let vt = svd.v_t.expect("Vt");
8 let s = svd.singular_values;
9 let p = s.len();
10
11 // defensively sort by singular value, descending
12 let mut idx: Vec<usize> = (0..p).collect();
13 idx.sort_by(|&a, &b| s[b].partial_cmp(&s[a]).unwrap());
14
15 let smax = if p > 0 { s[idx[0]] } else { 0.0 };
16 let keep_by_tol = if tol > 0.0 {
17 idx.iter().filter(|&&i| s[i] > tol * smax).count().max(1)
18 } else {
19 p
20 };
21 let k = chi_max.min(keep_by_tol).max(1).min(p);
22 // … assemble U_k, σ_k, Vᵀ_k from the top-k columns/rows …
23}

The sweep threads that truncation down the chain — even the reshape is an explicit loop, so no library is trusted with the index bookkeeping. Each site's factor becomes a left-canonical tensor (an isometry, so the norm is preserved), the leftover is pushed into the next site, and the kept singular values are recorded per bond — the referees will demand they are the Schmidt coefficients. The number kept is the new bond dimension:

ch17-tensor/src/main.rs — the canonical SVD sweep
1for _s in 0..n {
2 let ncol = carry.ncols();
3 let cols_next = ncol / d;
4 // reshape (chi_left × ncol) → M (chi_left·d × cols_next)
5 let mut mmat = DMatrix::<f64>::zeros(chi_left * d, cols_next);
6 for a in 0..chi_left {
7 for phys in 0..d {
8 for rest in 0..cols_next {
9 mmat[(a * d + phys, rest)] = carry[(a, phys * cols_next + rest)];
10 }
11 }
12 }
13 let (uk, sk, vtk) = trunc_svd(&mmat, chi_max, tol);
14 let k = sk.len();
15 tensors.push(MpsTensor { l: chi_left, r: k, mat: uk });
16 bond_sigmas.push(sk.clone());
17
18 // carry = diag(σ) · Vᵀ → (k × cols_next)
19 let mut newcarry = vtk;
20 for row in 0..k {
21 for cc in 0..cols_next {
22 newcarry[(row, cc)] *= sk[row];
23 }
24 }
25 carry = newcarry;
26 chi_left = k;
27 }

To check the MPS against the state vector we contract the whole train back into amplitudes, one site at a time — the bond index shared by two neighbours is summed over, exactly the matrix product of (17.2):

ch17-tensor/src/main.rs — contracting the tensor train
1/// Contract the MPS back into a full 2^n state vector.
2fn mps_to_vec(tensors: &[MpsTensor], n: usize) -> Vec<f64> {
3 let d = 2usize;
4 let mut acc = tensors[0].mat.clone(); // (2 × r0), phys = 2
5 for s in 1..n {
6 let ts = &tensors[s];
7 let ls = ts.l;
8 let rs = ts.r;
9 let phys = acc.nrows();
10 let mut newacc = DMatrix::<f64>::zeros(phys * d, rs);
11 for pp in 0..phys {
12 for p in 0..d {
13 for b in 0..rs {
14 let mut sum = 0.0;
15 for a in 0..ls {
16 sum += acc[(pp, a)] * ts.mat[(a * d + p, b)];
17 }
18 newacc[(pp * d + p, b)] = sum;
19 }
20 }
21 }
22 acc = newacc;
23 }
24 (0..acc.nrows()).map(|i| acc[(i, 0)]).collect()
25}

Eight referees run and write their verdicts to the JSON the panel below reads live — nothing is hardcoded. At a sufficient bond dimension the MPS reproduces the state-vector amplitudes to better than the tolerance; the untruncated bond dimension equals the Schmidt rank on every cut, not just the centre one (product at ; Bell, GHZ and the 1D cluster state at , and demonstrably not exact at ); the truncation error of the headline state is monotone non-increasing in and vanishes at full ; the left-canonical form keeps its isometries and unit norm; and the singular values the sweep keeps are the Schmidt coefficients of the matching cut, value by value. The last three referees grade the headline claim itself. The headline state — a three-layer brickwork circuit whose centre cut is crossed by only one entangler per layer — is reconstructed exactly at , and that rank sits strictly below the generic (the compression is real, not a restatement of “exact at full ”); one bond fewer still loses real weight (the rank is not padded); and the truncations land on their analytic closed forms — for Bell and GHZ, for the cluster chain.

Loading /data/ch17/tensor.json… (run cargo run --release in Rust-QML/ch17-tensor)

Run it yourself with cargo run --release in Rust-QML/ch17-tensor. The fidelity curve is the dequantization moral in one picture: a low-entanglement state sits at the cheap left end where a classical tensor network keeps up for free, and only genuinely high-entanglement states force the bond dimension — and the cost — to grow.

Put it all on one table. Across seventeen chapters the evidence sorts into five honest columns, and the scorecard panel above renders them live from the lab. The proven wins are the claims that come with an actual lower bound against the classical side: Grover (Chapter 8) — real and provably optimal, but only quadratic, and only in the oracle model — and learning from quantum data, on the strength of provable sample-complexity separations. One column over sit the believed giants: Shor's period finding (Chapter 7) and Hamiltonian simulation (Chapter 9). No classical rival is known for either, and the speedups are almost certainly real — but this chapter's own equation (17.1) demands the best classical algorithm, and no theorem rules out a classical surprise: there is no classical lower bound for factoring, and none for simulating generic local dynamics. Believed, not proven, is the honest word.

The plausible column holds quantum kernels and feature maps on classical data: advantage exists for carefully engineered, classically hard kernels, but case by case, with no blanket guarantee. And the hard truths sit in the last two columns. Low-rank linear-algebra QML is dequantized — the speedup was against a strawman. Generic NISQ variational QML is open: no proof of advantage, barren plateaus flattening the gradients as the model widens (Chapter 16), and the tensor-network result of this chapter waiting to dequantize any circuit that stays low-entanglement. That is not pessimism; it is the map you need to do useful work.

And so the book closes where it began — with a promise kept. We started with one qubit: two amplitudes, a direction on a sphere, one bit at readout. We grew it into a multi-qubit simulator, priced entanglement as a resource, modelled real noise, built the algorithms that made the field famous and measured exactly what each one buys, kept fragile quanta alive with codes and thresholds, and finally rebuilt learning itself in Hilbert space — feature maps, quantum kernels, variational circuits, and the plateaus that fight back. Every step obeyed the same discipline: propose the formalism, build it in Rust, and hand it to a merciless referee that checks against an exact result — and, just as often, against the best classical rival. You now own that method, and you own the honest scorecard it produces. The exponential is real; so are its limits. Knowing the difference — being able to compute it, referee it, and compare it honestly — is the whole of what this book had to give.

17.6Exercises

1. (F) Write the GHZ state as an explicit MPS with bond dimension : give the two matrices for a bulk site and the boundary vectors, and check the product reproduces the amplitudes.

2. (C) Using the bond-dimension explorer, read the truncation error at and . By how much does it fall when you double ? At what does it first drop to zero, and why is that value the Schmidt-rank marker on the plot rather than the full bond dimension at the plot's right edge?

3. (C) In the scorecard panel, find the two claims tagged dequantized and open. State in one sentence each why low-rank linear-algebra QML fell and why generic NISQ-QML has not been settled — and which chapter's result (barren plateaus, or this chapter's tensor networks) bears on the open case.

4. (P) Add a right_canonicalize sweep to the lab (SVD from the right end leftward) and verify it produces the same physical state as the left-canonical form to . Then compute the truncation error two ways — from discarded singular values, and from the reconstructed-state fidelity — and confirm they agree.

5. (F, hard) Prove the bound (17.5): show that a state with entanglement entropy bits across a cut requires bond dimension on that cut. (Hint: the entropy is the Shannon entropy of the Schmidt weights ; a distribution on outcomes has entropy at most , with equality iff it is uniform.) Then argue the converse consequence: a family of circuits whose entanglement entropy grows without bound cannot be simulated by any fixed- tensor network — the one place a quantum advantage can still hide.

The bridgeEpilogue: The Honest Frontier

Where you stand. You can tell a real quantum speedup from a dequantized one. You have an MPS simulator whose bond dimension is the Schmidt rank of Chapter 3 — the exact price of entanglement — and an honest scorecard: Grover and quantum-data learning proven, Shor and Hamiltonian simulation believed (no classical rival known, but no lower bound either), low-rank linear-algebra QML dequantized, generic NISQ-QML still open. You own the whole method now: compute it, referee it, compare it honestly.

The open question. So where does the field actually go from here? Which of the open questions are within reach of the machinery you built, and which wait on hardware that does not yet exist?

What comes next. The epilogue is the closing letter — a research map in four directions (hardware, algorithms, learning, foundations), the state of the field told without hype, and a last word, student to student, on the work that is now yours to do.

Continue to Epilogue