Skip to main content

Quantum Processing Interface (QPI) Hardware Driver

Project description

 ██████╗ ██████╗ ██╗
██╔═══██╗██╔══██╗██║
██║   ██║██████╔╝██║
██║▄▄ ██║██╔═══╝ ██║
╚██████╔╝██║     ██║
 ╚══▀▀═╝ ╚═╝     ╚═╝

QPI Hardware Driver

PyPI version CI/CD Workflow GitHub Tag License

Python hardware driver for the QPI quantum computing platform. Runs on isolated hardware nodes controlling the QPU via multiple executor backends.

📚 Read the Documentation


Install

Base package (mock executor)

pip install qpi-driver

With CLI support

pip install "qpi-driver[cli]"

With Qiskit Aer simulator

pip install "qpi-driver[aer]"

With Quantify/Qblox hardware support

pip install "qpi-driver[quantify]"

Requires Python ≥ 3.12, < 3.13.


Quick Start

CLI

# Connect a mock QPU to the orchestrator
qpi-driver start \
  --qpi-addr http://localhost:8090 \
  --token <qpu-access-token> \
  --ca-fingerprint <fingerprint> \
  --name qpu_sim_01 \
  --executor mock \
  --data-dir ./data

Environment variables are also supported:

export QPI_ADDR=http://localhost:8090
export QPI_ACCESS_TOKEN=<token>
export QPI_CA_FINGERPRINT=<fingerprint>
export QPU_NAME=qpu_sim_01
export DRIVER_BACKEND=mock
qpi-driver start

Python API

from qpi_driver import run_driver

run_driver(
    qpi_addr="http://localhost:8090",
    token="<qpu-access-token>",
    ca_fingerprint="<fingerprint>",
    name="qpu_sim_01",
    executor="mock",
    data_dir="./data",
)

Custom executor

from qpi_driver import Executor, run_driver
from qpi_driver.executors.mock import MockExecutor

class MyCustomExecutor(Executor):
    def execute(self, payload):
        # Your QPU-specific execution logic
        ...

run_driver(
    qpi_addr="http://localhost:8090",
    token="<token>",
    ca_fingerprint="<fingerprint>",
    name="my_qpu",
    executor="custom",
    custom_executor=MyCustomExecutor(),
)

Executor Backends

Backend Description Extra
mock Qiskit BasicSimulator (default)
qiskit_aer Qiskit Aer simulator [aer]
quantify Quantify-scheduler + Qblox instruments [quantify]
qblox Qblox scheduler (legacy) [qblox]

Architecture

The driver uses Python's multiprocessing library to isolate responsibilities:

  • Main Process: NNG PULL listener, receives commands from orchestrator
  • Worker Process: Executes quantum circuits via the configured executor
  • Result Sender Process: NNG PUSH, sends results back to orchestrator
┌─────────────┐     NNG PUSH      ┌─────────────────┐
│ Orchestrator│ ────────────────> │  Main Process   │
│  Dispatcher │                   │  (PULL listener)│
└─────────────┘                   └────────┬────────┘
                                           │
                              multiprocessing.Queue
                                           │
                                           ▼
                                   ┌───────────────┐
                                   │ Worker Process│
                                   │  (Executor)   │
                                   └───────┬───────┘
                                           │
                              multiprocessing.Queue
                                           │
                                           ▼
                                   ┌───────────────┐
                                   │Result Sender  │
                                   │  (PUSH)       │
                                   └───────┬───────┘
                                           │ NNG PUSH
                                           ▼
                                   ┌───────────────┐
                                   │  Orchestrator │
                                   │   Listener    │
                                   └───────────────┘

CLI Reference

qpi-driver start [OPTIONS]

Options:
  -a, --qpi-addr TEXT          QPI orchestrator URL [env: QPI_ADDR]
  -t, --token TEXT             QPU access token [env: QPI_ACCESS_TOKEN]
  -n, --name TEXT              QPU name [env: QPU_NAME]
  -e, --executor TEXT          Backend: mock, qiskit_aer, quantify, qblox, presto [env: DRIVER_BACKEND]
  -d, --data-dir PATH          Data directory [env: QPI_DATA_DIR]
  --is-dummy                   Run in dummy/simulation mode
  --quantify-hardware-config PATH  Quantify hardware config [env: QPI_QUANTIFY_HARDWARE_CONFIG]
  --quantify-device-config PATH    Quantify device config [env: QPI_QUANTIFY_DEVICE_CONFIG]
  --job-timeout INTEGER        Job timeout in seconds [env: QPI_JOB_TIMEOUT]
  --ca-file PATH               Path to the CA root certificate [env: QPI_CA_FILE]
  --ca-fingerprint TEXT        Fingerprint to verify the CA root certificate [env: QPI_CA_FINGERPRINT]
  --help                       Show this message and exit.

Documentation


License

MIT — see the main repository for details.

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

qpi_driver-0.0.13.tar.gz (35.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qpi_driver-0.0.13-py3-none-any.whl (40.0 kB view details)

Uploaded Python 3

File details

Details for the file qpi_driver-0.0.13.tar.gz.

File metadata

  • Download URL: qpi_driver-0.0.13.tar.gz
  • Upload date:
  • Size: 35.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qpi_driver-0.0.13.tar.gz
Algorithm Hash digest
SHA256 21de0c735f66657c29f83aaa80f16afdd737a90c2bfbaedd78b32e0bfcc88c67
MD5 bf1a1cb7f8332ea86d2eaaebf2670cd9
BLAKE2b-256 137ffdf9177d6dd60f84a3c85e7256ddc53161ba8c36a5c2546b14b0e84afc64

See more details on using hashes here.

Provenance

The following attestation bundles were made for qpi_driver-0.0.13.tar.gz:

Publisher: ci.yml on sopherapps/qpi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qpi_driver-0.0.13-py3-none-any.whl.

File metadata

  • Download URL: qpi_driver-0.0.13-py3-none-any.whl
  • Upload date:
  • Size: 40.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qpi_driver-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 ab8cd1f2fb3747459d14dfc0868f15d72c365e38f45785ec2a2ddcf7e7c701d3
MD5 8a73978e9a30cc29b561f0b13e7159f7
BLAKE2b-256 8f84d947ea1218cbda0558e222431646dc5304bd3c5628d0b6f5e3b68a61dccc

See more details on using hashes here.

Provenance

The following attestation bundles were made for qpi_driver-0.0.13-py3-none-any.whl:

Publisher: ci.yml on sopherapps/qpi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page