Skip to main content

Simulation of quantum many-body systems with tensor networks in Python

Project description

GitHub last commit Documentation Build GitHub issues conda PyPi

TeNPy (short for ‘Tensor Network Python’) is a Python library for the simulation of strongly correlated quantum systems with tensor networks.

The philosophy of this library is to get a new balance of a good readability and usability for new-comers, and at the same time powerful algorithms and fast development of new algorithms for experts. For good readability, we include an extensive documentation next to the code, both in Python doc strings and separately as user guides, as well as simple example codes and even toy codes, which just demonstrate various algorithms (like TEBD and DMRG) in ~100 lines per file.

How do I get set up?

If you have the conda package manager, you can install the latest released version of TeNPy with:

conda install --channel=conda-forge physics-tenpy

Further details and alternative methods can be found the file doc/INSTALL.rst. The latest version of the source code can be obtained from https://github.com/tenpy/tenpy.

How to read the documentation

The documentation is available online at https://tenpy.readthedocs.io/. The documentation is roughly split in two parts: on one hand the full “reference” containing the documentation of all functions, classes, methods, etc., and on the other hand the “user guide” containing some introductions and additional explanations.

The documentation is based on Python’s docstrings, and some additional *.rst files located in the folder doc/ of the repository. All documentation is formated as reStructuredText, which means it is quite readable in the source plain text, but can also be converted to other formats. If you like it simple, you can just use intective python help(), Python IDEs of your choice or jupyter notebooks, or just read the source. Moreover, the documentation gets converted into HTML using Sphinx, and is made available online at https://tenpy.readthedocs.io/. The big advantages of the (online) HTML documentation are a lot of cross-links between different functions, and even a search function. If you prefer yet another format, you can try to build the documentation yourself, as described in doc/contr/build_doc.rst.

Help - I looked at the documentation, but I don’t understand how …?

We have set up a community forum at https://tenpy.johannes-hauschild.de/, where you can post questions and hopefully find answers. Once you got some experience with TeNPy, you might also be able to contribute to the community and answer some questions yourself ;-) We also use this forum for official annoucements, for example when we release a new version.

I found a bug

You might want to check the github issues, if someone else already reported the same problem. To report a new bug, just open a new issue on github. If you already know how to fix it, you can just create a pull request :) If you are not sure whether your problem is a bug or a feature, you can also ask for help in the TeNPy forum.

Citing TeNPy

When you use TeNPy for a work published in an academic journal, you can cite this paper to acknowledge the work put into the development of TeNPy. (The license of TeNPy does not force you, however.) For example, you could add the sentence "Calculations were performed using the TeNPy Library (version X.X.X)\cite{tenpy}." in the acknowledgements or in the main text.

The corresponding BibTex Entry would be the following (the \url{...} requires \usepackage{hyperref} in the LaTeX preamble.):

@Article{tenpy,
    title={{Efficient numerical simulations with Tensor Networks: Tensor Network Python (TeNPy)}},
    author={Johannes Hauschild and Frank Pollmann},
    journal={SciPost Phys. Lect. Notes},
    pages={5},
    year={2018},
    publisher={SciPost},
    doi={10.21468/SciPostPhysLectNotes.5},
    url={https://scipost.org/10.21468/SciPostPhysLectNotes.5},
    archiveprefix={arXiv},
    eprint={1805.00055},
    note={Code available from \url{https://github.com/tenpy/tenpy}},
}

To keep us motivated, you can also include your work into the list of papers using TeNPy.

Acknowledgment

This work was funded by the U.S. Department of Energy, Office of Science, Office of Basic Energy Sciences, Materials Sciences and Engineering Division under Contract No. DE-AC02-05- CH11231 through the Scientific Discovery through Advanced Computing (SciDAC) program (KC23DAC Topological and Correlated Matter via Tensor Networks and Quantum Monte Carlo).

License

The code is licensed under GPL-v3.0 given in the file LICENSE of the repository, in the online documentation readable at https://tenpy.readthedocs.io/en/latest/install/license.html.

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

physics-tenpy-0.7.2.tar.gz (671.5 kB view details)

Uploaded Source

Built Distribution

physics_tenpy-0.7.2-py3.7-linux-x86_64.egg (1.7 MB view details)

Uploaded Source

File details

Details for the file physics-tenpy-0.7.2.tar.gz.

File metadata

  • Download URL: physics-tenpy-0.7.2.tar.gz
  • Upload date:
  • Size: 671.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for physics-tenpy-0.7.2.tar.gz
Algorithm Hash digest
SHA256 f6a701e31e48b9e1486a5781f6ca795f5f60f6d892c68f92cccdc8b2da73bb20
MD5 44749fc5ff077ca6f7a662d5a33d6850
BLAKE2b-256 835072e930cced98dc28ff37dcf5e7f810e8f50120ad4f37e05e11931d75fab0

See more details on using hashes here.

File details

Details for the file physics_tenpy-0.7.2-py3.7-linux-x86_64.egg.

File metadata

  • Download URL: physics_tenpy-0.7.2-py3.7-linux-x86_64.egg
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for physics_tenpy-0.7.2-py3.7-linux-x86_64.egg
Algorithm Hash digest
SHA256 89b7add511f3ac6542628fc6ff88606aefb562899072ff60b53bb40c46aeb251
MD5 4176c024dcd60723b51c3c0893b70214
BLAKE2b-256 35b1b91a87b4bb099eab973f359b937ebf740eb002bf3f9e298956c4e8b5ecda

See more details on using hashes here.

Supported by

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