Coder Social home page Coder Social logo

jhauschild / lecture_comp_methods Goto Github PK

View Code? Open in Web Editor NEW
60.0 5.0 7.0 4.91 MB

Tutorials for the lecture "Computational Methods in Many-Body Physics"

Home Page: https://www.cmt.ph.tum.de/index.php?id=65

License: MIT License

Python 2.38% Jupyter Notebook 97.62%
jupyter-notebooks lecture exercise-solutions exercises quantum-many-body

lecture_comp_methods's Introduction

Compuational Methods in Many-Body Physics

Authors: Prof. Frank Pollmann, Prof. Michael Knap, Johannes Hauschild

This is a set of tutorial codes and exercises for the lecture Compuational Methods in Many-Body Physics given at TU Munich in the summer term 2018. Lecture notes, exercise sheets and further references are available at the course web page: https://www.groups.ph.tum.de/cmt/teaching/archive/computational-methods-ss18/ (Password for the lecture notes upon request by Email) The codes are organized in folders by topics, since some of the exercises build on previous codes.

For some exercise, we provide some codes implementing various algorithms, as pure python 3 files with *.py filenames, and some data files, included in the folder exercises. The solutions to the exercise are provided as jupyter notebooks (formerly known as ipython notebooks), with sol*.ipynb filenames. If the exercise asked to modify a function, it is copied into the notebook, leaving the original templates *.py untouched as provided on the course webpage.

Setup

If you are completely new to python, a good introduction for our course are the scipy lectures

If you have a laptop, a very good python distribution is provided by Anaconda, available at https://www.anaconda.com/download. It ships with jupyter, uses Intel MKL and comes with the numba package.

The numba package is used in some of the codes for optimization. This brings in some cases a speed up of up to 100, installing numba is therefore highly recommended. If you really have big trouble installing numba, or find the error messages produced by it too confusing, you can copy the file numba.py providing a dummy @jit decorator into the other folders. The price is that you loose the speed-up...

On the work stations in the CIP pool at TUM, the intelpython distribution is installed. To start a jupyter notebook, follow these steps:

  1. Open a terminal
  2. Go to the directory where you keep your scripts/notebooks using cd some/directory
  3. On your laptop, enter jupyter notebook, or at the TUM workstations enter /mount/packs/intelpython35/bin/jupyter notebook This should start a local server opening a webpage in the browser (e.g. firefox), where you can create python notbooks etc. If you close the web page by accident, open the page http://localhost:8888/
  4. Do your calculations.
  5. Once you're done, stop the server in the terminal by pressing Ctrl-C and confirm with 'y'

We use the ipython magic %matplotlib inline to include plots showing the results directly in the notebooks.

Further references

lecture_comp_methods's People

Contributors

jhauschild avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lecture_comp_methods's Issues

non-hermitian H in ed_conserve.py

The code for ED with momentum conservation gives a non-hermitian Hamiltonian in some cases.
Example:

import ed_conserve
H2 = ed_conserve.calc_H(4, 1., 1.5)
print(H2)

automatic pyplot import

I seem to have had some automatic import pylab as pl or import matplotlib.pyplot as plt when I wrote these notebooks. In my current versions of jupyter notebook, this is no longer the case, so I guess we should replace all the py.plot* and so on by plt.plot* and import matplotlib.pyplot as plt explicitly in the beginning.

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.