Skip to main content

Official Python SDK for the QDevOps quantum reproducibility platform (qdevops.io).

Project description

qdevops-io — Python SDK

Official Python client for the QDevOps quantum reproducibility platform.

The distribution name on PyPI is qdevops-io; the import path is qdevops (same convention as python-dateutildateutil).

  • Submit Bell / GHZ / QFT / Grover / VQE circuits to the simulator, IBM Quantum, or AWS Braket
  • Poll runs to completion, fetch result payloads, diff two runs
  • Export pinned environment lockfiles
  • Publish results to the public benchmark dashboard at qdevops.io/bench

Install

pip install qdevops-io

Requires Python 3.10+.

Authenticate

Mint a personal access token at qdevops.io/account/tokens, then either:

export QDEVOPS_API_TOKEN="qass_pat_..."

…or pass it explicitly:

from qdevops import Client

qd = Client(api_token="qass_pat_...")

Quickstart — run a Bell state on the simulator

from qdevops import Client

with Client() as qd:
    run = qd.submit_run(
        project_id=42,
        circuit="bell",
        backend="simulator",
        params={"shots": 2048},
    )
    print("queued", run.run_id, run.circuit_hash)

    full = qd.wait_for_run(run.run_id, timeout=120)
    if full.status == "succeeded":
        print("counts:", full.result.get("counts"))
    else:
        print("failed:", full.failure_reason)

Compare backends

for backend in ("simulator", "ibm", "braket"):
    run = qd.submit_run(project_id=42, circuit="bell", backend=backend)
    finished = qd.wait_for_run(run.run_id)
    print(backend, finished.result.get("expectation"))

Publish a benchmark result

Requires a token with the benchmarks:write scope.

qd.publish_benchmark(
    circuit="bell",
    backend="simulator",
    commit_sha="abc1234",
    fidelity=0.984,
    shots=2048,
    duration_ms=210,
    sdk_version="0.1.1",
)

Errors

All non-2xx responses raise a subclass of qdevops.APIError:

Exception HTTP
AuthenticationError 401
ForbiddenError 403
NotFoundError 404
ConflictError 409
APIError (generic) 4xx/5xx

Client.wait_for_run raises qdevops.errors.TimeoutError if a run does not reach a terminal state within the requested timeout.

Reference

See the OpenAPI spec at api.qdevops.io/docs.

License

Proprietary © QDevOps.io

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

qdevops_io-0.1.1.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

qdevops_io-0.1.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file qdevops_io-0.1.1.tar.gz.

File metadata

  • Download URL: qdevops_io-0.1.1.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for qdevops_io-0.1.1.tar.gz
Algorithm Hash digest
SHA256 371efe7212f6383e3f270fcc1f0d758ba49a68fa15eedbc6c8b740f584981186
MD5 ff94c3292a572b14f28e35dcd3439a81
BLAKE2b-256 6d917a90b26f48ea7afe610045620846353b93454a84aa186cdee9835210e658

See more details on using hashes here.

File details

Details for the file qdevops_io-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: qdevops_io-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for qdevops_io-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6eecc68145a6a05c6eb889df1aaca23bc8e0a239249ae44be9e3406af3d14754
MD5 f7de5b0cb43c66b5449d32451907c550
BLAKE2b-256 636e9998d301b88cccc4403ab040992891892300f4c343e32f6e08fdbfc1ad46

See more details on using hashes here.

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