This is the repository for the CRC 183 summer school "Machine Learning in Condensed Matter Physics".
The badges above take you to servers of google colab or mybinder.org, where you can run the tutorial notebooks remotely.
In the hands-on sessions we will use JAX and the Netket library. Installing NetKet is relatively straightforward and it will automatically install JAX as a dependency.
For this Tutorial, if you are running it locally on your machine, we recommend that you create a clean virtual environment and install NetKet within:
python3 -m venv netket
source netket/bin/activate
pip install --pre netket
If you are wondering why we use the flag --pre
it is because today we will be working on a pre (beta) release of version 3.0.
If you are on Google Colab, run the following command in the first cell in order to install the required packages:
!pip install --pre -U netket
For the second session you will also have to clone this repository to the Colab directory:
!git clone https://github.com/CRC183-summer-school/school_2021.git
If you have anaconda installed, you can set up an environment with all required packages as follows:
- Install Jupyter notebook and the
nb_conda_kernels
package in the base environment
conda install -c conda-forge notebook
conda install -c conda-forge nb_conda_kernels
- Create a new environment
conda create --name <insert_name_here> python=3.8 pip ipykernel ipywidgets matplotlib
- Activate the new environment
conda activate <insert_name_here>
- Install Netket (and thereby the dependencies JAX and Flax)
pip install --pre netket
- Leave the new environment
conda deactivate
Now you can open Jupyter notebook from the command line (with your base
environment active) by entering
jupyter notebook
In the notebook you should be able to choose a kernel named Python [conda env:<insert_name_here>]
. When running this kernel, the libraries you just installed should be known.
Source: How to set up jupyter notebook to work with anaconda environments: https://towardsdatascience.com/how-to-set-up-anaconda-and-jupyter-notebook-the-right-way-de3b7623ea4a