Case Study 1: The Failure Mode I Predicted Wrongly
The prediction
Kernel concentration is a documented, well-understood failure mode of quantum kernels. As the feature map spreads states over more of Hilbert space, any two states become nearly orthogonal: $K(x,x') \to 0$ off the diagonal, and the Gram matrix approaches the identity.
I measured it, and it is severe:
qubits mean offdiag std offdiag
2 0.25147 0.21980
4 0.06195 0.07810
6 0.01497 0.02905
8 0.00429 0.00664
10 0.00088 0.00163
A collapse of several hundred fold across eight qubits. The mechanism is exactly Chapter 32's barren plateaus wearing different clothes: an exponential loss of signal with system size.
So I wrote down what would follow, before running it:
An identity Gram matrix says every point is equally dissimilar to every other. The SVM can separate the training set perfectly — every point is its own island — and learns nothing transferable. It will memorize and generalize at chance, and every training point will become a support vector.
The reasoning is sound. The Gram matrix really does approach the identity; an identity Gram matrix really does permit perfect training separation with zero generalization; and "every point becomes a support vector" really is the signature of that. It is a confident, mechanistically-justified prediction.
What the measurement said
Sweeping qubit count on the chapter's actual dataset:
qubits mean offdiag train acc test acc support vecs gap
2 0.28387 0.8458 0.7778 91 / 201 0.0680
4 0.12910 0.9254 0.8283 97 / 201 0.0971
6 0.07021 0.9453 0.8687 114 / 201 0.0766
8 0.04587 0.9552 0.8788 128 / 201 0.0764
10 0.03300 0.9552 0.8889 132 / 201 0.0663
12 0.02531 0.9602 0.8889 144 / 201 0.0713
Test accuracy rose, from 0.7778 to 0.8889. The generalization gap stayed flat at about 0.07. Support vectors grew from 91 to 144 — nowhere near all 201.
No memorization. The prediction was wrong in sign.
Train accuracy did rise as predicted (0.8458 → 0.9602), which is the part that would have made a selective reading look confirmatory. Had I reported only the train column and the concentration column, the prediction would appear vindicated.
Why it was wrong
The two measurements used different data, and the difference is the whole story.
qubits REDUNDANT (2 features over n qubits) INDEPENDENT (n features)
2 0.25346 0.25147
4 0.10728 0.06195
6 0.05749 0.01497
8 0.03478 0.00429
10 0.02251 0.00088
Concentration is driven by the dimension of the data the map sees, not by the qubit count.
The concentration sweep used random points with one independent feature per qubit — ten qubits reading ten independent numbers. That genuinely spreads the state across Hilbert space, and concentration is severe: a several-hundred-fold collapse.
The accuracy sweep used the chapter's moons data, which has two features. Spreading two numbers over ten qubits re-encodes the same information redundantly. It adds expressive depth — more interference, more structure in the resulting kernel — without spreading the state over more of Hilbert space. Concentration is mild (about 11× over the same range), and the extra depth helps.
⚛️ The Physics Underneath: what makes states orthogonal is independent information, not qubits.
Two states drift apart when the circuit has independent degrees of freedom to drive them apart with. Re-encoding the same two numbers on more qubits produces states that remain highly correlated — the extra qubits carry no new information about $x$, so they cannot make $\phi(x)$ and $\phi(x')$ more distinguishable.
The dangerous regime is high-dimensional data — which is exactly the regime kernel methods are for.
What the error actually was
Not the mechanism. The mechanism was right, and it is right in the independent regime, severely.
The error was applying a regime-dependent effect without checking which regime the experiment was in. I had both facts available — the data has two features, the sweep goes to twelve qubits — and I did not connect them before writing the conclusion.
A failure mode's mechanism can be correct while your judgement about whether it applies is wrong, and the second error is easier to make and harder to notice.
It is also the error that a confident, well-motivated prediction makes more likely, not less. Chapter 26 §26.4 found the same shape: a debugging tool whose reasoning was correct and whose default input could not exercise it.
What the project module does about it
concentration_verdict will not answer without the feature dimension:
def concentration_verdict(K, n_qubits: int, n_features: int, ...):
"""Is concentration a problem here? REQUIRES the feature dimension.
Section 34.6 predicted from qubit count alone that concentration would cause
memorization and chance-level generalization. Measured, test accuracy ROSE
from 0.7778 to 0.8889 across 2-12 qubits...
"""
n_features has no default. Passing the same Gram matrix with n_features=10 and n_features=2
returns different verdicts and different explanations — because the same kernel values mean different
things depending on what produced them.
There is also an OVERLOADED regime for n_features > n_qubits, which is neither and should be
flagged before anyone reads anything into the kernel values at all.
The lessons
Verify a prediction even when the mechanism is certain. Especially then — a confident derivation is what stops you checking.
Report the columns that could contradict you. Train accuracy alone would have confirmed the prediction. Test accuracy refuted it, and both were one line away.
Ask which regime you are in before applying a regime-dependent result. Concentration is real, severe, and well-documented. Whether it applies to your setup depends on a number you already know.
Keep the correction visible. §34.6 prints both measurements and says which prediction failed. A chapter that quietly deleted the wrong claim would teach the conclusion without teaching the mistake, and the mistake is more transferable.
And notice which direction the error ran. It would have made quantum kernels look worse than they are. Being wrong in the pessimistic direction is still being wrong — Chapter 33's Case Study 1 erred optimistically and this one erred the other way, and both came from not replicating before concluding.
Reproduce it: code/example-02-concentration.py measures the concentration collapse, runs the
accuracy sweep that refutes the prediction, and then isolates the redundant-versus-independent
comparison that explains it. concentration_verdict in code/vqelab/kernels.py requires the feature
dimension, and test_concentration_verdict_REQUIRES_the_feature_dimension asserts that the same Gram
matrix produces different verdicts under different regimes.