Chapter 32 — Key Takeaways (Quantum Machine Learning Fundamentals)

Part VI opens on the area with the widest gap between claims and measurements.

The headline

   model                        train time   train acc   test acc
   LogisticRegression               2.2 ms      1.0000     1.0000
   VQC (4q, 2 layers, exact)        50.2 s      0.9714     1.0000

Same test accuracy. ~20,000× slower — on an exact simulator, with no shots and no noise. On hardware the training would cost 2.06 billion shots = 2.38 QPU-days.

★ The input problem

   encoding             qubits for N features   gate cost     what you spend
   basis (binary)       N x bits                O(N)          one qubit per BIT
   angle (1 per qubit)  N                       O(1) depth    one qubit per FEATURE
   amplitude            log2(N)                 O(N) gates    exponential qubits saved,
                                                              exponential gates spent

Amplitude encoding measured:

    N features   qubits   prep 2q gates   transpiled ecr
             4        2               1                1
            16        4              11               19
            64        6              57              100
           128        7             120              227

The logical counts fit an exact formula:

$$\text{two-qubit gates} = N - \log_2 N - 1$$

reproducing 1, 4, 11, 26, 57, 120. 128 features in 7 qubits — and 227 transpiled gates, surviving at Chapter 12's error rate with probability 0.18. Before the model does anything.

⚛️ Amplitude encoding compresses the register, not the work. An arbitrary $N$-dimensional state has $N$ independent real parameters, so preparing it takes $\mathcal{O}(N)$ gates — the information has to get in somehow.

$\log_2 N$ is about STORAGE. $\mathcal{O}(N)$ is about LOADING. Quoting the first without the second is the most common error in QML exposition.

QRAM would fix this and does not exist — and a QRAM robust enough to use would itself need error correction, at which point Chapter 25's overhead dominates.

★★ And encoding is per sample

   iris       150 samples x  4 features  ->  60 steps  ->    9,000 state preparations
   digits    1797 samples x 64 features  ->  60 steps  ->  107,820 state preparations

The exponential compression compresses ONE VECTOR. Training uses thousands of them, thousands of times. Not a constant factor — the dominant term.

★ The classical baseline

   model                 train time   test accuracy
   LogisticRegression        2.2 ms          1.0000
   SVC (rbf)                 0.6 ms          1.0000
   RandomForest             60.8 ms          1.0000

All three get 100%. Iris-binary is linearly separable, and it is the dataset most QML demonstrations use.

🔬 Matching a baseline is not evidence of anything. The result shows a parameterized circuit can express a linear boundary — never in doubt, and a perceptron has done it since 1958.

A demonstration on a dataset the baseline solves perfectly cannot distinguish the two methods. It can only fail to.

