Giter VIP home page Giter VIP logo

entanglement-engineering-by-rl's Introduction

entanglement_engineering

System requirement

Windows 10, CPU

Setup

To set up the environment, open the Anaconda Prompt and run the following commands:

conda create -n qutip_RL python=3.9
conda env list
conda activate qutip_RL
pip install -r requirements.txt

File Placement for the Custom Quantum Environment

  1. Put all files from the directory .\cust_env\classical_control\ into the qutip_RL environment directory at C:\users\yourUserName\anaconda3\envs\qutip_RL\Lib\site-packages\gym\envs\classic_control\, replacing the original files.

  2. Copy the file from .\cust_env\__init__.py and paste it into C:\users\yourUserName\anaconda3\envs\qutip_RL\Lib\site-packages\gym\envs\__init__.py, replacing the original file.

Running the Code

Open spyder by running the following command in the Anaconda Prompt

spyder

Code Files

  1. Files with the suffix fig_plot are used for plotting figures.

  2. Files with the suffix fig_code are used for plotting partial figures.

  3. Files with the suffix fig_data are used for generating data for figures.

Tips

  1. When running the training code (e.g., training_fig2_data.py), you can copy it into a new directory named code_test. In this directory, you can try reducing the training load by setting parameters such as n_episode = 10, n_steps = 10, n_update = 2, and output_interval = 2. This will allow you to quickly test the code.

  2. The testing process in the code (e.g., test_ave_fig2_code.py) has the testing function (e.g., PPOtest) commented out and saves all testing data. You can simply plot all results by running such codes (e.g., test_ave_fig2_code.py) directly.

Data

The complete training results from Figures 4 to 8 and Figures S1 to S2 have been shared on Zenodo: [https://doi.org/10.5281/zenodo.12584159]

References

  1. Stable-baselines3 for the PPO agent: [https://stable-baselines3.readthedocs.io/en/master/index.html]

  2. Sb3-contrib for the recurrent PPO agent: [https://sb3-contrib.readthedocs.io/en/master/index.html]

  3. QuTip: [https://qutip.readthedocs.io/en/master/index.html]

entanglement-engineering-by-rl's People

Contributors

liliyequantum avatar

Stargazers

 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.