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.

Note

At present this package is a work in progress and is not yet complete

Project details


Download files

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

Source Distribution

ttarray-0.0.1.tar.gz (21.7 kB view hashes)

Uploaded source

Built Distribution

ttarray-0.0.1-py3-none-any.whl (31.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page