Re-landed from PR #668 (branch wai/quantum-planner-contract, merged with main
495651ddd at 37350335b) as one commit on main, under the land-it model. Five
review rounds; round 5's findings (two high: workers that died as PID 1) were
fixed on the branch, and its CI reds were traced and fixed before landing.
A job may carry a contract (deadline, energy ceiling, cost, accuracy); the
planner chooses a route that meets it or refuses with every route's reason,
and its reasoning is sealed in the receipt. Under #676's reading child the
contract job is planned in the child from the per-method timings the parent
sends, bounded as a job naming its chosen method plus its reasoning, kept
across a restart. Both verifiers (Rust and receipt_verify.py) check the
planner statement beside wasmQ's; the receipts corpus is regenerated with
both kinds (268 crafted receipts, 14 plants caught). The views page carries
its engine raw-deflated and stays under its 1 MiB limit (669,484 bytes).
Passed before the push (Framework, linux; M3, macOS): every repository
check, receipts conformance, breaking, corpora, catalogue, the qpu clients,
energy (wai-rs, wai-quantum full, serve), the CLI tests and clippy, writer,
smoke, cross-simulator corpus, job receipts, wasmQ tests and vectors, the
engine with and without receipts under -D warnings, the docs pages, and the
service suite with clippy.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
437 lines
13 KiB
JSON
437 lines
13 KiB
JSON
{
|
|
"status": "done",
|
|
"method": "provider",
|
|
"why": "on lab, prx-circuits:test-qc (prx-circuits): compiled exactly to prxcz on its qubits and checked by simulation here before it was sent",
|
|
"request": {
|
|
"qasm": "OPENQASM 3.0;\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n",
|
|
"provider": "lab",
|
|
"shots": 400,
|
|
"seed": 5,
|
|
"contract": {
|
|
"providers": "allowed",
|
|
"exactness": "measured"
|
|
}
|
|
},
|
|
"result": {
|
|
"method": "provider",
|
|
"qubits": 2,
|
|
"gates": 2,
|
|
"accuracy": {
|
|
"class": "measured",
|
|
"note": "counts from the processor the provider names, read as counts_source says (shot records, the provider's own counts, or counts rebuilt from probabilities); not reproducible by recomputation: the same job run again gives other counts, and no simulation stands in for them; what was set off at the provider, and what was left to its defaults, is in execution"
|
|
},
|
|
"shots": 400,
|
|
"provider": {
|
|
"name": "lab",
|
|
"kind": "prx-circuits",
|
|
"protocol": "prx-circuits",
|
|
"device": "prx-circuits:test-qc",
|
|
"provenance": "silicon",
|
|
"qubits": 5,
|
|
"basis": "prxcz",
|
|
"describe": "1f6d996884468f37481db4e20932d6c0ecb84ebbbf4232f734080c61ab9fae66"
|
|
},
|
|
"calibration": null,
|
|
"compiled": {
|
|
"basis": "prxcz",
|
|
"program": "12123632bbbc70df6b58c3103f50479a72211ba109a01d9e3a581c703f160dad",
|
|
"hash": "BLAKE3 of the program's OpenQASM 3 text, qasm3",
|
|
"qasm3": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\ngate prx(theta, phi) a { rz(-phi) a; rx(theta) a; rz(phi) a; }\nbit[2] c;\nprx(pi/2, -pi/2) $0;\nprx(pi/2, -pi/2) $1;\ncz $0, $1;\nprx(pi/2, pi/2) $1;\nc[0] = measure $0;\nc[1] = measure $1;\n",
|
|
"native_gates": 4,
|
|
"two_qubit_gates": 1,
|
|
"swaps": 0,
|
|
"layout": [
|
|
0,
|
|
1
|
|
],
|
|
"final_layout": [
|
|
0,
|
|
1
|
|
],
|
|
"checked": "the compiled program's final state equals the circuit's, each logical qubit on the physical qubit it ends on, by the bit-exact simulator here; nothing has been sent",
|
|
"qubit_names": {
|
|
"0": "QB1",
|
|
"1": "QB2"
|
|
},
|
|
"placement": {
|
|
"chosen": "the compiler's own layout, the fewest swaps: the description does not read as a device target (describe: native_gates lists the device's gates)"
|
|
}
|
|
},
|
|
"job": {
|
|
"id": "prx-0",
|
|
"polls": 1
|
|
},
|
|
"ideal": {
|
|
"computed": true,
|
|
"method": "exact",
|
|
"total_variation_distance": 0.0,
|
|
"hellinger_fidelity": 1.0,
|
|
"sampling_tvd_expected": 0.019947114020071634,
|
|
"ideal_outcomes": 2,
|
|
"note": "the circuit's exact distribution over its classical bits, by the bit-exact state vector here, against the provider's counts: the total variation distance, the Hellinger fidelity, and the distance this many shots of the exact distribution would leave on average (by the normal approximation); a distance well above that is the device's or the simulator's error, or a program not run as sent"
|
|
},
|
|
"cost": {
|
|
"free": false,
|
|
"estimate": {
|
|
"unknown": "the provider gives no estimate"
|
|
},
|
|
"charged": null,
|
|
"confirmed": true
|
|
},
|
|
"energy": {
|
|
"unmetered": "the work ran at the provider; this host's meter would read only the wait"
|
|
},
|
|
"counts_source": "vendor_counts",
|
|
"execution": {
|
|
"stated_by": "client",
|
|
"sent": {
|
|
"fields": [
|
|
"circuits",
|
|
"shots"
|
|
],
|
|
"settings": {}
|
|
},
|
|
"verbatim": false,
|
|
"note": "this client sends only circuits and shots: it sets nothing, so every step is the service's default, whatever that is",
|
|
"mitigation": "default",
|
|
"twirling": "default",
|
|
"decoupling": "default",
|
|
"remapping": "default",
|
|
"optimisation": "default"
|
|
},
|
|
"counts": {
|
|
"00": 200,
|
|
"11": 200
|
|
},
|
|
"distinct_outcomes": 2,
|
|
"omitted_shots": 0,
|
|
"engine": {
|
|
"name": "wai-quantum",
|
|
"version": "0.8.1"
|
|
},
|
|
"schema": "wai.quantum.job-result/1",
|
|
"planner": {
|
|
"format": "wai.quantum.planner/1",
|
|
"wanted": "measured",
|
|
"wanted_from": "contract",
|
|
"named": "provider:lab",
|
|
"question": "counts",
|
|
"auto": null,
|
|
"host": {
|
|
"job_bytes": 8589934592,
|
|
"providers": [
|
|
"lab"
|
|
]
|
|
},
|
|
"routes": [
|
|
{
|
|
"route": "method:exact",
|
|
"kind": "local",
|
|
"method": "exact",
|
|
"class": "bit-exact",
|
|
"host_dependent": false,
|
|
"auto_rank": 20,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "not_named",
|
|
"why": "the job names another route"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:statevector",
|
|
"kind": "local",
|
|
"method": "statevector",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": 30,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "not_named",
|
|
"why": "the job names another route"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:statevector_single",
|
|
"kind": "local",
|
|
"method": "statevector_single",
|
|
"class": "single",
|
|
"host_dependent": true,
|
|
"auto_rank": 40,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "not_named",
|
|
"why": "the job names another route"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:stabilizer",
|
|
"kind": "local",
|
|
"method": "stabilizer",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": 10,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "not_named",
|
|
"why": "the job names another route"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:pauli",
|
|
"kind": "local",
|
|
"method": "pauli",
|
|
"class": "bounded",
|
|
"host_dependent": false,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "not_named",
|
|
"why": "the job names another route"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:mps",
|
|
"kind": "local",
|
|
"method": "mps",
|
|
"class": "heuristic",
|
|
"host_dependent": false,
|
|
"auto_rank": 60,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "not_named",
|
|
"why": "the job names another route"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:stabilizer_rank",
|
|
"kind": "local",
|
|
"method": "stabilizer_rank",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "not_named",
|
|
"why": "the job names another route"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:tensor_network",
|
|
"kind": "local",
|
|
"method": "tensor_network",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "not_named",
|
|
"why": "the job names another route"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:cutrank",
|
|
"kind": "local",
|
|
"method": "cutrank",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": 50,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "not_named",
|
|
"why": "the job names another route"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:cutrank_single",
|
|
"kind": "local",
|
|
"method": "cutrank_single",
|
|
"class": "single",
|
|
"host_dependent": true,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "not_named",
|
|
"why": "the job names another route"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:density_matrix",
|
|
"kind": "local",
|
|
"method": "density_matrix",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "not_named",
|
|
"why": "the job names another route"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:trajectories",
|
|
"kind": "local",
|
|
"method": "trajectories",
|
|
"class": "estimate",
|
|
"host_dependent": false,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "not_named",
|
|
"why": "the job names another route"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:pulse",
|
|
"kind": "local",
|
|
"method": "pulse",
|
|
"class": "bounded",
|
|
"host_dependent": false,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "not_named",
|
|
"why": "the job names another route"
|
|
}
|
|
},
|
|
{
|
|
"route": "provider:lab",
|
|
"kind": "provider",
|
|
"provider": "lab",
|
|
"class": "measured",
|
|
"host_dependent": true,
|
|
"price": {
|
|
"money": {
|
|
"free": false,
|
|
"unknown": "the service states its prices in the person's account, not through this protocol"
|
|
},
|
|
"time": {
|
|
"seconds": null,
|
|
"why": "the provider's estimate states no time"
|
|
},
|
|
"memory_bytes": null,
|
|
"work": null,
|
|
"energy": {
|
|
"joules": null,
|
|
"why": "no provider states a job's energy before it runs"
|
|
},
|
|
"leaves_out": [
|
|
"time",
|
|
"amount",
|
|
"energy",
|
|
"mitigation",
|
|
"decoder",
|
|
"cancel",
|
|
"charged"
|
|
],
|
|
"program": {
|
|
"shots": 400,
|
|
"native_gates": 4,
|
|
"two_qubit_gates": 1,
|
|
"swaps": 0
|
|
}
|
|
},
|
|
"device": "prx-circuits:test-qc",
|
|
"provenance": "silicon",
|
|
"outcome": "chosen"
|
|
}
|
|
],
|
|
"choice": "provider:lab",
|
|
"why": "the cheapest of the 1 of 14 routes that meet the contract",
|
|
"stable": {
|
|
"scope": "digest: what each route that depends on nothing of the host costs, the same for this request and job memory on every host of one engine; choice: whether the route chosen is one of those whatever the host",
|
|
"routes": [
|
|
"method:exact",
|
|
"method:statevector",
|
|
"method:stabilizer",
|
|
"method:pauli",
|
|
"method:mps",
|
|
"method:stabilizer_rank",
|
|
"method:tensor_network",
|
|
"method:cutrank",
|
|
"method:density_matrix",
|
|
"method:trajectories",
|
|
"method:pulse"
|
|
],
|
|
"digest": "d603bacb92daa1043db820e5b85f4b2aec8f9e9ec8aff536d0d04019e153074d",
|
|
"choice": false
|
|
},
|
|
"shadow": {
|
|
"route": "method:exact",
|
|
"class": "bit-exact",
|
|
"request": {
|
|
"qasm": "OPENQASM 3.0;\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n",
|
|
"shots": 400,
|
|
"seed": 4294967301,
|
|
"method": "exact"
|
|
},
|
|
"budget_seconds": 300.0,
|
|
"price": {
|
|
"money": {
|
|
"free": true
|
|
},
|
|
"time": {
|
|
"seconds": 4e-8,
|
|
"basis": "nominal"
|
|
},
|
|
"memory_bytes": 134217920,
|
|
"work": 8,
|
|
"energy": {
|
|
"joules": null,
|
|
"why": "this host estimates no job's energy before it runs"
|
|
},
|
|
"leaves_out": []
|
|
}
|
|
},
|
|
"kept": {}
|
|
},
|
|
"shadow": {
|
|
"ran": true,
|
|
"route": "method:exact",
|
|
"accuracy": {
|
|
"class": "bit-exact"
|
|
},
|
|
"request": {
|
|
"qasm": "OPENQASM 3.0;\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n",
|
|
"shots": 400,
|
|
"seed": 4294967301,
|
|
"method": "exact"
|
|
},
|
|
"shots": 400,
|
|
"counts": {
|
|
"11": 211,
|
|
"00": 189
|
|
},
|
|
"distinct_outcomes": 2,
|
|
"omitted_shots": 0,
|
|
"distance": {
|
|
"computed": true,
|
|
"numerator": 22,
|
|
"denominator": 800,
|
|
"total_variation": 0.0275,
|
|
"hellinger_fidelity": 0.9992431772192786,
|
|
"sampling_tvd_bound": 0.039915404643269786
|
|
},
|
|
"elapsed_ms": 0
|
|
},
|
|
"receipt": {
|
|
"alg": "ed25519",
|
|
"canon": "rfc8785",
|
|
"key": "197f6b23e16c8532c6abc838facd5ea789be0c76b2920334039bfa8b3d368d61",
|
|
"digest": "eb120bfdd0deddf496a319b69627b745f522e00c4918c6ca2c1781490320b2e6",
|
|
"signature": "d6f57c66f6f68d729af292c4602a30b68e9439558e638b8273528e7b94c45222dccf9528135ade9b373663bb33f547cf3e486c166b3a30ba8e45c2ce94c54503"
|
|
}
|
|
}
|
|
}
|