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
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'
- Code partially from https://github.com/tcompa/BoseHubbardGutzwiller, install these files to use our code.
- With this file we generated the Gutzwiller coefficients.
- Produces Kitaev states
-
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_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.
- Code from keras-team/keras#3119 (comment).
- Needs to be in same folder as DANN main file
DANN_example.py
.
- Summerizes all the important building blocks from https://github.com/fchollet/keras/pull/4031/files.
- Needs to be in same folder as DANN main file
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
is the new file that has to be placed in the keras backend.training_old.py
is a backup of the original file.