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]>
547 lines
17 KiB
JSON
547 lines
17 KiB
JSON
{
|
|
"status": "done",
|
|
"method": "provider",
|
|
"why": "on ref, reference:line-5 (wai.quantum.provider/1): compiled exactly to rzsxxcz on its qubits and checked by simulation here before it was sent",
|
|
"request": {
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n",
|
|
"shots": 300,
|
|
"seed": 4,
|
|
"contract": {
|
|
"exactness": "simulated",
|
|
"providers": "allowed"
|
|
}
|
|
},
|
|
"result": {
|
|
"method": "provider",
|
|
"qubits": 2,
|
|
"gates": 2,
|
|
"accuracy": {
|
|
"class": "simulated",
|
|
"note": "counts from the provider's simulator or emulator, as provider.provenance names it, not measured on any device: classical software's sample of the program, read as counts_source says; they show what that software gives, under whatever noise it models, not what a device would"
|
|
},
|
|
"shots": 300,
|
|
"provider": {
|
|
"name": "ref",
|
|
"kind": "process",
|
|
"protocol": "wai.quantum.provider/1",
|
|
"device": "reference:line-5",
|
|
"provenance": "simulator:the wai-quantum exact simulator: the state vector in fixed point, sampled with the seed given",
|
|
"qubits": 5,
|
|
"basis": "rzsxxcz",
|
|
"describe": "0a802ecd608fb5bca73c5a22ff65b5a08a408416501bb5472986f6540ff91ac0"
|
|
},
|
|
"calibration": "reference-f2d9fe570421",
|
|
"compiled": {
|
|
"basis": "rzsxxcz",
|
|
"program": "b96b3d2e44387bac1dab89e43e29706788b0b6ed721f88d5c0f64be293c72df9",
|
|
"hash": "BLAKE3 of the program's OpenQASM 3 text, qasm3",
|
|
"qasm3": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nbit[2] c;\nrz(pi/2) $0;\nsx $0;\nrz(pi/2) $1;\nsx $1;\ncz $0, $1;\nrz(pi) $1;\nsx $1;\nrz(pi/2) $0;\nrz(pi/2) $1;\nc[0] = measure $0;\nc[1] = measure $1;\n",
|
|
"native_gates": 9,
|
|
"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",
|
|
"placement": {
|
|
"chosen": "the compiler's own layout, the fewest swaps: the description states no errors"
|
|
}
|
|
},
|
|
"job": {
|
|
"id": "ref-1",
|
|
"polls": 1
|
|
},
|
|
"ideal": {
|
|
"computed": true,
|
|
"method": "exact",
|
|
"total_variation_distance": 0.03666666666666665,
|
|
"hellinger_fidelity": 0.998653743148044,
|
|
"sampling_tvd_expected": 0.023032943298089033,
|
|
"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": {
|
|
"free": false,
|
|
"amount": "50",
|
|
"currency": "USD",
|
|
"unit": "job",
|
|
"seconds": 0.0
|
|
},
|
|
"charged": null,
|
|
"confirmed": true
|
|
},
|
|
"energy": {
|
|
"unmetered": "the work ran at the provider; this host's meter would read only the wait"
|
|
},
|
|
"counts_source": "shots",
|
|
"execution": {
|
|
"stated_by": "provider",
|
|
"mitigation": "none",
|
|
"twirling": "none",
|
|
"decoupling": "none",
|
|
"remapping": "none",
|
|
"optimisation": "none",
|
|
"verbatim": true,
|
|
"note": "the reference simulates the program's gates as written, on the qubits named, and corrects nothing"
|
|
},
|
|
"counts": {
|
|
"11": 161,
|
|
"00": 139
|
|
},
|
|
"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": "simulated",
|
|
"wanted_from": "contract",
|
|
"named": null,
|
|
"question": "counts",
|
|
"auto": "method:stabilizer",
|
|
"host": {
|
|
"job_bytes": 17179869184,
|
|
"providers": [
|
|
"ref",
|
|
"priced"
|
|
]
|
|
},
|
|
"routes": [
|
|
{
|
|
"route": "method:exact",
|
|
"kind": "local",
|
|
"method": "exact",
|
|
"class": "bit-exact",
|
|
"host_dependent": false,
|
|
"auto_rank": 20,
|
|
"price": {
|
|
"money": {
|
|
"free": true
|
|
},
|
|
"time": {
|
|
"seconds": 4e-08,
|
|
"basis": "nominal"
|
|
},
|
|
"memory_bytes": 134217920,
|
|
"work": 8,
|
|
"energy": {
|
|
"joules": null,
|
|
"why": "this host estimates no job's energy before it runs"
|
|
},
|
|
"leaves_out": []
|
|
},
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "class",
|
|
"why": "its class is bit-exact, and the job wants simulated"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:statevector",
|
|
"kind": "local",
|
|
"method": "statevector",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": 30,
|
|
"price": {
|
|
"money": {
|
|
"free": true
|
|
},
|
|
"time": {
|
|
"seconds": 8e-09,
|
|
"basis": "nominal"
|
|
},
|
|
"memory_bytes": 268442722,
|
|
"work": 8,
|
|
"energy": {
|
|
"joules": null,
|
|
"why": "this host estimates no job's energy before it runs"
|
|
},
|
|
"leaves_out": []
|
|
},
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "class",
|
|
"why": "its class is exact, and the job wants simulated"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:statevector_single",
|
|
"kind": "local",
|
|
"method": "statevector_single",
|
|
"class": "single",
|
|
"host_dependent": true,
|
|
"auto_rank": 40,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "class",
|
|
"why": "its class is single, and the job wants simulated"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:stabilizer",
|
|
"kind": "local",
|
|
"method": "stabilizer",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": 10,
|
|
"price": {
|
|
"money": {
|
|
"free": true
|
|
},
|
|
"time": {
|
|
"seconds": 7.296e-08,
|
|
"basis": "nominal"
|
|
},
|
|
"memory_bytes": 67128070,
|
|
"work": 608,
|
|
"energy": {
|
|
"joules": null,
|
|
"why": "this host estimates no job's energy before it runs"
|
|
},
|
|
"leaves_out": []
|
|
},
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "class",
|
|
"why": "its class is exact, and the job wants simulated"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:pauli",
|
|
"kind": "local",
|
|
"method": "pauli",
|
|
"class": "bounded",
|
|
"host_dependent": false,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "class",
|
|
"why": "its class is bounded, and the job wants simulated"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:mps",
|
|
"kind": "local",
|
|
"method": "mps",
|
|
"class": "heuristic",
|
|
"host_dependent": false,
|
|
"auto_rank": 60,
|
|
"price": {
|
|
"money": {
|
|
"free": true
|
|
},
|
|
"time": {
|
|
"seconds": 0.010518528000000001,
|
|
"basis": "nominal"
|
|
},
|
|
"memory_bytes": 270532608,
|
|
"work": 7012352,
|
|
"energy": {
|
|
"joules": null,
|
|
"why": "this host estimates no job's energy before it runs"
|
|
},
|
|
"leaves_out": []
|
|
},
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "class",
|
|
"why": "its class is heuristic, and the job wants simulated"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:stabilizer_rank",
|
|
"kind": "local",
|
|
"method": "stabilizer_rank",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "class",
|
|
"why": "its class is exact, and the job wants simulated"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:tensor_network",
|
|
"kind": "local",
|
|
"method": "tensor_network",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "class",
|
|
"why": "its class is exact, and the job wants simulated"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:cutrank",
|
|
"kind": "local",
|
|
"method": "cutrank",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": 50,
|
|
"price": {
|
|
"money": {
|
|
"free": true
|
|
},
|
|
"time": {
|
|
"seconds": 4.05e-07,
|
|
"basis": "nominal"
|
|
},
|
|
"memory_bytes": 268435554,
|
|
"work": 2700,
|
|
"energy": {
|
|
"joules": null,
|
|
"why": "this host estimates no job's energy before it runs"
|
|
},
|
|
"leaves_out": []
|
|
},
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "class",
|
|
"why": "its class is exact, and the job wants simulated"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:cutrank_single",
|
|
"kind": "local",
|
|
"method": "cutrank_single",
|
|
"class": "single",
|
|
"host_dependent": true,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "class",
|
|
"why": "its class is single, and the job wants simulated"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:density_matrix",
|
|
"kind": "local",
|
|
"method": "density_matrix",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "class",
|
|
"why": "its class is exact, and the job wants simulated"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:trajectories",
|
|
"kind": "local",
|
|
"method": "trajectories",
|
|
"class": "estimate",
|
|
"host_dependent": false,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "class",
|
|
"why": "its class is estimate, and the job wants simulated"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:pulse",
|
|
"kind": "local",
|
|
"method": "pulse",
|
|
"class": "bounded",
|
|
"host_dependent": false,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "class",
|
|
"why": "its class is bounded, and the job wants simulated"
|
|
}
|
|
},
|
|
{
|
|
"route": "provider:ref",
|
|
"kind": "provider",
|
|
"provider": "ref",
|
|
"class": "simulated",
|
|
"host_dependent": true,
|
|
"price": {
|
|
"money": {
|
|
"free": true
|
|
},
|
|
"time": {
|
|
"seconds": 0.0,
|
|
"basis": "provider"
|
|
},
|
|
"memory_bytes": null,
|
|
"work": null,
|
|
"energy": {
|
|
"joules": null,
|
|
"why": "no provider states a job's energy before it runs"
|
|
},
|
|
"leaves_out": [
|
|
"energy",
|
|
"mitigation",
|
|
"decoder"
|
|
],
|
|
"program": {
|
|
"shots": 300,
|
|
"native_gates": 9,
|
|
"two_qubit_gates": 1,
|
|
"swaps": 0
|
|
}
|
|
},
|
|
"device": "reference:line-5",
|
|
"provenance": "simulator:the wai-quantum exact simulator: the state vector in fixed point, sampled with the seed given",
|
|
"outcome": "chosen"
|
|
},
|
|
{
|
|
"route": "provider:priced",
|
|
"kind": "provider",
|
|
"provider": "priced",
|
|
"class": "simulated",
|
|
"host_dependent": true,
|
|
"price": {
|
|
"money": {
|
|
"free": false,
|
|
"amount": "0.09",
|
|
"currency": "USD",
|
|
"unit": "shot"
|
|
},
|
|
"time": {
|
|
"seconds": 0.0,
|
|
"basis": "provider"
|
|
},
|
|
"memory_bytes": null,
|
|
"work": null,
|
|
"energy": {
|
|
"joules": null,
|
|
"why": "no provider states a job's energy before it runs"
|
|
},
|
|
"leaves_out": [
|
|
"energy",
|
|
"mitigation",
|
|
"decoder",
|
|
"charged"
|
|
],
|
|
"program": {
|
|
"shots": 300,
|
|
"native_gates": 9,
|
|
"two_qubit_gates": 1,
|
|
"swaps": 0
|
|
}
|
|
},
|
|
"device": "reference:line-5",
|
|
"provenance": "simulator:the wai-quantum exact simulator: the state vector in fixed point, sampled with the seed given",
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "cost_no_ceiling",
|
|
"why": "0.09 USD: it costs money or its cost is unknown, and the contract gives no ceiling to hold it to; give max_cost, or name the provider"
|
|
}
|
|
}
|
|
],
|
|
"choice": "provider:ref",
|
|
"why": "the cheapest of the 1 of 15 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": "e42e49d90e3f5015f93e050136dfb3c2633235039d89e9db50114125c0aced1a",
|
|
"choice": false
|
|
},
|
|
"shadow": {
|
|
"route": "method:exact",
|
|
"class": "bit-exact",
|
|
"request": {
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n",
|
|
"shots": 300,
|
|
"seed": 4294967300,
|
|
"method": "exact"
|
|
},
|
|
"budget_seconds": 300.0,
|
|
"price": {
|
|
"money": {
|
|
"free": true
|
|
},
|
|
"time": {
|
|
"seconds": 4e-08,
|
|
"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;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n",
|
|
"shots": 300,
|
|
"seed": 4294967300,
|
|
"method": "exact"
|
|
},
|
|
"shots": 300,
|
|
"counts": {
|
|
"00": 161,
|
|
"11": 139
|
|
},
|
|
"distinct_outcomes": 2,
|
|
"omitted_shots": 0,
|
|
"distance": {
|
|
"computed": true,
|
|
"numerator": 44,
|
|
"denominator": 600,
|
|
"total_variation": 0.07333333333333333,
|
|
"hellinger_fidelity": 0.9946222222222221,
|
|
"sampling_tvd_bound": 0.04602751441903442
|
|
},
|
|
"elapsed_ms": 0
|
|
},
|
|
"receipt": {
|
|
"alg": "ed25519",
|
|
"canon": "rfc8785",
|
|
"key": "197f6b23e16c8532c6abc838facd5ea789be0c76b2920334039bfa8b3d368d61",
|
|
"digest": "21b63e110f5db9eb78f8bbe8bc3e0cc5c27026294f99bf750ac02d45c7d2808e",
|
|
"signature": "e9f33fed626b427bc208a79724d44468bd425f86f7ac9f421a530cd0a02a08a4c533cd176a16b9be3ea5fac09a93a8d784a5d097b537a584d92d2e1180a51506"
|
|
}
|
|
},
|
|
"id": "pj-6059aefb7ace70bc",
|
|
"submitted_ms": 1794033072508,
|
|
"finished_ms": 1794033072511
|
|
}
|