Skip to main content

Tensor Network Code

Project description

Tensor Network Notes

This repo contains my notes and code related to the course Tensor Network.

Environment Setup

This is a uv project. Setting up the environment is easy:

  1. If you have not got uv installed, follow the instructions to install it.
  2. Run uv sync to create an environment and get dependencies, including development dependencies that you need to run the code in a notebook.

Run Tools

We use poe to run tools. Available commands are:

  • lab: run Jupyter Lab
  • sync: sync the code in notebooks to the tensor_network package
  • format: format the code in notebooks
  • Checking: use ruff linter to check code
    • check_tensor_network: check the exported code in tensor_network package
    • check: check code in .
    • check_all: check code in . and tensor_network
  • precommit: run pre-commit hooks

Sample usage:

# if your shell detects venvs automatically, you can run poe directly
poe lab
# if your shell does not detect venvs automatically, you can run uv run poe directly
uv run poe lab

Trained MPS Checkpoints

See the repo on Huggingface.

Contribution

Contributions are very welcome. Please file an issue or PR if you have any questions or suggestions.

A few points to note:

  • The code should primarily live in notebooks, not Python scripts. We use nbdev to export useful code from notebooks to tensor_network package for reusability.
  • Run pre-commit install, or uv run pre-commit install if your shell doesn't autodetect venv

Acknowledgements

  • Big thanks to Prof. Ran for the course
  • Thanks to Gemini 2.0 and Claude Sonnet for transcribing a lot of equations

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

tensor_network_code-0.2.0.tar.gz (60.5 kB view details)

Uploaded Source

Built Distribution

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

tensor_network_code-0.2.0-py3-none-any.whl (78.5 kB view details)

Uploaded Python 3

File details

Details for the file tensor_network_code-0.2.0.tar.gz.

File metadata

  • Download URL: tensor_network_code-0.2.0.tar.gz
  • Upload date:
  • Size: 60.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.15

File hashes

Hashes for tensor_network_code-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9bcd55f5deee1ac7d5235a15b1e79bd3dbd2698a6b68271bf088ec46380e89c9
MD5 67a0d25d9bdd1dbdfc91d22054ec39a3
BLAKE2b-256 d16edc6ccc8cad5f39c02c24dd3d50f0f07b7d72887d2d04b9817e3b14e2d706

See more details on using hashes here.

File details

Details for the file tensor_network_code-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tensor_network_code-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8fcb984288ca102b214eb83e1f91a85c2bfef49ca2cb553c470f23cd3920bd2
MD5 73f4993305beb44d9bcb1f0a62f27262
BLAKE2b-256 ca19e2fb65e1bf017f0293c2ba8031c265bb4324e16f991fbf16951f495648fe

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