Quantum Circuit Generation via test-time learning with large language models

Quantum Circuit Generation via test-time learning with large language models
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

Large language models (LLMs) can generate structured artifacts, but using them as dependable optimizers for scientific design requires a mechanism for iterative improvement under black-box evaluation. Here, we cast quantum circuit synthesis as a closed-loop, test-time optimization problem: an LLM proposes edits to a fixed-length gate list, and an external simulator evaluates the resulting state with the Meyer-Wallach (MW) global entanglement measure. We introduce a lightweight test-time learning recipe that can reuse prior high-performing candidates as an explicit memory trace, augments prompts with a score-difference feedback, and applies restart-from-the-best sampling to escape potential plateaus. Across fixed 20-qubit settings, the loop without feedback and restart-from-the-best improves random initial circuits over a range of gate budgets. To lift up this performance and success rate, we use the full learning strategy. For the 25-qubit, it mitigates a pronounced performance plateau when naive querying is used. Beyond raw scores, we analyze the structure of synthesized states and find that high MW solutions can correspond to stabilizer or graph-state-like constructions, but full connectivity is not guaranteed due to the metric property and prompt design. These results illustrate both the promise and the pitfalls of memory evaluator-guided LLM optimization for circuit synthesis, highlighting the critical role of prior human-made theoretical theorems to optimally design a custom tool in support of research.


💡 Research Summary

The paper presents a novel framework that leverages large language models (LLMs) as active components in a closed‑loop, test‑time optimization process for quantum circuit synthesis. Traditional uses of LLMs in scientific domains have largely been “one‑shot” generation: a prompt yields a complete piece of code or description, and the result is evaluated post‑hoc. This approach is insufficient for quantum circuit design, where evaluation (e.g., simulation of a quantum state) is expensive, the objective is multi‑faceted, and iterative refinement is essential.

To address these challenges, the authors cast circuit synthesis as a sequential decision problem. An LLM receives a textual representation of a fixed‑length gate list (the current circuit) and proposes an edited list. An external quantum simulator computes the Meyer‑Wallach (MW) global entanglement measure of the resulting state, which serves as the scalar reward. Three key mechanisms are introduced:

  1. Episodic Memory – High‑scoring circuits are stored and re‑presented to the model in subsequent queries, allowing it to reuse successful motifs (e.g., entangling patterns).
  2. Score‑Difference Feedback – The numerical change ΔQ between the current and previous MW values is embedded in the prompt as a natural‑language reward or penalty (e.g., “You improved by +0.12”). This provides a dense learning signal that guides the model beyond pure stochastic sampling.
  3. Restart‑from‑Best – After a fixed number of iterations, the best circuit discovered so far is used as a fresh starting point for a new optimization run. This mitigates stagnation in local minima, especially in high‑dimensional search spaces.

The experimental protocol focuses on two system sizes: 20‑qubit and 25‑qubit registers. The gate set is deliberately limited to {CNOT, H, RY} with discrete rotation angles {3°, 7°, 25°} to keep the search space tractable and avoid continuous parameter optimization. Circuits are encoded as plain‑text lists (e.g., “(‘H’,


Comments & Academic Discussion

Loading comments...

Leave a Comment