Skip to content
DraconiticResearch
Search Sources API
197,768 studies31 sourcesUpdated 57 min ago
PreprintCC BY 4.0arXiv

Large Language Models for Quantum Code Translation: An Exploratory Study

Abstract

Quantum software development is challenged by quantum-mechanical semantics and fragmented software development kits (SDKs), which complicate cross-SDK code translation and execution. In this paper, we propose an LLM-based approach for translating executable programs between high-level quantum SDKs. We develop a quantum-aware translation workflow whose prompt design and validation reflect quantum semantics and accommodate the version evolution of quantum ecosystems. We conduct a preliminary evaluation of 4 LLM configurations on 43 tasks, translating Qiskit programs to PennyLane and Q#. LLMs achieve a zero-shot Pass@1 of up to 72.33%, while one-shot prompting further improves the translation effectiveness. These results suggest potential for quantum code translation by LLMs.

Related

  1. Large-Language-Model Discovery of Quantum LDPC Codes through Structured Concept Evolution
    Zidu Liu, Florian Marquardt
    arXivPreprintCC BY 4.0Full textQuantum physics & quantum informationarXiv
  2. Discovering state-of-the-art quantum circuits with large language models
    Andi Gu, Alek H. Kemeny, Susanne F. Yelin +1
    arXivPreprintCC BY-NC-SA 4.0Full textQuantum physics & quantum informationarXiv
  3. QEncodeBench: Can Large Language Models Encode Classical Problems into Verified Quantum Oracles?
    Xujun Che, Hanhan Wu, Yuchen Yuan +1
    arXivPreprintarXiv licenceFull textQuantum physics & quantum informationarXiv
  4. Track fitting as a language translation problem
    Deepak Samuel, Christy Elsa Koshy
    arXivPreprintarXiv licenceFull textHigh-energy & particle physicsarXiv
  5. The WEST code for large-scale excited-state materials simulations
    Victor Wen-zhe Yu, Siyuan Chen, Yu Jin +5
    arXivPreprintCC BY 4.0Full textCondensed matterarXiv
BibTeX
@misc{li2026large,
  title = {{Large Language Models for Quantum Code Translation: An Exploratory Study}},
  author = {Xiyuan Li and Yuechen Li and Jianjun Zhao},
  howpublished = {arXiv},
  year = {2026},
  month = oct,
  doi = {10.48550/arxiv.2610.34841},
  eprint = {2610.34841},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.34841},
  note = {CC BY 4.0},
}
RIS
TY  - UNPB
TI  - Large Language Models for Quantum Code Translation: An Exploratory Study
AU  - Xiyuan Li
AU  - Yuechen Li
AU  - Jianjun Zhao
PY  - 2026
DA  - 2026/10/26
PB  - arXiv
DO  - 10.48550/arxiv.2610.34841
UR  - https://arxiv.org/abs/2610.34841
AB  - Quantum software development is challenged by quantum-mechanical semantics and fragmented software development kits (SDKs), which complicate cross-SDK code translation and execution. In this paper, we propose an LLM-based approach for translating executable programs between high-level quantum SDKs. We develop a quantum-aware translation workflow whose prompt design and validation reflect quantum semantics and accommodate the version evolution of quantum ecosystems. We conduct a preliminary evaluation of 4 LLM configurations on 43 tasks, translating Qiskit programs to PennyLane and Q#. LLMs achieve a zero-shot Pass@1 of up to 72.33%, while one-shot prompting further improves the translation effectiveness. These results suggest potential for quantum code translation by LLMs.
ER  -