Skip to content

Back to the catalog

Toward Joint Optimization of Circuit Depth and Training Data Size in Adaptively Grown Quantum Classifiers
arxiv.orgpaper

Toward Joint Optimization of Circuit Depth and Training Data Size in Adaptively Grown Quantum Classifiers

The paper reimplements Q-FLAIR, which grows a quantum feature-map circuit gate by gate until the training loss stops improving. It runs the method on 784-pixel MNIST 3-vs-5 classification at five training-set sizes (N = 2000 to 10000), then fine-tunes each circuit to count Caro et al.'s active gates K. It finds no predictable link between training-set size and the circuit size Q-FLAIR converges to, and seed variance is nearly as large as any trend. The Caro et al. generalization bound holds in 14 of 15 runs, but the gap correlates only weakly with the bound (r = 0.12), so K explains little of the variation. This is a useful negative result for anyone hoping to jointly optimize circuit depth and data size.

TL;DR Q-FLAIR's adaptively grown quantum classifiers show no predictable scaling of circuit size with training data on MNIST 3-vs-5. The Caro et al. generalization bound is valid but only weakly predictive (r = 0.12).
Document

What it claims

On raw 784-pixel MNIST 3-vs-5, Q-FLAIR's converged circuit size T\ does not track training-set size N. Across N = 2000–10000, mean T\ ranges from 16 to 23 gates and mean test accuracy from 84% to 89%, neither moving monotonically. The authors' explanation is that with 784 candidate features, some gate clears the fixed loss-improvement threshold at almost any N. This decouples the stopping decision from how much data is available.

One clarification on the summary's "14 of 15": the 15th run (N=10000) did not violate the Caro et al. bound. Fine-tuning moved no weights, so K = 0 and the bound is trivially zero. The authors therefore excluded that run as "not applicable."

How it works

Phase 1, growth (Q-FLAIR reimplementation):

  • Uses Q-FLAIR's exact gate pool: Rx, Ry, Rxx, Ryy (fixed and data-encoding variants) plus H.
  • Runs on a 5-qubit ring, which is Q-FLAIR's own QNN qubit ceiling.
  • Each candidate gate's output is reconstructed as a closed-form sinusoid of its rotation angle, using 2 extra quantum evaluations.
  • The loss-minimizing weight and feature are found classically. At d = 784, brute-force grid search over features is too slow, so they use SciPy's bounded scalar minimizer (tolerance 10⁻³). This cuts classical cost by about 10×.
  • Growth stops when the best candidate improves training loss by less than ΔL = 10⁻³. There is no cap on circuit size.

Phase 2, joint fine-tune (new in this paper):

  • Q-FLAIR freezes each gate's weight once found, so K is undefined on its own.
  • The authors warm-start from the grown circuit and run Adam over all weights, with mini-batches and early stopping.
  • K is the number of gates whose weight moves by more than δ = 0.05.
  • Whichever weights (original or fine-tuned) give lower validation loss are kept, so Phase 2 can never report a worse model than Phase 1.

The bound reported is the full Caro et al. Theorem 3 form: min_K[√(K log(MT)/N) + Σ_{k>K} MΔ_k].

Evidence

Results are means over 3 seeds per N, each evaluated on the same 1000-example held-out test set:

NT\*test acc.gen. gap
200022.67±9.070.892±0.0280.0089±0.0047
400016.33±2.520.841±0.0080.0141±0.0123
600020.67±4.730.892±0.0270.0045±0.0028
800018.00±1.000.882±0.0010.0048±0.0024
1000022.67±8.960.874±0.0220.0128±0.0101
  • The seed standard deviation in T\* (up to ±9 gates) is comparable to the whole spread across N.
  • Across the 14 applicable runs, the gap correlates with the bound at r = 0.12. Raw gate count T alone gives r = 0.05, so K adds almost nothing as a predictor.
  • Setup:
  • Simulation is exact statevector in PennyLane.
  • Each run takes minutes to tens of minutes.
  • Pixels are rescaled to [−π, π] using training-set statistics.
  • The loss is negative log-likelihood.
  • The decision threshold comes from an ROC-style search that maximizes balanced accuracy on the training set.

Limits

  • Single task: only one dataset and task. Q-FLAIR's QSVM variant is untested.
  • Low statistical power: 3 seeds per N means a trend smaller than the seed variance would go undetected.
  • Untuned Phase 2: the fine-tune learning rate and δ were each chosen once and never varied. Other values could change K and the r = 0.12 result.
  • No code release: the page does not mention a repository.
  • Proposed fix is untested: the authors suggest a stopping threshold that scales with both N and candidate-pool size, such as a multiple-comparisons correction. They do not run it. The high-dimensionality explanation for the missing trend is a hypothesis, not something they test, for example by reducing the number of features.

Technologies named here

  • MNIST
  • Q-FLAIR

Techniques named here

  • Q-FLAIR
  • Fine-tuning grown circuits to measure active gates

Also named here

  • Caro et al.