arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2507.12480cs.SEcs.AIcs.ET
收藏

基于大语言模型的量子代码编译

LLM-Powered Quantum Code Transpilation

Department of Computer Science University of Colorado Colorado Springs (UCCS) United States

Nazanin Siavash, Armin Moin

AI总结:

本研究利用大语言模型实现灵活的量子代码转换,解决跨平台开发中的互操作性问题。

摘要:

现有各种针对不同量子计算平台定制的软件开发工具包(SDKs),这些被称为量子SDKs(QSDKs)。例如包括但不仅限于Qiskit、Cirq和PennyLane。然而,这种多样性给混合量子-经典软件系统的互操作性和跨平台开发带来了重大挑战。传统基于规则的编译器用于在QSDK之间翻译代码,设计和维护都很耗时,需要深厚的专家知识和在源代码和目标代码中的刚性映射。在本研究中,我们探索使用大语言模型(LLMs)作为灵活且自动的解决方案。利用其预训练知识和上下文推理能力,我们将LLMs定位为编程语言无关的编译器,能够将量子程序从一个QSDK转换到另一个,同时保持功能等价性。我们的方法消除了手动定义转换规则的需要,并提供了一种可扩展的量子软件移植解决方案。这项工作代表了在量子计算生态系统中实现智能、通用编译迈出的一步。

英文摘要:

There exist various Software Development Kits (SDKs) tailored to different quantum computing platforms. These are known as Quantum SDKs (QSDKs). Examples include but are not limited to Qiskit, Cirq, and PennyLane. However, this diversity presents significant challenges for interoperability and cross-platform development of hybrid quantum-classical software systems. Traditional rule-based transpilers for translating code between QSDKs are time-consuming to design and maintain, requiring deep expertise and rigid mappings in the source and destination code. In this study, we explore the use of Large Language Models (LLMs) as a flexible and automated solution. Leveraging their pretrained knowledge and contextual reasoning capabilities, we position LLMs as programming language-agnostic transpilers capable of converting quantum programs from one QSDK to another while preserving functional equivalence. Our approach eliminates the need for manually defined transformation rules and offers a scalable solution to quantum software portability. This work represents a step toward enabling intelligent, general-purpose transpilation in the quantum computing ecosystem.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