Skip to main content

Library for tensor train arrays with numpy-compatible api

Project description

This package provides a library with numpy-compatible api for calculations with multi dimensional arrays in the tensor train format. This format allows for the (lossy) compressed storage of very high dimensional arrays (think 2^200 or more). This is possible due to truncation of small singular values.

Vectors in the tensor train format are well known in the computational quantum physics world as matrix product states (MPS). This format allows us to represent and manipulate low-entangled quantum states in very high-dimensional Hilbert spaces. It turns out that many states of interests like ground states of local one dimensional Hamiltonians or thermal density matrices have low entanglement and can thus be efficiently worked with in tensor train form. This approach has opened the door to much progress in the numerical study of quantum systems.

The package is build around the TensorTrainArray class which provides a numpy compatible api and are designed to be used just as numpy arrays. Leveraging the __array_function__ and __array_ufunc__ protocols this even works for routines in the normal numpy namespace or in some third party libraries. However, it is important to note that not all operations can be performed efficiently on tensor trains! Additional methods specific to the TensorTrain format are provided as well.

Under the hood, the data is stored as a normal python list of numpy (or numpy-compatible) ndarrays which can be retrieved and manipulated manually. The raw namespace provides the basic algorithm which can be aplied to this format.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ttarray-0.0.2-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

Details for the file ttarray-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: ttarray-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 39.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for ttarray-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5c250d9af20d4118668ca57176861dc3d80cf7a14fc3c3cf6dceee30ba34aa68
MD5 995f4bcd38c1b7899fce0c7e4bae91de
BLAKE2b-256 a620dfd02b15791aa1e2d88ad49d3b657a036401ac70acf4b97079cd4b6f1fe8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page