Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2309.01167

Symbolically integrating tensor networks over various random tensors by the second version of Python RTNI

Motohisa Fukuda

Published Sep 3, 2023• 2 citations
arXivHTMLPDF

Abstract

We are upgrading the Python-version of RTNI, which symbolically integrates tensor networks over the Haar-distributed unitary matrices. Now, PyRTNI2 can treat the Haar-distributed orthogonal matrices and the real and complex normal Gaussian tensors as well. Moreover, it can export tensor networks in the format of TensorNetwork so that one can make further calculations with concrete tensors, even for low dimensions, where the Weingarten functions differ from the ones for high dimensions. The tutorial notebooks are found at GitHub: https://github.com/MotohisaFukuda/PyRTNI2. In this paper, we explain maths behind the program and show what kind of tensor network calculations can be made with it. For the former, we interpret the element-wise moment calculus of the above random matrices and tensors in terms of tensor network diagrams, and argue that the view is natural, relating delta functions in the calculus to edges in tensor network diagrams.

DOI
10.48550/arxiv.2309.01167

Related papers

RTNI—A symbolic integrator for Haar-random tensor networks

Motohisa Fukuda, Robert König, Ion Nechita

Abstract We provide a computer algebra package called random tensor network integrator ( RTNI ). It allows to compute averages of tensor networks containing multiple Haar-distributed random unitary matrices and deterministic symbolic tensors. Such tensor networks are represented as multigraphs, with vertices corresponding to tensors or random unitaries and edges corresponding to tensor contractions. Input and output spaces of random unitaries may be subdivided into arbitrary tensor factors, with dimensions treated symbolically. The algorithm implements the graphical Weingarten calculus and produces a weighted sum of tensor networks representing the average over the unitary group. We illustrate the use of this algorithmic tool on some examples from quantum information theory, including entropy calculations for random tensor network states as considered in toy models for holographic duality. Mathematica and Python implementations are supplied.

arXiv:1902.08539•Journal of Physics A Mathematical and Theoretical•Sep 10, 2019•24 citations

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

Bimal Gaudel, Robert G. Adam, Ajay Melekamburath +5 more

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.

cs.MSCross-listedarXiv:2511.09943•The Journal of Chemical Physics•Nov 14, 2025•1 citation

IntegrateUnitary.jl: A Julia package for symbolic integration over Haar measures

Łukasz Pawela, Zbigniew Puchała

Symbolic integration over the Haar measure of compact groups is a computational cornerstone in quantum information science and random matrix theory. We present \texttt{IntegrateUnitary.jl}, a comprehensive Julia package for computing exact expectations of polynomial functions over a wide range of compact groups ($U(d)$, $O(d)$, $Sp(d)$, and $SU(d)$ for balanced polynomials), circular and Gaussian ensembles, Ginibre ensembles, permutation groups, random pure states, and unitary $t$-designs. The package provides a fully open-source implementation of the Weingarten calculus and Wick contractions with broad symbolic-$d$ support for entry-wise and trace-polynomial integrals, while selected workflows currently require concrete integer dimensions (including higher pure trace moments $|\mathrm{tr}(U)|^{2k}$ for $k > 1$ and HCIZ with \texttt{SymbolicMatrix} inputs, and direct matrix-valued integration of \texttt{SymbolicMatrix}/\texttt{SymbolicMatrixProduct} expressions), automatic asymptotic expansions, a high-level symbolic trace interface that reconstructs Weingarten graphs from index-free expressions, and a bridge to \texttt{ITensors.jl} for tensor network averaging. We discuss the underlying algorithms, including the Murnaghan-Nakayama rule and symplectic-orthogonal duality, and demonstrate that the package efficiently handles high-degree moments and quantum information metrics.

quant-pharXiv:2605.23830•May 25, 2026•1 citation

Tensor Cookbook: Mastering Tensors through Diagrams

Beheshteh T. Rakhshan, Guillaume Rabusseau

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.

arXiv:2605.16610•May 15, 2026•0 citations

Tensor models from the viewpoint of matrix models: the cases of loop models on random surfaces and of the Gaussian distribution

Valentin Bonzom, Frédéric Combes

Two direct connections between random tensors and random matrices are discussed in this article. In the rst part, we introduce U( \tau ) matrix models which generate fully packed, oriented loops on random surfaces. e latter are found to be in bijection with a set of regular edge-colored graphs. It is shown that the expansion in the number of loops is organized like the 1/ N expansion of rank-three tensor models. Recent results on tensor models are applied in this context. For example, congurations which maximize the number of loops are precisely the melonic graphs of tensor models and a scaling limit which projects onto themelonic sector is found. is approach is generalized to higher-rank tensor models, which generate loops with fugacity \tau on triangulations in dimension d–1 . In the second part, we introduce singular value decompositions to evaluate the expectations of polynomial observables of Gaussian random tensors. Performing the integrals over the unitary group leads to a notion of eective observables which expand onto regular trace invariants. We show that both asymptotic and exact new calculations of expectations can be performed this way.

Annales de l’Institut Henri Poincaré D Combinatorics Physics and their Interactions•Apr 8, 2015•9 citations

TensorTrace: an application to contract tensor networks

Glen Evenbly

Tensor network methods are a conceptually elegant framework for encoding complicated datasets, where high-order tensors are approximated as networks of low-order tensors. In practice, however, the numeric implementation of tensor network algorithms is often a labor-intensive and error-prone task, even for experienced researchers in this area. \emph{TensorTrace} is application designed to alleviate the burden of contracting tensor networks: it provides a graphic drawing interface specifically tailored for the construction of tensor network diagrams, from which the code for their optimal contraction can then be automatically generated (in the users choice of the MATLAB, Python or Julia languages). \emph{TensorTrace} is freely available at \url{https://www.tensortrace.com} with versions for Windows, Mac and Ubuntu.

arXiv:1911.02558•Nov 6, 2019•6 citations
We are upgrading the Python-version of RTNI, which symbolically integrates tensor networks over the Haar-distributed unitary matrices. Now, PyRTNI2 can treat the Haar-distributed orthogonal matrices and the real and complex normal Gaussian tensors as well. Moreover, it can export tensor networks in the format of TensorNetwork so that one can make further calculations with concrete tensors, even for low dimensions, where the Weingarten functions differ from the ones for high dimensions. The tutorial notebooks are found at GitHub: https://github.com/MotohisaFukuda/PyRTNI2. In this paper, we explain maths behind the program and show what kind of tensor network calculations can be made with it. For the former, we interpret the element-wise moment calculus of the above random matrices and tensors in terms of tensor network diagrams, and argue that the view is natural, relating delta functions in the calculus to edges in tensor network diagrams.
Abstract We provide a computer algebra package called random tensor network integrator ( RTNI ). It allows to compute averages of tensor networks containing multiple Haar-distributed random unitary matrices and deterministic symbolic tensors. Such tensor networks are represented as multigraphs, with vertices corresponding to tensors or random unitaries and edges corresponding to tensor contractions. Input and output spaces of random unitaries may be subdivided into arbitrary tensor factors, with dimensions treated symbolically. The algorithm implements the graphical Weingarten calculus and produces a weighted sum of tensor networks representing the average over the unitary group. We illustrate the use of this algorithmic tool on some examples from quantum information theory, including entropy calculations for random tensor network states as considered in toy models for holographic duality. Mathematica and Python implementations are supplied.
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.
Symbolic integration over the Haar measure of compact groups is a computational cornerstone in quantum information science and random matrix theory. We present \texttt{IntegrateUnitary.jl}, a comprehensive Julia package for computing exact expectations of polynomial functions over a wide range of compact groups (U(d)U(d)U(d), O(d)O(d)O(d), Sp(d)Sp(d)Sp(d), and SU(d)SU(d)SU(d) for balanced polynomials), circular and Gaussian ensembles, Ginibre ensembles, permutation groups, random pure states, and unitary ttt-designs. The package provides a fully open-source implementation of the Weingarten calculus and Wick contractions with broad symbolic-ddd support for entry-wise and trace-polynomial integrals, while selected workflows currently require concrete integer dimensions (including higher pure trace moments ∣tr(U)∣2k|\mathrm{tr}(U)|^{2k}∣tr(U)∣2k for k>1k > 1k>1 and HCIZ with \texttt{SymbolicMatrix} inputs, and direct matrix-valued integration of \texttt{SymbolicMatrix}/\texttt{SymbolicMatrixProduct} expressions), automatic asymptotic expansions, a high-level symbolic trace interface that reconstructs Weingarten graphs from index-free expressions, and a bridge to \texttt{ITensors.jl} for tensor network averaging. We discuss the underlying algorithms, including the Murnaghan-Nakayama rule and symplectic-orthogonal duality, and demonstrate that the package efficiently handles high-degree moments and quantum information metrics.
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.
Two direct connections between random tensors and random matrices are discussed in this article. In the rst part, we introduce U( \tau ) matrix models which generate fully packed, oriented loops on random surfaces. e latter are found to be in bijection with a set of regular edge-colored graphs. It is shown that the expansion in the number of loops is organized like the 1/ N expansion of rank-three tensor models. Recent results on tensor models are applied in this context. For example, congurations which maximize the number of loops are precisely the melonic graphs of tensor models and a scaling limit which projects onto themelonic sector is found. is approach is generalized to higher-rank tensor models, which generate loops with fugacity \tau on triangulations in dimension d–1 . In the second part, we introduce singular value decompositions to evaluate the expectations of polynomial observables of Gaussian random tensors. Performing the integrals over the unitary group leads to a notion of eective observables which expand onto regular trace invariants. We show that both asymptotic and exact new calculations of expectations can be performed this way.
Tensor network methods are a conceptually elegant framework for encoding complicated datasets, where high-order tensors are approximated as networks of low-order tensors. In practice, however, the numeric implementation of tensor network algorithms is often a labor-intensive and error-prone task, even for experienced researchers in this area. \emph{TensorTrace} is application designed to alleviate the burden of contracting tensor networks: it provides a graphic drawing interface specifically tailored for the construction of tensor network diagrams, from which the code for their optimal contraction can then be automatically generated (in the users choice of the MATLAB, Python or Julia languages). \emph{TensorTrace} is freely available at \url{https://www.tensortrace.com} with versions for Windows, Mac and Ubuntu.