AG-CoT: Verified Algorithmic Traces for LLM Program Synthesis on Clifford Circuits

📅 2026-09-27
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the problem of large language models (LLMs) generating quantum Clifford circuits that are syntactically valid yet semantically incorrect, proposing a goal-directed exact verification framework. The core innovations include designing a rigorously verified Aaronson-Gottesman chain-of-thought (AG-CoT) prompting strategy to guide code generation and introducing a continued training mechanism filtered by a formal verifier, which integrates supervised fine-tuning with self-training to optimize OpenQASM outputs. Experimental results demonstrate that this approach improves state equivalence accuracy by four to six times for 3B- and 7B-parameter models, while enabling the 32B model to surpass 10% accuracy under verifier guidance. These findings significantly enhance the reliability of LLMs in quantum circuit generation.
📝 Abstract
Scientific code generation can produce executable programs that fail to compute the intended scientific object. We study this problem in language-model synthesis of Clifford circuits, which prepare the stabilizer states used in quantum error correction and admit exact classical verification. In our target-conditioned framework, each target is given as compact signed stabilizer generators, and an exact verifier checks the generated OpenQASM circuits. We supervise models with Aaronson-Gottesman chain-of-thought (AG-CoT) traces checked by the verifier, and continue training on model generations that the verifier accepts. Across two independently trained model families (3B and 7B), AG-CoT supervision multiplies greedy-decode state-equivalence accuracy by four to six times over circuit-only baselines, and verifier-filtered continuation training adds a further consistent gain atop both. A complementary 32B study shows that supervised models achieve near-perfect syntax and Clifford validity while the strongest direct model reaches 6.14% state equivalence per target, rising to over 10% under verifier-guided selection with multiple candidates. These results show that algorithmic trace supervision gives a large, statistically significant gain in both model families and that verifier-filtered continuation adds a further repeated gain. The persistent gap between Clifford validity and state equivalence confirms that exact verification is necessary: a circuit can be syntactically and physically valid yet prepare the wrong quantum state.
Problem

Research questions and friction points this paper is trying to address.

Program Synthesis
Clifford Circuits
Large Language Models
Scientific Code Generation
Quantum State Equivalence
Innovation

Methods, ideas, or system contributions that make the work stand out.

Chain-of-Thought
Program Synthesis
Clifford Circuits
Exact Verification
Continuation Training
🔎 Similar Papers
No similar papers found.
💼 Related Jobs
No related jobs found.
L
Lu Wei
Data Science Department
Y
Yufeng Wang
Department of Computer Science, Stony Brook University
C
Chenfeng Cao
Dahlem Center for Complex Quantum Systems, Freie Universität Berlin
Lu Pang
Lu Pang
Department of Computer Science, Stony Brook University
Haibin Ling
Haibin Ling
Chair Professor, Westlake University
computer visionaugmented realitymedical image analysismachine learningAI for science