通过多级中间表示实现量子加速器的可重定向优化器
Enabling Retargetable Optimizing Compilers for Quantum Accelerators via a Multi-Level Intermediate Representation
摘要:
我们提出了一个多层次的量子经典中间表示(IR),使优化,可重定向,提前可用的量子编程语言的编译器。为了展示我们的架构,我们利用我们提出的IR来启用OpenQASM量子语言规范版本3的编译器。我们支持整个基于门的OpenQASM 3语言,并为通用量子编程模式和改进的语法提供自定义扩展。我们的工作建立在多层中间表示(MLIR)框架的基础上,并利用其独特的渐进降低能力将量子语言表达式映射到LLVM机器级IR。我们通过MLIR模式重写子系统和标准LLVM优化通道提供量子和经典优化,并通过标准基准和测试用例展示我们的方法的可编程性,编译和执行。与目前可用的其他独立语言和编译器相比,我们的工作导致编译时间比标准Pythonic方法快1000倍,比相对独立的量子语言编译器快5- 10倍。我们的编译器通过标准编程模式提供量子资源优化,从而将纠缠操作(程序噪音的常见来源)减少10倍。最终,我们将这项工作视为快速量子编译器原型的工具,使语言集成,优化和与经典编译方法的互操作性成为可能。
英文摘要:
We present a multi-level quantum-classical intermediate representation (IR) that enables an optimizing, retargetable, ahead-of-time compiler for available quantum programming languages. To demonstrate our architecture, we leverage our proposed IR to enable a compiler for version 3 of the OpenQASM quantum language specification. We support the entire gate-based OpenQASM 3 language and provide custom extensions for common quantum programming patterns and improved syntax. Our work builds upon the Multi-level Intermediate Representation (MLIR) framework and leverages its unique progressive lowering capabilities to map quantum language expressions to the LLVM machine-level IR. We provide both quantum and classical optimizations via the MLIR pattern rewriting sub-system and standard LLVM optimization passes, and demonstrate the programmability, compilation, and execution of our approach via standard benchmarks and test cases. In comparison to other standalone language and compiler efforts available today, our work results in compile times that are 1000x faster than standard Pythonic approaches, and 5-10x faster than comparative standalone quantum language compilers. Our compiler provides quantum resource optimizations via standard programming patterns that result in a 10x reduction in entangling operations, a common source of program noise. Ultimately, we see this work as a vehicle for rapid quantum compiler prototyping enabling language integration, optimizations, and interoperability with classical compilation approaches.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。