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:
- If you have not got
uvinstalled, follow the instructions to install it. - Run
uv syncto 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 Labsync: sync the code in notebooks to thetensor_networkpackageformat: format the code in notebooks- Checking: use ruff linter to check code
check_tensor_network: check the exported code intensor_networkpackagecheck: check code in.check_all: check code in.andtensor_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
nbdevto export useful code from notebooks totensor_networkpackage for reusability. - Run
pre-commit install, oruv run pre-commit installif 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
Metadata
Release files for tensor-network-code 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tensor_network_code-0.2.0.tar.gz | 60.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tensor_network_code-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 139.1 kB
Release files / tensor_network_code-0.2.0.tar.gz
| Download URL | tensor_network_code-0.2.0.tar.gz |
|---|---|
| Size | 60.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9bcd55f5deee1ac7d5235a15b1e79bd3dbd2698a6b68271bf088ec46380e89c9
|
|
BLAKE2b-256 checksum How to use checksums |
d16edc6ccc8cad5f39c02c24dd3d50f0f07b7d72887d2d04b9817e3b14e2d706
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.15
|
Release files / tensor_network_code-0.2.0-py3-none-any.whl
| Download URL | tensor_network_code-0.2.0-py3-none-any.whl |
|---|---|
| Size | 78.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f8fcb984288ca102b214eb83e1f91a85c2bfef49ca2cb553c470f23cd3920bd2
|
|
BLAKE2b-256 checksum How to use checksums |
ca19e2fb65e1bf017f0293c2ba8031c265bb4324e16f991fbf16951f495648fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.15
|