arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1909.05270quant-phcs.DS
收藏

量子线路优化的精确实用模式匹配

Exact and practical pattern matching for quantum circuit optimization

Raban Iten, Romain Moyard, Tony Metger, David Sutter, Stefan Woerner

摘要:

量子计算通常被编译成基本量子门的电路。就像经典电路一样,量子编译器应该优化量子线路,例如通过最小化所需的门的数量。优化量子线路不仅与长期提高量子算法的运行时间有关,而且对于在噪声使计算变得无用之前只能实现少量量子门的近期量子设备也特别重要。许多量子线路优化技术的一个重要构建块是模式匹配,其中给定一个大的和一个小的量子线路,考虑到量子门的成对换向,我们感兴趣的是在大电路中找到小电路的所有最大匹配,称为模式。在这项工作中,我们提出了一个经典的模式匹配算法,可证明发现所有最大的匹配时间多项式的电路大小(对于一个固定的模式大小)。我们的算法适用于量子和可逆经典电路。我们通过数值计算证明,我们在开源库Qiskit中实现的算法的扩展性比理论最坏情况复杂度所建议的要好得多,并且对于近期量子设备典型的电路尺寸是实用的。使用我们的模式匹配算法作为已知的电路优化技术,如模板匹配和窥视孔优化的基础上,我们证明了一个显着的(~30%)减少随机量子线路的门数,并能够进一步提高实际相关的量子线路,已经优化了最先进的技术。

英文摘要:

Quantum computations are typically compiled into a circuit of basic quantum gates. Just like for classical circuits, a quantum compiler should optimize the quantum circuit, e.g. by minimizing the number of required gates. Optimizing quantum circuits is not only relevant for improving the runtime of quantum algorithms in the long term, but is also particularly important for near-term quantum devices that can only implement a small number of quantum gates before noise renders the computation useless. An important building block for many quantum circuit optimization techniques is pattern matching, where given a large and a small quantum circuit, we are interested in finding all maximal matches of the small circuit, called pattern, in the large circuit, considering pairwise commutation of quantum gates. In this work, we present a classical algorithm for pattern matching that provably finds all maximal matches in time polynomial in the circuit size (for a fixed pattern size). Our algorithm works for both quantum and reversible classical circuits. We demonstrate numerically that our algorithm, implemented in the open-source library Qiskit, scales considerably better than suggested by the theoretical worst-case complexity and is practical to use for circuit sizes typical for near-term quantum devices. Using our pattern matching algorithm as the basis for known circuit optimization techniques such as template matching and peephole optimization, we demonstrate a significant (~30%) reduction in gate count for random quantum circuits, and are able to further improve practically relevant quantum circuits that were already optimized with state-of-the-art techniques.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