Model-Driven Quantum Code Generation Using Large Language Models and Retrieval-Augmented Generation
Not on the map. Why?
Abstract (arXiv)
This paper introduces a novel research direction for model-to-text/code transformations by leveraging Large Language Models (LLMs) that can be enhanced with Retrieval-Augmented Generation (RAG) pipelines. The focus is on quantum and hybrid quantum-classical software systems, where model-driven approaches can help reduce the costs and mitigate the risks associated with the heterogeneous platform landscape and lack of developers' skills. We validate one of the proposed ideas regarding generating code out of UML model instances of software systems. This Python code uses a well-established library, called Qiskit, to execute on gate-based or circuit-based quantum computers. The RAG pipeline that we deploy incorporates sample Qiskit code from public GitHub repositories. Experimental results show that well-engineered prompts can improve CodeBLEU scores by up to a factor of four, yielding more accurate and consistent quantum code. However, the proposed research direction can go beyond this through further investigation in the future by conducting experiments to address our other research questions and ideas proposed here, such as deploying software system model instances as the source of information in the RAG pipelines, or deploying LLMs for code-to-code transformations, for instance, for transpilation use cases.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 16 of its 35 references that are in the map. First posted on arXiv 28 Aug 2025.
Builds on
16 of 35 references.
References · 16
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
- 2024A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Modelscited by 452
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
- 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 300
- 2020Unsupervised Translation of Programming Languagescited by 263
- 2023Large Language Models for Software Engineering: Survey and Open Problemscited by 181
- 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
- 2023Prompt Engineering a Prompt Engineercited by 53
- 2025C2SaferRust: Transforming C Projects into Safer Rust with NeuroSymbolic Techniquescited by 18
- 2024On the use of Large Language Models in Model-Driven Engineeringcited by 13
- 2024Context-Augmented Code Generation Using Programming Knowledge Graphscited by 4
- 2021ML-Quadrat & DriotData: A Model-Driven Engineering Tool and a Low-Code Platform for Smart IoT Servicescited by 3
4 more
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025A PennyLane-Centric Dataset to Enhance LLM-based Quantum Code Generation using RAG
- 2025QHackBench: Benchmarking Large Language Models for Quantum Code Generation Using PennyLane Hackathon Challenges
- 2026PennySynth: RAG-Driven Data Synthesis for Automated Quantum Code Generation
- 2026Revisiting Quantum Code Generation: Where Should Domain Knowledge Live?
- 2025Enhancing LLM-based Quantum Code Generation with Multi-Agent Optimization and Quantum Error Correction
- 2026Qiskit Code Migration with LLMs ↗
- 2025Automatic Qiskit Code Refactoring Using Large Language Models
- 2026Generative AI for Quantum Circuits and Quantum Code: A Technical Review and Taxonomy