Giter Site home page Giter Site logo

toriccoderl's Introduction

ToricCodeRL

Contains the code for https://arxiv.org/abs/1811.12338

Quantum error correction for the toric code using deep reinforcement learning

Philip Andreasson, Joel Johansson, Simon Liljestrand, Mats Granath

Code for depolarizing noise: https://github.com/mats-granath/toric-RL-decoder

Training a new RL agent

  1. In AllSettings.py, choose the desired parameters for the training. The most important parameter to specify is the size of the training data to be generated.

  2. In the main method of GenerateData.py, specify the size of the toric code. Then run GenerateData.py to generate training data.

  3. Run run_train.py. The network parameters are saved in TrainedNetwork.h5.

Testing a trained RL agent

  1. Specify the name of the network that you want to test, in the constructor of run_ready.py. You can either use your own trained network or one of the three provided networks for sizes 3, 5 and 7.

  2. In the Generate method of GenerateData.py, specify the size of the toric code. This size must be the same as the trained network used.

  3. In the run method of run_ready.py, insert the error rates that you want to test in the array testProbs. The results are continually printed in the terminal.

toriccoderl's People

Contributors

mats-granath avatar bjoernjoel avatar phiandre avatar

Stargazers

 avatar Samuel Yen-Chi Chen avatar  avatar

Watchers

 avatar paper2code - bot avatar

Forkers

sgangoly

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.