Skip to main content

Reinforcement Learning Gym for OpenQL

Project description

OpenQL-Gym

Note: This library is still under development and might change severely.

A Reinforcement Learning gym for training agents on problems that occur frequently in quantum compilation. This library is focussed around the specific compiler known as OpenQL.

The gym supports two environments:

  1. Initial mapping: the problem of mapping virtual to physical qubits
  2. Scheduling: the problem of scheduling quantum gate operations such that hardware and commutation constraints are satisfied.

Tutorial notebooks

We provide some tutorial notebooks to get to know Reinforcement Learning and this library. These notebooks are found in the folder notebooks.

Installation

Below, we describe several steps for installing

Building and installing from source

To build a wheel from this source one can run the command below. This will create a built wheel in a folder called dist.

Make sure that pip, setuptools, wheel are up-to-date.

python setup.py bdist_wheel

Setting up the environment

Initially, make sure you have Python installed on your computer. The python version should be either 3.8 or 3.9, other versions are currently not supported.

You can check your Python version with the command python --version(Windows)/python3 --version(Unix).

Subsequently, open a terminal inside the folder containing the notebooks and execute the following commands. This will create a Python virtual environment and require the qgym package and its requirements in it.

Windows:

python -m venv venv
.\venv\Script\activate
pip install --upgrade pip setuptools wheel
pip install .\dist\qgym-0.1.0a0-py3-none-any.whl[tutorial]

Unix:

python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip setuptools wheel
pip install ./dist/qgym-0.1.0a0-py3-none-any.whl[tutorial]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qgym-0.0.1.tar.gz (55.3 kB view hashes)

Uploaded Source

Built Distribution

qgym-0.0.1-py3-none-any.whl (73.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page