Large Language Models for Quantum Code Translation: An Exploratory Study
Xiyuan Li, Yuechen Li, Jianjun Zhao
Key points
From the paper's conclusion- These results suggest potential for quantum code translation by LLMs.
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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Autonomous Code Migration for Quantum Programming Languages: A Case Study with QED-C BenchmarksarXiv · 2026
- Qubrio: High-Performance Quantum Compilation via Multi-Agent LLM CollaborationarXiv · 2026
- When Does Fine-Tuning Beat Prompting for Qiskit-to-CUDA-Q Translation? An Execution-Verified StudyarXiv · 2026
- Non-Functional Requirements to Hyperparameter Translation for Quantum Software via LLMsarXiv · 2026
- Agentic MLIR-to-QIR Translation with Dual-Backend Testing: A Hybrid Deterministic and LLM ApproacharXiv · 2026
- Automating quantum circuit optimization with AI agentsarXiv · 2026