PYPI PACKAGE AUDIT v1.1.1 Enterprise Healthy

qsolve-sdk

SDK for building reusable quantum and hybrid workflows on the Qsolve platform

PyPkgScore qsolve-sdk
Methodology & Criteria ♥ Donate
905 / 1000
Quick Install
pip install qsolve-sdk
1. Governance
150/200
2. PEP Metadata
200/200
3. Security
200/200
4. Docs & SEO
155/200
5. CI Engineering
200/200
📣 Share Audit: Share this report and visual preview in the current language
Advertisement
PYPI TELEMETRY

Downloads & Community Adoption

Last 30 days (without mirrors)
Last 7 days
322
Last 30 days
322
Total (180 days)
322
Metric / Ecosystem Status / Value Source
Downloads (30d / 180d) — PyPI Stats (without mirrors)
Trusted Publishing (PEP 740) ✓ Verified OIDC PyPI Integrity / Sigstore
Django Packages — djangopackages.org
PyTech / PyPkgScore 905 / 1000 PyPkgScore Engine

Health & Engineering Analysis (5 Pillars)

1. Governance & Community150 / 200 ▾
LICENSE✓ 50 pts
SECURITY.md✓ 50 pts
CONTRIBUTING.md✓ 50 pts
CODE_OF_CONDUCT.md✕ 0 pts
2. PEP Metadata & Packaging200 / 200 ▾
Wheel (.whl)✓ 50 pts
pyproject.toml✓ 50 pts
Project URLs✓ 50 pts
Trove Classifiers✓ 50 pts
3. Security & Supply Chain200 / 200 ▾
Zero CVEs (OSV)✓ 60 pts
Trusted Publishing (OIDC)✓ 50 pts
Snyk / Audit Link✓ 40 pts
HTTPS Repository✓ 50 pts
4. Documentation, SEO & Ecosystem155 / 200 ▾
Structured README✓ 60 pts
Read the Docs✓ 50 pts
Django Packages✕ 0 pts
Website / Technical Articles✓ 45 pts
5. Engineering, CI & Quality200 / 200 ▾
Automated Tests✓ 65 pts
GitHub Actions CI✓ 65 pts
CHANGELOG.md✓ 35 pts
Env & Lockfile (uv/rye/poetry/pdm/hatch)✓ 35 pts
Advertisement
README & DOCS

Official Documentation & Usage Guide — qsolve-sdk

PyPI Metadata v1.1.1
Show full original documentation (English README) ▾

qsolve-sdk

The bridge between a Qiskit workflow and the Qsolve platform. Qsolve is a platform where researchers find, benchmark and run quantum and hybrid workflows, judged against the best classical method. Documentation.

You write a workflow in plain Qiskit: your circuits, your algorithm, your error mitigation, your classical references. This SDK runs it on Qsolve's backends (CPU, GPU, QPU), records every circuit it sends and every count it gets back, runs every method you declare, re-evaluates the answers, measures the quantum run and validates the lot. If a workflow passes qsolve check on your laptop, it passes validation on the platform, because the platform runs the same three stages (validate, lint, test) with this same code in its sandbox. (The sandbox has no network and a fixed set of importable modules; qsolve lint tells you what it will refuse, and the contract lists the platform rules.)

The SDK contains no quantum algorithm. Qsolve does not compete with Qiskit: use Qiskit (and its ecosystem) for the quantum part.

Install

pip install qsolve-sdk
pip install "qsolve-sdk[ibm]"    # + the IBM runtime: device noise models and IBM hardware

Python 3.12 or newer (the version the Qsolve sandbox runs, so what passes here runs there), Qiskit 2.x. Install the ibm extra even if you never touch hardware: the fake:<device> noise-model targets, and the noise-model case in the scaffold's benchmarks, need it. Running on a real IBM device additionally needs your own token in the QSOLVE_IBM_TOKEN environment variable (optional QSOLVE_IBM_INSTANCE). qsolve --version prints the installed version.

Five-minute tour

