Table of Contents
Fetching ...

SeQuant Framework for Symbolic and Numerical Tensor Algebra. I. Core Capabilities

Bimal Gaudel, Robert G. Adam, Ajay Melekamburath, Conner Masteran, Nakul Teke, Azam Besharatnik, Andreas Köhn, Edward F. Valeev

TL;DR

SeQuant tackles the need for scalable, robust symbolic tensor algebra in quantum many-body problems by introducing a graph-theoretic tensor network canonicalizer that can handle nested index dependencies and noncovariant networks. It combines a domain-neutral symbolic core with a specialized Wick's theorem engine and a runtime interpretation framework that lowers symbolic expressions to efficient numerical backends, while using an index-space registry to manage complex index vocabularies. The key contributions include a colored-graph TN representation and automorphism-based canonicalization that outperforms traditional group-theoretic methods in many scenarios, and a topologically aware WT engine that delivers diagram-like efficiency for high-rank CC-type derivations. Together with the IR-based optimization and runtime interpretive execution, SeQuant offers a practical, extensible front end for symbolic-tensor computations that accelerates method development in quantum chemistry and related fields, with future work on code-generation backends and broader backend integration.

Abstract

SeQuant is an open-source library for symbolic algebra of tensors over commutative (scalar) and non-commutative (operator) rings. The key innovation supporting most of its functionality is a graph-theoretic tensor network (TN) canonicalizer that can handle tensor networks with symmetries faster than their standard group-theoretic counterparts. The TN canonicalizer is used for routine simplification of conventional tensor expressions, for optimizing application of Wick's theorem (used to canonicalize products of tensors over operator fields), and for manipulation of the intermediate representation leading to the numerical evaluation. Notable features of SeQuant include support for noncovariant tensor networks (which often arise from tensor decompositions) and for tensors with modes that depend parametrically on indices of other tensor modes (such dependencies between degrees of freedom are naturally viewed as nesting of tensors, "tensors of tensors" arising in block-wise data compressions in data science and modern quantum simulation). SeQuant blurs the line between pure symbolic manipulation/code generation and numerical evaluation by including compiler-like components to optimize and directly interpret tensor expressions using external numerical tensor algebra frameworks. The SeQuant source code is available at https://github.com/ValeevGroup/SeQuant.

SeQuant Framework for Symbolic and Numerical Tensor Algebra. I. Core Capabilities

TL;DR

SeQuant tackles the need for scalable, robust symbolic tensor algebra in quantum many-body problems by introducing a graph-theoretic tensor network canonicalizer that can handle nested index dependencies and noncovariant networks. It combines a domain-neutral symbolic core with a specialized Wick's theorem engine and a runtime interpretation framework that lowers symbolic expressions to efficient numerical backends, while using an index-space registry to manage complex index vocabularies. The key contributions include a colored-graph TN representation and automorphism-based canonicalization that outperforms traditional group-theoretic methods in many scenarios, and a topologically aware WT engine that delivers diagram-like efficiency for high-rank CC-type derivations. Together with the IR-based optimization and runtime interpretive execution, SeQuant offers a practical, extensible front end for symbolic-tensor computations that accelerates method development in quantum chemistry and related fields, with future work on code-generation backends and broader backend integration.

Abstract

SeQuant is an open-source library for symbolic algebra of tensors over commutative (scalar) and non-commutative (operator) rings. The key innovation supporting most of its functionality is a graph-theoretic tensor network (TN) canonicalizer that can handle tensor networks with symmetries faster than their standard group-theoretic counterparts. The TN canonicalizer is used for routine simplification of conventional tensor expressions, for optimizing application of Wick's theorem (used to canonicalize products of tensors over operator fields), and for manipulation of the intermediate representation leading to the numerical evaluation. Notable features of SeQuant include support for noncovariant tensor networks (which often arise from tensor decompositions) and for tensors with modes that depend parametrically on indices of other tensor modes (such dependencies between degrees of freedom are naturally viewed as nesting of tensors, "tensors of tensors" arising in block-wise data compressions in data science and modern quantum simulation). SeQuant blurs the line between pure symbolic manipulation/code generation and numerical evaluation by including compiler-like components to optimize and directly interpret tensor expressions using external numerical tensor algebra frameworks. The SeQuant source code is available at https://github.com/ValeevGroup/SeQuant.

Paper Structure

This paper contains 29 sections, 38 equations, 7 figures, 6 tables, 1 algorithm.

Figures (7)

  • Figure 1: Programmatic construction and tree representation of a representative SeQuant expression.
  • Figure 2: Graphical representation of TN in \ref{['eq:tn1']}. External edges are shown in maroon, internal edges are shown in orange.
  • Figure 3: An illustrative example of the colored graph representation of a tensor network containing tensors with antisymmetric bra/ket ($\tilde{a}$), tensor with aux indices ($B$), and index dependencies ($a_{k}^{i_1 i_2}$).
  • Figure 4: Illustration of TN canonicalization for two simple TNs, $\bm{1}$ (${{\tilde{a}\newline\indices*{*^{a_2}_{i_2}*^{a_1}_{i_1}}}{t\newline\indices*{*^{i_2}_{a_2}}}{t\newline\indices*{*^{i_1}_{a_1}}}}$) and $\bm{2}$ (${{t\newline\indices*{*^{i_1}_{a_2}}}{\tilde{a}\newline\indices*{*^{a_2}_{i_2}*^{a_1}_{i_1}}}{t\newline\indices*{*^{i_2}_{a_1}}}}$), that are equivalent modulo sign. For each TN the corresponding colored graph, its original and canonical order of the vertices, and the regrouping of vertices to match the corresponding tensors are shown. The net permutation of slots of the $\tilde{a}$ tensor in TN $\bm{2}$ produces the sign change. The subsequent renaming of the dummy indices to match to the order of appearance produces identical (modulo sign) tensor network. Lastly, the lexicographic sort of tensors, slots, and slot bundles (with key features like the target order of tensor labels controlled by the user) is designed to produce an aesthetically pleasing final representation; in this case the tensor operators are moved to the right of tensors of scalars.
  • Figure 5: Comparison of representative tensor canonicalizers (Wolfram: default Butler-Portugal canonicalizer in Mathematica, Niehoff: the improved Butler-Portugal canonicalizer described in Ref. VRG:niehoff:2018:CPC), SeQuant: the default canonicalizer in SeQuant. (a) TN in \ref{['eq:tensor-total-symm']} with non-symmetric tensor $D$; (b) TN in \ref{['eq:tensor-total-symm']} with totally-symmetric tensor $D$. (c) TN in \ref{['eq:tensor-pairwise-symm']}. "SeQuant(n)" in (b) denotes variant of TN \ref{['eq:tensor-total-symm']} with symmetric $D_{i_1 \dots i_N}$ represented as a product of equivalent order-1 tensors, $D_{i_1} \dots D_{i_N}$. Timings for Wolfram and Niehoff canonicalizers were obtained using the Wolfram code accompanying Ref. VRG:niehoff:2018:CPC. All timings were obtained on an Apple M1 processor.
  • ...and 2 more figures