Skip to content

lere01/tutorial_nqs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deep Learning for Physics

A tutorial to introduce Physicists to the idea of using Neural Networks for parameterizing wave functions. In our scenario, we combine variational monte carlo approach with a neural quantum state to search for the ground state of a 2D lattice of Rydberg atoms

The following resources were consulted for this tutorial. You can consult them for further knowledge.

With permission, code in the APRIQUOT repository was used in the transformer training

Check how to use for usage on different platforms

Physics of the Problem

Let us consider the physics of the problem.

  • We are looking at a 2D lattice of Rydberg atoms
  • We will be using the Rydberg Hamiltonian
  • We are assuming all-to-all interaction between all lattice sites

Goals

The learning objectives include

  • Seeing a deep learning model combined with variational ansatz to search for ground state
  • Learning how the Hamiltonian of the problem slots into a machine learning framework. Our loss function would be the expectation of the Hamiltonian
  • Using a trained network to compute observables of a system

Models

  • Recurrent Neural Network (Gated Recurrent Unit)
  • Transformer (with Multihead Self-Attention)

Language/Framework

Requirements

You should have both of the following installed on your local machine one way or the other

  • Python3
  • Git (You may need to download the folders as a compressed folder if you do not have git installed)

How to Use

Follow these instructions for usage. Max/Unix, Windows, Makefile

Unix/Mac

  1. Clone the repository:

    git clone https://github.com/lere01/tutorial_nqs.git
  2. Change directory:

    cd tutorial_nqs
  3. Run the setup script:

    bash run.sh

Remember to run chmod +x run.sh to make the script executable before running. Some unix based systems allow you to simply double-click on the file.

Windows

  1. Clone the repository:

    git clone https://github.com/lere01/tutorial_nqs.git
  2. Change directory:

    cd tutorial_nqs
  3. Run the setup script:

    run.bat

Note that opening the root directory in Windows Explorer and double clicking run.bat can also achieve the same thing.

Advanced Users (Makefile)

The advantage of the Make commands is the fine grained control you get over running/stopping the app and cleaning your environment. So if you already have make setup on your PC/Mac, then using the following commands would serve better.

  1. Run the setup and start the application:

    make run
  2. To stop the application:

    make stop
  3. To clean up the environment:

    make clean

These steps will ensure that the virtual environment is created, dependencies are installed, and the application is run, all with a single command, making it easier for you to get started.