Skip to content

Python code for our paper "Adversarial Domain Adaptation for Identifying Phase Transitions"

License

Notifications You must be signed in to change notification settings

PatrickHuembeli/Adversarial-Domain-Adaptation-for-Identifying-Phase-Transitions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

This is the computational appendix for the following paper:

Patrick Huembeli, Alexandre Dauphin, Peter Wittek. Identifying Quantum Phase Transitions with Adversarial Neural Networks. Physical Review B, 97:134109, 2018. DOI:10.1103/PhysRevB.97.134109

DOI for this Git repository DOI

Installation

To train the DANN, you need a few changes to the Keras source files. We recommend to make a new environment for this. We assume that the Python distribution is Anaconda. Create and activate a new environment:

$ conda create -n dann anaconda
$ source activate dann

Replace training.py in /home/USERNAME/.conda/pkgs/keras-2.0.5-py36_0/lib/python3.6/site-packages/keras/engine by the training.py file in the folder. The file training_old.py is the original. Keep it, just in case. If the path cannot be found, start Python and type:

::python

import keras as ker 'ker.file'

Files to Generate States

Bose_Hubbard_Gutzwiller_coefficients.py

Bogoliubov_Kitaev.py

  • Produces Kitaev states

SSH_states_and_Winding_Nr.py

  • Produces SSH states for OBC and PBC and calculates also the winding number and gives a plot of it.

  • To do the same for long range SSH, replace the Hamiltonian in this file with the Hamiltonian from SSH_Long_Range_Hamiltonian.py.

Ising

  • Ising_energy_Gibbs_sampling.py generates the Ising configurations via Monte Carlo method. The code has been made faster by using the beginning of each Markov chain more than once.
  • CNN_Ising.py is a normal convolutional neural network, that can give the same output as the DANN.

Files for the neural network

Gradient_Reverse_Layer.py

DANN_helper_file.py

DANN_example.py

  • Main file for the DANN, with all the parameters.
  • First there is specified, which data has to be loaded. Then there is a section for the training, one for the preddiction / evaluation of the DANN, and the last part is to apply unsupervised techniques on the feature space directly.

training.py and training_old.py

  • training.py is the new file that has to be placed in the keras backend.
  • training_old.py is a backup of the original file.

About

Python code for our paper "Adversarial Domain Adaptation for Identifying Phase Transitions"

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages