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

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

Primary LanguagePythonMIT LicenseMIT

This is the computational appendix for the following paper:

Patrick Huembeli, Alexandre Dauphin, Peter Wittek. Adversarial Domain Adaptation for Identifying Phase Transitions. arXiv:1710.xxxxx, 2017.

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

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.