Programming Quantum Circuit Parameters with Large Language Models
Organizations: University of Innsbruck, Department of Physics, Technikerstrasse 25, 6020 Innsbruck, Austria · Federal University of S˜ao Carlos, Department of Computer Science, Rod. Washington Lu´ıs, km 235, Jardim Guanabara, S˜ao Carlos - SP, 13565-905, Brazil
Abstract
Large language models (LLMs) have recently demonstrated the ability to generate parameters for variational quantum circuits without conventional optimization. However, the conditions under which this approach is effective remain unclear. Here, we investigate a frozen, general-purpose LLM that generates complete circuit parameter vectors from symbolic circuit and Hamiltonian descriptions, with optional iterative energy feedback. We evaluate the approach on general random Hamiltonians, structured parent Hamiltonians, and molecular systems. For general Hamiltonians, LLM-generated parameters exhibit larger energy errors than conventional Adam optimization, while additional feedback generally provides limited improvement. In contrast, for structured Hamiltonians, the LLM can generate promising low-energy parameter configurations, suggesting that identifiable physical and mathematical structure facilitates parameter inference. We also show that direct LLM predictions of minimum energies can violate the Hamiltonian spectral lower bound, whereas generated circuit parameters allow independent evaluation of physically realizable energy expectation values. Finally, we investigate blind circuit interpretation and find that the LLM can predict measurement outcomes even when it fails to identify the underlying quantum algorithm. These findings highlight the role of problem structure, the limitations of iterative LLM optimization, and the importance of independently verifiable predictions in quantum parameter programming.
Figures & tables
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Standard | Distorted | |||||
|---|---|---|---|---|---|---|
| Atom | ||||||
| H 1 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 |
| H 2 | 1.06 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 |
| H 3 | 0.00 | 1.20 | 0.00 | 0.00 | 1.20 | 0.20 |
| H 4 | 1.06 | 1.20 | 0.00 | 1.05 | 1.20 | |
| Setting | Value |
|---|---|
| Qubits | |
| Entangling layers | |
| Non-Clifford rotations | |
| Random seeds | - |
| Trainable parameters | |
| Pauli-term budget | ( ); ( ) |
| Configuration | LMO | Adam |
|---|---|---|
| Parameter initialization | Model-generated | Seed 123 |
| Initialization scale | – | 0.3 |
| Optimization rounds | Up to 5 | 200 |
| Learning rate, | – | 0.1 |
| Learning rate, | – | 0.01 |
| Gradient method | None | Parameter shift |
Large Language Model-Guided Optimization
Large Language Model-Guided Optimization uses language models to propose, steer, and refine solutions to hard search and design problems.
See all 645 papers