Skip to content
Open access

Codebase release 0.0 for trainsum

Sep 2026 · SciPost Physics Codebases · 0 citations

Abstract

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.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.