Language models could program quantum circuits best with structured problems

The study explores generating variational quantum circuits without conventional optimisation methods. A frozen, general-purpose Large Language Model (LLM) produces full circuit parameter vectors using both symbolic circuit and Hamiltonian descriptions, optionally incorporating iterative energy feedback. Evaluation occurs across three classes of problems: general random Hamiltonians, structured parent Hamiltonians, and molecular systems. Results show that for general Hamiltonians, LLM-generated parameters yield greater energy errors compared to standard Adam optimisation; supplemental feedback offers minimal enhancement in these cases. Conversely, with structured Hamiltonians, the LLM generates effective parameters.

Language Models Excel at Structured Quantum Optimisation and Functional Prediction

For structured parent Hamiltonians, the Language Model Optimizer (LMO) generated promising low-energy configurations; initial proposals achieved energies competitive with conventional Adam optimisation despite lacking task-specific training. In contrast to this success, LLM errors were larger than those produced by Adam when tackling random Hamiltonians. Using the H4 molecule in a planar geometry described by the STO-3G basis set, containing eight spin orbitals equivalent to qubits, physics-aware prompting yielded lower energy errors than blind configuration approaches, even approaching reference values after few evaluations.

Examining three independent runs per strategy revealed that successive LMO proposals sometimes led to further reductions in energy, though isolating feedback’s contribution from generating additional parameters proved difficult. Iterative energy feedback generally offered limited improvement across all Hamiltonian types and even failed to identify an underlying quantum algorithm from circuit representations; however, this frozen general-purpose LLM accurately predicted measurement outcomes clarifying its capacity for functional inference independent of algorithmic understanding. Large language models offer tantalizing prospects for automating quantum programming tasks, but a “frozen” approach quickly hits limitations when faced with genuinely random problems, conventional optimisation techniques outperform it on general Hamiltonians.

This raises the vital question of whether these models truly *discover* solutions or simply regurgitate patterns learned from existing data and structures. Even if they don’t yet rival established methods for complex quantum problems, valuable insight is still gained by pinpointing where they struggle and succeed. In particular, researchers showed that LLMs excel with systems possessing clear underlying structure, an important observation guiding future development efforts to build stronger artificial intelligence tools applicable in fields like materials science and drug discovery.

LLM performance hinges on problem structure not inherent discovery ability

Work at Federal University of São Carlos and University of Innsbruck demonstrates large language models can generate parameters for quantum circuits without traditional optimisation methods; however, this capability relies heavily on the underlying structure of the solved problem. Structured parent Hamiltonians yielded promising low-energy configurations directly from the LLM, suggesting inherent structures aid inference, while initial attempts creating circuit settings for random Hamiltonians resulted in less accurate results than conventional techniques such as Adam optimisation.

This highlights an important distinction: generating data based on learned patterns differs significantly from discovering solutions through understanding fundamental properties. Further investigation will focus on scalability beyond small molecules and performance guarantees with larger active spaces and longer optimisation budgets.

When applied to general random Hamiltonians, the LLM’s generated parameters performed worse than standard methods like Adam optimization. In contrast, when used with structured parent Hamiltonians, the LLM produced promising low-energy parameter configurations, indicating identifiable structures facilitate inference. The authors are now investigating how this approach scales to more complex systems and exploring ways to improve its performance with increased computational resources.

👉 More information
🗞 Programming Quantum Circuit Parameters with Large Language Models
✍️ Farias, T.S.,1, 2, ∗Porto, C.M.,2 Fonseca, M. S.,2 Carpio, N. A. C.,2 De Oliveira, A. A.,2 and Villas-Boas, C. J2
🧠 ArXiv: https://arxiv.org/abs/2611.17246

Stay current

See today’s quantum computing news on Quantum Zeitgeist for the latest breakthroughs in qubits, hardware, algorithms, and industry deals.

Avatar of Dr. Donovan

Latest Posts by Dr. Donovan: