Unified Python API for multi-backend quantum control on Xilinx RFSoC
Project description
RFSoC-PYNQ-Quantum
Unified Python API for multi-backend quantum control on Xilinx RFSoC.
Implements RFC #57 — a pynq.quantum package that unifies fragmented quantum control ecosystems (QICK, QubiC, custom HLS) under a standard Python API.
Features
- Multi-backend support — QICK, QubiC, generic HLS, and simulation backends behind one API
- NumPy simulation — Full state-vector simulator for development and CI (no hardware needed)
- Standard gate library — X, Y, Z, H, CNOT, CZ, RX, RY, RZ, S, T, SWAP, Toffoli
- Pulse compiler — Translates gate operations to calibrated pulse instructions
- Multi-board clustering — Distribute circuits across multiple RFSoC boards
- Qiskit/Cirq bridges — Run Qiskit or Cirq circuits on RFSoC hardware
- Pip-installable —
numpyis the only hard dependency
Install
# Core (simulation only — no hardware deps)
pip install pynq-quantum
# With specific backends
pip install pynq-quantum[qick]
pip install pynq-quantum[qubic]
pip install pynq-quantum[qiskit]
pip install pynq-quantum[cirq]
# Everything
pip install pynq-quantum[all]
# Development
pip install -e ".[dev]"
Quickstart
from pynq_quantum import QuantumOverlay, QubitController
# Create overlay with simulation backend (default)
overlay = QuantumOverlay(backend='simulation')
# Create controller for 2 qubits
qc = QubitController(overlay, num_qubits=2)
# Build a Bell state
qc.h(0)
qc.cnot(0, 1)
qc.measure([0, 1])
# Run 1000 shots
result = qc.run(shots=1000)
print(result.counts) # {'00': ~500, '11': ~500}
Using QuantumCircuit Builder
from pynq_quantum import QuantumOverlay, QuantumCircuit
overlay = QuantumOverlay(backend='simulation')
circuit = QuantumCircuit(2)
circuit.h(0)
circuit.cnot(0, 1)
circuit.measure_all()
result = circuit.run(overlay, shots=1000)
print(result.counts)
Qiskit Bridge
from pynq_quantum.bridges.qiskit import RFSoCBackend
from qiskit import QuantumCircuit, transpile
backend = RFSoCBackend() # Uses simulation by default
qc = QuantumCircuit(2, 2)
qc.h(0)
qc.cx(0, 1)
qc.measure([0, 1], [0, 1])
job = backend.run(transpile(qc, backend), shots=1000)
result = job.result()
print(result.get_counts())
Architecture
┌────────────────────────────────────────┐
│ User Application │
├────────────────────────────────────────┤
│ QuantumCircuit │ QubitController │
├──────────────────┴─────────────────────┤
│ PulseCompiler │
├────────────────────────────────────────┤
│ QuantumOverlay │
├──────┬──────┬──────┬───────────────────┤
│ QICK │QubiC │ HLS │ Simulation │
│ Back │ Back │ Back │ Backend │
│ end │ end │ end │ (NumPy) │
├──────┴──────┴──────┴───────────────────┤
│ RFSoC Hardware / Simulator │
└────────────────────────────────────────┘
Supported Boards
| Board | Backend | Status |
|---|---|---|
| ZCU111 | QICK | Supported |
| ZCU216 | QICK | Supported |
| RFSoC 4x2 | QICK / QubiC | Supported |
| RFSoC 2x2 | QICK / QubiC | Supported |
| Custom HLS | Generic | Supported |
| No hardware | Simulation | Default |
Development
git clone https://github.com/The-AI-Cowboys-Projects/RFSoC-PYNQ-Quantum.git
cd RFSoC-PYNQ-Quantum
pip install -e ".[dev]"
# Run tests
pytest tests/ -v --cov=pynq_quantum
# Lint
ruff check src/ tests/
ruff format --check src/ tests/
# Type check
mypy src/
License
BSD-3-Clause — see 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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pynq_quantum-0.1.1.tar.gz.
File metadata
- Download URL: pynq_quantum-0.1.1.tar.gz
- Upload date:
- Size: 50.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee1425289fe29d107eb4a32fc58c8d4639f69ffb2e4b2b89af529b95813085da
|
|
| MD5 |
f48b2c4070a78bdbab1eb79263bf80bf
|
|
| BLAKE2b-256 |
7acdef8bf402db8945426f325069a10fc5b8791c0c73e5eada629f3912eb228f
|
Provenance
The following attestation bundles were made for pynq_quantum-0.1.1.tar.gz:
Publisher:
ci.yml on The-AI-Cowboys-Projects/RFSoC-PYNQ-Quantum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pynq_quantum-0.1.1.tar.gz -
Subject digest:
ee1425289fe29d107eb4a32fc58c8d4639f69ffb2e4b2b89af529b95813085da - Sigstore transparency entry: 971684857
- Sigstore integration time:
-
Permalink:
The-AI-Cowboys-Projects/RFSoC-PYNQ-Quantum@6e7225d2a238831ccfcd3033261c436913b2517a -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/The-AI-Cowboys-Projects
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@6e7225d2a238831ccfcd3033261c436913b2517a -
Trigger Event:
release
-
Statement type:
File details
Details for the file pynq_quantum-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pynq_quantum-0.1.1-py3-none-any.whl
- Upload date:
- Size: 40.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9464e4a4228103b89879391c479f1083eabde7412171d6d0d708cb3553c677e1
|
|
| MD5 |
f96ab65ad514c922cd4595241c2ce0c8
|
|
| BLAKE2b-256 |
02084c307be0c31f3ebe43623a1a2a8fc15dce74989c87a297c9aad227ec30cf
|
Provenance
The following attestation bundles were made for pynq_quantum-0.1.1-py3-none-any.whl:
Publisher:
ci.yml on The-AI-Cowboys-Projects/RFSoC-PYNQ-Quantum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pynq_quantum-0.1.1-py3-none-any.whl -
Subject digest:
9464e4a4228103b89879391c479f1083eabde7412171d6d0d708cb3553c677e1 - Sigstore transparency entry: 971684879
- Sigstore integration time:
-
Permalink:
The-AI-Cowboys-Projects/RFSoC-PYNQ-Quantum@6e7225d2a238831ccfcd3033261c436913b2517a -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/The-AI-Cowboys-Projects
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@6e7225d2a238831ccfcd3033261c436913b2517a -
Trigger Event:
release
-
Statement type: