The Quantum Engineering Platform: statistical testing, cost and execution intelligence, provider-agnostic plugins, spend guards, and observability for quantum programs
Project description
Qontinuum
The Quantum Engineering Platform โ statistical testing, cost & execution intelligence, provider-agnostic plugins, and observability for quantum programs.
๐ Website ยท ๐ Docs ยท ๐ Live demo dashboard ยท ๐ Explainer
Quantum programs don't return values โ they return probability distributions sampled from
noisy hardware. assert result == expected doesn't work, and nothing in the classical CI
toolchain knows that. Qontinuum does.
qont testโ a pytest-style runner for quantum circuits with statistical assertions: total variation distance with shots-aware soundness floors, chi-squared tests, Hellinger fidelity, and snapshot baselines committed as JSON.qont costโ estimates what your suite would cost on real hardware across providers (IonQ, Rigetti, IQM, AQT via Braket; IBM; Azure Quantum) before you spend a cent.qont routeโ recommends hardware for your workload: estimated success probability ร price, ranked by--optimize cost|fidelity|value.qont recommend/plan/healthโ execution intelligence: rank devices under six strategies with a plain-English explanation of every choice, produce a concrete execution plan with fallbacks, and score per-device reliability from calibration + your run history.qont run --on ibm:โฆ --max-cost 5โ executes the suite on real hardware behind an all-or-nothing spend guard (default budget: $0 โ it refuses until you authorize).qont ciโ one command for CI: run the suite, write a markdown report.qont dashboardโ renders run history as a self-contained HTML observability dashboard (status timeline, per-check statistic trends vs thresholds).qont diff/qont hashโ semantic, register-name-agnostic circuit diffing and content addressing.- GitHub Action โ posts a sticky PR comment with regression results and the cost table.
- Noise-aware testing โ simulate against real IBM device calibration data, offline, for free.
- Plugin ecosystem โ providers, simulator backends, and SDKs are plugins; Qiskit, QASM 2/3, Cirq, PennyLane, IBM, and Braket ship built in, and you can add your own via entry points without forking.
โฆand that's just the core. v0.4 is the Quantum Engineering Platform โ 116 commands translating the DevOps stack to quantum:
qont lint |
ruff for quantum tests โ 9 rules incl. the statistical soundness floor (Q001) |
qont noise headroom |
load-testing for quantum โ how much calibration drift survives your test? |
qont history bisect |
git-bisect for physics โ which run first crossed the threshold? |
qont budget |
QPU FinOps โ monthly/total caps enforced before submission |
qont test --cached |
build caching for simulation โ content-addressed seeded results |
qont fuzz |
flakiness hunting โ empirical pass rates with Wilson intervals |
qont pack |
reproducibility bundles โ verify re-runs and two-sample-compares |
qont shots plan |
shot-count audits โ the napkin statistics, mechanized |
qont report junit |
quantum checks rendered natively in Jenkins/GitLab/Buildkite |
qont explain |
failure forensics: which outcomes drove the statistic, and why |
qont recommend / plan / health |
execution intelligence โ reason about where to run: fidelity, cost, speed, reliability, with explanations |
qont plugin |
provider-, backend-, and SDK-agnostic โ add hardware or SDKs via plugins, no fork |
+ circuit device registry stats bench watch config env doctor init mock schedule โฆ |
the full plumbing |
Install
pip install qontinuum # core
pip install 'qontinuum[ibm]' # + IBM calibration noise models
Quick start
Write a quantum test in any file named q_test_*.py:
from qiskit import QuantumCircuit
from qontinuum import qtest, assert_distribution
@qtest(shots=4000)
def bell_pair():
qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)
qc.measure_all()
return qc
@bell_pair.check
def is_maximally_entangled(result):
assert_distribution(result, {"00": 0.5, "11": 0.5}, tvd_threshold=0.05)
$ qont test
โ q_test_bell.py::bell_pair aer, 4000 shots, 30 ms
โ is_maximally_entangled
1 passed, 0 failed, 0 errors
Statistics done right
Sampling noise means even a perfect circuit never reproduces a distribution exactly. Every assertion is shots-aware: if your threshold is below what the shot count can statistically resolve, Qontinuum refuses to run a test that would be flaky by construction โ and tells you the shot count that would fix it:
! is_maximally_entangled tvd_threshold=0.01 is below the sampling noise floor 0.0289
at 4000 shots: even a perfect result would fail ~1% of the time.
Use at least 33380 shots or raise the threshold to >= 0.0289.
Test against real hardware noise โ offline and free
@qtest(shots=4000, backend="ibm:manila") # bundled real calibration snapshot
def bell_under_noise(): ...
@qtest(shots=4000, backend="ibm:brisbane@live") # today's live calibration (free IBM account)
def bell_today(): ...
Snapshot testing for quantum
@qtest(shots=4000, snapshot=True)
def ghz_5(): ...
qont snapshot update records the distribution as a golden baseline (keyed by the
circuit's content hash). Later runs are compared with a two-sample homogeneity test โ
if the circuit changes, the snapshot is flagged stale for review, exactly like Jest.
Know the cost before you run on hardware
$ qont cost
Estimated hardware cost โ 3 test(s), 12000 total shots
โ Provider โ Device โ Est. cost โ
โ AWS Braket โ Rigetti Cepheus โ $6.00 โ
โ IBM Quantum โ Heron (Pay-As-You-Go) โ $9.61 โ
โ AWS Braket โ IQM Garnet โ $18.30 โ
โ Azure Quantum โ IonQ Aria 1 โ $63.29 โ
โ AWS Braket โ IonQ Forte โ $960.90 โ
โ Azure Quantum โ Quantinuum H2 โ 137.4 HQC โ
Same suite, $6 or $961, depending on where you run it. That's why this table belongs on every pull request.
Route to the right hardware
$ qont route --optimize value
โ # โ Provider โ Device โ Est. success/shot โ Est. cost โ $ / success โ
โ 1 โ AWS Braket โ Rigetti Cepheus โ 71.0% โ $10.00 โ $14.08 โ
โ 2 โ IBM Quantum โ Heron (PAYG) โ 93.3% โ $16.01 โ $17.17 โ
Cheap-but-noisy vs pricey-but-clean, resolved with one number.
Run on real hardware โ without surprise bills
qont run --on ibm:ibm_brisbane --dry-run --max-cost 5 # estimate only
qont run --on braket:rigetti_cepheus --max-cost 5 # refuses if estimate > $5
The guard is all-or-nothing: the whole suite is priced before the first shot is submitted, and the default budget is $0.
Watch your suite over time
Every run appends to .qontinuum/history.jsonl; qont dashboard turns it into a
single-file HTML dashboard โ status timeline, each check's statistic trending against
its threshold, cost per run. No server, no JavaScript, works as a CI artifact.
Diff circuits, not files
$ qont diff old.qasm new.qasm
- cx q[0, 1]
+ cx q[1, 0]
1 ops added, 1 removed
Register renames and formatting don't show up โ only semantic changes do (the same canonicalization that powers snapshot staleness detection).
GitHub Action
# .github/workflows/quantum.yml
on: pull_request
permissions:
contents: read
pull-requests: write
jobs:
quantum:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: XTanishkX/quantum/action@main
with:
path: .
seed: "42"
Every PR gets one sticky comment (updated in place) with pass/fail per check and the hardware cost table โ see a live one on PR #1.
Assertions
| Assertion | What it tests |
|---|---|
assert_distribution(result, expected, tvd_threshold=) |
TVD against an expected distribution, with sampling-floor soundness check |
assert_chi_squared(result, expected, alpha=) |
Pearson goodness-of-fit |
assert_fidelity(result, expected, min_fidelity=) |
Hellinger (classical) fidelity |
assert_probability(result, outcome, min_p=, max_p=) |
Single-outcome probability bounds |
assert_matches_baseline(result, counts, alpha=) |
Two-sample test vs a recorded run |
License
Apache-2.0
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
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 qontinuum-0.4.0.tar.gz.
File metadata
- Download URL: qontinuum-0.4.0.tar.gz
- Upload date:
- Size: 167.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
262ec7dd90f97fdee2ee3090b94396b8701d85be7a6abee69d8d604a247f8d8a
|
|
| MD5 |
757996e58cd377b5aa5e47b4bd61bc90
|
|
| BLAKE2b-256 |
cba7010ab0cfedc33c22379c6ed2e690c6559ddb1c12c4734e37167b2f0971fd
|
Provenance
The following attestation bundles were made for qontinuum-0.4.0.tar.gz:
Publisher:
release.yml on XTanishkX/quantum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qontinuum-0.4.0.tar.gz -
Subject digest:
262ec7dd90f97fdee2ee3090b94396b8701d85be7a6abee69d8d604a247f8d8a - Sigstore transparency entry: 2172837833
- Sigstore integration time:
-
Permalink:
XTanishkX/quantum@6c472789a24c021be38ddfd1e4427d5aec9b46f2 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/XTanishkX
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6c472789a24c021be38ddfd1e4427d5aec9b46f2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file qontinuum-0.4.0-py3-none-any.whl.
File metadata
- Download URL: qontinuum-0.4.0-py3-none-any.whl
- Upload date:
- Size: 134.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0eebd201bdde92fddecbc40cf58cc630da799d6a435ee2c201a37664db0ef7a4
|
|
| MD5 |
1c41b5668f320836843e601a641e9c41
|
|
| BLAKE2b-256 |
de2ef6f50509351b7a671f3c785f7fea7ab4e7af93a1905a516ce7b5b0a7d170
|
Provenance
The following attestation bundles were made for qontinuum-0.4.0-py3-none-any.whl:
Publisher:
release.yml on XTanishkX/quantum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qontinuum-0.4.0-py3-none-any.whl -
Subject digest:
0eebd201bdde92fddecbc40cf58cc630da799d6a435ee2c201a37664db0ef7a4 - Sigstore transparency entry: 2172837900
- Sigstore integration time:
-
Permalink:
XTanishkX/quantum@6c472789a24c021be38ddfd1e4427d5aec9b46f2 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/XTanishkX
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6c472789a24c021be38ddfd1e4427d5aec9b46f2 -
Trigger Event:
push
-
Statement type: