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:2602.20226

trainsum -- A Python package for quantics tensor trains

Paul Haubenwallner, Matthias Heller

cs.MSphysics.comp-phquant-phSubmitted Feb 23, 2026• Announced Feb 24, 2026
arXivHTMLPDF

Abstract

We present trainsum, a versatile Python package for doing computations with multidimensional quantics tensor trains: https://github.com/fh-igd-iet/trainsum. Using the Array API standard together with opt_einsum, trainsum allows the effortless approximation of tensors or functions by tensor trains independent of their shape or dimensionality. Once approximated, our package can perform normal arithmetic operations with quantics tensor trains, including addition, Einstein summations and element-wise transformations. It can be therefore used for generic computations with applications in simulation, data compression, machine learning and data analysis.

Related papers

SeeMPS: A Python-based Matrix Product State and Tensor Train Library

Paula García-Molina, Juan José Rodríguez-Aldavero, Jorge Gidi +1 more

We introduce SeeMPS, a Python library dedicated to implementing tensor network algorithms based on the well-known Matrix Product States (MPS) and Quantized Tensor Train (QTT) formalisms. SeeMPS is implemented as a complete finite precision linear algebra package where exponentially large vector spaces are compressed using the MPS/TT formalism. It enables both low-level operations, such as vector addition, linear transformations, and Hadamard products, as well as high-level algorithms, including the approximation of linear equations, eigenvalue computations, and exponentially efficient Fourier transforms. This library can be used for traditional quantum many-body physics applications and also for quantum-inspired numerical analysis problems, such as solving PDEs, interpolating and integrating multidimensional functions, sampling multivariate probability distributions, etc.

quant-pharXiv:2601.16734•Jan 26, 2026•0 citations

Codebase release 0.0 for trainsum

Paul Haubenwallner, Matthias Heller

We present trainsum, a Python package for computations with multidimensional quantics tensor trains. The package enables efficient approximation of tensors and functions by tensor trains, regardless of their shape or dimensionality, and supports analytic constructions of important objects, such as polynomials and Fourier transforms. Once represented in tensor train format, trainsum provides standard arithmetic operations, including addition, multiplication, and element-wise transformations. An Einstein-summation interface, closely aligned with NumPy’s einsum, enables concise specification of complex tensor train contractions and linear solvers. With support for multiple CPU and GPU backends (NumPy, CuPy, PyTorch), trainsum serves as a general-purpose framework for constructing and manipulating high-dimensional tensor representations in applications such as numerical simulation, data compression, machine learning, and data analysis.

SciPost Physics Codebases•Sep 14, 2026•0 citations

TensorLy-Quantum: Quantum Machine Learning with Tensor Methods

Taylor L. Patti, Jean Kossaifi, Susanne F. Yelin +1 more

Simulation is essential for developing quantum hardware and algorithms. However, simulating quantum circuits on classical hardware is challenging due to the exponential scaling of quantum state space. While factorized tensors can greatly reduce this overhead, tensor network-based simulators are relatively few and often lack crucial functionalities. To address this deficiency, we created TensorLy-Quantum, a Python library for quantum circuit simulation that adopts the PyTorch API. Our library leverages the optimized tensor methods of the existing TensorLy ecosystem to represent, simulate, and manipulate large-scale quantum circuits. Through compact tensor representations and efficient operations, TensorLy-Quantum can scale to hundreds of qubits on a single GPU and thousands of qubits on multiple GPUs. TensorLy-Quantum is open-source and accessible at https://github.com/tensorly/quantum

arXiv:2112.10239•Dec 19, 2021•6 citations

Reducing Computational Complexity of Tensor Contractions via Tensor-Train Networks

Ilya Kisil, Giuseppe G. Calvi, Kriton Konstantinidis +2 more

There is a significant expansion in both volume and range of applications along with the concomitant increase in the variety of data sources. These ever-expanding trends have highlighted the necessity for more versatile analysis tools that offer greater opportunities for algorithmic developments and computationally faster operations than the standard flat-view matrix approach. Tensors, or multi-way arrays, provide such an algebraic framework which is naturally suited to data of such large volume, diversity, and veracity. Indeed, the associated tensor decompositions have demonstrated their potential in breaking the Curse of Dimensionality associated with traditional matrix methods, where a necessary exponential increase in data volume leads to adverse or even intractable consequences on computational complexity. A key tool underpinning multi-linear manipulation of tensors and tensor networks is the standard Tensor Contraction Product (TCP). However, depending on the dimensionality of the underlying tensors, the TCP also comes at the price of high computational complexity in tensor manipulation. In this work, we resort to diagrammatic tensor network manipulation to calculate such products in an efficient and computationally tractable manner, by making use of Tensor Train decomposition (TTD). This has rendered the underlying concepts easy to perceive, thereby enhancing intuition of the associated underlying operations, while preserving mathematical rigour. In addition to bypassing the cumbersome mathematical multi-linear expressions, the proposed Tensor Train Contraction Product model is shown to accelerate significantly the underlying computational operations, as it is independent of tensor order and linear in the tensor dimension, as opposed to performing the full computations through the standard approach (exponential in tensor order).

arXiv:2109.00626•Sep 1, 2021•3 citations

Factorizing binary tensors into quantics tensor trains

Paul Haubenwallner, Matthias Heller

The conversion of functions to quantics tensor trains is a well-established procedure and can either be done analytically or numerically. Numerical conversion schemes are based on singular value decompositions, where access to the full tensor is necessary, or on cross interpolations, which only depend on sampling a function. When dealing with large binary tensors, the first approach becomes prohibitively expensive while the second approach might fail to converge due to the non-smoothness of the data. In this work, we provide insight into how binary tensors, where the positions of the non-zero entries are defined by some Boolean function, can be converted into quantics tensor trains with a hybrid analytical-numerical approach utilizing the rank product. The proposed construction scheme nicely reproduces results from the literature and can be used for discrete convolutions, the construction of discrete wavelet transforms or slicing and assignment operations of multi-dimensional quantics tensor trains.

arXiv:2606.04506•Jun 3, 2026•0 citations

Algebraic Operations on Tensor Trains

Petr Tichavský

The tensor train (TT) model is widely used to approximate high-dimensional tensors, enabling efficient handling of data that may exceed available memory. TT helps address the curse of dimensionality in applications such as system identification and dynamic programming. In some applications, TT is known as a ``matrix product state" (MPS). The last product is also known under the acronym MPO--MPS. The proposed algorithms achieve an improved trade-off between computational efficiency and accuracy compared to state-of-the-art methods.

arXiv:2606.14627•Jun 12, 2026•0 citations
We present trainsum, a versatile Python package for doing computations with multidimensional quantics tensor trains: https://github.com/fh-igd-iet/trainsum. Using the Array API standard together with opt_einsum, trainsum allows the effortless approximation of tensors or functions by tensor trains independent of their shape or dimensionality. Once approximated, our package can perform normal arithmetic operations with quantics tensor trains, including addition, Einstein summations and element-wise transformations. It can be therefore used for generic computations with applications in simulation, data compression, machine learning and data analysis.
We introduce SeeMPS, a Python library dedicated to implementing tensor network algorithms based on the well-known Matrix Product States (MPS) and Quantized Tensor Train (QTT) formalisms. SeeMPS is implemented as a complete finite precision linear algebra package where exponentially large vector spaces are compressed using the MPS/TT formalism. It enables both low-level operations, such as vector addition, linear transformations, and Hadamard products, as well as high-level algorithms, including the approximation of linear equations, eigenvalue computations, and exponentially efficient Fourier transforms. This library can be used for traditional quantum many-body physics applications and also for quantum-inspired numerical analysis problems, such as solving PDEs, interpolating and integrating multidimensional functions, sampling multivariate probability distributions, etc.
We present trainsum, a Python package for computations with multidimensional quantics tensor trains. The package enables efficient approximation of tensors and functions by tensor trains, regardless of their shape or dimensionality, and supports analytic constructions of important objects, such as polynomials and Fourier transforms. Once represented in tensor train format, trainsum provides standard arithmetic operations, including addition, multiplication, and element-wise transformations. An Einstein-summation interface, closely aligned with NumPy’s einsum, enables concise specification of complex tensor train contractions and linear solvers. With support for multiple CPU and GPU backends (NumPy, CuPy, PyTorch), trainsum serves as a general-purpose framework for constructing and manipulating high-dimensional tensor representations in applications such as numerical simulation, data compression, machine learning, and data analysis.
Simulation is essential for developing quantum hardware and algorithms. However, simulating quantum circuits on classical hardware is challenging due to the exponential scaling of quantum state space. While factorized tensors can greatly reduce this overhead, tensor network-based simulators are relatively few and often lack crucial functionalities. To address this deficiency, we created TensorLy-Quantum, a Python library for quantum circuit simulation that adopts the PyTorch API. Our library leverages the optimized tensor methods of the existing TensorLy ecosystem to represent, simulate, and manipulate large-scale quantum circuits. Through compact tensor representations and efficient operations, TensorLy-Quantum can scale to hundreds of qubits on a single GPU and thousands of qubits on multiple GPUs. TensorLy-Quantum is open-source and accessible at https://github.com/tensorly/quantum
There is a significant expansion in both volume and range of applications along with the concomitant increase in the variety of data sources. These ever-expanding trends have highlighted the necessity for more versatile analysis tools that offer greater opportunities for algorithmic developments and computationally faster operations than the standard flat-view matrix approach. Tensors, or multi-way arrays, provide such an algebraic framework which is naturally suited to data of such large volume, diversity, and veracity. Indeed, the associated tensor decompositions have demonstrated their potential in breaking the Curse of Dimensionality associated with traditional matrix methods, where a necessary exponential increase in data volume leads to adverse or even intractable consequences on computational complexity. A key tool underpinning multi-linear manipulation of tensors and tensor networks is the standard Tensor Contraction Product (TCP). However, depending on the dimensionality of the underlying tensors, the TCP also comes at the price of high computational complexity in tensor manipulation. In this work, we resort to diagrammatic tensor network manipulation to calculate such products in an efficient and computationally tractable manner, by making use of Tensor Train decomposition (TTD). This has rendered the underlying concepts easy to perceive, thereby enhancing intuition of the associated underlying operations, while preserving mathematical rigour. In addition to bypassing the cumbersome mathematical multi-linear expressions, the proposed Tensor Train Contraction Product model is shown to accelerate significantly the underlying computational operations, as it is independent of tensor order and linear in the tensor dimension, as opposed to performing the full computations through the standard approach (exponential in tensor order).
The conversion of functions to quantics tensor trains is a well-established procedure and can either be done analytically or numerically. Numerical conversion schemes are based on singular value decompositions, where access to the full tensor is necessary, or on cross interpolations, which only depend on sampling a function. When dealing with large binary tensors, the first approach becomes prohibitively expensive while the second approach might fail to converge due to the non-smoothness of the data. In this work, we provide insight into how binary tensors, where the positions of the non-zero entries are defined by some Boolean function, can be converted into quantics tensor trains with a hybrid analytical-numerical approach utilizing the rank product. The proposed construction scheme nicely reproduces results from the literature and can be used for discrete convolutions, the construction of discrete wavelet transforms or slicing and assignment operations of multi-dimensional quantics tensor trains.
The tensor train (TT) model is widely used to approximate high-dimensional tensors, enabling efficient handling of data that may exceed available memory. TT helps address the curse of dimensionality in applications such as system identification and dynamic programming. In some applications, TT is known as a ``matrix product state" (MPS). The last product is also known under the acronym MPO--MPS. The proposed algorithms achieve an improved trade-off between computational efficiency and accuracy compared to state-of-the-art methods.