论文标题

量子电路重写的基于模式匹配的框架

A Pattern Matching-Based Framework for Quantum Circuit Rewriting

论文作者

Jiang, Hui, Li, Diankang, Deng, Yuxin, Xu, Ming

论文摘要

量子算法的实现依赖于基本量子处理器的特定量子汇编。但是,有多种方法可以在不同的物理设备中物理实施Qubit并操纵这些量子位。这些差异导致了不同的通信方法和连接拓扑,每个供应商都实施了自己的原始门集。因此,必须重写或转换量子电路才能从一个平台移植到另一个平台。我们提出了一个基于模式匹配的框架,用于重写量子电路,称为Q Retriting。它利用使用符号序列的量子电路的新表示。与传统的使用定向无环图的方式不同,新表示形式使我们能够轻松地识别出非自止但可降低的模式。然后,我们将模式匹配的问题转换为查找不同子序列的问题,并提出了基于多项式的动态编程模式匹配和替换算法。我们开发一个用于基本优化的规则库,并使用它从$ g_ {ibm} $ GATE设置为$ g_ {sur} $ GATE SET中重写算术和Toffoli基准。与现有的工具PAF相比,QRITITING的降低深度(分别栅极计数)的改善增加了29 \%(分别为14 \%)。

The realization of quantum algorithms relies on specific quantum compilations according to the underlying quantum processors. However, there are various ways to physically implement qubits in different physical devices and manipulate those qubits. These differences lead to different communication methods and connection topologies, with each vendor implementing its own set of primitive gates. Therefore, quantum circuits have to be rewritten or transformed in order to be transplanted from one platform to another. We propose a pattern matching-based framework for rewriting quantum circuits, called QRewriting. It takes advantage of a new representation of quantum circuits using symbol sequences. Unlike the traditional way of using directed acyclic graphs, the new representation allows us to easily identify the patterns that appear non-consecutively but reducible. Then, we convert the problem of pattern matching into that of finding distinct subsequences and propose a polynomial-time dynamic programming-based pattern matching and replacement algorithm. We develop a rule library for basic optimizations and use it to rewrite the Arithmetic and Toffoli benchmarks from the $G_{IBM}$ gate set to the $G_{Sur}$ gate set. Compared with the existing tool PaF, QRewriting obtains an improvement of reducing depths (resp. gate counts) by 29\% (resp. 14\%).

扫码加入交流群

加入微信交流群

微信交流群二维码

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