arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2402.13065cs.DSmath.COquant-ph
收藏

计算图中的可扩展模式匹配

Scalable Pattern Matching in Computation Graphs

Luca Mondada, Pablo Andrés-Martínez

AI总结:

提出一种基于预计算数据结构的端口图模式匹配新方法,使运行时复杂度与模式数量无关,在量子电路10000个真实模式上实现20倍加速。

摘要:

图重写是编译器、机器学习和量子计算等领域中优化和修改图表达式的常用工具。底层数据结构通常是端口图——在边端点带有标签的图。图重写的一个先决条件是能够找到图模式。我们提出了一种在端口图中进行模式匹配的新解决方案。其新颖之处在于使用了一种预计算的数据结构,使得模式匹配的运行时复杂度与模式数量无关。这对于具有大量小模式集的使用场景,相比现有解决方案提供了显著优势。我们的方法特别适合量子超优化。我们提供了实现和基准测试,表明我们的算法在描述量子电路的10000个真实世界模式的数据集上,比当前实现提供了20倍的加速。

英文摘要:

Graph rewriting is a popular tool for the optimisation and modification of graph expressions in domains such as compilers, machine learning and quantum computing. The underlying data structures are often port graphs - graphs with labels at edge endpoints. A pre-requisite for graph rewriting is the ability to find graph patterns. We propose a new solution to pattern matching in port graphs. Its novelty lies in the use of a pre-computed data structure that makes the pattern matching runtime complexity independent of the number of patterns. This offers a significant advantage over existing solutions for use cases with large sets of small patterns. Our approach is particularly well-suited for quantum superoptimisation. We provide an implementation and benchmarks showing that our algorithm offers a 20x speedup over current implementations on a dataset of 10000 real world patterns describing quantum circuits.

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

↑