一句话:为 Qunity 量子控制流语言实现完整编译器与多阶段优化,高效生成 OpenQASM 3 线路。
现有量子编程语言大多基于量子线路模型,因为高层抽象——尤其是量子控制流——极难实现。Voichick 等人提出的 Qunity 语言以量子控制构造提供了此类抽象,并谨慎保证了可实现性,但该语言缺少可运行实现,且原始编译过程极其低效,简单量子算法也会编译成规模离谱的线路。本文以 Qunity 为起点,聚焦高层量子控制流构造的高效编译。作者在 Qunity 核心语言之上引入更丰富的抽象,提供与原控制构造不同的权衡;实现了完整的 Qunity 编译器,将高层 Qunity 代码转换为量子汇编语言 OpenQASM 3;并针对编译过程的多个阶段开发优化技术,既包括底层线路优化,也包括利用 Qunity 程序高层结构的方法,显著减少了编译器使用的量子比特数与门数量。
Most existing quantum programming languages are based on the quantum circuit model of computation, as higher-level abstractions are particularly challenging to implement—especially ones relating to quantum control flow. The Qunity language, proposed by Voichick et al., offered such an abstraction in the form of a quantum control construct, with great care taken to ensure that the resulting language is still realizable. However, Qunity lacked a working implementation, and the originally proposed compilation procedure was very inefficient, with even simple quantum algorithms compiling to unreasonably large circuits. In this work, we focus on the efficient compilation of high-level quantum control flow constructs, using Qunity as our starting point. We introduce a wider range of abstractions on top of Qunity’s core language that offer compelling trade-offs compared to its existing control construct. We create a complete implementation of a Qunity compiler, which converts high-level Qunity code into the quantum assembly language OpenQASM 3. We develop optimization techniques for multiple stages of the Qunity compilation procedure, including both low-level circuit optimizations as well as methods that consider the high-level structure of a Qunity program, greatly reducing the number of qubits and gates used by the compiler.
@article{paperbot2933,
title = {Compositional Quantum Control Flow with Efficient Compilation in Qunity},
author = {Mikhail Mints and Finn Voichick and Leonidas Lampropoulos and Robert Rand},
journal = {Proceedings of the ACM on Programming Languages},
volume = {9},
number = {OOPSLA2},
year = {2025},
doi = {10.1145/3763056}
}