tensor4all GitHub

tensor4all

Tensor networks, and the Rust stack for computational physics underneath them

We are an open research community working on tensor cross interpolation, quantics tensor trains and tree tensor networks. To run them we build a layered Rust stack, from strided kernels and batched linear algebra up to a tensor runtime with autodiff, that any computational physics code can use.

Next meeting

Meetings are open to everyone. The Zoom link is sent to the mailing list. See the full meeting history.

A Rust stack for computational physics New

It started as the engine for our tensor network algorithms. It has grown into general infrastructure: each layer is a separate library you can adopt on its own, whether you need fast tensor contraction, batched linear algebra or automatic differentiation over Fortran friendly layouts.

The layer map. Each layer depends only on the layers below it. Open the full stack overview.
tensor runtime

tenferro-rs

Dense tensors with einsum, linear algebra and FFT on CPU, CUDA and XLA backends, plus eager and traced automatic differentiation (VJP, JVP, higher order). Column major, with explicit device and thread control. crates.io 0.7.1

Documentation →
building blocks

Kernels you can use without tenferro

  • strided-rs: strided views and permutation kernels
  • tcontract: binary contraction over arbitrary strides, with a C ABI
  • tlinalg: batched SVD, QR, LU, Cholesky and eigensolvers
  • cpueinsum: N-ary einsum with a caller supplied order
  • hataori: map and pmap over Rayon and MPI
algorithms

tensor4all-rs

TCI, quantics tensor trains, Fourier and shift operators, tree tensor networks and patching, with a C API and the Tensor4all.jl frontend. active development

Documentation →

Not only for tensor networks

The kernels know nothing about tensor networks: they take plain strided views and an explicit context, and tcontract exposes a C ABI, so existing C, C++ and Fortran codes can call them directly.

Explicit by design

No hidden global thread pools and no behavior switched by environment variables. The caller passes a context down, so an MPI program, a Julia session and a Rust test can share one machine predictably.

Measured in the open

Reproducible CPU and GPU comparisons against PyTorch and JAX live in tenferro-benchmark, keyed by commit and hardware. The core libraries each have its own benchmark repository.

Need TCI today?

The Rust stack is where development happens. For production work right now, these libraries are stable and documented.

C++ and Python

xfac

The original tensor cross interpolation library, with Python bindings and tutorials.

Read the docs →
Julia

TensorCrossInterpolation.jl and friends

Core TCI, quantics TCI, quantics grids and interpolative QTT construction.

Julia tutorials →

Which library should I use?

The software map lists every package with its status: use now, active development or maintenance.

Software map →

Community

Most day to day discussion happens in our Matrix space: development threads, new papers, GitHub activity and announcements, each in its own room.

chat

Matrix space

Rooms for general discussion, announcements, papers, tenferro development and a live GitHub feed. Open, federated and end to end encrypted.

How to join →
announcements

Mailing list

Meeting announcements and Zoom links. No Google account? Write to tensor4all-admin@googlegroups.com.

Subscribe →
meetings

Monthly online meetings

Developer meetings and invited talks, recently on randomized sketching for tensor trains and MPS solvers for phonon transport.

Meeting history →

How we build

Much of the Rust stack is written with AI coding agents under human review. We publish how we do it, and how we keep track of where code and ideas come from.

Agentic AI coding

Slides on the workflow behind tenferro-rs and tensor4all-rs: rules, review and testing.

Slides (PDF) →

Provenance and citation

Each repository states how ported code is attributed and which papers to cite.

Policy →

Learn

Learning tensor networks with tensor cross interpolation: new algorithms and libraries Y. Núñez Fernández, M. K. Ritter, M. Jeannin, J.-W. Li, T. Kloss, T. Louvet, S. Terasaki, O. Parcollet, J. von Delft, H. Shinaoka, X. Waintal. SciPost Phys. 18, 104 (2025), arXiv:2407.02454.

A pedagogical introduction with an overview of the literature. More in Learn: references, tutorials, lecture notes, workshops and the FAQ.