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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file qgym-0.0.1.tar.gz.

File metadata

  • Download URL: qgym-0.0.1.tar.gz
  • Upload date:
  • Size: 55.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for qgym-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4fb227bbc83ce5ef96233165d123638ce2096c49ca97880f4a81176979391254
MD5 b3e30daec2b096667b753120197604fc
BLAKE2b-256 385731f7befc9bf8d7c2f1aebd1eed861f1a4923bef9eeff41cc351f36354282

See more details on using hashes here.

File details

Details for the file qgym-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: qgym-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 73.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for qgym-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 84a95624375aa43ea551ec4bb9fe03494a7e3b41dc20dafa3b131748166c343d
MD5 2eca94439d1074fd0547aa7936eaa4f5
BLAKE2b-256 4fa169042c2a04dd5881ee68a38498ec06ffa9cb5f33c32c4c0498a0c4de6818

See more details on using hashes here.

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