portc Documentation
Parallel Out-of-Core Randomized Tensor-Network Compression.
portc stands for Parallel Out-of-Core Randomized Tensor-Network Compression.
It is a pure-Python implementation of Successive Randomized
Compression (SRC) (Camaño et al., 2026), a randomized algorithm that contracts and
compresses tensor trains in a single sweep. It extends the original MPO-MPS
product to MPO-MPO products, plain compression of an MPS or MPO, and whole
stacks of trains.
The package has no tensor-network framework dependency: it takes and returns
plain lists of per-site NumPy arrays, in the quimb layout (Gray, 2018), and
runs on GPUs through CuPy, including multiple GPUs and memory-budgeted
out-of-core execution.
New here? Install the package and run the first example in Getting Started, then read Concepts for the algorithm and the array conventions.
Getting Started
Install portc and compress your first product.
Concepts
The SRC algorithm and the index and contraction conventions.
Features
Stacks, adaptive truncation, precision, GPUs and logging.
HPC clusters
Set up and run on supercomputers, with an example job script.
Tutorials
Runnable notebooks on concrete problems.
Python API
Reference generated from the docstrings.
How the documentation is organised
User guide — use the library.
- Getting Started — installation and a first example.
- Concepts — how SRC works, and the array layout and contraction order every function expects.
- Features — one-sweep stacks, adaptive truncation, precision and reproducibility, GPU execution and logging.
- Tutorials — runnable notebooks.
Reference — look up details.
- Python API — every public function and argument.
- Benchmarks — accuracy and timing measurements.
- References — the papers behind the method.
Contributing — work on portc itself.
- Contributing — workflow, quality gates, tests and docs.