Clifford Quantum Synthesis Circuit Models

Introduction

This repository hosts models for clifford synthesis in quantum circuits trained with RL techniques. The models are specialized for different topologies and qubit counts.

Clifford circuits transform stabilizer states by gates that map Pauli operators to Pauli operators, typically composed of H, S, and CNOT gates arranged under the device’s connectivity constraints. More info about Clifford circuits in Qiskit

For each model, there is the environment config (.json) and the trained policy weights (.safetensors).

Scope

  • Clifford synthesis models only.
  • Each model is tied to a specific qubit count and topology; use the matching pair for your target device/layout. To discover the specific topology for each model see the gateset property in the model's config.

Contents

  • clifford_*.json: model configs for a given qubit count/topology.
  • Matching .safetensors files: trained policies for each JSON (same filename stem).

Training

Training data is entirely synthetic and generated internally at IBM Quantum using custom reinforcement learning environments built on Qiskit-Gym.

Data Collection: Random clifford operators are generated by composing random CNOT, H and S gates sequences consistent with the target coupling map. The number of gates scales with the difficulty, which increase when the model learns to solve circuits at that difficulty. No external datasets or third-party circuit repositories are used.

PII: No personal or sensitive data is present or used in any phase of training, as all data is synthetic and generated algorithmically.

Infrastructure: We train the models using IBM's Cognitive Computing Cluster (CCC) using NVIDIA A100 40GB GPUs. The cluster provides a scalable and efficient infrastructure for training.

Usage example

Below is a snippet to synthesize a random 10-qubit clifford. We use qiskit-gym (repo), twisteRL (repo), and qiskit. Install dependencies via pip install qiskit-gym in your virtual environment.

from qiskit_gym.rl import RLSynthesis
from twisterl.utils import pull_hub_algorithm
from qiskit.quantum_info import random_clifford

repo_id = "Qiskit/ai-transpiler_cliffords"  # adjust if your repo name differs
model_stem = "clifford_9qL"                # replace with the stem of your model files

local_path = pull_hub_algorithm(
    repo_id=repo_id,
    model_path="./models",
    revision="main",
    validate=True,
)
if not local_path:
    raise ValueError("Failed to download Clifford model from hub")

num_qubits = 9
seed = 42
target_clifford = random_clifford(num_qubits, seed=seed)

rls = RLSynthesis.from_config_json(
    f"{local_path}/{model_stem}.json",
    f"{local_path}/{model_stem}.safetensors",
)

qc_clifford = rls.synth(
    target_clifford,
    num_searches=10,
    num_mcts_searches=0,
    deterministic=False,
)
print(qc_clifford)

Models

Below is the list of available models with qubit counts and topologies:

Acknowledgements

The authors acknowledge the IBM Research CCC Service for providing resources that have contributed to the production or processing of the data contained within this data collection.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including Qiskit/ai-transpiler_cliffords