The contraction cost of a tensor network depends on the contraction order. However, the optimal contraction ordering problem is known to be NP-hard. We show that the linear contraction ordering problem for tree tensor networks admits a polynomial-time algorithm, by drawing connections to database join ordering. The result relies on the adjacent sequence interchange property of the contraction cost, which enables a global decision of the contraction order based on local comparisons. Based on that, we specify a modified version of the IKKBZ database join ordering algorithm to find the optimal tree tensor network linear contraction order. Finally, we extend our algorithm as a heuristic to general contraction orders and arbitrary tensor network topologies.
翻译:张量网络的缩并代价取决于缩并顺序,然而最优缩并顺序问题已知为NP难问题。本文通过建立与数据库连接顺序问题的关联,证明树张量网络的线性缩并顺序问题存在多项式时间算法。该结果依赖于缩并代价的相邻序列交换性质,该性质使得基于局部比较即可全局决定缩并顺序。在此基础上,我们提出了IKKBZ数据库连接顺序算法的改进版本,用于寻找最优树张量网络线性缩并顺序。最后,我们将该算法作为启发式方法扩展到一般缩并顺序及任意张量网络拓扑结构。