πŸ“–
Large Language Models for Quantum Code Translation: An Exploratory Study
Xiyuan Li, Yuechen Li, Jianjun Zhao

Large Language Models for Quantum Code Translation: An Exploratory Study

Author / Organization:
Computer Science & Mathematics Published 2026 Verification Pending

Overview & Synopsis

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.

Advertisement
SPONSOR CONTENT
Indexed from repository: arXiv (arxiv.org)
Loading document from verified source...
Keyboard Shortcuts: ← / → for pages • + / - for zoom • 0 to fit width Powered by Mozilla PDF.js v3.11

Document Information

Document Title Large Language Models for Quantum Code Translation: An Exploratory Study
Author / Organization Xiyuan Li, Yuechen Li, Jianjun Zhao
Subject & Discipline cs.SE
Categories Computer Science & Mathematics
Publication Year 2026
License / Rights arXiv Open Access / Creative Commons
Resource Verification Listed PDF (Verification Pending)
Original Host Website arXiv (arxiv.org)
File Format application/pdf (Portable Document Format)
Language EN
Catalog ID DOC-5970
Original Source Link Visit Source Page on arxiv.org »