mlsanityData to 7 Oct 2026

Exploring LLM-Driven Explanations for Quantum Algorithms

arXiv 2409.19028 ↗First posted 26 Sep 2024cs.CL cs.SE quant-phcited by 7

Not on the map. Why?

Abstract (arXiv)

Background: Quantum computing is a rapidly growing new programming paradigm that brings significant changes to the design and implementation of algorithms. Understanding quantum algorithms requires knowledge of physics and mathematics, which can be challenging for software developers. Aims: In this work, we provide a first analysis of how LLMs can support developers' understanding of quantum code. Method: We empirically analyse and compare the quality of explanations provided by three widely adopted LLMs (Gpt3.5, Llama2, and Tinyllama) using two different human-written prompt styles for seven state-of-the-art quantum algorithms. We also analyse how consistent LLM explanations are over multiple rounds and how LLMs can improve existing descriptions of quantum algorithms. Results: Llama2 provides the highest quality explanations from scratch, while Gpt3.5 emerged as the LLM best suited to improve existing explanations. In addition, we show that adding a small amount of context to the prompt significantly improves the quality of explanations. Finally, we observe how explanations are qualitatively and syntactically consistent over multiple rounds. Conclusions: This work highlights promising results, and opens challenges for future research in the field of LLMs for quantum code explanation. Future work includes refining the methods through prompt optimisation and parsing of quantum code explanations, as well as carrying out a systematic assessment of the quality of explanations.

Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 10 of its 44 references that are in the map. First posted on arXiv 26 Sep 2024.

Builds on

10 of 44 references.

References · 10

  1. 2022From Anecdotal Evidence to Quantitative Evaluation Methods: A Systematic Review on Evaluating Explainable AIcited by 299
  2. 2022Automatic Generation of Programming Exercises and Code Explanations using Large Language Modelscited by 124
  3. 2022Using Large Language Models to Enhance Programming Error Messagescited by 67
  4. 2023Stochastic LLMs do not Understand Language: Towards Symbolic, Explainable and Ontologically Based LLMscited by 9
  5. 2024Quantum Software Engineering: Roadmap and Challenges Aheadcited by 6
  6. 2024Testing and Debugging Quantum Programs: The Road to 2030cited by 5
  7. 2020Quantum Software Engineering: Landscapes and Horizonscited by 4
  8. 2022Understanding Quantum Software Engineering Challenges An Empirical Study on Stack Exchange Forums and GitHub Issuescited by 4
  9. 2024On Repairing Quantum Programs Using ChatGPTcited by 4
  10. 2021On Testing and Debugging Quantum Softwarecited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 3; 2026: 3.

7 papers.