A quantum circuit synthesis environment for reinforcement learning
Project description
Quantum Circuit Synthesis Environment for Reinforcement Learning
This project provides a quantum circuit synthesis environment for reinforcement learning. The environment is built on top of the Gymnasium framework.
Installation
To install the environment, you need to have Python and pip installed on your system. If you don't have them installed, you can download them from the official Python website.
Once you have Python and pip installed, you can install the environment by running the following command in your terminal:
pip install qc_syn
Usage
To create a new instance of the environment, you can use the gym.make
function:
import gymnasium as gym
import qc_syn
env = gym.make("qc_syn/QuantumCircuit-v0", qubit_count=4)
observation, info = env.reset()
for _ in range(1000):
action = env.action_space.sample() # agent policy that uses the observation and info
observation, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
observation, info = env.reset()
env.close()
Contributing
Contributions are welcome! Please feel free to submit a pull request.
License
This project is licensed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file qc_syn-0.1.0.tar.gz
.
File metadata
- Download URL: qc_syn-0.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58ea02f92c21c87ea9a285e73873f9a2e318231b1e885fe0ebd8824b14050f35 |
|
MD5 | 933d924745f4147dea74223b29804987 |
|
BLAKE2b-256 | 2964f6c62d10dad8037ecb90960b9ab58c8f0daf90f726218953c7daf9945abf |
File details
Details for the file qc_syn-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: qc_syn-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5819871df6bac74337dbd71736ea6dc7bf7bc3be3ff9cb350d1c0adaedbe9f5 |
|
MD5 | be7271fecdb5a413e730073007a2e17a |
|
BLAKE2b-256 | f05ce99f0ba85a7d30af34bf1d9bfe9accf69d19e7cb4b443c303ec0b07744cd |