?
Preprint IEEE Access · MDPI Entropy (in prep.)

Predicting the Trainability of Variational Quantum Circuits: A Data-Driven Model for Barren Plateaus

Habibur Rahman and Jaeho Kim · Department of Aerospace and Software Engineering, Gyeongsang National University

Abstract

Barren plateaus — the exponential vanishing of cost-function gradients as a variational quantum circuit is scaled — are the central obstacle to training quantum machine-learning models, and diagnosing them today requires expensive gradient sampling on each candidate circuit. We reframe barren-plateau diagnosis as supervised prediction: given only a circuit's architecture (qubit count, depth, ansatz type, entanglement pattern, entangler gate, and cost-observable locality), can a classical model predict its trainability without sampling a single gradient? Using this simulator's exact statevector engine we generate 20,000 random variational circuits, each labelled by the gradient variance measured over 200 random parameter vectors via the parameter-shift rule. A gradient-boosted model predicts the trainability and, crucially, extrapolates from small circuits to larger qubit counts that are progressively harder to simulate. We make no quantum-advantage claim — this is classical machine learning about quantum circuits, offering a cheap ansatz-screening heuristic.

20,000
circuits (2–12 qubits)
0.991
classifier AUC (barren vs. trainable)
0.685
regression R² (hold-out)
0.719
regression R² (extrapolation)

Method

Each data point is a random circuit spec. The circuit is built and simulated exactly with this project's qsim statevector engine; the parameter-shift gradient of the cost is sampled over 200 random parameter vectors to form the gradient-variance label y. Cheap closed-form architectural features X are read directly from the spec. A gradient-boosted model is trained on (X, y) to predict trainability — as regression (log10 of the gradient variance) and as classification (barren vs. trainable).

Method pipeline diagram
The full pipeline: spec → simulate → parameter-shift gradients → variance label; the spec also yields features; a gradient-boosted model predicts trainability.

Dataset

The design space is sampled independently and uniformly. Every circuit is seeded reproducibly, so the exact dataset regenerates from a single command (below).

Design choiceCount Mean log10VarBarren %
Local cost Z09,974−2.3330.9%
Global cost Z⊗n10,026−4.4962.4%
Entanglement: linear6,649−2.5038.5%
Entanglement: all-to-all6,603−4.7952.8%

The data reproduces barren-plateau theory directly: global cost observables are ~2 orders of magnitude more barren than local ones, exactly the cost-locality effect predicted by Cerezo et al. (2021).

Gradient variance vs qubit count
Mean gradient variance vs. qubit count. Global costs show the exponential decay that defines a barren plateau; local costs decay far more slowly.

Results

We compared six model families on both a random hold-out split and an extrapolation split (train on ≤10 qubits, test on larger). Gradient-boosted trees won both tasks.

ModelReg. R² (hold-out)Reg. R² (extrap.) AUC (hold-out)AUC (extrap.)
Hist Gradient Boosting0.6850.7190.9910.989
MLP (neural net)0.6650.7520.9900.991
k-NN0.6450.6390.9860.979
Random Forest0.6400.7160.9850.988
Extra Trees0.6100.7070.9680.988
Linear baseline0.2740.2970.9530.889
Predicted vs true
Predicted vs. true log10 gradient variance (hold-out).
Feature importance
Feature importance: cost locality & entanglement dominate.

Reproduce it yourself

The entire study — data generation, model training, model comparison, and the paper's figures/tables — regenerates from the open-source repository with fixed random seeds. On any machine with Python 3.10+:

1Get the code and install dependencies

git clone https://github.com/bithabib/quantum_computer_simulator.git
cd quantum_computer_simulator
python3 -m venv .venv && source .venv/bin/activate
pip install -r qml_bp/requirements.txt

2Quick sanity check (~1 minute, small dataset)

python -m qml_bp.generate --n-specs 300 --samples 80 --qubit-max 8 --out data_bp/sample.csv
python -m qml_bp.train --data data_bp/sample.csv

3Regenerate the full 20,000-circuit dataset (set --workers to your core count; ~1 hour on 16 cores)

python -m qml_bp.generate --n-specs 20000 --samples 200 \
    --qubit-min 2 --qubit-max 12 --layer-min 1 --layer-max 20 \
    --workers "$(nproc)" --out data_bp/bp_dataset.csv

4Train, compare models, and describe the data

# headline model + extrapolation split + feature importance
python -m qml_bp.train --data data_bp/bp_dataset.csv

# compare six model families (picks the best)
python -m qml_bp.compare_models --data data_bp/bp_dataset.csv

# dataset descriptive-statistics tables
python -m qml_bp.describe_data --data data_bp/bp_dataset.csv --outdir paper/latex

5Rebuild the paper figures and PDFs

python paper/latex/make_figures.py --data data_bp/bp_dataset.csv
python paper/latex/fill_results.py --data data_bp/bp_dataset.csv   # syncs numbers into all papers
(cd paper/ieee-access && ./build.sh)   # IEEE Access PDF
(cd paper/mdpi && ./build.sh)          # MDPI Entropy PDF
Reproducibility note. Every circuit spec is seeded from a fixed root SeedSequence, and all models use fixed random_state, so the numbers above regenerate exactly. Labels are computed with the ideal (noiseless) statevector simulator; hardware noise is out of scope.

Code & data

Source repository Try the Quantum Lab Interactive experiments

The qml_bp/ package (data generation, training, model comparison) and the qsim/ statevector simulator that produces the labels are both in the repository. The dataset is regenerable end-to-end; it is not committed because it is large and deterministic.