★★ The training shot budget

   parameters                  24
   parameter-shift evals/grad  2n+1 = 49        (Ch. 16 Sec 16.4)
   training samples            70
   optimizer steps             60
   shots per circuit           10,000           (Ch. 27 Sec 27.5's floor)

   TOTAL = (2n+1) x samples x steps x shots = 2,058,000,000 shots
         = 57.2 QPU HOURS = 2.38 DAYS

Chapter 24's VQE bill was 3.9e9 shots for one molecule at one geometry. This is the same order of magnitude for a 70-sample toy dataset — because the training loop multiplies Chapter 24's budget by the dataset.

📌 QML papers quote qubits, depth, accuracy, sometimes iterations. TOTAL SHOTS decides feasibility, is one line of arithmetic, and is almost never reported — exactly as Chapter 24 §24.3 found for VQE.

★ Barren plateaus arrive too

    qubits   params    var(grad)   ratio    used   excluded
         2       12    1.033e-01       -     420        300
         4       24    2.819e-02   3.67x     720        720
         6       36    1.410e-02   2.00x    1200        960
         8       48    1.951e-03   7.23x    1680       1200
        10       60    1.169e-03   1.67x    2160       1440

An 88× collapse across eight qubits — Chapter 16's barren plateau in the QML setting.

📌 The exclusion count is reported because Chapter 16 §16.6 learned to. ~40% of gradients are dropped at every size — parameters structurally unable to affect $\langle Z_0\rangle$. Chapter 16's version of this mistake produced a beautiful exponential fit to an artifact 18 orders of magnitude off. A filtered statistic whose exclusion count is not reported is not a statistic.

★★ And the constraints multiply

Resolving a gradient of size $g$ needs $\mathcal{O}(1/g^2)$ shots (Ch. 24 §24.3):

    qubits   params   typical |grad|   shots to resolve   total training shots
         4       24         1.00e-01                100               2.06e+07
         8       48         2.50e-02              1,600               6.52e+08
        12       72         6.25e-03             25,600               1.56e+10
        20      120         3.91e-04          6,553,600               6.63e+12

🔬 These are not separate problems that might be solved separately. More qubits means a flatter landscape AND more parameters AND more shots per parameter. The bill is a product, and every term grows the wrong way.

Chapter 24 §24.7's three barriers — shot budget, barren plateaus, hardware noise. QML has all three, multiplied by the dataset.

Is there any demonstrated advantage?

Proven separations exist, on constructed problems — learning tasks a quantum learner solves efficiently and a classical one cannot, under standard assumptions. Real theorems, and without exception about problems built to exhibit the separation.

No demonstrated advantage on a natural dataset. Not at any scale, against a tuned baseline. Several results initially presented as advantages were later reproduced classically, via dequantization techniques growing out of Ewin Tang's work.

And the input problem may be decisive. If loading $N$ numbers costs $\mathcal{O}(N)$, no exponential speedup on classical data survives it.

The strongest honest case: a promising research direction, with proven separations on constructed problems, no demonstrated advantage on natural data, and an unsolved structural input obstacle.

Defensible to work on. Not what most QML publicity says. And the standard is not harsher than Chapter 21 applied to Grover or Chapter 24 to QAOA — Chapter 23's Shor is the one that clears it.

Why Part VI continues anyway

  • The techniques are transferable — quantum kernels (Ch. 34) have a clean mathematical story.
  • The negative results are load-bearing. Barren plateaus, the input problem, dequantization are among the most useful things learned in the last decade, by people trying to make QML work. A field that produces sharp impossibility results is doing science.
  • The quantum-data case is real. When the input is already a quantum state, the loading cost vanishes and the argument changes completely. Chapter 35 returns to it.

How to read a QML paper

   1. WHAT IS THE CLASSICAL BASELINE, and is it tuned?
   2. IS THE DATASET ONE CLASSICAL METHODS SOLVE PERFECTLY? Iris, moons, circles all are.
   3. HOW WAS THE DATA ENCODED, and what did it cost -- PER SAMPLE?
   4. WHAT IS THE TOTAL SHOT COUNT? (2n+1) x samples x steps x shots.
   5. HARDWARE, or an exact simulator that hides all shot noise?
   6. HOW DOES IT SCALE? Was gradient variance measured or assumed?
   7. IS THE DATA CLASSICAL? Then the input problem applies.

Common pitfalls

  • Quoting $\log_2 N$ qubits without $\mathcal{O}(N)$ gates.
  • Forgetting that encoding is per sample, per step.
  • Demonstrating on a dataset the baseline already solves perfectly.
  • Omitting the total shot count.
  • Reporting exact-simulator results without saying so.
  • Assuming gradient variance rather than measuring it.
  • Depending on QRAM without naming the dependency.

Project piece added this chapter

vqelab/qml.pyEncodingCost carrying qubits AND gates together, with no way to request only the flattering half; state_preparations_per_run; training_shot_budget computing the number that decides feasibility; shots_to_resolve for the $1/g^2$ coupling; and compare_to_baseline, which returns UNINFORMATIVE_TIE — not a verdict — when the classical baseline already reaches perfect accuracy, naming what to do instead. 21 tests pass, including test_the_gate_count_matches_the_measured_formula_exactly, test_encoding_happens_PER_SAMPLE, test_the_training_budget_is_billions_of_shots, and test_compare_to_baseline_REFUSES_an_uninformative_tie.