mlsanityData to 14 Oct 2026

Enhancing LLM-based Quantum Code Generation with Multi-Agent Optimization and Quantum Error Correction

arXiv 2504.14557 ↗First posted 20 Apr 2025quant-ph cs.MAcited by 11

On the map: LLM agents and tool use → Medical and scientific domain agents

Abstract (arXiv)

Multi-agent frameworks with Large Language Models (LLMs) have become promising tools for generating general-purpose programming languages using test-driven development, allowing developers to create more accurate and robust code. However, their potential has not been fully unleashed for domain-specific programming languages, where specific domain exhibits unique optimization opportunities for customized improvement. In this paper, we take the first step in exploring multi-agent code generation for quantum programs. By identifying the unique optimizations in quantum designs such as quantum error correction, we introduce a novel multi-agent framework tailored to generating accurate, fault-tolerant quantum code. Each agent in the framework focuses on distinct optimizations, iteratively refining the code using a semantic analyzer with multi-pass inference, alongside an error correction code decoder. We also examine the effectiveness of inference-time techniques, like Chain-of-Thought (CoT) and Retrieval-Augmented Generation (RAG) in the context of quantum programming, uncovering observations that are different from general-purpose code generation. To evaluate our approach, we develop a test suite to measure the impact each optimization has on the accuracy of the generated code. Our findings indicate that techniques such as structured CoT significantly improve the generation of quantum algorithms by up to 50%. In contrast, we have also found that certain techniques such as RAG show limited improvement, yielding an accuracy increase of only 4%. Moreover, we showcase examples of AI-assisted quantum error prediction and correction, demonstrating the effectiveness of our multi-agent framework in reducing the quantum errors of generated quantum programs.

Key facts. Cited by 11 papers in the map (data through 14 Oct 2026). Placed in Medical and scientific domain agents, one of 16 directions in LLM agents and tool use. Builds on 24 of its 43 references that are in the map. First posted on arXiv 20 Apr 2025.

Builds on

24 of 43 references.

References · 24

  1. 2017Attention Is All You Needcited by 60,361
  2. 2023GPT-4 Technical Reportcited by 18,396
  3. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  4. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  5. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
  6. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  7. 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
  8. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  9. 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,986
  10. 2023StarCoder: may the source be with you!cited by 799
  11. 2024A Survey on Large Language Models for Code Generationcited by 658
  12. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
12 more
  1. 2023Multi-Agent Collaboration: Harnessing the Power of Intelligent LLM Agentscited by 333
  2. 2021A Survey of Embodied AI: From Simulators to Research Taskscited by 261
  3. 2022Efficient Training of Language Models to Fill in the Middlecited by 255
  4. 2024A Survey on Efficient Inference for Large Language Modelscited by 205
  5. 2023Structured Chain-of-Thought Prompting for Code Generationcited by 138
  6. 2024Synthetic continued pretrainingcited by 60
  7. 2024Qiskit HumanEval: An Evaluation Benchmark For Quantum Code Generative Modelscited by 30
  8. 2018Reinforcement Learning Decoders for Fault-Tolerant Quantum Computationcited by 28
  9. 2024Qiskit Code Assistant: Training LLMs for generating Quantum Computing Codecited by 25
  10. 2024Progressive Mixed-Precision Decoding for Efficient LLM Inferencecited by 18
  11. 2024Hardware-Aware Parallel Prompt Decoding for Memory-Efficient Acceleration of LLM Inferencecited by 16
  12. 2025Exploring Code Language Models for Automated HLS-based Hardware Generation: Benchmark, Infrastructure and Analysiscited by 10

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 6; 2026: 5.

11 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Revisiting Quantum Code Generation: Where Should Domain Knowledge Live?
  2. 2025QHackBench: Benchmarking Large Language Models for Quantum Code Generation Using PennyLane Hackathon Challenges
  3. 2025Agent-Q: Fine-Tuning Large Language Models for Quantum Circuit Generation and Optimization
  4. 2025A PennyLane-Centric Dataset to Enhance LLM-based Quantum Code Generation using RAG
  5. 2026PennySynth: RAG-Driven Data Synthesis for Automated Quantum Code Generation
  6. 2025PennyCoder: Efficient Domain-Specific LLMs for PennyLane-Based Quantum Code Generation
  7. 2026Generative AI for Quantum Circuits and Quantum Code: A Technical Review and Taxonomy
  8. 2026El Agente Forjador: Task-Driven Agent Generation for Quantum Simulation