Coder Social home page Coder Social logo

sampreet / quantrl Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 193 KB

A toolbox to interface reinforcement learning with quantum systems!

License: BSD 3-Clause Clear License

Python 100.00%
open-quantum-systems quantum-control reinforcement-learning stochastic-processes

quantrl's Introduction

QuantRL: Quantum Control using Reinforcement Learning

Latest Version

A library of modules to interface deterministic and stochastic quantum models for reinforcement learning.

Key Features!

  • Quickly interface environments for Reinforcement Learning using Stable-Baselines3.
  • Run multiple environments in parallel using vectorized inheritable classes.
  • Support for deterministic and stochastic linear environments.
  • Live visualization and learning curves.

What's New in v0.0.7

  • Added support for measurement noise in observations.
  • Updated stochastic environment for fast Wiener processes.
  • Asynchronous cache-dump to speed up environment evolution.
  • Callback to save best mean reward.

What's New in v0.0.6

  • Initialize environments with any of the three backends: NumPy, PyTorch and JAX.
  • Solve IVPs for the popular libraries TorchDiffEq and Diffrax.

Installation

QuantRL requires Python 3.10+, preferably installed via the Anaconda distribution. The toolbox primarily relies on gymnasium (for single environments) and stable-baselines3 (for vectorized environments). All of its dependencies can be installed using:

conda install "numpy<2.0.0" scipy matplotlib tqdm gymnasium stable-baselines3

Additionally, to avail the PyTorch or JAX backends, the latest version of these framework (for both CPU and GPU) should be installed (preferably in different conda environments) using in their official documentations: PyTorch docs and JAX docs. After successful installation, the corresponding libraries (torchdiffeq for PyTorch and diffrax for JAX) can be installed using PIP as:

pip install torchdiffeq

or,

pip install diffrax

Note: JAX-GPU support for Windows and MacOS is still limited but it runs well in WSL2.

Finally, to install the latest version of quantrl locally, download the repository as .zip and extract the contents, or clone the repository. Now, execute the following from outside the top-level directory, ROOT_DIR, inside which setup.py is located as:

pip install -e ROOT_DIR

quantrl's People

Contributors

sampreet 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.