论文标题
扩展C ++用于异质量子经典计算
Extending C++ for Heterogeneous Quantum-Classical Computing
论文作者
论文摘要
我们提出QCOR- C ++和编译器实现的语言扩展,可在单一源上下文中实现异质量子量子典型的编程,编译和执行。我们的工作提供了以量子语言不可知的方式提供的首个C ++编译器,可启用高级量子内核(函数)表达式,以及针对许多物理和虚拟量子计算的硬件,可重新定位的编译器,可重新定位的编译器工作流。 QCOR利用新颖的Clang插件接口并建立在XACC系统级量子级编程框架上,以提供最先进的集成机制,用于量子典型的汇编,从而利用了社区最佳的量子。 QCOR最终将量子内核转换为XACC中间表示,并为量子汇编例程(例如电路优化,分析和放置)提供了可扩展的钩子。这项工作详细介绍了QCOR的整体体系结构和编译器工作流程,并提供了许多启发性的编程示例,这些示例展示了其用于近期变异任务,量子算法表达和馈送误差校正方案的实用性。
We present qcor - a language extension to C++ and compiler implementation that enables heterogeneous quantum-classical programming, compilation, and execution in a single-source context. Our work provides a first-of-its-kind C++ compiler enabling high-level quantum kernel (function) expression in a quantum-language agnostic manner, as well as a hardware-agnostic, retargetable compiler workflow targeting a number of physical and virtual quantum computing backends. qcor leverages novel Clang plugin interfaces and builds upon the XACC system-level quantum programming framework to provide a state-of-the-art integration mechanism for quantum-classical compilation that leverages the best from the community at-large. qcor translates quantum kernels ultimately to the XACC intermediate representation, and provides user-extensible hooks for quantum compilation routines like circuit optimization, analysis, and placement. This work details the overall architecture and compiler workflow for qcor, and provides a number of illuminating programming examples demonstrating its utility for near-term variational tasks, quantum algorithm expression, and feed-forward error correction schemes.