# Weight-Space Programming of Variational Quantum Circuits: Large Language Models Write Quantum Circuit Parameters Without an Optimizer

Quantum.world

> Variational quantum algorithms train the angles of a parameterized quantum circuit with a classical optimizer, and that optimizer is the bottleneck: every loss evaluation is a run of a quantum…

**arXiv**: 2611.11537 · Preprint · not peer-reviewed

**Published**: 2026-11-08

**Authors**: Debarshi Kundu, Swaroop Ghosh, Vasant G Honavar

## In plain words

Variational quantum algorithms train the angles of a parameterized quantum circuit with a classical optimizer, and that optimizer is the bottleneck: every loss evaluation is a run of a quantum device, gradients vanish for generic circuits, and the problem is NP-hard in general.

## AI summary

## Overview

**Research area:** Quantum computing / variational quantum algorithms, at the intersection with large language models (LLM weight-space programming).

**Technical level:** Intermediate. The paper includes a background section written for machine-learning readers, so it is accessible to anyone comfortable with basic neural-network and linear-algebra concepts; the quantum vocabulary is defined from scratch.

**Scope:** A single-model empirical study (139 requests to GPT-6 Astra) testing whether an LLM can write the gate angles of variational quantum circuits directly, with no optimizer and no feedback, across quantum machine learning, VQE and QAOA tasks.

## What This Paper Is About

Variational quantum algorithms train the angles of a parameterized quantum circuit with a classical optimizer, and that optimizer is the bottleneck: every loss evaluation is a run of a quantum device, gradients vanish for generic circuits, and the problem is NP-hard in general. The authors ask whether a large language model can skip the optimizer entirely and simply *write* the angles, given the problem description, the circuit and the gate conventions. They carry the idea of "weight-space programming" — introduced by Takehi et al. for classical neural networks — into quantum circuits, and test where it works and where it breaks.

## Key Contributions

1. **Transfers weight-space programming to quantum circuits.** The paper defines a protocol in which a general-purpose LLM reads a Hamiltonian, a graph or a handful of labelled digit images, together with the exact circuit and Qiskit gate conventions, and replies with a JSON list of angles. The reply is simulated exactly as written; no loss, gradient or accuracy is ever returned. Only syntactic errors (malformed circuit) can be corrected, at most twice.
2. **A controlled comparison across all three VQA families.** Every trial is scored against random weights, a classical optimizer (L-BFGS-B with finite-difference gradients) on the same circuit, and the same optimizer warm-started from the model's weights, plus exact references (diagonalization, brute-force MaxCut) and, for QML, logistic regression on raw pixels.
3. **A free-design experiment.** In one QML setting the model also chooses the architecture — qubits, encoding, gates, readout — within a small circuit language (up to 8 qubits, 200 gates), testing whether it can invent a usable circuit and program it in one shot, including under structural rules that forbid the obvious design.
4. **A released artifact.** All 139 prompts, raw replies, parsed circuits, free-text reasoning and scores are released, along with a batched state-vector simulator cross-checked against Qiskit, and a model-agnostic harness.

## Main Findings

