mlsanityData to 7 Oct 2026

A PennyLane-Centric Dataset to Enhance LLM-based Quantum Code Generation using RAG

arXiv 2503.02497 ↗First posted 4 Mar 2025cs.SE cs.AI quant-phcited by 7

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) offer powerful capabilities in code generation, natural language understanding, and domain-specific reasoning. Their application to quantum software development remains limited, in part because of the lack of high-quality datasets both for LLM training and as dependable knowledge sources. To bridge this gap, we introduce textitPennyLang, an off-the-shelf, high-quality dataset of 3,347 PennyLane-specific quantum code samples with contextual descriptions, curated from textbooks, official documentation, and open-source repositories. Our contributions are threefold: (1) the creation and open-source release of PennyLang, a purpose-built dataset for quantum programming with PennyLane; (2) a framework for automated quantum code dataset construction that systematizes curation, annotation, and formatting to maximize downstream LLM usability; and (3) a baseline evaluation of the dataset across multiple open-source and commercial models, including ablation studies, all conducted within a retrieval-augmented generation (RAG) pipeline. Using PennyLang with RAG substantially improves performance: for example, Qwen 7B's success rate rises from 8.7% without retrieval to 41.7% with full-context augmentation, and LLaMa 4 improves from 78.8% to 84.8%, while also reducing hallucinations and enhancing quantum code correctness. Moving beyond Qiskit-focused studies, we bring LLM-based tools and reproducible methods to PennyLane for advancing AI-assisted quantum development.

Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 22 of its 54 references that are in the map. First posted on arXiv 4 Mar 2025.

Builds on

22 of 54 references.

References · 22

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  5. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
  6. 2021Program Synthesis with Large Language Modelscited by 3,509
  7. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  8. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  9. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  10. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  11. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  12. 2024A Survey on Large Language Models for Code Generationcited by 646
10 more
  1. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  2. 2023Financial Fraud Detection using Quantum Graph Neural Networkscited by 35
  3. 2024A comprehensive review of Quantum Machine Learning: from NISQ to Fault Tolerancecited by 32
  4. 2024Survey of different Large Language Model Architectures: Trends, Benchmarks, and Challengescited by 31
  5. 2023A Survey on Quantum Machine Learning: Current Trends, Challenges, Opportunities, and the Road Aheadcited by 29
  6. 2024Qiskit Code Assistant: Training LLMs for generating Quantum Computing Codecited by 24
  7. 2024FedQNN: Federated Learning using Quantum Neural Networkscited by 20
  8. 2024QFNN-FFD: Quantum Federated Neural Network for Financial Fraud Detectioncited by 18
  9. 2024Quantum Clustering for Cybersecuritycited by 6
  10. 2023Adapting Pre-trained Language Models for Quantum Natural Language Processingcited by 2

Built on by

Cited by year (2026 to 7 Oct)

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

7 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Model-Driven Quantum Code Generation Using Large Language Models and Retrieval-Augmented Generation
  2. 2026Revisiting Quantum Code Generation: Where Should Domain Knowledge Live?
  3. 2025Enhancing LLM-based Quantum Code Generation with Multi-Agent Optimization and Quantum Error Correction
  4. 2026Beyond Rules: LLM-Powered Linting for Quantum Programs ↗
  5. 2025LLM-Powered Quantum Code Transpilation
  6. 2026Qiskit Code Migration with LLMs ↗
  7. 2026QBugLM: An Agentic Benchmarking Framework for LLM-based Quantum Software Debugging
  8. 2026Qiskit QuantumKatas: Adapting Microsoft's Quantum Computing exercises for LLM evaluation