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]>
343 lines
9.6 KiB
JSON
343 lines
9.6 KiB
JSON
{
|
|
"status": "done",
|
|
"method": "stabilizer",
|
|
"why": "Clifford circuit: the stabilizer tableau of 2 qubits; the cheapest of the 4 of 13 routes that meet the contract",
|
|
"estimate": {
|
|
"memory_bytes": 67172870,
|
|
"work": 2008
|
|
},
|
|
"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": 1000,
|
|
"seed": 7,
|
|
"contract": {
|
|
"exactness": "exact",
|
|
"max_cost": {
|
|
"amount": "1",
|
|
"currency": "USD"
|
|
},
|
|
"deadline_seconds": 60.0
|
|
}
|
|
},
|
|
"result": {
|
|
"method": "stabilizer",
|
|
"qubits": 2,
|
|
"gates": 2,
|
|
"accuracy": {
|
|
"class": "bit-exact"
|
|
},
|
|
"counts": {
|
|
"11": 505,
|
|
"00": 495
|
|
},
|
|
"distinct_outcomes": 2,
|
|
"omitted_shots": 0,
|
|
"outcome_dimension": 1,
|
|
"elapsed_ms": 0,
|
|
"engine": {
|
|
"name": "wai-quantum",
|
|
"version": "0.8.1"
|
|
},
|
|
"schema": "wai.quantum.job-result/1",
|
|
"planner": {
|
|
"format": "wai.quantum.planner/1",
|
|
"wanted": "exact",
|
|
"wanted_from": "contract",
|
|
"named": null,
|
|
"question": "counts",
|
|
"auto": "method:stabilizer",
|
|
"host": {
|
|
"job_bytes": 17179869184,
|
|
"providers": []
|
|
},
|
|
"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": "met"
|
|
},
|
|
{
|
|
"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": 268459522,
|
|
"work": 8,
|
|
"energy": {
|
|
"joules": null,
|
|
"why": "this host estimates no job's energy before it runs"
|
|
},
|
|
"leaves_out": []
|
|
},
|
|
"outcome": "met"
|
|
},
|
|
{
|
|
"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 exact"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:stabilizer",
|
|
"kind": "local",
|
|
"method": "stabilizer",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": 10,
|
|
"price": {
|
|
"money": {
|
|
"free": true
|
|
},
|
|
"time": {
|
|
"seconds": 2.4096e-07,
|
|
"basis": "nominal"
|
|
},
|
|
"memory_bytes": 67172870,
|
|
"work": 2008,
|
|
"energy": {
|
|
"joules": null,
|
|
"why": "this host estimates no job's energy before it runs"
|
|
},
|
|
"leaves_out": []
|
|
},
|
|
"outcome": "chosen"
|
|
},
|
|
{
|
|
"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 exact"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:mps",
|
|
"kind": "local",
|
|
"method": "mps",
|
|
"class": "heuristic",
|
|
"host_dependent": false,
|
|
"auto_rank": 60,
|
|
"price": {
|
|
"money": {
|
|
"free": true
|
|
},
|
|
"time": {
|
|
"seconds": 0.027721728,
|
|
"basis": "nominal"
|
|
},
|
|
"memory_bytes": 270532608,
|
|
"work": 18481152,
|
|
"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 exact only when nothing is truncated, which it cannot know before it runs; the job wants exact"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:stabilizer_rank",
|
|
"kind": "local",
|
|
"method": "stabilizer_rank",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "cannot",
|
|
"why": "stabilizer_rank answers amplitudes and expectation values"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:tensor_network",
|
|
"kind": "local",
|
|
"method": "tensor_network",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "cannot",
|
|
"why": "tensor_network answers amplitudes only"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:cutrank",
|
|
"kind": "local",
|
|
"method": "cutrank",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": 50,
|
|
"price": {
|
|
"money": {
|
|
"free": true
|
|
},
|
|
"time": {
|
|
"seconds": 1.35e-06,
|
|
"basis": "nominal"
|
|
},
|
|
"memory_bytes": 268435554,
|
|
"work": 9000,
|
|
"energy": {
|
|
"joules": null,
|
|
"why": "this host estimates no job's energy before it runs"
|
|
},
|
|
"leaves_out": []
|
|
},
|
|
"outcome": "met"
|
|
},
|
|
{
|
|
"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 exact"
|
|
}
|
|
},
|
|
{
|
|
"route": "method:density_matrix",
|
|
"kind": "local",
|
|
"method": "density_matrix",
|
|
"class": "exact",
|
|
"host_dependent": false,
|
|
"auto_rank": null,
|
|
"price": null,
|
|
"outcome": "rejected",
|
|
"rejected": {
|
|
"code": "cannot",
|
|
"why": "density_matrix is for noisy circuits (give \"noise\")"
|
|
}
|
|
},
|
|
{
|
|
"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 exact"
|
|
}
|
|
},
|
|
{
|
|
"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 exact"
|
|
}
|
|
}
|
|
],
|
|
"choice": "method:stabilizer",
|
|
"why": "the cheapest of the 4 of 13 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": "30b5ed16af1556898b035da46b1d388aec9591b3194052e76020b1d83ce9567e",
|
|
"choice": true
|
|
},
|
|
"kept": {
|
|
"deadline": {
|
|
"seconds": 60.0,
|
|
"elapsed_ms": 0,
|
|
"kept": true
|
|
},
|
|
"cost": {
|
|
"max_cost": {
|
|
"amount": "1",
|
|
"currency": "USD"
|
|
},
|
|
"charged": null,
|
|
"kept": true
|
|
}
|
|
}
|
|
},
|
|
"energy": {
|
|
"unmetered": "the command line does not meter a run's energy"
|
|
},
|
|
"receipt": {
|
|
"alg": "ed25519",
|
|
"canon": "rfc8785",
|
|
"key": "197f6b23e16c8532c6abc838facd5ea789be0c76b2920334039bfa8b3d368d61",
|
|
"digest": "de187e27decaf890ba2e96ac57bc908087f76bd4917fb6ce7e5cfbbbf453addd",
|
|
"signature": "abf8ec3aea805b1e7e7e72d51a00456b9a57a1a9d18656f8f4ec1ebf521a2a54d0e7f42699aa0445e361c4782ee50dd138d5b787129b2c08dc4969870a30760c"
|
|
}
|
|
}
|
|
}
|