Git Product home page Git Product logo

tenpy_toycodes's Introduction

Tutorials on Tensor Networks and Matrix product states

This is a set of tutorials used in various (Winter-/Summer-)Schools on Tensor Networks, e.g. from the European Tensor Network. Each school has it's on branch with the final notebooks used.

This "main" branch keeps a general set of notebooks that can be used as an introduction and that forms the basis for the tutorials in the various schools, and is also included into the main TeNPy documentation.

The tutorials are split into two parts as follows.

In the first part, the exercise_1_*.ipynb notebooks use a set of small "toy codes", small python scripts that require only Python with numpy + scipy + matplotlib. They should give you a good idea how the algorithms work without the need to understand a full library like TeNPy. These python files for this are in the folder tenpy_toycodes, and you need to look into them during the tutorials to see how they work. It should not be necessary to modify the python files, however; you can define all functions etc in the notebooks itself. This will ensure that the other notebooks using them keep working. The exercises itself are in interactive jupyter notebooks, where you can have code, output and plots together.

The exercise_tenpy.ipynb notebook is for the second part, and uses the TeNPy library to demonstrate first examples of calling TeNPy rather than the toycodes.

DISCLAIMER: The toycodes and examples used are not optimized, and we only use very small bond dimensions here to make sure everything runs quickly on a normal laptop. For state-of-the-art MPS calculations (especially for cylinders towards 2D), chi should be significantly larger, often on the order of several 1000s (and significantly more CPU time).

Some References

Setup

Running locally: If you have a working Python installation, feel free to solve all the exercises locally on your own computer. For the most part, you only need the *.ipynb notebooks and the tenpy_toycodes/ folder. For the second part, you need to install TeNPy, which is often just a conda install physics-tenpy or pip install physics-tenpy, depending on your setup.

Jupyter notebooks: We recommend solving the exercises interactively with jupyter notebooks. You can get it with conda install jupyterlab or pip install jupyterlab and then run jupyter-lab, which opens an interactive coding session in your web browser.

Running notebooks on Google colab: You can also use Google's colab cloud service to run the jupyter notebooks without any local installation. Use this option if you have any trouble with your local installation. However, you have to perform addiontal installs:

  • For the first part, exercise_1_*.ipynb, you need to make sure that you not only copy the notebooks itself onto google colab, but also the tenpy_toycodes/ folder (including the __init__.py file). Alternatively, install them by adding and executing a notebook cell !pip install git+https://github.com/tenpy/tenpy_toycodes.git at the top of the notebooks.
  • For the second part, exercise_tenpy.ipynb, you need to install TeNPy. On google colab, this can be done by adding and executing a notebook cell !pip install physics-tenpy at the top of the notebook.

License

All codes are released under GPL (v3) given in the file LICENSE, which means you can freely copy, share and distribute the code. They toycodes in the folder tenpy_toycodes have formerly been distributed directly from the TeNPy repository (also under the GPL).

tenpy_toycodes's People

Contributors

jhauschild avatar jakob-unfried avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.