Skip to main content

Tensor Networks for Machine Learning

Project description

logo

Tensor Networks for Machine Learning

Static Badge Static Badge
tn4ml is a Python library that handles tensor networks for machine learning applications. It is built on top of Quimb, for Tensor Network objects, and JAX, for optimization pipeline.
For now, the library supports 1D Tensor Network structures: Matrix Product State, Matrix Product Operator and Spaced Matrix Product Operator.
It supports different embedding functions, initialization techniques, and optimization strategies.

Installation

First create a virtualenv using pyenv or conda. Then install the package and its dependencies.

With pip (tag v1.0.2):

pip install tn4ml

or directly from github:

pip install -U git+https://github.com/bsc-quantic/tn4ml.git

If you want to test and edit the code, you can clone local version of the package and install.

git clone https://github.com/bsc-quantic/tn4ml.git
pip install -e tn4ml/

Documentation

Visit tn4ml.readthedocs.io

Example notebooks

There are working examples of supervised learning (classification), and unsupervised learning (anomaly detection), both on MNIST images.

TN for Classification
TN for Anomaly Detection
TN for Anomaly Detection with DMRG-like method

License

MIT license - check it out here

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

tn4ml-1.0.3.tar.gz (41.1 kB view details)

Uploaded Source

Built Distribution

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

tn4ml-1.0.3-py3-none-any.whl (47.9 kB view details)

Uploaded Python 3

File details

Details for the file tn4ml-1.0.3.tar.gz.

File metadata

  • Download URL: tn4ml-1.0.3.tar.gz
  • Upload date:
  • Size: 41.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.13

File hashes

Hashes for tn4ml-1.0.3.tar.gz
Algorithm Hash digest
SHA256 c50f40b59f930a6964accce3f24c397b8ca5661f9f034122110f2f362aef2edc
MD5 2b9ed897e48224a0350c23bb80661457
BLAKE2b-256 c6c21ce71609ae9ee98cd3f7d45e208ef297f2d12eb6697aac0f6a8e00060e8d

See more details on using hashes here.

File details

Details for the file tn4ml-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: tn4ml-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 47.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.13

File hashes

Hashes for tn4ml-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 95e6ee744d8090a7157400f7d3e7d62a5620f11c0fced3947aa90916a54f6bad
MD5 e6cdf89ada5b24fa84632ea9406f02af
BLAKE2b-256 0a35710239824514c7814c0b9fc0739a1d2b58706c62a5dee140d72dd14f53fc

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