Finding efficient tensor contraction paths is essential for a wide range of problems, including model counting, quantum circuits, graph problems, and language models. There exist several approaches to find efficient paths, such as the greedy and random greedy algorithm by Optimized Einsum (opt_einsum), and the greedy algorithm and hypergraph partitioning approach employed in cotengra. However, these algorithms require a lot of computational time and resources to find efficient contraction paths. In this paper, we introduce a novel approach based on the greedy algorithm by opt_einsum that computes efficient contraction paths in less time. Moreover, with our approach, we are even able to compute paths for large problems where modern algorithms fail.
翻译:寻找高效的张量缩并路径对于一系列广泛的问题至关重要,包括模型计数、量子电路、图问题以及语言模型。目前存在若干种寻找高效路径的方法,例如Optimized Einsum(opt_einsum)中的贪心算法与随机贪心算法,以及cotengra中采用的贪心算法与超图划分方法。然而,这些算法在寻找高效缩并路径时需要消耗大量的计算时间与资源。本文提出了一种基于opt_einsum贪心算法的新方法,能够在更短的时间内计算出高效的缩并路径。此外,通过我们的方法,甚至能够为现代算法无法处理的复杂问题计算路径。