Approximate Contraction of Arbitrary Tensor Networks with a Flexible and Efficient Density Matrix Algorithm
Linjian Ma, Matthew Fishman, Miles Stoudenmire, Edgar Solomonik
TL;DR
This work tackles the challenge of contracting arbitrary tensor networks efficiently by introducing partitioned_contract, a flexible framework that uses partial contraction trees and an embedding-tree representation to produce low-rank tree TNs. The method integrates an environment-aware density-matrix truncation (with memoization) and an embedding-tree construction that respects contraction paths, enabling scalable contractions across general graph structures beyond lattices. It generalizes boundary-based algorithms to arbitrary graphs and demonstrates favorable empirical performance, including substantial speedups over prior approaches while maintaining accuracy. The results indicate meaningful improvements in both the computational cost and contraction fidelity for lattice and nonlattice TNs, highlighting the practical impact for quantum physics, statistical mechanics, and related fields.
Abstract
Tensor network contractions are widely used in statistical physics, quantum computing, and computer science. We introduce a method to efficiently approximate tensor network contractions using low-rank approximations, where each intermediate tensor generated during the contractions is approximated as a low-rank binary tree tensor network. The proposed algorithm has the flexibility to incorporate a large portion of the environment when performing low-rank approximations, which can lead to high accuracy for a given rank. Here, the environment refers to the remaining set of tensors in the network, and low-rank approximations with larger environments can generally provide higher accuracy. For contracting tensor networks defined on lattices, the proposed algorithm can be viewed as a generalization of the standard boundary-based algorithms. In addition, the algorithm includes a cost-efficient density matrix algorithm for approximating a tensor network with a general graph structure into a tree structure, whose computational cost is asymptotically upper-bounded by that of the standard algorithm that uses canonicalization. Experimental results indicate that the proposed technique outperforms previously proposed approximate tensor network contraction algorithms for multiple problems in terms of both accuracy and efficiency.
