quant-phNov 8, 2026

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

Authors: Debarshi Kundu, Swaroop Ghosh, Vasant G Honavar

Organizations: The Pennsylvania State University

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, gradients, or accuracy feedback. Across 139 requests, we test handwritten-digit classification, VQE ground-state estimation for spin chains and H2_2, and MaxCut QAOA, comparing against random weights, classical optimization, and optimization initialized with LLM weights on the same circuit. When parameters have interpretable structure, the LLM matches or approaches the optimizer: it achieves 95--100% of the energy spectrum on every VQE problem, derives the exact H2_2 ground state in closed form, finds optimal depth-one QAOA angles for every graph, and reaches 93--96% accuracy on digits 3 versus 8 with 12--18 hand-written weights, outperforming an optimizer trained on the same ten examples. Its weights are also strong warm starts: optimization reaches its best value after a median of one evaluation rather than hundreds. Allowed to design circuits, the LLM chooses data-dependent rotation chains encoding pixel importance in all 30 cases (one qubit for binary tasks, one chain per qubit for ten classes), reaching 65% accuracy across ten digits. Yet the approach fails in opaque weight spaces: accuracy drops to chance when fixed circuits exceed 30 weights, while optimization improves. It is also sensitive to gate conventions: 6 of 42 QAOA replies reverse mixing-angle signs and fail. We release all prompts, replies, and scores.

Figures & tables

Appendix figures & tables4 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Programming Quantum Circuit Parameters with Large Language Models

    Nov 12, 2026Tiago de Souza Farias, Caio Moraes Porto, Matheus da Silva Fonseca +3Large Language Model-Guided OptimizationQuantum Circuit Optimization

  2. An LLM System for Autonomous Variational Quantum Circuit Design

    Jun 11, 2026Kenya Sakka, Wataru Mizukami, Kosuke MitaraiQuantum ChemistryQuantum Kernel Methods

  3. SPSA Hyperparameter Tuning for Variational Quantum Natural Language Inference

    Aug 11, 2026Nayan D'Souza, Christopher J. AgostinoHyperparameter OptimizationQuantum NLP