Skip to main content
 ██████╗ ██████╗ ██╗
██╔═══██╗██╔══██╗██║
██║   ██║██████╔╝██║
██║▄▄ ██║██╔═══╝ ██║
╚██████╔╝██║     ██║
 ╚══▀▀═╝ ╚═╝     ╚═╝

QPI Python Client

PyPI version CI/CD Workflow GitHub Tag License

Python client SDK for the QPI quantum computing platform. Includes both a low-level HTTP client and a Qiskit-compatible backend.

📚 Read the Documentation


Install

pip install qpi-client

Requires Python ≥ 3.10.


Quick Start

Low-level client

from qpi_client import QPIClient

client = QPIClient("http://localhost:8090", api_token="my-token")

# Submit a job
job_id = client.submit_job([
    {"circuit": 'OPENQASM 3.0; include "stdgates.inc"; qubit[2] q; bit[2] c; h q[0]; cx q[0], q[1]; c = measure q;'}
], shots=1024)
print("Job ID:", job_id)

# Wait for completion
job = client.job(job_id)
result = job.result(timeout=120)
print(result.get_counts())

Qiskit integration

from qiskit.circuit import QuantumCircuit
from qpi_client import QPIClient

client = QPIClient("http://localhost:8090", api_token="my-token")
# The name is the QPU's; its qubit count is read from the server.
backend = client.get_backend("mock")

qc = QuantumCircuit(2, 2)
qc.h(0)
qc.cx(0, 1)
qc.measure([0, 1], [0, 1])

job = backend.run(qc, shots=4096)
result = job.result(timeout=120)
print(result.get_counts())

Submit raw QASM with parameters

job = backend.run(
    qasm='OPENQASM 3.0; include "stdgates.inc"; qubit[1] q; bit[1] c; rx({{theta}}) q[0]; c = measure q;',
    parameter_values=[[0.5], [1.0]],
    shots=1024
)
result = job.result()

API Overview

QPIClient

Method Description
QPIClient(base_url, api_token) Create a new client
submit_job(circuits, shots, ...) Submit a quantum job
job(job_id) Retrieve a job by ID (returns QPIJob)
list_jobs() List all jobs for the authenticated user
cancel_job(job_id) Request job cancellation
get_backend(name) Get a Qiskit-compatible backend

QPIBackend (Qiskit)

Method Description
backend.run(circuit, shots) Run a QuantumCircuit
backend.run(qasm, parameter_values, shots) Run raw QASM with parameter bindings
backend.job(job_id) Retrieve a past job

Documentation


License

MIT — see the main repository for 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_client-0.4.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

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

qpi_client-0.4.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file qpi_client-0.4.0.tar.gz.

File metadata

  • Download URL: qpi_client-0.4.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for qpi_client-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6d176dc7730494c01bd4ce9a6bc04eafd3ef42b69b2d3c2e91bd32b63b0516f5
MD5 67737018d5b2dc80f7394644f4797c07
BLAKE2b-256 1b743301f9518c4dbef75c61b23f31e9fc2e2635bbcb36dd5cbe34cb66d533fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for qpi_client-0.4.0.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_client-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: qpi_client-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for qpi_client-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 774ac823baf960ed3bccca2ec0795dfdc25456a8990900bd3cf8e3bc0b0de354
MD5 71e50e3ff7a37db17b4c251b67f4bc52
BLAKE2b-256 c1a1672b220e3d25ad2191ade86ae1dbad2f0f8df1a757381f9678eeb56aa7a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for qpi_client-0.4.0-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