{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://git.transaction.science/Transaction-Science/open-standards/raw/branch/main/wai/wai-quantum/schemas/job-result.v1.json", "title": "wai.quantum.job-result/1", "description": "A job's result as the engine gives it, on every host: what was asked of the program, computed by the method its plan chose, with that method's accuracy class. The receipt seals the result without its receipt member, beside the request. A result names the engine that made it and this schema (engine and schema); results made before results carried them have neither and follow this schema all the same.", "type": "object", "required": [ "method", "qubits", "gates", "accuracy" ], "properties": { "engine": { "type": "object", "description": "The engine that made the result: the wai-quantum crate's name and version.", "required": [ "name", "version" ], "properties": { "name": { "const": "wai-quantum" }, "version": { "type": "string", "description": "Its semantic version, as MAJOR.MINOR.PATCH." } } }, "schema": { "const": "wai.quantum.job-result/1", "description": "The schema the result follows." }, "components": { "type": "array", "description": "The identity of every component that made the result, when a registered one took part (engine::registry): its program's format, the passes its compile ran, the noise channels it names, its method; each registered one marked so. Sealed by the receipt with the rest.", "items": { "$ref": "#/$defs/component" } }, "method": { "type": "string", "description": "The method that ran the job (provider for a run on the person's own provider)." }, "qubits": { "type": "integer", "minimum": 0 }, "gates": { "type": "integer", "minimum": 0, "description": "The program's gates, in standard gates (at most 2^53 - 1), however the method ran them." }, "operations": { "type": "integer", "minimum": 0, "description": "When the method held a gate under many controls as one (statevector, and exact asked for it): the operations it ran." }, "accuracy": { "$ref": "#/$defs/accuracy" }, "state_hash": { "type": "string", "description": "The bit-exact method's statevector hash (BLAKE3, hex): the same on every machine." }, "counts": { "type": "object", "description": "Outcomes and their counts, keyed by the program's classical bits, the highest bit first. At most 65536 outcomes are listed; omitted_shots holds the rest.", "additionalProperties": { "type": "integer", "minimum": 0 } }, "distinct_outcomes": { "type": "integer", "minimum": 0 }, "omitted_shots": { "type": "integer", "minimum": 0 }, "outcome_dimension": { "type": "integer", "minimum": 0, "description": "The stabilizer method: the dimension of the measured outcomes' affine space." }, "shots": { "type": "integer", "minimum": 0, "description": "The shots, where the method names them in the result (trajectories, provider)." }, "expectations": { "type": "array", "items": { "$ref": "#/$defs/expectation" } }, "amplitudes": { "type": "array", "items": { "$ref": "#/$defs/amplitude" } }, "global_phase": { "type": "string", "description": "Why the amplitudes' global phase is not fixed, when it is not." }, "warning": { "type": "string" }, "contraction_flops": { "type": "number", "description": "The tensor network's contraction cost." }, "dynamic": { "type": "object", "description": "A program that measures in the middle, resets or branches on a measured bit: how it ran.", "properties": { "measurements_and_resets": { "type": "integer", "minimum": 0 }, "branches_run": { "type": "integer", "minimum": 0 }, "states_at_once": { "type": "integer", "minimum": 0 }, "branches_weighed": { "type": "integer", "minimum": 0 } } }, "outputs": { "type": "array", "description": "The program's output declarations: each its name and type, and its value, or the places of its bits in each outcome.", "items": { "type": "object", "required": [ "name", "type" ], "properties": { "name": { "type": "string" }, "type": { "type": "string" }, "bits": { "type": "array", "items": { "type": "integer", "minimum": 0 } }, "value": { "description": "A number, a boolean, a bit string, a duration's text, {\"re\", \"im\"}, or an array of them." } } } }, "timing": { "type": "object", "description": "A program that states durations (delay, box, stretch) the method does not apply: said so, with the reader's code.", "required": [ "applied", "why" ], "properties": { "applied": { "type": "boolean" }, "code": { "type": "string" }, "why": { "type": "string" } } }, "diagnostics": { "type": "array", "description": "The reader's warnings and notes on the program, each with its code.", "items": { "$ref": "tools.v1.json#/$defs/diagnostic" } }, "compiled": { "description": "How the program was compiled before it ran: on the person's own provider, to the device's gates; or, asked with compile, to a basis within a budget. Either way, basis is the gate set it was compiled to.", "anyOf": [ { "type": "object", "description": "A provider job: the program sent, compiled exactly to the device's own gates: its basis (the device's gate set), its OpenQASM 3 text (qasm3) and that text's BLAKE3 (program), its counts of gates and swaps, its layouts, and the check it passed before it was sent. Results sealed before qasm3 carry the hash alone.", "required": [ "basis", "program" ], "properties": { "basis": { "type": "string" }, "program": { "type": "string" }, "hash": { "type": "string" }, "qasm3": { "type": "string", "description": "The program sent, as OpenQASM 3, $i being index i of the coupling map the provider described; program is the BLAKE3 of its UTF-8 bytes." }, "qubit_names": { "type": "object", "additionalProperties": { "type": "string", "minLength": 1 }, "description": "The device's own name for each index the program uses, as it was when the job was sent, where a client sends it under those names." }, "native_gates": { "type": "integer" }, "two_qubit_gates": { "type": "integer" }, "swaps": { "type": "integer" }, "layout": { "type": "array", "items": { "type": "integer" } }, "final_layout": { "type": "array", "items": { "type": "integer" } }, "checked": { "type": "string" }, "equivalence": { "type": "object", "description": "The equivalence checker's verdict on the compiled program against the request's program, decided before it was sent: proved, or undecided within the budget it states (a client sends nothing it refutes), with each route's finding and the residual Z rotations the statement takes in.", "required": ["verdict", "notion", "statement", "why"], "properties": { "version": { "type": "integer", "description": "The verdict's form: 1." }, "notion": { "enum": [ "unitary", "measured" ], "description": "unitary: one unitary up to a global phase; measured: up to phases on the computational basis just before the final measurements." }, "statement": { "type": "string", "description": "The statement decided, in words." }, "verdict": { "enum": [ "proved", "refuted", "undecided" ] }, "why": { "type": "string", "description": "How it was decided, or why no route decided it." }, "proved_by": { "type": "array", "items": { "type": "string" }, "description": "The routes that proved it: decision_diagram, zx." }, "refuted_by": { "type": "array", "items": { "type": "string" }, "description": "The routes that refuted it: stimuli, decision_diagram, zx, shape." }, "arithmetic": { "enum": [ "exact", "tolerance" ], "description": "Of a proof: exact (integers in a cyclotomic field, or exact phases), or doubles within tolerance." }, "tolerance": { "type": "number", "description": "With arithmetic tolerance: within what two doubles were taken equal." }, "global_phase": { "type": "array", "items": { "type": "number" }, "description": "The phase the decision diagram found, as [re, im]." }, "counterexample": { "type": "object", "description": "Of a refutation: what shows it (found_by: stimuli, decision_diagram, zx or shape), with an input and the outcomes that differ, entries of the miter's matrix, or wires that cross." }, "routes": { "type": "array", "items": { "type": "object" }, "description": "Each route's finding: stimuli, decision_diagram, zx, with its outcome and its counts." }, "wires": { "type": "object", "description": "The miter's wires: the logical qubits, the physical qubits used, the layout, the ancillas and the closing exchanges." }, "gates": { "type": "object", "description": "Primitive gates of the source and of the compiled program." }, "budget": { "type": "object", "description": "The counts each route might spend (no clock): stimuli, state_vector_qubits, diagram_nodes, diagram_steps, zx_rewrites, exact_bits, seed." }, "residual": { "type": "array", "items": { "type": "object" }, "description": "The Z rotations the compiled program leaves unapplied before its measurements, each a physical qubit and m/2^k of a turn, which the statement takes in." }, "residual_is": { "type": "string" }, "final_layout_from": { "type": "string", "description": "Where each logical qubit's end was read from, when it was read from the measurements." }, "final_layout": { "type": "array", "items": { "type": "integer" } } } }, "placement": { "type": "object", "description": "Where the program was placed on the device's qubits, and why." } } }, { "type": "object", "description": "A job asked to compile its program first: what ran is the compiled circuit, within distance of the program in the operator norm up to a global phase.", "required": [ "basis", "verdict" ], "properties": { "basis": { "enum": [ "clifford_t", "standard", "cz", "zz", "xx" ], "description": "The gate set the program was compiled to." }, "level": { "type": "integer", "minimum": 0 }, "epsilon": { "type": "number", "description": "The budget asked for." }, "distance": { "type": [ "number", "null" ], "description": "The bound the passes' distances add to." }, "verdict": { "type": "string" }, "source": { "$ref": "compile-result.v1.json#/$defs/counts" }, "output": { "$ref": "compile-result.v1.json#/$defs/counts" }, "certificate": { "type": [ "string", "null" ], "description": "The BLAKE3 of the compile certificate's RFC 8785 text, in hex." }, "chain": { "type": "object", "description": "The certificate's chain of digests (wai/extensions/quantum-compile.md section 6.3): the program's digest, each pass with the digests of the circuit it was given and the circuit it gave, the layer its check stands on and the distance it adds, and the output's digest; with the layer the whole compile stands on and the weakest of its passes'. A verifier holds it to its form and compiles the request's program again. Results sealed before results carried it have none.", "required": [ "source", "output", "passes" ], "properties": { "source": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "output": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "layer": { "enum": [ "pass_equivalence", "exact_simulation", "exact_arithmetic", "stabilizer", null ] }, "weakest": { "enum": [ "unchecked", "bounded", "exact_simulation", "exact_arithmetic", "stabilizer", null ] }, "passes": { "type": "array", "items": { "type": "object", "required": [ "pass", "input", "output", "layer", "bound" ], "properties": { "pass": { "type": "string" }, "input": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "output": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "layer": { "enum": [ "unchecked", "bounded", "exact_simulation", "exact_arithmetic", "stabilizer" ] }, "bound": { "type": "number", "minimum": 0 } } } } } }, "note": { "type": "string" } } } ] }, "verdict": { "$ref": "verdict.v1.json" }, "target": { "type": "object", "description": "A run on a device target: which target (its hash, as its receipt binds it), its calibration snapshot, where the program was placed and why, and the noise derived from the target.", "required": [ "name", "hash" ], "properties": { "name": { "type": "string" }, "hash": { "type": "string" }, "hash_is": { "type": "string" }, "calibration": { "type": "object", "properties": { "id": { "type": "string" }, "timestamp": { "type": "string" } } }, "source": { "type": "object", "properties": { "format": { "type": "string" }, "note": { "type": "string" } } }, "placement": { "type": "object", "description": "The native gate set, the layout and routes chosen, the swaps, the expected success beside the fewest-swaps layout's (and, where the target states its gates' errors' standard deviations, expected_success_interval at one standard deviation each way), and the check of the compiled program." }, "compiled": { "type": "object", "description": "The program as compiled for the target, in the form a provider's result gives its own: its text (OpenQASM 3 on physical qubits $p, logical qubit i measured into c[i] where it ends), its layouts, and the equivalence checker's verdict on it against the request's program, decided before anything ran (a refuted one is not run).", "required": ["qasm3", "layout", "final_layout", "equivalence"], "properties": { "qasm3": { "type": "string" }, "layout": { "type": "array", "items": { "type": "integer" } }, "final_layout": { "type": "array", "items": { "type": "integer" } }, "equivalence": { "$ref": "#/properties/compiled/anyOf/0/properties/equivalence" } } }, "noise": { "type": "object", "description": "The noise model derived from the target's calibration: its channels, durations and idling, and each qubit's readout; where the target states coherent errors, leakage, static ZZ or its errors' standard deviations, applied and ignored say what the model applied of them and what it leaves out." } } }, "fabric": { "$ref": "#/$defs/fabric" }, "repaired": { "type": "object", "description": "A job asked to repair its program first: the program that ran, each repair, and what needs a person.", "properties": { "qasm": { "type": "string" }, "repairs": { "type": "array", "items": { "$ref": "tools.v1.json#/$defs/repair_step" } }, "needs_person": { "type": "array", "items": { "type": "object" } } } }, "elapsed_ms": { "type": "integer", "minimum": 0, "description": "Wall time of the run, where the host has a clock (not in a browser tab)." }, "energy": { "$ref": "#/$defs/energy" }, "receipt": { "anyOf": [ { "$ref": "receipt.v2.json" }, { "$ref": "receipt.v2.json#/$defs/first" } ] }, "provider": { "type": "object", "description": "A provider job: the provider's name, kind and protocol, the device, its provenance, and the hash of its description." }, "accepted_shots": { "type": "integer", "minimum": 1, "description": "A provider job: the shots its counts are of, the counts' sum (wai/extensions/quantum-providers.md section 8.1): the request's shots, or another number when the device kept another, as a post-selected or heralded readout discards shots. Results sealed before it carry none, and their counts are of the shots." }, "counts_source": { "enum": [ "shots", "vendor_counts", "probabilities" ], "description": "A provider job: where its counts come from (wai/extensions/quantum-providers.md section 8.3): tallied from one record a shot (shots), the provider's own counts (vendor_counts), or rebuilt from the probabilities it returned by largest remainders, derived and not shot records (probabilities). Results sealed before it carry neither it nor execution." }, "execution": { "type": "object", "description": "A provider job: how the device was asked to run the program (section 8.3): who states it (stated_by: client, provider or nobody); what the client sent (sent: the request's members and the settings among them); each of mitigation, twirling, decoupling, remapping and optimisation (off, on, default when the request sets nothing for it, none when the device has no such step, unknown when nobody states it); whether the gates were to run as written (verbatim); and a note.", "required": [ "stated_by", "mitigation", "twirling", "decoupling", "remapping", "optimisation", "verbatim" ], "properties": { "stated_by": { "enum": [ "client", "provider", "nobody" ] }, "sent": { "type": "object", "required": [ "fields", "settings" ], "properties": { "fields": { "type": "array", "items": { "type": "string" } }, "settings": { "type": "object" } }, "additionalProperties": false }, "mitigation": { "$ref": "#/$defs/execution_step" }, "twirling": { "$ref": "#/$defs/execution_step" }, "decoupling": { "$ref": "#/$defs/execution_step" }, "remapping": { "$ref": "#/$defs/execution_step" }, "optimisation": { "$ref": "#/$defs/execution_step" }, "verbatim": { "type": [ "boolean", "null" ] }, "note": { "type": "string" } }, "additionalProperties": false }, "calibration": { "type": [ "string", "null" ], "description": "A provider job: the calibration snapshot it ran under." }, "job": { "type": "object", "description": "A provider job: the provider's job id and its status checks." }, "ideal": { "$ref": "#/$defs/ideal" }, "cost": { "type": "object", "description": "A provider job: the estimate shown before it was sent, what the provider says it charged, and whether the person confirmed a run that was not free." }, "provenance": { "$ref": "provenance.v1.json" }, "mitigation": { "$ref": "mitigation.v1.json" }, "pulse": { "type": "object", "description": "A pulse run (method pulse, engine::pulse): what was read and its distribution, the final populations, each capture's reading, the final density matrix's digest, the schedule's length, the integrator and its step, the device and where each parameter came from, and what the receipt binds (calibration).", "required": [ "read", "outcome_bits", "populations", "simulated_qubits", "density_hash", "integrator", "device", "calibration" ], "properties": { "read": { "type": "string", "description": "What the distribution reads: the captures together (into the program's bits when each writes one), or the final state." }, "outcome_bits": { "type": "array", "items": { "type": "string" }, "description": "What each character of an outcome is, left to right: a program bit (c[0]) or a qubit ($0)." }, "distribution": { "type": [ "object", "null" ], "additionalProperties": { "type": "number" }, "description": "The probability of each outcome, which the counts sample; null when the captures start at different samples." }, "populations": { "type": "object", "additionalProperties": { "type": "number" }, "description": "The final state read on every simulated qubit, the highest qubit first, a level above 0 read as 1." }, "simulated_qubits": { "type": "array", "items": { "type": "integer" } }, "captures": { "type": "array", "items": { "type": "object", "properties": { "frame": { "type": "string" }, "qubit": { "type": "integer" }, "start": { "type": "integer" }, "start_ns": { "type": "number" }, "bit": { "type": [ "string", "null" ] }, "p1": { "type": "number" }, "p2": { "type": "number" } } } }, "leakage": { "type": "array", "items": { "type": "object", "properties": { "qubit": { "type": "integer" }, "p2": { "type": "number" } } }, "description": "With three levels: each qubit's final probability of level 2." }, "trace": { "type": "number" }, "density_hash": { "type": "string", "description": "The BLAKE3 of the final density matrix's bits: the same on every platform." }, "duration": { "type": "integer" }, "duration_ns": { "type": "number" }, "integrator": { "type": "object", "properties": { "name": { "type": "string" }, "order": { "type": "integer" }, "dt_ns": { "type": "number" }, "substeps": { "type": "integer" }, "step_ns": { "type": "number" }, "steps": { "type": "integer" }, "norm_max": { "type": "number" }, "frame": { "type": "string" } } }, "device": { "type": "object", "properties": { "levels": { "type": "integer" }, "dt_ns": { "type": "number" }, "qubits": { "type": "array", "items": { "type": "object", "properties": { "qubit": { "type": "integer" }, "frequency_hz": { "type": "number" }, "rabi_hz": { "type": "number" }, "anharmonicity_hz": { "type": "number" }, "t1_ns": { "type": "number" }, "t2_ns": { "type": "number" }, "from": { "type": "object", "additionalProperties": { "enum": [ "pulse", "target", "default", "none" ] } } } } }, "couplings": { "type": "array" }, "model": { "type": "string" } } }, "calibration": { "type": "object", "description": "What the receipt binds: the program's, its calibrations', the schedule's and the device's digests, and the target snapshot.", "properties": { "program": { "type": "string" }, "calibrations": { "type": "string" }, "schedule": { "type": "string" }, "device": { "type": "string" }, "target": { "type": "object", "properties": { "name": { "type": "string" }, "hash": { "type": "string" }, "calibration": { "type": "object" } } } } }, "not_modelled": { "type": "array", "items": { "type": "string" } } } }, "planner": { "$ref": "#/$defs/planner" }, "stopped": { "type": "object", "description": "A run stopped at its contract's max_joules by a live reading: it gave no answer, and accuracy.class is none (wai/extensions/quantum-providers.md section 8.7).", "required": ["at", "joules", "max_joules", "elapsed_ms", "read"], "properties": { "at": { "const": "max_joules" }, "joules": { "type": "number", "description": "What the reading had come to, at or past the ceiling." }, "max_joules": { "type": "number" }, "elapsed_ms": { "type": "integer", "minimum": 0 }, "read": { "type": "string", "description": "What read the run, and what that covers." } } }, "shadow": { "$ref": "#/$defs/shadow" } }, "$defs": { "execution_step": { "enum": [ "off", "on", "default", "none", "unknown" ], "description": "What happened to one step: off or on (by a setting the client sent, or as the provider states), default (the request sets nothing for it, so the provider's default stands), none (the device has no such step), unknown (nobody states it)." }, "accuracy": { "type": "object", "description": "What the method promises of the numbers it gave.", "required": [ "class" ], "properties": { "class": { "enum": [ "bit-exact", "exact", "single", "bounded", "estimate", "heuristic", "measured", "simulated", "none" ], "description": "bit-exact: the same bits on every machine; exact: no approximation beyond double-precision rounding; single: single-precision arithmetic; bounded: a rigorous bound beside each value; estimate: a statistical estimate with its standard error; heuristic: an approximation with an estimate of its error, not a bound; measured: counts a processor returned through the person's provider, not reproducible by recomputation; simulated: counts a provider's simulator or emulator returned, measured on no device. Results sealed before simulated existed label a provider's simulator measured, and are read by its provenance. none: the run was stopped at its contract's energy ceiling and gave no answer." }, "approximate": { "const": true, "description": "A simulated result whose provider states its simulator is approximate." }, "note": { "type": "string" }, "global_phase": { "type": "object", "description": "The bit-exact method: method statevector's state of the program that ran is e^(i radians) times the amplitudes given, since this method's lowering drops the phase of rz, rx, ry, rxx, ryy, rzz and u. Absent when that is 1. The language's own state can differ from both: its U is e^(i theta / 2) times the matrix both methods take as u, the reader drops an uncontrolled gphase (Q206), and a compiled job's program is the compile's, right up to a global phase.", "required": ["turns_over_2_33", "radians", "note"], "properties": { "turns_over_2_33": { "type": "integer", "minimum": 0, "description": "The phase exactly, in 2^33rds of a turn." }, "radians": { "type": "number", "description": "The same in radians, in (-pi, pi]." }, "note": { "type": "string" } } }, "below_table": { "type": "object", "description": "The bit-exact method: phase gates of its lowering that are not zero and ran as no phase, within the reader's tolerance (1e-14 of a turn) of a whole turn. `angles` counts those gates: one angle written may be several, and another count in another form of the same program.", "required": ["angles", "largest_radians", "note"], "properties": { "angles": { "type": "integer", "minimum": 1 }, "largest_radians": { "type": "number" }, "note": { "type": "string" } } }, "moved_angles": { "type": "object", "description": "The bit-exact method: phase gates of its lowering within the reader's tolerance (1e-14 of a turn) of a dyadic angle, by more than a double's rounding of it, that ran as it. `angles` counts those gates.", "required": ["angles", "largest_radians", "note"], "properties": { "angles": { "type": "integer", "minimum": 1 }, "largest_radians": { "type": "number" }, "note": { "type": "string" } } }, "fusion": { "type": "integer" }, "device": { "type": "string" }, "threshold": { "type": "number" }, "max_weight": { "type": [ "integer", "null" ] }, "max_bond": { "type": "integer" }, "max_bond_used": { "type": "integer" }, "discarded_weight": { "type": "number" }, "fidelity_estimate": { "type": "number" }, "truncations": { "type": "integer" }, "shots": { "type": "integer" }, "trajectories": { "type": "integer" }, "histories": { "type": "integer" }, "gate_applications": { "type": "integer" }, "max_cut": { "type": "integer" }, "order_work": { "type": "number" }, "batch": { "type": "integer" }, "bound": { "type": "number", "description": "The bound this result is held to, by method: a pulse run (class bounded): every probability within this of the exact solution of the model's master equation, the truncation bound and the rounding estimate together; stabilizer_rank's sampled mode (class estimate): the bound on the distance of the estimated state from the state, holding with the probability confidence states.", "minimum": 0 }, "truncation_bound": { "type": "number", "description": "A pulse run: the proved bound, in the trace norm, on what the integrator's series leaves out." }, "rounding_estimate": { "type": "number", "description": "A pulse run: an estimate of floating-point rounding beside the bound, not a proof." }, "tolerance": { "type": "number" }, "norm": { "type": "string" }, "t_count": { "type": "integer", "minimum": 0, "description": "stabilizer_rank: the T and T† gates the program lowers to." }, "terms": { "type": "integer", "minimum": 1, "description": "stabilizer_rank: the stabilizer branches summed (2^t exactly), or drawn." }, "confidence": { "type": "number", "description": "The probability a stated bound holds." } } }, "expectation": { "type": "object", "required": [ "observable", "coeff", "value" ], "properties": { "observable": { "type": "string" }, "coeff": { "type": "number" }, "value": { "type": "number", "description": "The coefficient times the expectation value." }, "stderr": { "type": "number", "description": "The standard error, for an estimate." }, "bound": { "type": "number", "description": "A bound on |exact − value|: rigorous for the bounded class; with confidence beside it, holding with that probability." }, "peak_terms": { "type": "integer" }, "threshold_reached": { "type": "number" }, "max_terms": { "type": "integer" }, "ladder": { "type": "array", "description": "The value at thresholds a decade apart, the asked one last.", "items": { "type": "object", "required": [ "threshold", "value", "bound" ], "properties": { "threshold": { "type": "number" }, "value": { "type": "number" }, "bound": { "type": "number" }, "peak_terms": { "type": "integer" }, "threshold_reached": { "type": "number" } } } }, "confidence": { "type": "number", "description": "The probability the bound holds, for a bound that holds with a stated probability (stabilizer_rank's sampled mode)." } } }, "amplitude": { "type": "object", "required": [ "bits", "re", "im" ], "properties": { "bits": { "type": "string", "description": "One 0 or 1 per qubit, qubit n-1 first." }, "re": { "type": "number" }, "im": { "type": "number" }, "bound": { "type": "number", "minimum": 0, "description": "A bound on |exact − value| of the amplitude, holding with the probability confidence states (stabilizer_rank's sampled mode)." }, "confidence": { "type": "number", "description": "The probability the bound holds." } } }, "energy": { "description": "The CPU energy of the job's process as the kernel counts it, with its uncertainty and what it leaves out, or unmetered with the reason.", "anyOf": [ { "type": "object", "required": [ "unmetered" ], "properties": { "unmetered": { "type": "string" }, "service_kwh": { "type": "number", "description": "A provider job: the provider's own figure." }, "service_kwh_is": { "type": "string" } } }, { "type": "object", "required": [ "joules_micro", "energy_provenance", "coverage" ], "properties": { "joules_micro": { "type": "integer", "minimum": 1 }, "energy_provenance": { "type": "string" }, "energy_uncertainty": { "type": "object", "properties": { "relative_ppm": { "type": "integer" }, "window_us": { "type": "integer" } } }, "energy_counter_filtering": { "type": "string" }, "coverage": { "enum": [ "whole", "partial" ] }, "covers": { "type": "string" }, "excludes": { "type": "array", "items": { "type": "string" } }, "cpu_ms": { "type": "integer" }, "source": { "type": "string" }, "attribution": { "enum": [ "process", "none" ], "description": "Whose energy it is: the job's worker process, or none (the processor packages' over the job's window, every process on the host in it)." }, "packages": { "type": "integer", "minimum": 1, "description": "The processor packages read." }, "concurrent_jobs": { "type": "integer", "minimum": 0, "description": "Other jobs that ran on the host during the window." }, "counter": { "type": "object", "description": "The package counter as seen: the longest it went between updates, and the smallest step it took.", "properties": { "update_us": { "type": "integer", "minimum": 0 }, "step_uj": { "type": "integer", "minimum": 0 } } }, "declared": { "type": "string", "description": "What the stated uncertainty covers, and what it does not." } } } ] }, "ideal": { "description": "A provider job: the circuit's exact distribution set beside the measured counts.", "anyOf": [ { "type": "object", "required": [ "computed", "total_variation_distance", "hellinger_fidelity" ], "properties": { "computed": { "const": true }, "method": { "type": "string" }, "total_variation_distance": { "type": "number" }, "hellinger_fidelity": { "type": "number" }, "sampling_tvd_expected": { "type": "number" }, "ideal_outcomes": { "type": "integer" }, "note": { "type": "string" } } }, { "type": "object", "required": [ "computed", "why" ], "properties": { "computed": { "const": false }, "why": { "type": "string" } } } ] }, "target_placement": { "type": "object", "description": "A run on a device target: which target (its hash, as its receipt binds it), its calibration snapshot, where the program was placed and why, and the noise derived from the target.", "required": [ "name", "hash" ], "properties": { "name": { "type": "string" }, "hash": { "type": "string" }, "hash_is": { "type": "string" }, "calibration": { "type": "object", "properties": { "id": { "type": "string" }, "timestamp": { "type": "string" } } }, "source": { "type": "object", "properties": { "format": { "type": "string" }, "note": { "type": "string" } } }, "placement": { "type": "object", "description": "The native gate set, the layout and routes chosen, the swaps, the expected success beside the fewest-swaps layout's (and, where the target states its gates' errors' standard deviations, expected_success_interval at one standard deviation each way), and the check of the compiled program." }, "compiled": { "type": "object", "description": "The program as compiled for the target, in the form a provider's result gives its own: its text (OpenQASM 3 on physical qubits $p, logical qubit i measured into c[i] where it ends), its layouts, and the equivalence checker's verdict on it against the request's program, decided before anything ran (a refuted one is not run).", "required": ["qasm3", "layout", "final_layout", "equivalence"], "properties": { "qasm3": { "type": "string" }, "layout": { "type": "array", "items": { "type": "integer" } }, "final_layout": { "type": "array", "items": { "type": "integer" } }, "equivalence": { "$ref": "#/properties/compiled/anyOf/0/properties/equivalence" } } }, "noise": { "type": "object", "description": "The noise model derived from the target's calibration: its channels, durations and idling, and each qubit's readout; where the target states coherent errors, leakage, static ZZ or its errors' standard deviations, applied and ignored say what the model applied of them and what it leaves out." } } }, "fabric_parity": { "type": "object", "description": "A certificate's standing against the CPU reference: bit-exact, within a bound (max_ulp, max_abs), statistical (fidelity over shots) or uncertified. Only bit-exact members are placed.", "required": [ "tier" ], "properties": { "tier": { "enum": [ "bit-exact", "within", "statistical", "uncertified" ] }, "max_ulp": { "type": "integer", "minimum": 0 }, "max_abs": { "type": "number" }, "fidelity": { "type": "number" }, "shots": { "type": "integer", "minimum": 0 } } }, "fabric_member": { "type": "object", "description": "A member of the fabric and its certificate for the kernel: its id (which binds the device), its key, its class, the implementation, the parity tier, the certificate's digest (BLAKE3, hex), and the corpus it was earned on (its digest, generator and cases; the CPU reference's own standing has none).", "required": [ "member", "implementation", "parity", "certificate" ], "properties": { "member": { "type": "string" }, "key": { "type": "string" }, "class": { "type": "string" }, "implementation": { "type": "string" }, "parity": { "$ref": "#/$defs/fabric_parity" }, "certificate": { "type": "string" }, "corpus": { "type": "string" }, "generator": { "type": "string" }, "cases": { "type": "integer", "minimum": 0 }, "wide": { "$ref": "#/$defs/fabric_wide" }, "why": { "type": "string", "description": "For a member the job fell back from: how it failed." } } }, "fabric_wide": { "type": "object", "description": "A member's certificate for gates on more than three qubits at once (wai.quantum.sv/run-wide): a fusion width of 4 to 6, or a wider gate, runs kernels the pinned corpus does not reach, certified on a corpus of their own (sv64-wide-v1). A member is placed for such a job only when this certificate is bit-exact; one that is not, or has none, says why and runs only gates on up to three qubits at once.", "required": [ "parity" ], "properties": { "kernel": { "type": "string" }, "parity": { "$ref": "#/$defs/fabric_parity" }, "certificate": { "type": "string" }, "corpus": { "type": "string" }, "generator": { "type": "string" }, "cases": { "type": "integer", "minimum": 0 }, "why": { "type": "string" } } }, "fabric_auto": { "type": "object", "description": "Why auto placed the state where it ran: the rule (a member is placed only where the committed measurements show it faster than this host's CPU for the job's size and fusion width) and the measured row it rests on, with the host, the day and the load it was measured under. Present only when auto placed a state on a member.", "required": [ "rule", "host", "fusion", "from_qubits", "to_qubits" ], "properties": { "rule": { "type": "string" }, "host": { "type": "string", "description": "The host's processor as the measurements name it (cpu--)." }, "measured": { "type": "string", "description": "The day the host was measured (UTC)." }, "about": { "type": "string" }, "load": { "type": "string" }, "discovery_ms": { "type": "number", "description": "What discovering and certifying the host's members took, once per process, as measured." }, "fusion": { "type": "integer", "minimum": 1 }, "from_qubits": { "type": "integer", "minimum": 0 }, "to_qubits": { "type": "integer", "minimum": 0 }, "min_launches": { "type": "integer", "minimum": 0 }, "basis": { "type": "object", "description": "The measured row the job is judged by: the largest measured size at or below its own, the launches of its plan, the runs of each, and the spread of the CPU's and the member's times in milliseconds.", "required": [ "qubits", "launches", "runs", "cpu_ms", "member_ms" ], "properties": { "qubits": { "type": "integer", "minimum": 0 }, "launches": { "type": "integer", "minimum": 0 }, "runs": { "type": "integer", "minimum": 0 }, "cpu_ms": { "$ref": "#/$defs/fabric_spread" }, "member_ms": { "$ref": "#/$defs/fabric_spread" } } } } }, "fabric_spread": { "type": "object", "description": "The least, the median and the most of a measured row's runs, in milliseconds.", "required": [ "min", "median", "max" ], "properties": { "min": { "type": "number" }, "median": { "type": "number" }, "max": { "type": "number" } } }, "fabric": { "type": "object", "description": "Where the state vector, or the pauli method's sum of terms, ran: the kernel, the placement the job asked for, the member that ran it (or each partition's), each with its certificate, and the energy. Present when the job asked for a placement, or when auto placed the state on a member by measurement (`auto`); a job auto leaves on the CPU names nothing; the receipt seals it with the rest of the result. Every member placed is certified bit-exact, so the answers are the CPU's, byte for byte.", "required": [ "kernel", "asked", "parity", "energy" ], "properties": { "kernel": { "type": "string" }, "asked": { "description": "The placement the job asked for, as it gave it.", "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "member": { "type": "string" }, "key": { "type": "string" }, "class": { "type": "string" }, "implementation": { "type": "string" }, "parity": { "$ref": "#/$defs/fabric_parity" }, "certificate": { "type": "string" }, "corpus": { "type": "string" }, "generator": { "type": "string" }, "cases": { "type": "integer", "minimum": 0 }, "wide": { "$ref": "#/$defs/fabric_wide" }, "partitions": { "type": "array", "description": "Each partition's member, by the value of the state's top qubits: partition i holds the amplitudes whose top bits read i.", "items": { "$ref": "#/$defs/fabric_member" } }, "partition_qubits": { "type": "integer", "minimum": 0 }, "local_qubits": { "type": "integer", "minimum": 0 }, "segments": { "type": "integer", "minimum": 0, "description": "Runs of gates the partitions took in turn, between exchanges." }, "exchanges": { "type": "integer", "minimum": 0, "description": "Partition qubits exchanged with local ones through the host's copy of the state." }, "fell_back_from": { "type": "array", "description": "An accelerator request whose member failed during the run: each member that failed, in turn, with how; the member named above ran the job.", "items": { "$ref": "#/$defs/fabric_member" } }, "auto": { "$ref": "#/$defs/fabric_auto" }, "energy": { "$ref": "#/$defs/energy" }, "why": { "type": "string" } } }, "component": { "type": "object", "description": "One component that made the result (engine::registry): its kind, name and version, the BLAKE3 digest of its descriptor, and whether it is built in. A result carries these only when a registered component took part; one made by built-ins alone names them as it always has (its method, its compile's passes, its noise's channels and the engine's version), the digests of that version listed by the components list.", "required": [ "kind", "name", "version", "digest", "origin" ], "properties": { "kind": { "enum": [ "method", "pass", "channel", "front_end" ] }, "name": { "type": "string" }, "version": { "type": "string" }, "digest": { "type": "string", "pattern": "^[0-9a-f]{64}$", "description": "BLAKE3 of the component's descriptor in its canonical JSON (engine::registry::digest_of)." }, "origin": { "enum": [ "built-in", "registered" ], "description": "built-in: the engine's own; registered: a host's own, added in its process, not part of the engine." }, "certified": { "const": false, "description": "Beside a registered component: the engine does not certify it." } } }, "route_money": { "description": "What a route costs in money: free, an amount in a currency, or why that is not known. An unknown cost is not free.", "type": "object", "required": [ "free" ], "properties": { "free": { "type": "boolean" }, "amount": { "type": "string" }, "currency": { "type": "string" }, "unit": { "type": "string" }, "unknown": { "type": "string" }, "at_least": { "const": true, "description": "The amount is the least the job can come to: what it takes decides the rest, so it meets no ceiling (cost_at_least)." } } }, "route_price": { "description": "What a route costs, with what is really known: a method's memory and work as the planner counts them and its time at the planner's nominal rate; a provider's own estimate, with what that leaves out.", "type": "object", "required": [ "money", "time", "memory_bytes", "work", "energy", "leaves_out" ], "properties": { "money": { "$ref": "#/$defs/route_money" }, "time": { "type": "object", "required": [ "seconds" ], "properties": { "seconds": { "type": [ "number", "null" ], "minimum": 0 }, "basis": { "enum": [ "nominal", "provider" ] }, "why": { "type": "string" } } }, "memory_bytes": { "type": [ "number", "null" ], "minimum": 0 }, "work": { "type": [ "number", "null" ], "minimum": 0 }, "energy": { "type": "object", "required": [ "joules" ], "properties": { "joules": { "type": [ "number", "null" ], "minimum": 0, "description": "An estimate of what the run takes, from past runs, never a promise. A contract's max_joules is enforced by a live reading while the run goes; an estimate can only refuse a job clearly past a ceiling." }, "watch": { "type": "string", "description": "What reads the run while it runs, and what that covers: what stops it at a contract's max_joules." }, "unwatched": { "type": "string", "description": "Why nothing can read the run while it runs; under a ceiling the route is refused (energy_unwatched)." }, "basis": { "type": "string" }, "why": { "type": "string" } } }, "leaves_out": { "description": "What this price leaves out: time (it states no time), amount (it states no amount), energy, mitigation (what the provider's own mitigation costs or does), decoder (any decoder's latency), charged (what the provider charges may differ from what it estimates), cancel (its client cannot stop a job it sent).", "type": "array", "items": { "enum": [ "time", "amount", "energy", "mitigation", "decoder", "charged", "cancel" ] } }, "program": { "description": "What the job asks of a provider's device: its shots, and the compiled program's gates and swaps, and its expected success when a calibration states one.", "type": "object", "properties": { "shots": { "type": "integer", "minimum": 0 }, "native_gates": { "type": "integer", "minimum": 0 }, "two_qubit_gates": { "type": "integer", "minimum": 0 }, "swaps": { "type": "integer", "minimum": 0 }, "expected_success": { "type": "number" } } } } }, "route": { "description": "One route the planner could see: its class, its price or why it has none, and what came of it.", "type": "object", "required": [ "route", "kind", "class", "host_dependent", "price", "outcome" ], "properties": { "route": { "type": "string", "description": "method: or provider:." }, "kind": { "enum": [ "local", "provider" ] }, "method": { "type": "string" }, "provider": { "type": "string" }, "device": { "type": "string" }, "provenance": { "type": "string" }, "approximate": { "const": true }, "class": { "type": "string", "description": "The accuracy class its result has at worst: a matrix product state's is heuristic, though its result may say exact." }, "host_dependent": { "type": "boolean", "description": "Whether it depends on the host: a provider's, a method on a GPU, or a registered method." }, "auto_rank": { "type": [ "integer", "null" ], "minimum": 0, "description": "On a local route: its rank in auto's order for the job's question, or null where auto does not try it; a built-in method's is section 8.7's table." }, "price": { "anyOf": [ { "$ref": "#/$defs/route_price" }, { "type": "null" } ] }, "outcome": { "enum": [ "chosen", "met", "rejected" ] }, "rejected": { "type": "object", "required": [ "code", "why" ], "properties": { "code": { "enum": [ "not_named", "fabric", "class", "cannot", "memory", "providers", "deadline", "deadline_unknown", "cost", "cost_currency", "cost_unknown", "cost_at_least", "cost_no_ceiling", "energy", "energy_unwatched" ] }, "why": { "type": "string" } } } } }, "planner": { "description": "Why this route ran (wai.quantum.planner/1): every route the host could see, each one's price or reason for rejection, and the choice. Sealed by the receipt; a verifier recomputes each route's outcome and the choice from what it states (wai/extensions/quantum-providers.md section 8.7). A plan carries it too, with the refusal in place of the choice when no route meets the contract.", "type": "object", "required": [ "format", "wanted", "wanted_from", "auto", "host", "routes", "choice", "why", "stable", "named", "question" ], "properties": { "format": { "const": "wai.quantum.planner/1" }, "wanted": { "type": [ "string", "null" ], "description": "The class wanted: the contract's, else that of the route the job names or auto's pick." }, "wanted_from": { "enum": [ "contract", "named", "auto", null ] }, "named": { "type": [ "string", "null" ], "description": "The route the job names: the provider or the method its request names, or the one method a device target's job runs on; null when it names none." }, "question": { "enum": [ "noise", "counts", "expectations", "amplitudes" ], "description": "The question the job asks, read from its request, which orders the methods auto tries (section 8.7)." }, "auto": { "type": [ "string", "null" ], "description": "The route auto picks, when the job leaves the method to it." }, "host": { "type": "object", "required": [ "job_bytes", "providers" ], "properties": { "job_bytes": { "type": "number", "minimum": 0 }, "providers": { "type": "array", "items": { "type": "string" } } } }, "routes": { "type": "array", "items": { "$ref": "#/$defs/route" } }, "choice": { "type": [ "string", "null" ] }, "why": { "type": "string" }, "refusal": { "description": "When no route meets the contract, in a plan: the refusal as data.", "type": "object" }, "stable": { "type": "object", "required": [ "scope", "routes", "digest", "choice" ], "properties": { "scope": { "type": "string" }, "routes": { "type": "array", "items": { "type": "string" } }, "digest": { "type": "string" }, "choice": { "type": "boolean" } } }, "shadow": { "description": "The classical method that would shadow a provider's answer within the contract, or why none can.", "type": "object", "required": [ "route" ], "properties": { "route": { "type": [ "string", "null" ] }, "class": { "type": "string" }, "request": { "type": "object" }, "budget_seconds": { "type": "number", "minimum": 0 }, "price": { "$ref": "#/$defs/route_price" }, "code": { "enum": [ "budget", "memory", "none" ] }, "why": { "type": "string" }, "tried": { "type": "array", "items": { "type": "object", "properties": { "route": { "type": "string" }, "code": { "type": "string" }, "why": { "type": "string" } } } } } }, "kept": { "description": "What the contract asked, against what happened; each kept is null when it cannot be said. A result that missed one is sealed and says so.", "type": "object", "properties": { "deadline": { "type": "object", "required": [ "seconds", "elapsed_ms", "kept" ], "properties": { "seconds": { "type": "number" }, "elapsed_ms": { "type": [ "integer", "null" ], "minimum": 0 }, "kept": { "type": [ "boolean", "null" ] } } }, "energy": { "type": "object", "required": [ "max_joules", "joules", "kept" ], "properties": { "max_joules": { "type": "number" }, "joules": { "type": [ "number", "null" ] }, "kept": { "type": [ "boolean", "null" ] } } }, "cost": { "type": "object", "required": [ "max_cost", "charged", "kept" ], "properties": { "max_cost": { "type": "object", "properties": { "amount": { "type": "string" }, "currency": { "type": "string" } } }, "charged": { "type": [ "object", "null" ], "properties": { "amount": { "type": "string" }, "currency": { "type": "string" } } }, "kept": { "type": [ "boolean", "null" ] } } } } } } }, "shadow": { "description": "A classical method's answer beside a provider's, and their distance, for a contract job a provider answered; or why there is none. Its request can be run again by anyone, to the same counts.", "type": "object", "required": [ "ran" ], "properties": { "ran": { "type": "boolean" }, "route": { "type": "string" }, "accuracy": { "$ref": "#/$defs/accuracy" }, "request": { "type": "object", "properties": { "qasm": { "type": "string" }, "shots": { "type": "integer" }, "seed": { "type": "integer" }, "method": { "type": "string" } } }, "shots": { "type": "integer", "minimum": 1 }, "counts": { "type": "object", "additionalProperties": { "type": "integer", "minimum": 1 } }, "distinct_outcomes": { "type": "integer", "minimum": 0 }, "omitted_shots": { "type": "integer", "minimum": 0 }, "distance": { "type": "object", "required": [ "computed" ], "properties": { "computed": { "type": "boolean" }, "numerator": { "type": "integer", "minimum": 0 }, "denominator": { "type": "integer", "minimum": 1 }, "total_variation": { "type": "number", "minimum": 0, "maximum": 1 }, "hellinger_fidelity": { "type": "number" }, "sampling_tvd_bound": { "type": "number", "minimum": 0, "maximum": 1, "description": "A bound on the total variation the shots alone leave between two samples of one distribution, on average (section 8.7): each outcome's pooled count split as a fair coin splits it." }, "why": { "type": "string" } } }, "elapsed_ms": { "type": "integer", "minimum": 0 }, "code": { "type": "string" }, "why": { "type": "string" } } } } }