ttglow

Tensor trains with the ease of PyTorch.
Compress, compute, differentiate.

scroll to explore ↓

Familiar syntax.
Exponential compression.

Create and manipulate tensor trains just like PyTorch tensors. QR, SVD, and contractions work exactly as you'd expect.

python

Matrix-vector algebra in TT format

TTMatrix represents linear operators with compressed storage. Apply operators to vectors, compose operators, and perform matrix arithmetic.

python

Quantum-inspired tensor networks

Build multi-site gates with Kronecker products, apply to specific sites, and chain operations with automatic rank truncation.

python

Why tensor trains?

Break the curse of dimensionality. Represent exponentially large tensors with linear storage.

🗜️

Exponential Compression

Store 1020 elements with just thousands of parameters.

PyTorch Native

Full autograd support. GPU ready. Integrates with your ML stack.

🎯

NumPy-like API

Indexing, slicing, arithmetic. tt[:, 2, :] just works.

🔗

Operator Algebra

TTMatrix for operators. Kronecker products, partial application.

Get Started

$ pip install ttglow

Ready to compress your tensors?

View on GitHub API Roadmap Animations