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 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.
This is the documentation for the tensor library QSpace (v4.0) that provides a toolbox to exploit `quantum symmetry spaces’ in tensor network states in the quantum many-body context. QSpace permits arbitrary combinations of symmetries including the Abelian symmetries \mathbb{Z}_n ℤ n and U(1) U ( 1 ) , as well as all non-Abelian symmetries represented by the simple classical Lie algebras: A_n A n , B_n B n , C_n C n , and D_n D n , or respectively, the special unitary group SU( n n ), the odd orthogonal group SO( 2n+1 2 n + 1 ), the symplectic group Sp( 2n 2 n ), and the even orthogonal group SO( 2n 2 n ). The code (C++ embedded via the MEX interface into Matlab) is available open-source as of QSpace v4.0 on bitbucket (https://bitbucket.org/qspace4u) under the Apache 2.0 license. QSpace is designed as a bottom-up approach for non-Abelian symmetries. It starts from the defining representation and the respective Lie algebra. By explicitly computing and tabulating generalized Clebsch-Gordan coefficient tensors, QSpace is versatile in its operations across all symmetries. At the level of an application, much of the symmetry-related details are hidden within the QSpace C++ core libraries. Hence when developing tensor network algorithms with QSpace, these can be coded (nearly) as if there are no symmetries at all, despite being able to fully exploit general non-Abelian symmetries.
Tensor networks (TNs) are a central computational tool in quantum science and artificial intelligence. However, the lack of a unified software interface across tensor-computing frameworks severely limits the portability of TN applications, coupling algorithmic development to specific hardware and software back ends. To address this challenge, we introduce the Tensor Computing Application Programming Interface (TCAPI)---an application-oriented, lightweight API designed to enable framework-independent, high-performance TN applications, currently specified for \texttt{C++} and \texttt{Python}. TCAPI provides well-defined type-system conventions that abstract tensor objects, together with a minimal yet expressive set of core functions for essential tensor manipulations and tensor linear-algebra operations, with operation semantics shared across language specifications. Through numerical demonstrations of representative tensor-network applications implemented in \texttt{C++} using TCAPI, we show that code written against TCAPI can be migrated seamlessly across heterogeneous hardware and software platforms while achieving performance comparable to native framework implementations. We further provide open-source implementations of TCAPI based on \textit{Cytnx} and \textit{ITensor} in \texttt{C++}, and on \textit{NumPy} in \texttt{Python}, demonstrating its practicality and ease of integration with existing tensor-computing frameworks.
High-dimensional data arise naturally in many areas of science and engineering, including machine learning, signal processing, computational physics, and statistics. Such data are often represented as tensors, multi-dimensional generalizations of matrices. While tensors provide a natural representation for multi-modal structure, their direct manipulation quickly becomes challenging as the order grows: the number of parameters increases exponentially, and algebraic expressions involving many indices become difficult to interpret and implement. Tensor networks (TNs) provide an effective framework for addressing these challenges. Originally introduced by Penrose and developed extensively in quantum physics, the graphical language of tensor networks encodes contractions as edges in a graph, reducing notational overhead and revealing structural properties obscured by index notation. Despite the central role of high-dimensional tensors in modern machine learning and numerical analysis, tensor network diagrams remain underutilized outside quantum computing, partly due to the lack of a self-contained mathematical reference accessible to a broad technical audience. This manuscript provides a self-contained guide to tensor networks and their use in tensor algebra. We present the main operations on tensors, contractions, products, and reshaping through, graphical notation, and show how classical tensor decompositions and related computations are naturally expressed in this framework. We also illustrate how tensor networks simplify the derivation of gradients and the manipulation of high-dimensional probability distributions. Throughout, we show that the diagrammatic approach yields genuinely shorter and more transparent proofs of classical identities, rank bounds, and gradient formulas that would otherwise require laborious index manipulation.
The continuous demand for higher accuracy in computational chemistry necessitates the development of advanced many-body electronic structure methods. However, the derivation and efficient implementation of these theories constitute a significant bottleneck. As the rank of the associated tensors increases, the governing equations explode in complexity, rendering manual implementation labor-intensive, error-prone, and difficult to optimize for modern hardware. To address this challenge, this dissertation presents SeQuant, a comprehensive framework for the automated derivation and parallel implementation of many-body quantum chemistry methods. Built upon a robust symbolic algebra engine, SeQuant allows for the expression of theories in the natural language of second quantization. It automates the transformation of high-level theoretical ansatzes into explicit tensor contraction expressions and subsequently generates optimized, high-performance C++ code. A central innovation of this work is the extension of automated implementation to reduced-scaling methods, which exploit the sparsity inherent in electronic correlation. We introduce a novel "tensor-of-tensors" data structure designed to manage the irregular sparsity patterns of Pair Natural Orbital (PNO) formulations. This development enables the first fully automated implementation of PNO-Coupled Cluster (PNO-CC) methods, bridging the gap between symbolic abstraction and the runtime requirements of sparse tensor algebra. The results demonstrate that SeQuant not only reproduces established dense methods (such as CCSD and CCSDT) with high fidelity but also effectively handles the complexity of sparse, local correlation approaches. By decoupling the complexity of the physics from the details of the implementation, this framework establishes a new paradigm for method development, dramatically accelerating the translation of theoretical insights into computational reality.
This is the documentation for the tensor library QSpace (v4.0) that provides a toolbox to exploit ‘quantum symmetry spaces’ in tensor network states in the quantum many-body context. QSpace permits arbitrary combinations of symmetries including the Abelian symmetries \mathbb{Z}_n ℤ n and U(1) U ( 1 ) , as well as all non-Abelian symmetries represented by the simple classical Lie algebras: A_n A n , B_n B n , C_n C n , and D_n D n , or respectively, the special unitary group SU( n n ), the odd orthogonal group SO( 2n+1 2 n + 1 ), the symplectic group Sp( 2n 2 n ), and the even orthogonal group SO( 2n 2 n ). The code (C++ embedded via the MEX interface into Matlab) is available (https://bitbucket.org/qspace4u) under the Apache 2.0 license. QSpace is designed as a bottom-up approach for non-Abelian symmetries. It starts from the defining representation and the respective Lie algebra. By explicitly computing and tabulating generalized Clebsch-Gordan coefficient tensors, QSpace is versatile in its operations across all symmetries. At the level of an application, much of the symmetry-related details are hidden within the QSpace C++ core libraries. Hence when developing tensor network algorithms with QSpace, these can be coded (nearly) as if there are no symmetries at all, despite being able to fully exploit general non-Abelian symmetries.
Operator equations (OEs) underpin quantitative modeling across science and engineering. Finite-element (FE) methods discretize continuous OEs into finite-dimensional algebraic systems, whereas tensor networks (TNs) provide flexible variational representations of correlated discrete systems. Here, we develop a framework that connects FE with TN for analytic OEs. The power of this method comes from its ability to convert highly non-linear partial differential equations into linear matrix equations. In particular, we show that FE discretization induces a hierarchy of multilinear interaction tensors, through which differential, integral, nonlinear, memory, and delay equations can be expressed within a common algebraic structure. The resulting systems are reformulated as weighted-residual optimization problems over TN degrees of freedom. Matrix-product-state calculations for one-dimensional linear and nonlinear diffusion reproduce conventional solutions with controlled error while preserving continuity and Neumann boundary conditions. The framework provides a common variational language for analytic OEs and establishes a direct connection between FE numerical formalism and TN variational algorithms, offering a general foundation for TN-based and quantum-inspired approaches to solving OEs.