基于LLVM的变分混合量子经典算法和量子加速器C++编译器工具链
An LLVM-based C++ Compiler Toolchain for Variational Hybrid Quantum-Classical Algorithms and Quantum Accelerators
摘要:
变分算法是结合量子和经典计算的一类典型的量子计算工作负载。本文提出了一个基于LLVM的C++编译器工具链,以有效地执行变分混合量子经典算法的计算系统中,量子设备作为一个加速器。我们引入了一组扩展的C++语言编程这些算法。我们为Quantum定义了一种新的可执行和链接格式(ELF),并在LLVM框架中创建了一个量子设备编译器组件来编译C++源代码的量子部分,并在LLVM框架中重用主机编译器来编译C++源代码的经典计算部分。变分算法重复运行量子线路,每次使用不同的门参数。我们向量子运行时添加了动态执行具有不同参数的量子线路的能力。因此,程序员可以像调用经典例程一样调用量子例程。有了这些功能,变分混合量子经典算法可以在单个源代码中指定,并且只需要为所有迭代编译一次。单次编译显著降低了变分算法的执行延迟。我们通过运行量子线路来评估该框架的性能,该量子电路用于制备热场双态(TFD),这是一种量子经典变分算法。
英文摘要:
Variational algorithms are a representative class of quantum computing workloads that combine quantum and classical computing. This paper presents an LLVM-based C++ compiler toolchain to efficiently execute variational hybrid quantum-classical algorithms on a computational system in which the quantum device acts as an accelerator. We introduce a set of extensions to the C++ language for programming these algorithms. We define a novel Executable and Linking Format (ELF) for Quantum and create a quantum device compiler component in the LLVM framework to compile the quantum part of the C++ source and reuse the host compiler in the LLVM framework to compile the classical computing part of the C++ source. A variational algorithm runs a quantum circuit repeatedly, each time with different gate parameters. We add to the quantum runtime the capability to execute dynamically a quantum circuit with different parameters. Thus, programmers can call quantum routines the same way as classical routines. With these capabilities, a variational hybrid quantum-classical algorithm can be specified in a single-source code and only needs to be compiled once for all iterations. The single compilation significantly reduces the execution latency of variational algorithms. We evaluate the framework's performance by running quantum circuits that prepare Thermofield Double (TFD) states, a quantum-classical variational algorithm.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。