Giter Site home page Giter Site logo

patrickhuembeli / adversarial-domain-adaptation-for-identifying-phase-transitions Goto Github PK

View Code? Open in Web Editor NEW
20.0 2.0 6.0 51 KB

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

License: MIT License

Python 100.00%

adversarial-domain-adaptation-for-identifying-phase-transitions's Introduction

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.

adversarial-domain-adaptation-for-identifying-phase-transitions's People

Contributors

peterwittek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.