Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

tensor4all-rs

tensor4all-rs is a Rust implementation of tensor network algorithms, focused on:

  • Tensor Cross Interpolation (TCI / TCI2) — adaptive low-rank tensor approximation
  • Quantics Tensor Train (QTT) — representation of functions in exponentially fine grids
  • Tree Tensor Networks (TreeTN) — tensor networks with arbitrary tree topology

The library is structured as a workspace of independent crates under crates/, designed for modular use and AI-agentic development workflows. Language bindings for Julia are provided through the C API layer.

Source code and issue tracker: github.com/tensor4all/tensor4all-rs

The repository root README.md stays intentionally concise. Longer runnable examples live in this guide and the guide examples are exercised in CI.


Where to start

I want to…Go to
Understand tensor networks from scratchConcepts
Install and run my first exampleGetting Started
Understand the crate structureArchitecture & Crate Guide
Come from ITensors.jl and map typesConventions
Browse the full API referencerustdoc API reference
Use tensor4all-rs from JuliaJulia Bindings

Feature highlights

  • Dynamic Index/Tensor system inspired by ITensors.jl: indices carry semantic identity, tensor contraction aligns axes by index rather than position
  • Tensor Cross Interpolation (TCI2): approximates high-dimensional tensors from a small number of evaluations using cross-approximation
  • Quantics Tensor Train (QTT): represents smooth functions on exponentially fine grids; includes transformation operators (affine, shift, sum)
  • Tree Tensor Networks: arbitrary-topology TTN, not limited to chains (MPS/MPO); supports standard MPS/MPO as special cases with runtime topology checks
  • C API (tensor4all-capi): stable FFI surface for language bindings, currently used by Tensor4all.jl

Not sure where you fit?

If you are new to the library, read Getting Started for a short working example, then consult Concepts for background on the data structures used throughout.