- **It matches the optimizer when weights carry meaning.** On eleven VQE problem–ansatz pairs the model's angles are within 0.007 of the optimizer on the normalized spectrum scale, and within 0.001 on seven of eleven; random angles sit at 0.30–0.64. For the transverse-field Ising chain with the four-angle HVA it reaches 0.955, 0.993 and 1.000 at h = 0.5, 1 and 2, against an optimizer ceiling of 0.957, 0.995 and 1.000.
- **Its angles track the physics.** The first-layer coupling angle falls from 0.55 to 0.47 to 0.24 as h grows from 0.5 to 2, while the field angle rises from 1.20 to 1.36, with repeats agreeing to within 0.1 rad.
- **Closed-form derivations, not search.** For H₂ the model derives E(θ) = −1.0520 − 0.7782 cos θ + 0.1820 sin θ and returns θ* = −arctan(0.1820/0.7782) = −0.2297, the exact ground state. For QAOA at p = 1 it writes the exact expectation of the cut as a trigonometric polynomial (accounting for the graph's four triangles) and maximizes it in closed form.
- **Optimal depth-one QAOA on every graph.** p = 1 ratios are 0.776, 0.801, 0.776, 0.833, 0.760 and 0.778 with zero variance across repeats; on the second Erdős–Rényi graph and the weighted ring the five-restart optimizer itself fell short in one run of three (0.737 and 0.740), so the model's average exceeds the optimizer's.
- **Strong warm starts.** Started from the model's angles, L-BFGS-B reached within 0.1% of the best value found from random starts after a median of one evaluation — the model's point was already in tolerance in 61% (VQE) and 64% (QAOA) of requests. Means were 48 and 36 evaluations versus 607 and 263 from random starts, and success rates 91%/93% versus 81%/46%.
- **Hand-written digit classifiers beat the optimizer on the same ten examples.** With a fixed amplitude-encoding circuit the model scores 0.926 ± 0.033 at 12 weights and 0.963 ± 0.019 at 18 weights on 3 vs 8, above an optimizer trained on the same examples (0.867) and close to an optimizer given 200 images (0.935–0.954).
- **Free design converges on one structure, 30 out of 30 times.** Every unconstrained trial produced chains of data-dependent RY rotations whose weights are pixel importances — a linear classifier with a smooth threshold, since consecutive same-axis rotations add. All 25 binary requests used a single qubit with a chain of 8–51 rotations; ten-class tasks used one such chain per qubit (6–8 qubits), scoring 0.653 ± 0.053 against 0.17 for the optimizer on the same thirty images and 0.10 chance.
- **Structural rules produce circuit identities.** Forbidden the single-qubit chain, the model interleaves Z gates (using z·ry(b)·z = ry(−b)) or accumulates the weighted sum as a phase between CNOTs; for ten classes it built a five-qubit circuit with 117 u3 rotations and 12 CNOTs (0.706) and two eight-qubit nearest-prototype circuits with 39 Toffoli and 146 controlled-phase gates (0.713, the best ten-class result).
- **It does not scale to opaque weight spaces.** As the fixed circuit deepens, 3 vs 8 accuracy falls from 0.963 at 18 weights to 0.81 ± 0.02 at 30 and 0.70 ± 0.25 at 54 while the optimizer rises from 0.87 to 0.93; for ten classes the model never leaves chance (0.07–0.14) while the optimizer reaches 0.57 at 54 weights. Its replies say it is writing "hand-designed heuristic weights," and it is right.
- **Conventions are a systematic failure mode.** In 6 of 42 QAOA requests every mixing angle was negated, scoring 0.10–0.22; re-evaluated with |β| those circuits give 0.87–0.96, at the optimizer's level in every case. Over all 42 requests the mean ratio is 0.748 as written and 0.856 corrected, against 0.849 for the optimizer; over the 36 sign-correct requests it is 0.846 versus 0.838.
- **No repair needed.** All 139 requests produced a valid circuit or weight vector on the first attempt.
- **Cost.** A request cost on average 1.8k output tokens and 45 s for QAOA, 3.0k tokens and 160 s for VQE, and 5.2–5.5k tokens and 100–150 s for QML; the largest were the ten-class free-design replies at 14k tokens and 240 s.

## Methodology in Plain English

The authors treat a parameterized quantum circuit exactly like a neural network: the gate layout is the architecture, the gate angles are the weights, and the measurement is the readout. In each trial the model receives a single prompt containing the problem (a Hamiltonian written out as Pauli terms with coefficients, a graph's edge list, or a few labelled digit images), the circuit gate by gate with named angles θ[0..K−1], the exact Qiskit gate conventions, and a required JSON reply format. In the free-design variant the model instead writes a full circuit in a small JSON language where every angle is an affine expression of one pixel, plus a readout mapping bit strings to classes.

Because the circuits are at most eight qubits, all 2ⁿ amplitudes are computed exactly on a laptop, so every reported number is a noise-free expectation rather than a sampled estimate. Each prompt is sent three times (five for free-design QML) with no shared context, and means ± standard deviations are reported. Crucially, no score ever flows back to the model — the strictest possible setting. Comparisons use random angles (50 draws for VQE/QAOA, 20 for QML) as a floor, an optimizer on the same layout as a ceiling, the optimizer started from the model's angles, and exact/classical references. Energies are reported as the fraction of the spectrum captured, r = (E_max − E)/(E_max − E_0), and MaxCut as the approximation ratio ⟨C⟩/C_max, putting everything on a [0,1] scale. The digits data are scikit-learn's 8×8 images with a fixed 70/30 split and 5 examples per class unless stated; the train/test scoring uses 108–109 test images for a digit pair and 540 for all ten classes.

## Why This Matters

**Impact on research.** The paper reframes what an LLM can contribute to variational quantum algorithms: not a general replacement for the optimizer, but a source of parameters for circuits whose weights have physical or geometric meaning, and an initializer that removes most of the optimizer's work. The warm-start result is the most directly practical one, because loss evaluations are runs of the quantum device — a few seconds of model reasoning replaced a median of one evaluation instead of hundreds. The negative result is equally useful: performance tracks the *interpretability* of the weight space, not its size, which explains why the same model writes networks of 10⁴–10⁶ classical weights in Takehi et al. but fails on 54 angles whose effect is only a product of rotations on a 64-dimensional amplitude vector.

**Real-world applications:**

- **Quantum chemistry and materials (VQE):** writing initial angles for molecular ground states such as H₂, where the model derived the exact minimizer analytically.
- **Combinatorial optimization (QAOA):** producing near-optimal angle schedules for MaxCut on regular and random graphs at a fraction of the optimizer's device runs.
- **Quantum machine learning on near-term hardware:** hand-specified classifiers as baselines and warm starts for small supervised tasks, where an optimizer overfits ten examples and the model's prior does not.
- **Hybrid quantum–classical pipelines:** a cheap initializer that reduces the number of quantum-device executions in an outer optimization loop.

**Industry relevance.** For any group paying for quantum-device time, the value proposition is fewer circuit executions per training run. The released harness and per-request logs make it straightforward for practitioners to substitute another model and check whether the strategies and failure modes generalize, and the paper is explicit that the reported model is a single frontier system (GPT-6 Astra, at a 32,000-token output budget).

## Future Directions

- **One round of feedback.** The authors identify allowing even a single loss evaluation as the obvious next experiment; they expect it to remove the sign-flip failures and improve the deep fixed-ansatz circuits. They deliberately disallowed it here to keep the test clean.
- **Do other frontier models behave the same way?** Whether other models share these strategies and the negated-mixing-angle failure is an open question the released model-agnostic harness is built to answer.
- **Novel Hamiltonians and datasets.** The test problems are well known — the Ising model, QAOA on regular graphs, the digits dataset — so part of what is measured is recall. Performance on unseen problems is not predicted by these results.
- **Better baselines and larger circuits.** The optimizer baseline is deliberately modest (L-BFGS-B with finite differences, a few restarts, a 60-second budget) and would widen the gap on deep QML cases; all circuits are at most eight qubits and noise-free, leaving noisy and larger devices untested.

## Target Audience

Machine-learning researchers curious whether LLM weight-space methods transfer beyond classical networks; quantum-computing practitioners working on VQE, QAOA or quantum machine learning who want better initial parameters; and quantum algorithm researchers interested in what structured priors an LLM brings to circuit design. The paper's dedicated background section makes it readable by graduate students and engineers with a neural-network background but no quantum training. Readers looking for a general-purpose optimizer replacement will not find one here — the paper argues explicitly against that reading.

## Authors’ abstract

Variational quantum algorithms (VQAs) optimize circuit angles through repeated quantum-device evaluations, often facing vanishing gradients and high optimization costs. We ask whether a large language model (LLM) can write these angles directly. Extending *weight-space programming* from classical networks to quantum circuits, we provide a frontier LLM (\gpt) with the problem, circuit, and gate conventions. Its angles are executed exactly as written, without returning losses,…

[The full abstract on arXiv](https://arxiv.org/abs/2611.11537)

[Read the original paper](https://arxiv.org/abs/2611.11537)

## Related papers

- [Delta-Corrected Shot Reduction for Bypassing Optimization Plateaus in Variational Quantum Eigensolvers](https://quantum.world/paper/delta-corrected-shot-reduction-for-bypassing-optimization-plateaus-in-2611.10524) 2026-11-07 · quant-ph · Key terms of the title in common
- [Normalizing Flows for Classical Simulation of Quantum Circuits in Phase Space](https://quantum.world/paper/normalizing-flows-for-classical-simulation-of-quantum-circuits-in-phase-2611.14006) 2026-11-10 · quant-ph · Key terms of the title in common
- [Proxima: Optimizing Syndrome Extraction Circuit Scheduling for Practical Quantum LDPC Codes](https://quantum.world/paper/proxima-optimizing-syndrome-extraction-circuit-scheduling-for-practical-2611.19715) 2026-11-15 · quant-ph · Key terms of the title in common
- [CAVQS: Context-Aware Variational Quantum Circuit Synthesis via Unitary Redistribution and Dynamic Reconstruction](https://quantum.world/paper/cavqs-context-aware-variational-quantum-circuit-synthesis-via-unitary-2611.26219) 2026-11-19 · quant-ph · Key terms of the title in common
- [Automating quantum circuit optimization with AI agents](https://quantum.world/paper/automating-quantum-circuit-optimization-with-ai-agents-2610.31352) 2026-10-22 · quant-ph · Key terms of the title in common

---

Canonical: https://quantum.world/paper/weight-space-programming-of-variational-quantum-circuits-large-language-2611.11537
