论文标题

放松的窥视孔优化:量子电路的新型编译器优化

Relaxed Peephole Optimization: A Novel Compiler Optimization for Quantum Circuits

论文作者

Liu, Ji, Bello, Luciano, Zhou, Huiyang

论文摘要

在本文中,我们提出了一种新型的量子编译器优化,称为量子计算机的宽松窥视孔优化(RPO)。 RPO利用可以由编译器静态确定的单量状态信息。我们定义量子位处于基础状态,当时,在给定的时间点其状态在X,Y-或Z-Basis中。当将基础量楼用作量子门的输入时,就会存在降低力量的机会,这将用同等但价格较低的量子操作取代量子操作。与量子程序现有的窥视孔优化相比,不同的是我们提出的优化不需要相同的单一基质,从而命名为“放松”的窥镜优化。当某些输入量子位在已知的纯状态时,我们还扩展了我们的方法以优化量子门。在IBM的Qiskit Transpiler中实现了优化,即量子基态优化(QBO)和量子纯状态优化(QPO)。我们的实验结果表明,我们提出的优化通过是快速有效的。通过我们的编译器优化进行优化的电路可获得高达18.0%(平均为11.7%)的CNOT门,而换载时间低于Qiskit Compiler中最具侵略性优化水平的电路。当在实际量子计算机上运行时,由于门计数的减少,3 Quit量子相估计算法的成功率提高了2.30倍。

In this paper, we propose a novel quantum compiler optimization, named relaxed peephole optimization (RPO) for quantum computers. RPO leverages the single-qubit state information that can be determined statically by the compiler. We define that a qubit is in a basis state when, at a given point in time, its state is either in the X-, Y-, or Z-basis. When basis qubits are used as inputs to quantum gates, there exist opportunities for strength reduction, which replaces quantum operations with equivalent but less expensive ones. Compared to the existing peephole optimization for quantum programs, the difference is that our proposed optimization does not require an identical unitary matrix, thereby named `relaxed' peephole optimization. We also extend our approach to optimize the quantum gates when some input qubits are in known pure states. Both optimizations, namely the Quantum Basis-state Optimization (QBO) and the Quantum Pure-state Optimization (QPO), are implemented in the IBM's Qiskit transpiler. Our experimental results show that our proposed optimization pass is fast and effective. The circuits optimized with our compiler optimizations obtain up to 18.0% (11.7% on average) fewer CNOT gates and up to 8.2% (7.1% on average) lower transpilation time than that of the most aggressive optimization level in the Qiskit compiler. When running on real quantum computers, the success rates of 3-qubit quantum phase estimation algorithm improve by 2.30X due to the reduced gate counts.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源