qsolve init my-problem --summary "Pick the best depots"   # a complete Qiskit workflow to start from
cd my-problem
qsolve validate .                          # manifest, schemas, example inputs
qsolve lint .                              # secrets and imports the sandbox would reject
qsolve run . -i examples/qubo_5.json       # run on the CPU simulator
qsolve estimate . -i examples/qubo_5.json  # circuits and shots to expect, no execution
qsolve test .                              # the validation gates and benchmark cases
qsolve check .                             # validate + lint + test: the full pre-submission check

qsolve test does not run lint, and the platform does, so use qsolve check . before you submit: it runs the three stages in the platform's order and stops at the first failure. Every command exits non-zero on failure. The scaffold is a working QAOA workflow that passes every gate; change it step by step and re-run qsolve check . after each step.

src/workflow.py is the whole workflow:

from qsolve import Context, Outcome, Workflow


class Qubo(Workflow):
    def __init__(self, input, params): ...  # parse the input; raise WorkflowError for mistakes
    def size(self) -> int: ...  # qubits or variables
    def quantum(self, ctx: Context) -> Outcome:  # plain Qiskit: build circuits, run them via ctx
        counts = ctx.sampler.run([(circuit, params, shots)]).result()[0].data.meas.get_counts()
        ...

    def reference(self, ctx) -> Outcome: ...  # the classical answer you are judged against
    def classical_annealing(self, ctx) -> Outcome: ...  # any other classical method you declare
    def evaluate(
        self, solution
    ) -> float: ...  # the objective of a solution: Qsolve re-checks every method with it
    def answer(self, outcome) -> dict: ...  # the domain answer people read

qsolve.yaml declares the methods and says in plain words what each one is. Qsolve shows that text and measures every number itself.

Targets

Target Runs on
sim-cpu Qiskit Aer on the CPU (the default)
sim-gpu Qiskit Aer on a GPU; needs qiskit-aer-gpu
fake:<device>[@scale] Aer with an IBM device's published noise model, optionally with every error rate multiplied by scale, from 1 to 10 (for example fake:[email protected]); free; needs the ibm extra
ibm:<device> IBM Quantum hardware, with your own token in QSOLVE_IBM_TOKEN (needs the ibm extra); spends your own IBM quota

What Qsolve measures, and what it does not

All workflow code is untrusted. Qsolve guarantees: provenance (what ran, reproducibly, in a sandbox); boundary measurement (circuits, shots, depth, two-qubit gates and raw fidelity, computed from what actually crossed the backend); re-evaluation (each method's objective recomputed with your evaluate; a contradiction fails validation); that the quantum method really sent circuits; and honest cost (your estimate() is compared with what was sent). It cannot prove that your classical baseline is the best classical method, or that your error mitigation is legitimate: mitigated figures are labelled reported, next to the measured raw figures.

Public API

Everything a workflow imports is exported from qsolve: Workflow, Outcome, Context, WorkflowError, InvalidSolution, MethodUnavailable, QuantumNotAllowed, Estimate, Result, Provenance, Quality, Mitigation, Uncertainty, MethodResult, Metrics, CircuitStats, RunOutput, Manifest, load_workflow, run_workflow, estimate_run, MAX_SHOTS_PER_CIRCUIT (the most shots the platform runs per circuit, 100000) and __version__.

Compatibility. The SDK follows semantic versioning. Names in qsolve.__all__, the qsolve commands and the lint codes are public and stable: they change incompatibly only in a new major version, after a deprecating minor release, and every change is listed in CHANGELOG.md. Other modules (qsolve.backends, qsolve.metering, qsolve.benchmark, qsolve.lint, ...) are documented and importable but may change in a minor version. The executor protocol (qsolve.backends.remote), qsolve.sandbox_entry and every underscore-prefixed name are internal and may change in any release. Every public name, with signatures, parameters and examples, is in the SDK reference of the Qsolve documentation (Build a workflow, "SDK reference"), and every qsolve command and flag is in "The qsolve command line" there.

Documentation

Development

uv sync && uv run pytest && uv run ruff check src tests && uv run mypy src