hf-banner-ai-transpiler_paulis

Pauli Network Quantum Synthesis Circuit Models

Introduction

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

Pauli networks are circuits made of Clifford gates (H, S, SX, CX) interleaved with single-qubit Pauli rotations (RX, RY, RZ), arranged under the device connectivity constraints. More info about Pauli gates and Clifford circuits in Qiskit.

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

Scope

  • Pauli network 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

  • pauli_*.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 Pauli networks are generated by composing random Clifford layers and inserting random Pauli rotations (RX/RY/RZ) 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 Pauli network. 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 import QuantumCircuit
from qiskit.quantum_info import random_clifford
import numpy as np

repo_id = "Qiskit/ai-transpiler_paulis"  # adjust if your repo name differs
model_stem = "pauli_6qL"                 # 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 Pauli model from hub")

num_qubits = 6
seed = 42
rng = np.random.default_rng(seed)

qc = QuantumCircuit(num_qubits)
qc.compose(random_clifford(num_qubits, seed=seed).to_circuit(), inplace=True)

for _ in range(3):
    angle = rng.uniform(0.1, np.pi)
    gate_name = rng.choice(["rx", "ry", "rz"])
    qubit = rng.integers(0, num_qubits)
    getattr(qc, gate_name)(angle, qubit)

rls = RLSynthesis.from_config_json(
    f"{local_path}/{model_stem}.json",
    f"{local_path}/{model_stem}.safetensors",
)
qc_pauli = rls.synth(qc, num_searches=10, num_mcts_searches=0, deterministic=False)
print(qc_pauli)

Models

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

Model Qubits Topology
pauli_4qL 4 L
pauli_4qT 4 T
pauli_5qL 5 L
pauli_5qT 5 T
pauli_6qL 6 L
pauli_6qT 6 T
pauli_6qY 6 Y

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
113
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including Qiskit/ai-transpiler_paulis