Skip to main content

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


Download files

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

Source Distribution

qc_syn-0.1.0.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

qc_syn-0.1.0-py3-none-any.whl (6.0 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