WAI Quantum MCP
An official MCP server operated by Transaction Science that allows agents to run OpenQASM 3 quantum circuits on a free job service without authentication. It provides tools for executing circuits, verifying signed receipts, estimating resources, and diagnosing quantum programs.
Endpoint and access
No sign-in to connect and list tools. Individual tools may still need a vendor account, credentials, or permissions; check the documented prerequisites.
https://wai.transaction.science/quantum-jobs/mcpWhat you can do with it
- Run quantum circuits
- Verify quantum receipts
- Estimate resources
- Critique QASM programs
Source and maintenance
Protocol and capabilities
- Server
- wai-quantum 0.2.0
- MCP protocol
- 2025-06-18
- Tools
- 21 advertised
- Resources
- 9 advertised
- Resource templates
- 0 advertised
- Prompts
- 3 advertised
{
"tools": {
"listChanged": false
},
"prompts": {
"listChanged": false
},
"resources": {
"listChanged": false
}
}Server-provided instructions
Untrusted server output shown for inspection. It is not Koskamo guidance and is excluded from knowledge search.
Tools
21 advertised
run_quantum_circuit — Run a quantum circuit
Run an OpenQASM program and return measurement counts, Pauli expectation values and/or amplitudes. The service chooses the method (bit-exact or double-precision state vector up to 32 qubits, single precision on a GPU to 33, stabilizer tableau for Clifford circuits up to 32768 qubits, matrix product states up to 4096, sparse Pauli dynamics for expectation values up to 1024 with an error bound, an exact density matrix or trajectories for noise), reports why and how accurate, and signs the result. Give `intent` (an exact distribution, or a reference program it must equal or whose state it must prepare) and the engine checks it with the run. Every answer carries `verdict`: the level the engine checked to (proof, evidence, executed, parsed, refused), whether the intent holds and a plain statement, sealed in the receipt. Waits up to 50 s; a longer job answers with status running and an id for get_quantum_job.
{
"type": "object",
"required": [
"qasm"
],
"properties": {
"qasm": {
"type": "string",
"description": "The program, OpenQASM 3 (or 2), read as the whole language: registers, aliases and slices; the standard gates, `U` and `gphase`; user `gate` definitions and `def` subroutines, inlined; every modifier (`ctrl @`, `negctrl @`, `inv @`, `pow(k) @`) on any gate, lowered exactly; classical types (int, uint, float, angle, complex, bool, bit, arrays), their arithmetic and built-in functions, computed on reading; `for`, `while`, `switch`, `break`, `continue`; measurement and `reset` anywhere; classical control on measured bits (`if (c[0]) x q[1];`, `if (c >= 2) { … } else { … }`, `&&`, `||`); a `while` on measured bits takes `@wai.max_iterations N` before it. `output` declarations come back in the result; `delay`, `box` and `stretch` are carried and labelled as not applied; `defcal` and `cal` are kept, not run. A program that measures in the middle or acts on what it measured runs on statevector or stabilizer: counts split their shots at each measurement; expectation values are exact, of the state before the final measurements. What the reader refuses comes back with a code, as `[Q103]`; qasm_diagnostics says what each code means."
},
"seed": {
"type": "integer",
"description": "Sampling seed (default 1); the same job and seed give the same counts."
},
"noise": {
"type": "object",
"properties": {
"readout": {
"type": "number"
},
"dephasing": {
"type": "number"
},
"depolarizing_1q": {
"type": "number"
},
"depolarizing_2q": {
"type": "number"
},
"amplitude_damping": {
"type": "number"
}
},
"description": "Optional noise, each a probability: depolarizing_1q, depolarizing_2q, amplitude_damping, dephasing (after each gate on its qubits), readout (each measured bit)."
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Measurement shots. Default 1024 when no observables or amplitudes are asked for."
},
"intent": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0,
"description": "For a sampled intent: the sampling seed (default: the job's)."
},
"test": {
"enum": [
"chi_squared",
"g_test"
],
"description": "For a sampled intent: Pearson's chi-squared test, or the G-test (the likelihood ratio)."
},
"alpha": {
"type": "number",
"description": "For a sampled intent: the significance level, as 0.01.",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1,
"description": "For a sampled intent: the samples the test takes."
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"description": "A distribution the program's samples are held to: the program run as the job runs it for `shots` at `seed`, and the counts tested by `test` at the significance level `alpha` (all three required). Evidence, never proof.",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string",
"description": "A reference program's text: the same state from |0…0⟩, the same qubits measured into the same bits."
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "For a distribution: the total variation distance it is held within (default 1e-9)."
},
"equivalent": {
"type": "string",
"description": "A reference program's text: the same circuit up to a global phase, by the equivalence ladder."
},
"distribution": {
"type": "object",
"description": "The exact distribution of the measured bits, keyed by the classical bits with the highest bit first, as {\"00\": 0.5, \"11\": 0.5}.",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled; with note, name, and \"require\": \"proof\" (evidence then counts as unchecked)."
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0,
"description": "For a sampled intent: the sampling seed (default: the job's)."
},
"test": {
"enum": [
"chi_squared",
"g_test"
],
"description": "For a sampled intent: Pearson's chi-squared test, or the G-test (the likelihood ratio)."
},
"alpha": {
"type": "number",
"description": "For a sampled intent: the significance level, as 0.01.",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1,
"description": "For a sampled intent: the samples the test takes."
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"description": "A distribution the program's samples are held to: the program run as the job runs it for `shots` at `seed`, and the counts tested by `test` at the significance level `alpha` (all three required). Evidence, never proof.",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string",
"description": "A reference program's text: the same state from |0…0⟩, the same qubits measured into the same bits."
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "For a distribution: the total variation distance it is held within (default 1e-9)."
},
"equivalent": {
"type": "string",
"description": "A reference program's text: the same circuit up to a global phase, by the equivalence ladder."
},
"distribution": {
"type": "object",
"description": "The exact distribution of the measured bits, keyed by the classical bits with the highest bit first, as {\"00\": 0.5, \"11\": 0.5}.",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled; with note, name, and \"require\": \"proof\" (evidence then counts as unchecked)."
},
"minItems": 1
}
],
"description": "What the program must do, checked by the engine with the run: the result's `verdict` states how far it checked (proof, evidence, executed, parsed, refused) and whether the intent holds, sealed by the receipt."
},
"method": {
"enum": [
"auto",
"exact",
"statevector",
"statevector_single",
"stabilizer",
"pauli",
"mps",
"tensor_network",
"cutrank",
"cutrank_single",
"density_matrix",
"trajectories"
],
"type": "string",
"description": "Leave as auto unless you need a particular method."
},
"repair": {
"description": "Repair the program first, on the lines its diagnostics flag alone (as repair_qasm does): true, or the choices {\"max_iterations\": N, \"dyadic_bits\": K, \"sizes\": {\"q\": 3}}. The result's `repaired` holds the program that ran and each repair."
},
"target": {
"description": "A device target: a built-in target's name (list_targets) or a target document (wai.quantum.target/1). The program is then compiled to its gates, placed where it is most likely to succeed and simulated under its noise, its hash in the receipt; not with noise or amplitudes. The service reads the document given and fetches nothing."
},
"compile": {
"type": "object",
"properties": {
"dd": {
"enum": [
"xx",
"xy4"
],
"type": "string",
"description": "Dynamical decoupling in each window where a qubit idles long enough, checked to change nothing without noise."
},
"basis": {
"enum": [
"clifford_t",
"standard"
],
"type": "string",
"description": "clifford_t (default): every rotation off the multiples of π/4 written as a Clifford+T word within its share of epsilon; standard: nothing approximated."
},
"level": {
"type": "integer",
"maximum": 2,
"minimum": 0,
"description": "0: lower and approximate; 1 (default): also checked rewrites and phase folding; 2: also one- and two-qubit resynthesis."
},
"twirl": {
"description": "Twirl each two-qubit Clifford gate with Paulis from a seeded stream: true, or {\"seed\": N}. One seed is one instance, checked to be the same circuit."
},
"epsilon": {
"type": "number",
"description": "The most the output may differ from the program in the operator norm, up to a global phase, shared by its rotations (default 1e-6).",
"exclusiveMinimum": 0
}
},
"description": "Compile the program first (as compile_qasm does) and run the compiled circuit: with basis clifford_t it runs bit-exact, and the result's `compiled` states its distance from the program."
},
"options": {
"type": "object",
"description": "Advanced, per method: max_bond (mps), threshold and max_terms (pauli), fusion (statevector), trajectories."
},
"mitigate": {
"anyOf": [
{
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
],
"type": "string"
},
{
"type": "object",
"required": [
"method"
],
"properties": {
"keep": {
"type": "integer",
"minimum": 0,
"description": "cdr: non-Clifford gates each training circuit keeps (default 2, and always one fewer than the program has)."
},
"seed": {
"type": "integer",
"minimum": 0
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 1,
"description": "Shots per circuit (default 10000; 2000 per sampled circuit for pec)."
},
"method": {
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
],
"type": "string"
},
"factors": {
"type": "array",
"items": {
"type": "number"
},
"description": "zne: odd whole numbers (default 1, 3, 5); pea: factors from 1 to 10 (default 1, 1.5, 2)."
},
"samples": {
"type": "integer",
"minimum": 2,
"description": "pec: sampled circuits (default 200)."
},
"training": {
"type": "integer",
"minimum": 3,
"description": "cdr: training circuits (default 16)."
},
"learn_shots": {
"type": "integer",
"minimum": 100,
"description": "pea, pec: shots per depth of the cycle benchmarking that learns the noise (default 60000)."
},
"extrapolation": {
"enum": [
"richardson",
"linear",
"exponential"
],
"type": "string"
}
}
}
],
"description": "Mitigate the job's expectation values (or, for readout, its counts) under its own noise: zne (the whole program folded U(U†U)^k and extrapolated), pea (the noise learned as a sparse Pauli–Lindblad model and amplified), pec (the learned channels inverted and sampled), cdr (a line fitted over near-Clifford training circuits), vd (two copies), readout (the counts' flips inverted). Needs noise and observables (shots for readout), at most 8 qubits. The result's `mitigation` gives raw and mitigated values with standard errors, the ideal value (known because this is a simulation), the method's bias and variance assumptions and its cost. A method's name, or an object."
},
"amplitudes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Basis states to give amplitudes of: one character per qubit, qubit n-1 first, e.g. \"0011\"."
},
"observables": {
"type": "array",
"items": {
"type": "string"
},
"description": "Pauli strings to take expectation values of, e.g. [\"Z0\", \"Z0 Z1\", \"X2 Y3\"]. Qubits count from 0."
}
}
}{
"$id": "wai-quantum://schemas/run_quantum_circuit/1",
"type": "object",
"anyOf": [
{
"anyOf": [
{
"type": "object",
"title": "wai.quantum.job/1",
"required": [
"status",
"request"
],
"properties": {
"id": {
"type": "string",
"description": "The job service's id for the job."
},
"why": {
"type": "string",
"description": "Why the plan chose the method."
},
"error": {
"type": "string",
"description": "Why a job failed."
},
"method": {
"type": "string",
"description": "The method the plan chose; set for a set."
},
"result": {
"anyOf": [
{
"type": "object",
"title": "wai.quantum.job-result/1",
"required": [
"method",
"qubits",
"gates",
"accuracy"
],
"properties": {
"job": {
"type": "object",
"description": "A provider job: the provider's job id and its status checks."
},
"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."
},
"gates": {
"type": "integer",
"minimum": 0
},
"ideal": {
"anyOf": [
{
"type": "object",
"required": [
"computed",
"total_variation_distance",
"hellinger_fidelity"
],
"properties": {
"note": {
"type": "string"
},
"method": {
"type": "string"
},
"computed": {
"const": true
},
"ideal_outcomes": {
"type": "integer"
},
"hellinger_fidelity": {
"type": "number"
},
"sampling_tvd_expected": {
"type": "number"
},
"total_variation_distance": {
"type": "number"
}
}
},
{
"type": "object",
"required": [
"computed",
"why"
],
"properties": {
"why": {
"type": "string"
},
"computed": {
"const": false
}
}
}
],
"description": "A provider job: the circuit's exact distribution set beside the measured counts."
},
"shots": {
"type": "integer",
"minimum": 0,
"description": "The shots, where the method names them in the result (trajectories, provider)."
},
"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
}
},
"energy": {
"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": {
"covers": {
"type": "string"
},
"cpu_ms": {
"type": "integer"
},
"source": {
"type": "string"
},
"counter": {
"type": "object",
"properties": {
"step_uj": {
"type": "integer",
"minimum": 0
},
"update_us": {
"type": "integer",
"minimum": 0
}
},
"description": "The package counter as seen: the longest it went between updates, and the smallest step it took."
},
"coverage": {
"enum": [
"whole",
"partial"
]
},
"declared": {
"type": "string",
"description": "What the stated uncertainty covers, and what it does not."
},
"excludes": {
"type": "array",
"items": {
"type": "string"
}
},
"packages": {
"type": "integer",
"minimum": 1,
"description": "The processor packages read."
},
"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)."
},
"joules_micro": {
"type": "integer",
"minimum": 1
},
"concurrent_jobs": {
"type": "integer",
"minimum": 0,
"description": "Other jobs that ran on the host during the window."
},
"energy_provenance": {
"type": "string"
},
"energy_uncertainty": {
"type": "object",
"properties": {
"window_us": {
"type": "integer"
},
"relative_ppm": {
"type": "integer"
}
}
},
"energy_counter_filtering": {
"type": "string"
}
}
}
],
"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."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string",
"description": "Its semantic version, as MAJOR.MINOR.PATCH."
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"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
},
"schema": {
"const": "wai.quantum.job-result/1",
"description": "The schema the result follows."
},
"target": {
"type": "object",
"required": [
"name",
"hash"
],
"properties": {
"hash": {
"type": "string"
},
"name": {
"type": "string"
},
"noise": {
"type": "object",
"description": "The noise model derived from the target's calibration: its channels, durations and idling, and each qubit's readout."
},
"source": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"format": {
"type": "string"
}
}
},
"hash_is": {
"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 the check of the compiled program."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"timestamp": {
"type": "string"
}
}
}
},
"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."
},
"timing": {
"type": "object",
"required": [
"applied",
"why"
],
"properties": {
"why": {
"type": "string"
},
"code": {
"type": "string"
},
"applied": {
"type": "boolean"
}
},
"description": "A program that states durations (delay, box, stretch) the method does not apply: said so, with the reader's code."
},
"dynamic": {
"type": "object",
"properties": {
"branches_run": {
"type": "integer",
"minimum": 0
},
"states_at_once": {
"type": "integer",
"minimum": 0
},
"branches_weighed": {
"type": "integer",
"minimum": 0
},
"measurements_and_resets": {
"type": "integer",
"minimum": 0
}
},
"description": "A program that measures in the middle, resets or branches on a measured bit: how it ran."
},
"outputs": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"type"
],
"properties": {
"bits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
}
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"value": {
"description": "A number, a boolean, a bit string, a duration's text, {\"re\", \"im\"}, or an array of them."
}
}
},
"description": "The program's output declarations: each its name and type, and its value, or the places of its bits in each outcome."
},
"receipt": {
"anyOf": [
{
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
{
"type": "object",
"required": [
"alg",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128
}
},
"description": "The first form, before canon: the digest is over serde_json's own text of each, under the domain ending \\x01. Never written now; still verified."
}
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"warning": {
"type": "string"
},
"accuracy": {
"type": "object",
"required": [
"class"
],
"properties": {
"note": {
"type": "string"
},
"batch": {
"type": "integer"
},
"class": {
"enum": [
"bit-exact",
"exact",
"single",
"bounded",
"estimate",
"heuristic",
"measured"
],
"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 device returned, not reproducible by recomputation."
},
"shots": {
"type": "integer"
},
"device": {
"type": "string"
},
"fusion": {
"type": "integer"
},
"max_cut": {
"type": "integer"
},
"max_bond": {
"type": "integer"
},
"histories": {
"type": "integer"
},
"threshold": {
"type": "number"
},
"max_weight": {
"type": [
"integer",
"null"
]
},
"order_work": {
"type": "number"
},
"truncations": {
"type": "integer"
},
"trajectories": {
"type": "integer"
},
"max_bond_used": {
"type": "integer"
},
"discarded_weight": {
"type": "number"
},
"fidelity_estimate": {
"type": "number"
},
"gate_applications": {
"type": "integer"
}
},
"description": "What the method promises of the numbers it gave."
},
"compiled": {
"anyOf": [
{
"type": "object",
"required": [
"basis",
"program"
],
"properties": {
"hash": {
"type": "string"
},
"basis": {
"type": "string"
},
"swaps": {
"type": "integer"
},
"layout": {
"type": "array",
"items": {
"type": "integer"
}
},
"checked": {
"type": "string"
},
"program": {
"type": "string"
},
"placement": {
"type": "object",
"description": "Where the program was placed on the device's qubits, and why."
},
"final_layout": {
"type": "array",
"items": {
"type": "integer"
}
},
"native_gates": {
"type": "integer"
},
"two_qubit_gates": {
"type": "integer"
}
},
"description": "A provider job: the program sent, compiled exactly to the device's own gates: its basis (the device's gate set), the BLAKE3 of its OpenQASM 3 text, its counts of gates and swaps, its layouts, and the check it passed before it was sent."
},
{
"type": "object",
"required": [
"basis",
"verdict"
],
"properties": {
"note": {
"type": "string"
},
"basis": {
"enum": [
"clifford_t",
"standard"
],
"description": "The gate set the program was compiled to."
},
"level": {
"type": "integer",
"minimum": 0
},
"output": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"source": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"epsilon": {
"type": "number",
"description": "The budget asked for."
},
"verdict": {
"type": "string"
},
"distance": {
"type": [
"number",
"null"
],
"description": "The bound the passes' distances add to."
},
"certificate": {
"type": [
"string",
"null"
],
"description": "The BLAKE3 of the compile certificate's RFC 8785 text, in hex."
}
},
"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."
}
],
"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."
},
"provider": {
"type": "object",
"description": "A provider job: the provider's name, kind and protocol, the device, its provenance, and the hash of its description."
},
"repaired": {
"type": "object",
"properties": {
"qasm": {
"type": "string"
},
"repairs": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"by",
"edits"
],
"properties": {
"by": {
"enum": [
"engine",
"proposal"
]
},
"code": {
"type": "string"
},
"rule": {
"type": "string"
},
"edits": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"after": {
"type": [
"string",
"null"
]
},
"before": {
"type": [
"string",
"null"
]
}
}
}
},
"flagged": {
"type": "array",
"items": {
"type": "integer"
}
}
}
}
},
"needs_person": {
"type": "array",
"items": {
"type": "object"
}
}
},
"description": "A job asked to repair its program first: the program that ran, each repair, and what needs a person."
},
"amplitudes": {
"type": "array",
"items": {
"type": "object",
"required": [
"bits",
"re",
"im"
],
"properties": {
"im": {
"type": "number"
},
"re": {
"type": "number"
},
"bits": {
"type": "string",
"description": "One 0 or 1 per qubit, qubit n-1 first."
}
}
}
},
"elapsed_ms": {
"type": "integer",
"minimum": 0,
"description": "Wall time of the run, where the host has a clock (not in a browser tab)."
},
"mitigation": {
"type": "object",
"title": "wai.quantum.mitigation/1",
"required": [
"method",
"options",
"assumptions"
],
"properties": {
"cost": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"shots": {
"type": "integer",
"minimum": 0
},
"circuits": {
"type": "integer",
"minimum": 0
}
},
"description": "The circuits and shots it spent beyond the job's own."
},
"note": {
"type": "string"
},
"noise": {
"type": "string",
"description": "How the job's noise model is read for the method."
},
"method": {
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
"details": {
"type": "object",
"description": "The method's own: the folded scales and the folding check (zne), the learned model and the amplified values (pea), the quasi-probability and the value it converges to (pec), the training fits (cdr), the purity (vd), the flip and its amplification (readout).",
"additionalProperties": true
},
"options": {
"type": "object",
"properties": {
"keep": {
"type": "integer"
},
"seed": {
"type": "integer"
},
"shots": {
"type": "integer"
},
"method": {
"type": "string"
},
"factors": {
"type": "array",
"items": {
"type": "number"
}
},
"samples": {
"type": "integer"
},
"training": {
"type": "integer"
},
"learn_shots": {
"type": "integer"
},
"extrapolation": {
"enum": [
"richardson",
"linear",
"exponential"
]
}
},
"description": "The options it ran with, the defaults filled in."
},
"assumptions": {
"type": "object",
"properties": {
"bias": {
"type": "string"
},
"variance": {
"type": "string"
}
}
},
"observables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "number"
},
"coeff": {
"type": "number"
},
"ideal": {
"type": "number"
},
"stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
},
"observable": {
"type": "string"
},
"raw_stderr": {
"type": "number"
}
},
"description": "One observable: its raw value and the mitigated one, each with its standard error, and the ideal value a simulation knows."
}
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "number"
},
"bits": {
"type": "string"
},
"stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
}
}
},
"description": "readout: each outcome's raw share and its mitigated quasi-probability, with its standard error."
}
},
"description": "A job's mitigation (its request's mitigate, engine::mitigate), in its result: the method and the options it ran with, its bias and variance assumptions, each observable raw and mitigated with a standard error each and the ideal value (or, for readout, the counts inverted as a quasi-distribution), the method's own details and what it spent. docs/qec.md describes each method."
},
"provenance": {
"type": "object",
"title": "wai.quantum.provenance/1",
"required": [
"schema",
"circuit",
"computer",
"compilation",
"execution",
"software"
],
"properties": {
"schema": {
"const": "wai.quantum.provenance/1"
},
"circuit": {
"type": "object",
"required": [
"program"
],
"properties": {
"gates": {
"type": [
"integer",
"null"
]
},
"qubits": {
"type": "integer",
"minimum": 0
},
"program": {
"type": "string",
"description": "BLAKE3 of the program's text, in hex."
}
},
"description": "The program: the BLAKE3 digest of its text as given, its qubits and its gates."
},
"computer": {
"type": "object",
"required": [
"kind",
"method"
],
"properties": {
"kind": {
"const": "simulator"
},
"method": {
"type": "string"
},
"target": {
"type": "string",
"description": "The device target's hash; its layout, routes and noise are in the result's own target."
},
"accuracy": {
"type": [
"string",
"null"
]
}
},
"description": "What ran it: a classical simulator, the method and its accuracy class, and a device target's hash when the job named one."
},
"software": {
"type": "object",
"required": [
"engine",
"host"
],
"properties": {
"host": {
"type": "string"
},
"engine": {
"type": "string"
}
},
"description": "The engine's name and version, and the host's."
},
"execution": {
"type": "object",
"required": [
"plan"
],
"properties": {
"plan": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"work": {
"type": "integer",
"minimum": 0
},
"method": {
"type": "string"
},
"memory_bytes": {
"type": "integer",
"minimum": 0
}
}
},
"seed": {
"type": [
"integer",
"null"
]
},
"shots": {
"type": [
"integer",
"null"
]
}
},
"description": "The shots, the seed and the plan the job ran under; its identifier and times are the host's, outside the result."
},
"compilation": {
"type": "object",
"required": [
"asked"
],
"properties": {
"why": {
"type": "string"
},
"asked": {
"type": "boolean"
},
"basis": {
"type": [
"string",
"null"
],
"description": "The gate set compiled to: clifford_t or standard."
},
"level": {
"type": [
"integer",
"null"
]
},
"device": {
"type": "string",
"description": "A job on a device target, compiled exactly to its gates: where its layout and routes are."
},
"passes": {
"type": [
"array",
"null"
],
"items": {
"type": "object",
"properties": {
"pass": {
"type": "string"
},
"verdict": {
"type": [
"string",
"null"
]
}
}
}
},
"seeded": {
"const": false
},
"status": {
"const": "not-applicable"
},
"epsilon": {
"type": [
"number",
"null"
]
},
"distance": {
"type": [
"number",
"null"
]
},
"certificate": {
"type": [
"string",
"null"
]
}
},
"description": "Whether the job asked to be compiled; if it did, each pass in order with its check's verdict, the certificate's digest, the gate set compiled to (its basis), the level, the ε budget and the distance the result carries, and that no pass draws a random number."
}
},
"description": "What a result came from, under the five categories cross-platform provenance surveys use: the circuit, the computer, the compilation, the execution and the software. A host adds it to the results it seals (the job service does, and each item of a set); a result without it reads as it always did. wai-quantum-service/docs/provenance.md maps every field to where it is and whether the receipt seals it."
},
"state_hash": {
"type": "string",
"description": "The bit-exact method's statevector hash (BLAKE3, hex): the same on every machine."
},
"calibration": {
"type": [
"string",
"null"
],
"description": "A provider job: the calibration snapshot it ran under."
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
},
"description": "The reader's warnings and notes on the program, each with its code."
},
"expectations": {
"type": "array",
"items": {
"type": "object",
"required": [
"observable",
"coeff",
"value"
],
"properties": {
"bound": {
"type": "number",
"description": "A rigorous bound on |exact − value|, for the bounded class."
},
"coeff": {
"type": "number"
},
"value": {
"type": "number",
"description": "The coefficient times the expectation value."
},
"ladder": {
"type": "array",
"items": {
"type": "object",
"required": [
"threshold",
"value",
"bound"
],
"properties": {
"bound": {
"type": "number"
},
"value": {
"type": "number"
},
"threshold": {
"type": "number"
},
"peak_terms": {
"type": "integer"
},
"threshold_reached": {
"type": "number"
}
}
},
"description": "The value at thresholds a decade apart, the asked one last."
},
"stderr": {
"type": "number",
"description": "The standard error, for an estimate."
},
"max_terms": {
"type": "integer"
},
"observable": {
"type": "string"
},
"peak_terms": {
"type": "integer"
},
"threshold_reached": {
"type": "number"
}
}
}
},
"global_phase": {
"type": "string",
"description": "Why the amplitudes' global phase is not fixed, when it is not."
},
"omitted_shots": {
"type": "integer",
"minimum": 0
},
"contraction_flops": {
"type": "number",
"description": "The tensor network's contraction cost."
},
"distinct_outcomes": {
"type": "integer",
"minimum": 0
},
"outcome_dimension": {
"type": "integer",
"minimum": 0,
"description": "The stabilizer method: the dimension of the measured outcomes' affine space."
}
},
"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",
"title": "wai.quantum.set/1",
"required": [
"format",
"count",
"done",
"failed",
"root",
"items"
],
"properties": {
"done": {
"type": "integer",
"minimum": 0
},
"root": {
"type": "string",
"description": "The Merkle root of the items' leaves, in hex (domains moq-jwp:merkle-leaf and moq-jwp:merkle-node, version 1)."
},
"count": {
"type": "integer",
"minimum": 1
},
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"request",
"status",
"path"
],
"properties": {
"why": {
"type": "string"
},
"code": {
"type": "string",
"description": "A failed item's refusal code (engine::refusal)."
},
"path": {
"type": "array",
"items": {
"type": "string"
},
"description": "The item's leaf's sibling digests up to the root, in hex."
},
"error": {
"type": "string"
},
"index": {
"type": "integer",
"minimum": 0
},
"point": {
"type": "object",
"description": "A sweep's item: the value of each input it was run at."
},
"method": {
"type": "string"
},
"result": {
"type": "object",
"title": "wai.quantum.job-result/1",
"required": [
"method",
"qubits",
"gates",
"accuracy"
],
"properties": {
"job": {
"type": "object",
"description": "A provider job: the provider's job id and its status checks."
},
"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."
},
"gates": {
"type": "integer",
"minimum": 0
},
"ideal": {
"anyOf": [
{
"type": "object",
"required": [
"computed",
"total_variation_distance",
"hellinger_fidelity"
],
"properties": {
"note": {
"type": "string"
},
"method": {
"type": "string"
},
"computed": {
"const": true
},
"ideal_outcomes": {
"type": "integer"
},
"hellinger_fidelity": {
"type": "number"
},
"sampling_tvd_expected": {
"type": "number"
},
"total_variation_distance": {
"type": "number"
}
}
},
{
"type": "object",
"required": [
"computed",
"why"
],
"properties": {
"why": {
"type": "string"
},
"computed": {
"const": false
}
}
}
],
"description": "A provider job: the circuit's exact distribution set beside the measured counts."
},
"shots": {
"type": "integer",
"minimum": 0,
"description": "The shots, where the method names them in the result (trajectories, provider)."
},
"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
}
},
"energy": {
"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": {
"covers": {
"type": "string"
},
"cpu_ms": {
"type": "integer"
},
"source": {
"type": "string"
},
"counter": {
"type": "object",
"properties": {
"step_uj": {
"type": "integer",
"minimum": 0
},
"update_us": {
"type": "integer",
"minimum": 0
}
},
"description": "The package counter as seen: the longest it went between updates, and the smallest step it took."
},
"coverage": {
"enum": [
"whole",
"partial"
]
},
"declared": {
"type": "string",
"description": "What the stated uncertainty covers, and what it does not."
},
"excludes": {
"type": "array",
"items": {
"type": "string"
}
},
"packages": {
"type": "integer",
"minimum": 1,
"description": "The processor packages read."
},
"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)."
},
"joules_micro": {
"type": "integer",
"minimum": 1
},
"concurrent_jobs": {
"type": "integer",
"minimum": 0,
"description": "Other jobs that ran on the host during the window."
},
"energy_provenance": {
"type": "string"
},
"energy_uncertainty": {
"type": "object",
"properties": {
"window_us": {
"type": "integer"
},
"relative_ppm": {
"type": "integer"
}
}
},
"energy_counter_filtering": {
"type": "string"
}
}
}
],
"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."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string",
"description": "Its semantic version, as MAJOR.MINOR.PATCH."
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"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
},
"schema": {
"const": "wai.quantum.job-result/1",
"description": "The schema the result follows."
},
"target": {
"type": "object",
"required": [
"name",
"hash"
],
"properties": {
"hash": {
"type": "string"
},
"name": {
"type": "string"
},
"noise": {
"type": "object",
"description": "The noise model derived from the target's calibration: its channels, durations and idling, and each qubit's readout."
},
"source": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"format": {
"type": "string"
}
}
},
"hash_is": {
"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 the check of the compiled program."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"timestamp": {
"type": "string"
}
}
}
},
"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."
},
"timing": {
"type": "object",
"required": [
"applied",
"why"
],
"properties": {
"why": {
"type": "string"
},
"code": {
"type": "string"
},
"applied": {
"type": "boolean"
}
},
"description": "A program that states durations (delay, box, stretch) the method does not apply: said so, with the reader's code."
},
"dynamic": {
"type": "object",
"properties": {
"branches_run": {
"type": "integer",
"minimum": 0
},
"states_at_once": {
"type": "integer",
"minimum": 0
},
"branches_weighed": {
"type": "integer",
"minimum": 0
},
"measurements_and_resets": {
"type": "integer",
"minimum": 0
}
},
"description": "A program that measures in the middle, resets or branches on a measured bit: how it ran."
},
"outputs": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"type"
],
"properties": {
"bits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
}
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"value": {
"description": "A number, a boolean, a bit string, a duration's text, {\"re\", \"im\"}, or an array of them."
}
}
},
"description": "The program's output declarations: each its name and type, and its value, or the places of its bits in each outcome."
},
"receipt": {
"anyOf": [
{
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
{
"type": "object",
"required": [
"alg",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128
}
},
"description": "The first form, before canon: the digest is over serde_json's own text of each, under the domain ending \\x01. Never written now; still verified."
}
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"warning": {
"type": "string"
},
"accuracy": {
"type": "object",
"required": [
"class"
],
"properties": {
"note": {
"type": "string"
},
"batch": {
"type": "integer"
},
"class": {
"enum": [
"bit-exact",
"exact",
"single",
"bounded",
"estimate",
"heuristic",
"measured"
],
"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 device returned, not reproducible by recomputation."
},
"shots": {
"type": "integer"
},
"device": {
"type": "string"
},
"fusion": {
"type": "integer"
},
"max_cut": {
"type": "integer"
},
"max_bond": {
"type": "integer"
},
"histories": {
"type": "integer"
},
"threshold": {
"type": "number"
},
"max_weight": {
"type": [
"integer",
"null"
]
},
"order_work": {
"type": "number"
},
"truncations": {
"type": "integer"
},
"trajectories": {
"type": "integer"
},
"max_bond_used": {
"type": "integer"
},
"discarded_weight": {
"type": "number"
},
"fidelity_estimate": {
"type": "number"
},
"gate_applications": {
"type": "integer"
}
},
"description": "What the method promises of the numbers it gave."
},
"compiled": {
"anyOf": [
{
"type": "object",
"required": [
"basis",
"program"
],
"properties": {
"hash": {
"type": "string"
},
"basis": {
"type": "string"
},
"swaps": {
"type": "integer"
},
"layout": {
"type": "array",
"items": {
"type": "integer"
}
},
"checked": {
"type": "string"
},
"program": {
"type": "string"
},
"placement": {
"type": "object",
"description": "Where the program was placed on the device's qubits, and why."
},
"final_layout": {
"type": "array",
"items": {
"type": "integer"
}
},
"native_gates": {
"type": "integer"
},
"two_qubit_gates": {
"type": "integer"
}
},
"description": "A provider job: the program sent, compiled exactly to the device's own gates: its basis (the device's gate set), the BLAKE3 of its OpenQASM 3 text, its counts of gates and swaps, its layouts, and the check it passed before it was sent."
},
{
"type": "object",
"required": [
"basis",
"verdict"
],
"properties": {
"note": {
"type": "string"
},
"basis": {
"enum": [
"clifford_t",
"standard"
],
"description": "The gate set the program was compiled to."
},
"level": {
"type": "integer",
"minimum": 0
},
"output": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"source": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"epsilon": {
"type": "number",
"description": "The budget asked for."
},
"verdict": {
"type": "string"
},
"distance": {
"type": [
"number",
"null"
],
"description": "The bound the passes' distances add to."
},
"certificate": {
"type": [
"string",
"null"
],
"description": "The BLAKE3 of the compile certificate's RFC 8785 text, in hex."
}
},
"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."
}
],
"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."
},
"provider": {
"type": "object",
"description": "A provider job: the provider's name, kind and protocol, the device, its provenance, and the hash of its description."
},
"repaired": {
"type": "object",
"properties": {
"qasm": {
"type": "string"
},
"repairs": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"by",
"edits"
],
"properties": {
"by": {
"enum": [
"engine",
"proposal"
]
},
"code": {
"type": "string"
},
"rule": {
"type": "string"
},
"edits": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"after": {
"type": [
"string",
"null"
]
},
"before": {
"type": [
"string",
"null"
]
}
}
}
},
"flagged": {
"type": "array",
"items": {
"type": "integer"
}
}
}
}
},
"needs_person": {
"type": "array",
"items": {
"type": "object"
}
}
},
"description": "A job asked to repair its program first: the program that ran, each repair, and what needs a person."
},
"amplitudes": {
"type": "array",
"items": {
"type": "object",
"required": [
"bits",
"re",
"im"
],
"properties": {
"im": {
"type": "number"
},
"re": {
"type": "number"
},
"bits": {
"type": "string",
"description": "One 0 or 1 per qubit, qubit n-1 first."
}
}
}
},
"elapsed_ms": {
"type": "integer",
"minimum": 0,
"description": "Wall time of the run, where the host has a clock (not in a browser tab)."
},
"mitigation": {
"type": "object",
"title": "wai.quantum.mitigation/1",
"required": [
"method",
"options",
"assumptions"
],
"properties": {
"cost": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"shots": {
"type": "integer",
"minimum": 0
},
"circuits": {
"type": "integer",
"minimum": 0
}
},
"description": "The circuits and shots it spent beyond the job's own."
},
"note": {
"type": "string"
},
"noise": {
"type": "string",
"description": "How the job's noise model is read for the method."
},
"method": {
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
"details": {
"type": "object",
"description": "The method's own: the folded scales and the folding check (zne), the learned model and the amplified values (pea), the quasi-probability and the value it converges to (pec), the training fits (cdr), the purity (vd), the flip and its amplification (readout).",
"additionalProperties": true
},
"options": {
"type": "object",
"properties": {
"keep": {
"type": "integer"
},
"seed": {
"type": "integer"
},
"shots": {
"type": "integer"
},
"method": {
"type": "string"
},
"factors": {
"type": "array",
"items": {
"type": "number"
}
},
"samples": {
"type": "integer"
},
"training": {
"type": "integer"
},
"learn_shots": {
"type": "integer"
},
"extrapolation": {
"enum": [
"richardson",
"linear",
"exponential"
]
}
},
"description": "The options it ran with, the defaults filled in."
},
"assumptions": {
"type": "object",
"properties": {
"bias": {
"type": "string"
},
"variance": {
"type": "string"
}
}
},
"observables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "number"
},
"coeff": {
"type": "number"
},
"ideal": {
"type": "number"
},
"stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
},
"observable": {
"type": "string"
},
"raw_stderr": {
"type": "number"
}
},
"description": "One observable: its raw value and the mitigated one, each with its standard error, and the ideal value a simulation knows."
}
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "number"
},
"bits": {
"type": "string"
},
"stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
}
}
},
"description": "readout: each outcome's raw share and its mitigated quasi-probability, with its standard error."
}
},
"description": "A job's mitigation (its request's mitigate, engine::mitigate), in its result: the method and the options it ran with, its bias and variance assumptions, each observable raw and mitigated with a standard error each and the ideal value (or, for readout, the counts inverted as a quasi-distribution), the method's own details and what it spent. docs/qec.md describes each method."
},
"provenance": {
"type": "object",
"title": "wai.quantum.provenance/1",
"required": [
"schema",
"circuit",
"computer",
"compilation",
"execution",
"software"
],
"properties": {
"schema": {
"const": "wai.quantum.provenance/1"
},
"circuit": {
"type": "object",
"required": [
"program"
],
"properties": {
"gates": {
"type": [
"integer",
"null"
]
},
"qubits": {
"type": "integer",
"minimum": 0
},
"program": {
"type": "string",
"description": "BLAKE3 of the program's text, in hex."
}
},
"description": "The program: the BLAKE3 digest of its text as given, its qubits and its gates."
},
"computer": {
"type": "object",
"required": [
"kind",
"method"
],
"properties": {
"kind": {
"const": "simulator"
},
"method": {
"type": "string"
},
"target": {
"type": "string",
"description": "The device target's hash; its layout, routes and noise are in the result's own target."
},
"accuracy": {
"type": [
"string",
"null"
]
}
},
"description": "What ran it: a classical simulator, the method and its accuracy class, and a device target's hash when the job named one."
},
"software": {
"type": "object",
"required": [
"engine",
"host"
],
"properties": {
"host": {
"type": "string"
},
"engine": {
"type": "string"
}
},
"description": "The engine's name and version, and the host's."
},
"execution": {
"type": "object",
"required": [
"plan"
],
"properties": {
"plan": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"work": {
"type": "integer",
"minimum": 0
},
"method": {
"type": "string"
},
"memory_bytes": {
"type": "integer",
"minimum": 0
}
}
},
"seed": {
"type": [
"integer",
"null"
]
},
"shots": {
"type": [
"integer",
"null"
]
}
},
"description": "The shots, the seed and the plan the job ran under; its identifier and times are the host's, outside the result."
},
"compilation": {
"type": "object",
"required": [
"asked"
],
"properties": {
"why": {
"type": "string"
},
"asked": {
"type": "boolean"
},
"basis": {
"type": [
"string",
"null"
],
"description": "The gate set compiled to: clifford_t or standard."
},
"level": {
"type": [
"integer",
"null"
]
},
"device": {
"type": "string",
"description": "A job on a device target, compiled exactly to its gates: where its layout and routes are."
},
"passes": {
"type": [
"array",
"null"
],
"items": {
"type": "object",
"properties": {
"pass": {
"type": "string"
},
"verdict": {
"type": [
"string",
"null"
]
}
}
}
},
"seeded": {
"const": false
},
"status": {
"const": "not-applicable"
},
"epsilon": {
"type": [
"number",
"null"
]
},
"distance": {
"type": [
"number",
"null"
]
},
"certificate": {
"type": [
"string",
"null"
]
}
},
"description": "Whether the job asked to be compiled; if it did, each pass in order with its check's verdict, the certificate's digest, the gate set compiled to (its basis), the level, the ε budget and the distance the result carries, and that no pass draws a random number."
}
},
"description": "What a result came from, under the five categories cross-platform provenance surveys use: the circuit, the computer, the compilation, the execution and the software. A host adds it to the results it seals (the job service does, and each item of a set); a result without it reads as it always did. wai-quantum-service/docs/provenance.md maps every field to where it is and whether the receipt seals it."
},
"state_hash": {
"type": "string",
"description": "The bit-exact method's statevector hash (BLAKE3, hex): the same on every machine."
},
"calibration": {
"type": [
"string",
"null"
],
"description": "A provider job: the calibration snapshot it ran under."
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
},
"description": "The reader's warnings and notes on the program, each with its code."
},
"expectations": {
"type": "array",
"items": {
"type": "object",
"required": [
"observable",
"coeff",
"value"
],
"properties": {
"bound": {
"type": "number",
"description": "A rigorous bound on |exact − value|, for the bounded class."
},
"coeff": {
"type": "number"
},
"value": {
"type": "number",
"description": "The coefficient times the expectation value."
},
"ladder": {
"type": "array",
"items": {
"type": "object",
"required": [
"threshold",
"value",
"bound"
],
"properties": {
"bound": {
"type": "number"
},
"value": {
"type": "number"
},
"threshold": {
"type": "number"
},
"peak_terms": {
"type": "integer"
},
"threshold_reached": {
"type": "number"
}
}
},
"description": "The value at thresholds a decade apart, the asked one last."
},
"stderr": {
"type": "number",
"description": "The standard error, for an estimate."
},
"max_terms": {
"type": "integer"
},
"observable": {
"type": "string"
},
"peak_terms": {
"type": "integer"
},
"threshold_reached": {
"type": "number"
}
}
}
},
"global_phase": {
"type": "string",
"description": "Why the amplitudes' global phase is not fixed, when it is not."
},
"omitted_shots": {
"type": "integer",
"minimum": 0
},
"contraction_flops": {
"type": "number",
"description": "The tensor network's contraction cost."
},
"distinct_outcomes": {
"type": "integer",
"minimum": 0
},
"outcome_dimension": {
"type": "integer",
"minimum": 0,
"description": "The stabilizer method: the dimension of the measured outcomes' affine space."
}
},
"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."
},
"status": {
"enum": [
"done",
"failed"
]
},
"request": {
"type": "object",
"anyOf": [
{
"required": [
"qasm"
]
},
{
"required": [
"programs"
]
}
],
"title": "wai.quantum.job-request/1",
"properties": {
"qasm": {
"type": "string",
"description": "The program, in OpenQASM 3 or the OpenQASM 2 forms in common use."
},
"seed": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "The sampling seed (1 when not given): the same job and seed give the same counts."
},
"noise": {
"type": "object",
"properties": {
"readout": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"dephasing": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_1q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_2q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"amplitude_damping": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"description": "A noise model, each channel a probability. A channel not listed here is refused.",
"additionalProperties": false
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Measurement shots; 1024 when no observables or amplitudes are asked for, otherwise 0."
},
"sweep": {
"type": "object",
"description": "A set over the request's own qasm: values for each of the program's inputs (integer, float or angle), every combination run, the names in sorted order and the first varying slowest.",
"additionalProperties": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 1
}
},
"intent": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
"minItems": 1
}
],
"description": "What the program must do, checked with the run: one intent or a list. The result's verdict says how far it was checked."
},
"method": {
"type": "string",
"description": "auto (the default: the strongest method the program admits), or a method by its name as the methods list names it."
},
"repair": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sizes": {
"type": "object",
"additionalProperties": {
"type": "integer",
"minimum": 1
}
},
"dyadic_bits": {
"type": "integer",
"maximum": 32,
"minimum": 1
},
"max_iterations": {
"type": "integer",
"minimum": 1
}
}
}
],
"description": "Repair the program first on its flagged lines: true, or the choices."
},
"target": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"title": "wai.quantum.target/1",
"required": [
"format",
"name",
"source",
"qubits",
"gates",
"coupling"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"gates": {
"type": "array",
"items": {
"type": "object",
"required": [
"gate",
"qubits"
],
"properties": {
"gate": {
"type": "string",
"pattern": "^[a-z0-9_]{1,40}$"
},
"error": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "The average gate infidelity."
},
"qubits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 1
},
"duration_ns": {
"type": "number",
"minimum": 0,
"description": "Nanoseconds."
}
},
"additionalProperties": false
},
"maxItems": 262144,
"description": "Each native gate where the device runs it, sorted by gate then qubits."
},
"format": {
"const": "wai.quantum.target/1"
},
"qubits": {
"type": "array",
"items": {
"type": "object",
"required": [
"qubit"
],
"properties": {
"label": {
"type": "string",
"description": "The source's own name for it, when that is not its index."
},
"qubit": {
"type": "integer",
"minimum": 0,
"description": "Its index: its place in the list."
},
"t1_us": {
"type": "number",
"minimum": 0,
"description": "T1, microseconds."
},
"t2_us": {
"type": "number",
"minimum": 0,
"description": "T2 (the echo or Ramsey time the source reports), microseconds."
},
"readout": {
"type": "object",
"required": [
"p01",
"p10"
],
"properties": {
"p01": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 1 | holds 0)."
},
"p10": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 0 | holds 1)."
}
},
"additionalProperties": false
},
"measure_ns": {
"type": "number",
"minimum": 0,
"description": "The measurement's duration, nanoseconds."
},
"frequency_ghz": {
"type": "number",
"minimum": 0,
"description": "Its frequency, gigahertz."
}
},
"additionalProperties": false
},
"maxItems": 2048,
"minItems": 1,
"description": "Every qubit, in order."
},
"source": {
"type": "object",
"required": [
"format"
],
"properties": {
"note": {
"type": "string",
"maxLength": 400
},
"format": {
"type": "string",
"description": "The format the target was read from (wai-quantum targets import --help lists them)."
}
},
"additionalProperties": false
},
"coupling": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 2
},
"description": "The pairs a two-qubit gate may act on, each once, the lower qubit first, sorted."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 400,
"description": "The calibration snapshot's id, as the source names it, or a content id of the snapshot read."
},
"timestamp": {
"type": "string",
"maxLength": 400,
"description": "When the snapshot was taken, as the source writes it."
}
},
"additionalProperties": false
}
},
"description": "A device target: its qubits, the pairs it couples, its native gates with their errors and durations, and the calibration snapshot they come from. A value not known is left out, never written as zero. Every field but format, name, source, qubits, gates and coupling is optional, and a field the format does not name is refused, so a misspelt one never reads as absent. Its canonical text is its RFC 8785 form, and the BLAKE3 of that text, the target's hash, names the snapshot in a receipt.",
"additionalProperties": false
}
],
"description": "A device target: a built-in target's name, or a target document. The program is compiled to it, placed and simulated under its noise; noise may not be given beside it."
},
"compile": {
"type": "object",
"properties": {
"dd": {
"anyOf": [
{
"enum": [
"xx",
"xy4"
]
},
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sequence": {
"enum": [
"xx",
"xy4"
]
}
}
}
],
"description": "Dynamical decoupling in each window where a qubit idles long enough: xx or xy4 (or {\"sequence\": …}), checked to change nothing without noise."
},
"basis": {
"enum": [
"clifford_t",
"standard"
]
},
"level": {
"type": "integer",
"maximum": 2,
"minimum": 0
},
"twirl": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [
"seed"
],
"properties": {
"seed": {
"type": "integer",
"minimum": 0
}
}
}
],
"description": "Twirl each two-qubit Clifford gate with Paulis drawn from a seeded stream: true (seed 1), or {\"seed\": N}. One seed is one instance, checked to be the same circuit."
},
"stages": {
"type": "boolean"
},
"epsilon": {
"type": "number",
"exclusiveMinimum": 0
}
},
"description": "What a compile is asked for, each optional: the most the output may differ from the program (epsilon, in the operator norm up to a global phase), the level (0 lowers and approximates; 1 also rewrites and folds phases; 2 also resynthesises), the basis, the gate set it writes the program in (clifford_t: every rotation off the multiples of π/4 a Clifford+T word; standard: nothing approximated), whether to give the circuit after each pass (stages), and the twirl and dd passes, last (twirl, with its seed; dd, with its sequence)."
},
"dry_run": {
"type": "boolean",
"description": "With true: what the host would do with the job or set, running nothing."
},
"history": {
"type": "object",
"description": "The program's history's account of the version the job runs: its digest, and the gates and lines in each hand. The receipt binds it; a history recomputes and checks it."
},
"options": {
"type": "object",
"description": "Options of the method that runs the job, as the methods list names them (max_bond, cutoff, fusion, trajectories, threshold, max_weight, ladder, max_terms, path_restarts), and memory_gb."
},
"verdict": {
"type": "boolean",
"description": "true: the result carries a verdict even with no intent."
},
"mitigate": {
"anyOf": [
{
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
{
"type": "object",
"required": [
"method"
]
}
],
"description": "Mitigate the job's expectation values (or, for readout, its counts) under its noise (engine::mitigate): zne, pea, pec, cdr, vd or readout, or {\"method\", …} with its options. The result's mitigation gives each value raw and mitigated."
},
"programs": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A program's text."
},
{
"type": "object",
"required": [
"qasm"
],
"description": "A job of its own, read as a job request is (no programs or sweep in it); each item of the set's result holds its request in full."
}
]
},
"minItems": 1,
"description": "A set (engine::sets): the programs to run as one job, each a program's text or a job of its own; the request's other fields apply to every item that does not set them itself."
},
"provider": {
"type": "string",
"description": "The person's own provider to run on, by the name their registry gives it. Only a host that holds their credentials runs such a job; every other host refuses it."
},
"amplitudes": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 64,
"description": "Basis states whose amplitudes to return: one 0 or 1 per qubit, qubit n-1 first."
},
"observables": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A Pauli string, as \"Z0 Z1\"; qubits count from 0."
},
{
"type": "object",
"required": [
"pauli"
],
"properties": {
"coeff": {
"type": "number",
"description": "Its coefficient (1 when not given)."
},
"pauli": {
"type": "string",
"description": "A Pauli string, as \"X3\"."
}
}
}
]
},
"maxItems": 256,
"description": "Pauli observables to take the expectation values of."
}
},
"description": "A job as a client submits it: a program and what is asked of it, or a set: many programs (programs), or one over a grid of its inputs (sweep), run as one job. The command line, both MCP servers, the job service, the desktop app and the Studio read it alike, and a receipt seals it as it was given. A member the engine does not read is ignored, and sealed with the rest."
}
},
"description": "One item: its index, its point in a sweep, its request (a plain job, complete in itself), and its result with its own receipt, or why it failed; and its path to the set's root."
}
},
"energy": {
"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": {
"covers": {
"type": "string"
},
"cpu_ms": {
"type": "integer"
},
"source": {
"type": "string"
},
"counter": {
"type": "object",
"properties": {
"step_uj": {
"type": "integer",
"minimum": 0
},
"update_us": {
"type": "integer",
"minimum": 0
}
},
"description": "The package counter as seen: the longest it went between updates, and the smallest step it took."
},
"coverage": {
"enum": [
"whole",
"partial"
]
},
"declared": {
"type": "string",
"description": "What the stated uncertainty covers, and what it does not."
},
"excludes": {
"type": "array",
"items": {
"type": "string"
}
},
"packages": {
"type": "integer",
"minimum": 1,
"description": "The processor packages read."
},
"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)."
},
"joules_micro": {
"type": "integer",
"minimum": 1
},
"concurrent_jobs": {
"type": "integer",
"minimum": 0,
"description": "Other jobs that ran on the host during the window."
},
"energy_provenance": {
"type": "string"
},
"energy_uncertainty": {
"type": "object",
"properties": {
"window_us": {
"type": "integer"
},
"relative_ppm": {
"type": "integer"
}
}
},
"energy_counter_filtering": {
"type": "string"
}
}
}
],
"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."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"failed": {
"type": "integer",
"minimum": 0
},
"format": {
"const": "wai.quantum.set/1"
},
"schema": {
"const": "wai.quantum.set/1"
},
"receipt": {
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
"elapsed_ms": {
"type": "integer",
"minimum": 0
}
},
"description": "A set's result: many programs, or one program over a grid of its inputs, run as one job (engine::sets). Its head holds the count, how many items finished and failed, the Merkle root over the items' leaves, the set's energy and time; the set's receipt seals the set's request and its head. Each item is a plain job with its own receipt, its index, its point in a sweep, and its path to the root, so it is shown sealed by the set alone. A result names the engine that made it and this schema (engine and schema)."
}
]
},
"status": {
"enum": [
"queued",
"running",
"done",
"failed",
"cancelled"
]
},
"digests": {
"type": "object",
"properties": {
"result": {
"type": "string"
},
"receipt": {
"type": "string"
},
"request": {
"type": [
"string",
"null"
]
},
"programs": {
"type": "array",
"items": {
"type": "string"
}
},
"algorithm": {
"const": "blake3"
}
},
"description": "The job service: the BLAKE3 digests its store keeps the job's objects under (the request, each program, the result and the receipt)."
},
"request": {
"type": "object",
"anyOf": [
{
"required": [
"qasm"
]
},
{
"required": [
"programs"
]
}
],
"title": "wai.quantum.job-request/1",
"properties": {
"qasm": {
"type": "string",
"description": "The program, in OpenQASM 3 or the OpenQASM 2 forms in common use."
},
"seed": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "The sampling seed (1 when not given): the same job and seed give the same counts."
},
"noise": {
"type": "object",
"properties": {
"readout": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"dephasing": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_1q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_2q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"amplitude_damping": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"description": "A noise model, each channel a probability. A channel not listed here is refused.",
"additionalProperties": false
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Measurement shots; 1024 when no observables or amplitudes are asked for, otherwise 0."
},
"sweep": {
"type": "object",
"description": "A set over the request's own qasm: values for each of the program's inputs (integer, float or angle), every combination run, the names in sorted order and the first varying slowest.",
"additionalProperties": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 1
}
},
"intent": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
"minItems": 1
}
],
"description": "What the program must do, checked with the run: one intent or a list. The result's verdict says how far it was checked."
},
"method": {
"type": "string",
"description": "auto (the default: the strongest method the program admits), or a method by its name as the methods list names it."
},
"repair": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sizes": {
"type": "object",
"additionalProperties": {
"type": "integer",
"minimum": 1
}
},
"dyadic_bits": {
"type": "integer",
"maximum": 32,
"minimum": 1
},
"max_iterations": {
"type": "integer",
"minimum": 1
}
}
}
],
"description": "Repair the program first on its flagged lines: true, or the choices."
},
"target": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"title": "wai.quantum.target/1",
"required": [
"format",
"name",
"source",
"qubits",
"gates",
"coupling"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"gates": {
"type": "array",
"items": {
"type": "object",
"required": [
"gate",
"qubits"
],
"properties": {
"gate": {
"type": "string",
"pattern": "^[a-z0-9_]{1,40}$"
},
"error": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "The average gate infidelity."
},
"qubits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 1
},
"duration_ns": {
"type": "number",
"minimum": 0,
"description": "Nanoseconds."
}
},
"additionalProperties": false
},
"maxItems": 262144,
"description": "Each native gate where the device runs it, sorted by gate then qubits."
},
"format": {
"const": "wai.quantum.target/1"
},
"qubits": {
"type": "array",
"items": {
"type": "object",
"required": [
"qubit"
],
"properties": {
"label": {
"type": "string",
"description": "The source's own name for it, when that is not its index."
},
"qubit": {
"type": "integer",
"minimum": 0,
"description": "Its index: its place in the list."
},
"t1_us": {
"type": "number",
"minimum": 0,
"description": "T1, microseconds."
},
"t2_us": {
"type": "number",
"minimum": 0,
"description": "T2 (the echo or Ramsey time the source reports), microseconds."
},
"readout": {
"type": "object",
"required": [
"p01",
"p10"
],
"properties": {
"p01": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 1 | holds 0)."
},
"p10": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 0 | holds 1)."
}
},
"additionalProperties": false
},
"measure_ns": {
"type": "number",
"minimum": 0,
"description": "The measurement's duration, nanoseconds."
},
"frequency_ghz": {
"type": "number",
"minimum": 0,
"description": "Its frequency, gigahertz."
}
},
"additionalProperties": false
},
"maxItems": 2048,
"minItems": 1,
"description": "Every qubit, in order."
},
"source": {
"type": "object",
"required": [
"format"
],
"properties": {
"note": {
"type": "string",
"maxLength": 400
},
"format": {
"type": "string",
"description": "The format the target was read from (wai-quantum targets import --help lists them)."
}
},
"additionalProperties": false
},
"coupling": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 2
},
"description": "The pairs a two-qubit gate may act on, each once, the lower qubit first, sorted."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 400,
"description": "The calibration snapshot's id, as the source names it, or a content id of the snapshot read."
},
"timestamp": {
"type": "string",
"maxLength": 400,
"description": "When the snapshot was taken, as the source writes it."
}
},
"additionalProperties": false
}
},
"description": "A device target: its qubits, the pairs it couples, its native gates with their errors and durations, and the calibration snapshot they come from. A value not known is left out, never written as zero. Every field but format, name, source, qubits, gates and coupling is optional, and a field the format does not name is refused, so a misspelt one never reads as absent. Its canonical text is its RFC 8785 form, and the BLAKE3 of that text, the target's hash, names the snapshot in a receipt.",
"additionalProperties": false
}
],
"description": "A device target: a built-in target's name, or a target document. The program is compiled to it, placed and simulated under its noise; noise may not be given beside it."
},
"compile": {
"type": "object",
"properties": {
"dd": {
"anyOf": [
{
"enum": [
"xx",
"xy4"
]
},
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sequence": {
"enum": [
"xx",
"xy4"
]
}
}
}
],
"description": "Dynamical decoupling in each window where a qubit idles long enough: xx or xy4 (or {\"sequence\": …}), checked to change nothing without noise."
},
"basis": {
"enum": [
"clifford_t",
"standard"
]
},
"level": {
"type": "integer",
"maximum": 2,
"minimum": 0
},
"twirl": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [
"seed"
],
"properties": {
"seed": {
"type": "integer",
"minimum": 0
}
}
}
],
"description": "Twirl each two-qubit Clifford gate with Paulis drawn from a seeded stream: true (seed 1), or {\"seed\": N}. One seed is one instance, checked to be the same circuit."
},
"stages": {
"type": "boolean"
},
"epsilon": {
"type": "number",
"exclusiveMinimum": 0
}
},
"description": "What a compile is asked for, each optional: the most the output may differ from the program (epsilon, in the operator norm up to a global phase), the level (0 lowers and approximates; 1 also rewrites and folds phases; 2 also resynthesises), the basis, the gate set it writes the program in (clifford_t: every rotation off the multiples of π/4 a Clifford+T word; standard: nothing approximated), whether to give the circuit after each pass (stages), and the twirl and dd passes, last (twirl, with its seed; dd, with its sequence)."
},
"dry_run": {
"type": "boolean",
"description": "With true: what the host would do with the job or set, running nothing."
},
"history": {
"type": "object",
"description": "The program's history's account of the version the job runs: its digest, and the gates and lines in each hand. The receipt binds it; a history recomputes and checks it."
},
"options": {
"type": "object",
"description": "Options of the method that runs the job, as the methods list names them (max_bond, cutoff, fusion, trajectories, threshold, max_weight, ladder, max_terms, path_restarts), and memory_gb."
},
"verdict": {
"type": "boolean",
"description": "true: the result carries a verdict even with no intent."
},
"mitigate": {
"anyOf": [
{
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
{
"type": "object",
"required": [
"method"
]
}
],
"description": "Mitigate the job's expectation values (or, for readout, its counts) under its noise (engine::mitigate): zne, pea, pec, cdr, vd or readout, or {\"method\", …} with its options. The result's mitigation gives each value raw and mitigated."
},
"programs": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A program's text."
},
{
"type": "object",
"required": [
"qasm"
],
"description": "A job of its own, read as a job request is (no programs or sweep in it); each item of the set's result holds its request in full."
}
]
},
"minItems": 1,
"description": "A set (engine::sets): the programs to run as one job, each a program's text or a job of its own; the request's other fields apply to every item that does not set them itself."
},
"provider": {
"type": "string",
"description": "The person's own provider to run on, by the name their registry gives it. Only a host that holds their credentials runs such a job; every other host refuses it."
},
"amplitudes": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 64,
"description": "Basis states whose amplitudes to return: one 0 or 1 per qubit, qubit n-1 first."
},
"observables": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A Pauli string, as \"Z0 Z1\"; qubits count from 0."
},
{
"type": "object",
"required": [
"pauli"
],
"properties": {
"coeff": {
"type": "number",
"description": "Its coefficient (1 when not given)."
},
"pauli": {
"type": "string",
"description": "A Pauli string, as \"X3\"."
}
}
}
]
},
"maxItems": 256,
"description": "Pauli observables to take the expectation values of."
}
},
"description": "A job as a client submits it: a program and what is asked of it, or a set: many programs (programs), or one over a grid of its inputs (sweep), run as one job. The command line, both MCP servers, the job service, the desktop app and the Studio read it alike, and a receipt seals it as it was given. A member the engine does not read is ignored, and sealed with the rest."
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"estimate": {
"type": "object",
"required": [
"memory_bytes",
"work"
],
"properties": {
"work": {
"type": "integer",
"minimum": 0,
"description": "In the method's own unit."
},
"memory_bytes": {
"type": "integer",
"minimum": 0
}
},
"description": "What the plan admitted the job with."
},
"started_ms": {
"type": "integer"
},
"finished_ms": {
"type": "integer"
},
"submitted_ms": {
"type": "integer",
"description": "The job service: when it was submitted, in milliseconds since 1970."
},
"peak_rss_bytes": {
"type": "integer",
"description": "The job service: the most memory the job's process held."
}
},
"description": "A job as a host returns it: its status, the method its plan chose and why, the request as submitted, and, once it is done, the result with its receipt: a job's result, or for a set (a request with programs or a sweep, its method set) the set's result. The command line's run --json, the local MCP server's run_quantum_circuit and a run on the person's own provider give a finished job; the job service also gives its id and times, and a job still queued or running, or failed with its error. A job's receipt verifies from this document alone: request and result."
},
{
"type": "object",
"required": [
"dry_run",
"ran",
"accepted",
"bounds",
"client"
],
"properties": {
"ran": {
"const": false
},
"why": {
"type": "string"
},
"time": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"note": {
"type": "string"
},
"rate": {
"type": "object"
},
"basis": {
"type": "string"
},
"at_most": {
"type": "integer"
},
"seconds": {
"type": [
"number",
"null"
]
}
},
"description": "The estimated time: seconds and its basis, or null and why, with the most the job may take.",
"additionalProperties": true
},
"work": {
"type": "integer",
"minimum": 0
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"time": {
"type": "object",
"additionalProperties": true
},
"work": {
"type": "integer"
},
"index": {
"type": "integer"
},
"point": {
"type": "object"
},
"energy": {
"type": "object",
"additionalProperties": true
},
"method": {
"type": "string"
},
"qubits": {
"type": "integer"
},
"memory_bytes": {
"type": "integer"
}
}
},
"description": "A set: each item's plan and estimates."
},
"bounds": {
"type": "object",
"description": "The bounds that apply here: memory, time, queue and items of a set.",
"additionalProperties": true
},
"client": {
"type": "object",
"properties": {
"active_jobs": {
"type": "integer"
},
"submissions_left": {
"type": "integer"
},
"memory_held_bytes": {
"type": "integer"
},
"window_resets_in_seconds": {
"type": "integer"
}
},
"description": "Where the client stands: its active jobs, the memory they hold, the submissions left in its window and when the window resets."
},
"energy": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"basis": {
"type": "string"
},
"unestimated": {
"type": "string"
},
"energy_provenance": {
"type": "string"
},
"joules_micro_estimate": {
"type": "integer",
"minimum": 0
}
},
"description": "The estimated energy, never a reading of this job: microjoules, its provenance and basis, or why there is none.",
"additionalProperties": true
},
"method": {
"type": "string"
},
"qubits": {
"type": "integer",
"minimum": 0
},
"status": {
"type": "integer",
"description": "The HTTP status a refusal would carry."
},
"target": {
"type": "object",
"description": "A job on a device target: the target the plan placed it on."
},
"dry_run": {
"const": true
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"accepted": {
"type": "boolean",
"description": "Whether the service would take it now, by every limit."
},
"memory_bytes": {
"type": "integer",
"minimum": 0
},
"within_time_limit": {
"type": [
"boolean",
"null"
]
}
},
"description": "What the service would do with a job or a set, running nothing: the plan's method and why, its qubits, memory and work, the estimated time and energy (each with its basis, or why there is none), the bounds that apply, where the client stands against its limits, each item of a set, and whether the service would take it now, or the refusal it would give."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
},
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A job the service no longer holds, known only by its id."
}
],
"description": "A job: queued, running, done with its result and receipt, or failed with its error; a set's job holds the set's result; with dry_run true, what the service would do with it, running nothing."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"required": [
"verdict"
],
"description": "A job: queued, running, done with its result and receipt, or failed with its error; a set's job holds the set's result; with dry_run true, what the service would do with it, running nothing."
}{
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true
}run_quantum_set — Run a set of quantum programs, or one over a grid
Run several OpenQASM programs as one set (`programs`: each a program's text or a job), or one program over a grid of its inputs (`qasm` with `sweep`, as {"theta": [0.1, 0.2], "n": [2, 3]}: every combination; integer inputs written out, float and angle inputs bound to the double given). The set's other fields (shots, observables, seed, intent, …) apply to every item. Each item gets its own result and receipt, each stating its verdict, and one receipt over the set binds every item through a Merkle root; verify_quantum_receipt checks it whole. At most 100 items, run one after another in one job. Waits up to 50 s; a longer set answers with status running and an id for get_quantum_job.
{
"type": "object",
"properties": {
"qasm": {
"type": "string",
"description": "With sweep: the program, which declares the inputs the sweep gives values (`input uint n;`, `input float theta;`, `input angle phi;`)."
},
"seed": {
"type": "integer",
"description": "Sampling seed (default 1); the same job and seed give the same counts."
},
"noise": {
"type": "object",
"properties": {
"readout": {
"type": "number"
},
"dephasing": {
"type": "number"
},
"depolarizing_1q": {
"type": "number"
},
"depolarizing_2q": {
"type": "number"
},
"amplitude_damping": {
"type": "number"
}
},
"description": "Optional noise, each a probability: depolarizing_1q, depolarizing_2q, amplitude_damping, dephasing (after each gate on its qubits), readout (each measured bit)."
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Measurement shots. Default 1024 when no observables or amplitudes are asked for."
},
"sweep": {
"type": "object",
"description": "Each input of qasm and its values: every combination runs, the names in sorted order, the first varying slowest; an integer input's values are whole numbers.",
"additionalProperties": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 1
}
},
"intent": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0,
"description": "For a sampled intent: the sampling seed (default: the job's)."
},
"test": {
"enum": [
"chi_squared",
"g_test"
],
"description": "For a sampled intent: Pearson's chi-squared test, or the G-test (the likelihood ratio)."
},
"alpha": {
"type": "number",
"description": "For a sampled intent: the significance level, as 0.01.",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1,
"description": "For a sampled intent: the samples the test takes."
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"description": "A distribution the program's samples are held to: the program run as the job runs it for `shots` at `seed`, and the counts tested by `test` at the significance level `alpha` (all three required). Evidence, never proof.",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string",
"description": "A reference program's text: the same state from |0…0⟩, the same qubits measured into the same bits."
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "For a distribution: the total variation distance it is held within (default 1e-9)."
},
"equivalent": {
"type": "string",
"description": "A reference program's text: the same circuit up to a global phase, by the equivalence ladder."
},
"distribution": {
"type": "object",
"description": "The exact distribution of the measured bits, keyed by the classical bits with the highest bit first, as {\"00\": 0.5, \"11\": 0.5}.",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled; with note, name, and \"require\": \"proof\" (evidence then counts as unchecked)."
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0,
"description": "For a sampled intent: the sampling seed (default: the job's)."
},
"test": {
"enum": [
"chi_squared",
"g_test"
],
"description": "For a sampled intent: Pearson's chi-squared test, or the G-test (the likelihood ratio)."
},
"alpha": {
"type": "number",
"description": "For a sampled intent: the significance level, as 0.01.",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1,
"description": "For a sampled intent: the samples the test takes."
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"description": "A distribution the program's samples are held to: the program run as the job runs it for `shots` at `seed`, and the counts tested by `test` at the significance level `alpha` (all three required). Evidence, never proof.",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string",
"description": "A reference program's text: the same state from |0…0⟩, the same qubits measured into the same bits."
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "For a distribution: the total variation distance it is held within (default 1e-9)."
},
"equivalent": {
"type": "string",
"description": "A reference program's text: the same circuit up to a global phase, by the equivalence ladder."
},
"distribution": {
"type": "object",
"description": "The exact distribution of the measured bits, keyed by the classical bits with the highest bit first, as {\"00\": 0.5, \"11\": 0.5}.",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled; with note, name, and \"require\": \"proof\" (evidence then counts as unchecked)."
},
"minItems": 1
}
],
"description": "What the program must do, checked by the engine with the run: the result's `verdict` states how far it checked (proof, evidence, executed, parsed, refused) and whether the intent holds, sealed by the receipt."
},
"method": {
"enum": [
"auto",
"exact",
"statevector",
"statevector_single",
"stabilizer",
"pauli",
"mps",
"tensor_network",
"cutrank",
"cutrank_single",
"density_matrix",
"trajectories"
],
"type": "string",
"description": "Leave as auto unless you need a particular method."
},
"repair": {
"description": "Repair the program first, on the lines its diagnostics flag alone (as repair_qasm does): true, or the choices {\"max_iterations\": N, \"dyadic_bits\": K, \"sizes\": {\"q\": 3}}. The result's `repaired` holds the program that ran and each repair."
},
"target": {
"description": "A device target: a built-in target's name (list_targets) or a target document (wai.quantum.target/1). The program is then compiled to its gates, placed where it is most likely to succeed and simulated under its noise, its hash in the receipt; not with noise or amplitudes. The service reads the document given and fetches nothing."
},
"compile": {
"type": "object",
"properties": {
"dd": {
"enum": [
"xx",
"xy4"
],
"type": "string",
"description": "Dynamical decoupling in each window where a qubit idles long enough, checked to change nothing without noise."
},
"basis": {
"enum": [
"clifford_t",
"standard"
],
"type": "string",
"description": "clifford_t (default): every rotation off the multiples of π/4 written as a Clifford+T word within its share of epsilon; standard: nothing approximated."
},
"level": {
"type": "integer",
"maximum": 2,
"minimum": 0,
"description": "0: lower and approximate; 1 (default): also checked rewrites and phase folding; 2: also one- and two-qubit resynthesis."
},
"twirl": {
"description": "Twirl each two-qubit Clifford gate with Paulis from a seeded stream: true, or {\"seed\": N}. One seed is one instance, checked to be the same circuit."
},
"epsilon": {
"type": "number",
"description": "The most the output may differ from the program in the operator norm, up to a global phase, shared by its rotations (default 1e-6).",
"exclusiveMinimum": 0
}
},
"description": "Compile the program first (as compile_qasm does) and run the compiled circuit: with basis clifford_t it runs bit-exact, and the result's `compiled` states its distance from the program."
},
"options": {
"type": "object",
"description": "Advanced, per method: max_bond (mps), threshold and max_terms (pauli), fusion (statevector), trajectories."
},
"mitigate": {
"anyOf": [
{
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
],
"type": "string"
},
{
"type": "object",
"required": [
"method"
],
"properties": {
"keep": {
"type": "integer",
"minimum": 0,
"description": "cdr: non-Clifford gates each training circuit keeps (default 2, and always one fewer than the program has)."
},
"seed": {
"type": "integer",
"minimum": 0
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 1,
"description": "Shots per circuit (default 10000; 2000 per sampled circuit for pec)."
},
"method": {
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
],
"type": "string"
},
"factors": {
"type": "array",
"items": {
"type": "number"
},
"description": "zne: odd whole numbers (default 1, 3, 5); pea: factors from 1 to 10 (default 1, 1.5, 2)."
},
"samples": {
"type": "integer",
"minimum": 2,
"description": "pec: sampled circuits (default 200)."
},
"training": {
"type": "integer",
"minimum": 3,
"description": "cdr: training circuits (default 16)."
},
"learn_shots": {
"type": "integer",
"minimum": 100,
"description": "pea, pec: shots per depth of the cycle benchmarking that learns the noise (default 60000)."
},
"extrapolation": {
"enum": [
"richardson",
"linear",
"exponential"
],
"type": "string"
}
}
}
],
"description": "Mitigate the job's expectation values (or, for readout, its counts) under its own noise: zne (the whole program folded U(U†U)^k and extrapolated), pea (the noise learned as a sparse Pauli–Lindblad model and amplified), pec (the learned channels inverted and sampled), cdr (a line fitted over near-Clifford training circuits), vd (two copies), readout (the counts' flips inverted). Needs noise and observables (shots for readout), at most 8 qubits. The result's `mitigation` gives raw and mitigated values with standard errors, the ideal value (known because this is a simulation), the method's bias and variance assumptions and its cost. A method's name, or an object."
},
"programs": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"required": [
"qasm"
]
}
]
},
"maxItems": 100,
"minItems": 1,
"description": "The set's programs: each a program's text, or a job ({\"qasm\", …}) whose own fields win over the set's."
},
"amplitudes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Basis states to give amplitudes of: one character per qubit, qubit n-1 first, e.g. \"0011\"."
},
"observables": {
"type": "array",
"items": {
"type": "string"
},
"description": "Pauli strings to take expectation values of, e.g. [\"Z0\", \"Z0 Z1\", \"X2 Y3\"]. Qubits count from 0."
}
}
}{
"$id": "wai-quantum://schemas/run_quantum_set/1",
"type": "object",
"anyOf": [
{
"anyOf": [
{
"type": "object",
"title": "wai.quantum.job/1",
"required": [
"status",
"request"
],
"properties": {
"id": {
"type": "string",
"description": "The job service's id for the job."
},
"why": {
"type": "string",
"description": "Why the plan chose the method."
},
"error": {
"type": "string",
"description": "Why a job failed."
},
"method": {
"type": "string",
"description": "The method the plan chose; set for a set."
},
"result": {
"anyOf": [
{
"type": "object",
"title": "wai.quantum.job-result/1",
"required": [
"method",
"qubits",
"gates",
"accuracy"
],
"properties": {
"job": {
"type": "object",
"description": "A provider job: the provider's job id and its status checks."
},
"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."
},
"gates": {
"type": "integer",
"minimum": 0
},
"ideal": {
"anyOf": [
{
"type": "object",
"required": [
"computed",
"total_variation_distance",
"hellinger_fidelity"
],
"properties": {
"note": {
"type": "string"
},
"method": {
"type": "string"
},
"computed": {
"const": true
},
"ideal_outcomes": {
"type": "integer"
},
"hellinger_fidelity": {
"type": "number"
},
"sampling_tvd_expected": {
"type": "number"
},
"total_variation_distance": {
"type": "number"
}
}
},
{
"type": "object",
"required": [
"computed",
"why"
],
"properties": {
"why": {
"type": "string"
},
"computed": {
"const": false
}
}
}
],
"description": "A provider job: the circuit's exact distribution set beside the measured counts."
},
"shots": {
"type": "integer",
"minimum": 0,
"description": "The shots, where the method names them in the result (trajectories, provider)."
},
"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
}
},
"energy": {
"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": {
"covers": {
"type": "string"
},
"cpu_ms": {
"type": "integer"
},
"source": {
"type": "string"
},
"counter": {
"type": "object",
"properties": {
"step_uj": {
"type": "integer",
"minimum": 0
},
"update_us": {
"type": "integer",
"minimum": 0
}
},
"description": "The package counter as seen: the longest it went between updates, and the smallest step it took."
},
"coverage": {
"enum": [
"whole",
"partial"
]
},
"declared": {
"type": "string",
"description": "What the stated uncertainty covers, and what it does not."
},
"excludes": {
"type": "array",
"items": {
"type": "string"
}
},
"packages": {
"type": "integer",
"minimum": 1,
"description": "The processor packages read."
},
"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)."
},
"joules_micro": {
"type": "integer",
"minimum": 1
},
"concurrent_jobs": {
"type": "integer",
"minimum": 0,
"description": "Other jobs that ran on the host during the window."
},
"energy_provenance": {
"type": "string"
},
"energy_uncertainty": {
"type": "object",
"properties": {
"window_us": {
"type": "integer"
},
"relative_ppm": {
"type": "integer"
}
}
},
"energy_counter_filtering": {
"type": "string"
}
}
}
],
"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."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string",
"description": "Its semantic version, as MAJOR.MINOR.PATCH."
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"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
},
"schema": {
"const": "wai.quantum.job-result/1",
"description": "The schema the result follows."
},
"target": {
"type": "object",
"required": [
"name",
"hash"
],
"properties": {
"hash": {
"type": "string"
},
"name": {
"type": "string"
},
"noise": {
"type": "object",
"description": "The noise model derived from the target's calibration: its channels, durations and idling, and each qubit's readout."
},
"source": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"format": {
"type": "string"
}
}
},
"hash_is": {
"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 the check of the compiled program."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"timestamp": {
"type": "string"
}
}
}
},
"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."
},
"timing": {
"type": "object",
"required": [
"applied",
"why"
],
"properties": {
"why": {
"type": "string"
},
"code": {
"type": "string"
},
"applied": {
"type": "boolean"
}
},
"description": "A program that states durations (delay, box, stretch) the method does not apply: said so, with the reader's code."
},
"dynamic": {
"type": "object",
"properties": {
"branches_run": {
"type": "integer",
"minimum": 0
},
"states_at_once": {
"type": "integer",
"minimum": 0
},
"branches_weighed": {
"type": "integer",
"minimum": 0
},
"measurements_and_resets": {
"type": "integer",
"minimum": 0
}
},
"description": "A program that measures in the middle, resets or branches on a measured bit: how it ran."
},
"outputs": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"type"
],
"properties": {
"bits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
}
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"value": {
"description": "A number, a boolean, a bit string, a duration's text, {\"re\", \"im\"}, or an array of them."
}
}
},
"description": "The program's output declarations: each its name and type, and its value, or the places of its bits in each outcome."
},
"receipt": {
"anyOf": [
{
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
{
"type": "object",
"required": [
"alg",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128
}
},
"description": "The first form, before canon: the digest is over serde_json's own text of each, under the domain ending \\x01. Never written now; still verified."
}
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"warning": {
"type": "string"
},
"accuracy": {
"type": "object",
"required": [
"class"
],
"properties": {
"note": {
"type": "string"
},
"batch": {
"type": "integer"
},
"class": {
"enum": [
"bit-exact",
"exact",
"single",
"bounded",
"estimate",
"heuristic",
"measured"
],
"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 device returned, not reproducible by recomputation."
},
"shots": {
"type": "integer"
},
"device": {
"type": "string"
},
"fusion": {
"type": "integer"
},
"max_cut": {
"type": "integer"
},
"max_bond": {
"type": "integer"
},
"histories": {
"type": "integer"
},
"threshold": {
"type": "number"
},
"max_weight": {
"type": [
"integer",
"null"
]
},
"order_work": {
"type": "number"
},
"truncations": {
"type": "integer"
},
"trajectories": {
"type": "integer"
},
"max_bond_used": {
"type": "integer"
},
"discarded_weight": {
"type": "number"
},
"fidelity_estimate": {
"type": "number"
},
"gate_applications": {
"type": "integer"
}
},
"description": "What the method promises of the numbers it gave."
},
"compiled": {
"anyOf": [
{
"type": "object",
"required": [
"basis",
"program"
],
"properties": {
"hash": {
"type": "string"
},
"basis": {
"type": "string"
},
"swaps": {
"type": "integer"
},
"layout": {
"type": "array",
"items": {
"type": "integer"
}
},
"checked": {
"type": "string"
},
"program": {
"type": "string"
},
"placement": {
"type": "object",
"description": "Where the program was placed on the device's qubits, and why."
},
"final_layout": {
"type": "array",
"items": {
"type": "integer"
}
},
"native_gates": {
"type": "integer"
},
"two_qubit_gates": {
"type": "integer"
}
},
"description": "A provider job: the program sent, compiled exactly to the device's own gates: its basis (the device's gate set), the BLAKE3 of its OpenQASM 3 text, its counts of gates and swaps, its layouts, and the check it passed before it was sent."
},
{
"type": "object",
"required": [
"basis",
"verdict"
],
"properties": {
"note": {
"type": "string"
},
"basis": {
"enum": [
"clifford_t",
"standard"
],
"description": "The gate set the program was compiled to."
},
"level": {
"type": "integer",
"minimum": 0
},
"output": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"source": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"epsilon": {
"type": "number",
"description": "The budget asked for."
},
"verdict": {
"type": "string"
},
"distance": {
"type": [
"number",
"null"
],
"description": "The bound the passes' distances add to."
},
"certificate": {
"type": [
"string",
"null"
],
"description": "The BLAKE3 of the compile certificate's RFC 8785 text, in hex."
}
},
"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."
}
],
"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."
},
"provider": {
"type": "object",
"description": "A provider job: the provider's name, kind and protocol, the device, its provenance, and the hash of its description."
},
"repaired": {
"type": "object",
"properties": {
"qasm": {
"type": "string"
},
"repairs": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"by",
"edits"
],
"properties": {
"by": {
"enum": [
"engine",
"proposal"
]
},
"code": {
"type": "string"
},
"rule": {
"type": "string"
},
"edits": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"after": {
"type": [
"string",
"null"
]
},
"before": {
"type": [
"string",
"null"
]
}
}
}
},
"flagged": {
"type": "array",
"items": {
"type": "integer"
}
}
}
}
},
"needs_person": {
"type": "array",
"items": {
"type": "object"
}
}
},
"description": "A job asked to repair its program first: the program that ran, each repair, and what needs a person."
},
"amplitudes": {
"type": "array",
"items": {
"type": "object",
"required": [
"bits",
"re",
"im"
],
"properties": {
"im": {
"type": "number"
},
"re": {
"type": "number"
},
"bits": {
"type": "string",
"description": "One 0 or 1 per qubit, qubit n-1 first."
}
}
}
},
"elapsed_ms": {
"type": "integer",
"minimum": 0,
"description": "Wall time of the run, where the host has a clock (not in a browser tab)."
},
"mitigation": {
"type": "object",
"title": "wai.quantum.mitigation/1",
"required": [
"method",
"options",
"assumptions"
],
"properties": {
"cost": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"shots": {
"type": "integer",
"minimum": 0
},
"circuits": {
"type": "integer",
"minimum": 0
}
},
"description": "The circuits and shots it spent beyond the job's own."
},
"note": {
"type": "string"
},
"noise": {
"type": "string",
"description": "How the job's noise model is read for the method."
},
"method": {
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
"details": {
"type": "object",
"description": "The method's own: the folded scales and the folding check (zne), the learned model and the amplified values (pea), the quasi-probability and the value it converges to (pec), the training fits (cdr), the purity (vd), the flip and its amplification (readout).",
"additionalProperties": true
},
"options": {
"type": "object",
"properties": {
"keep": {
"type": "integer"
},
"seed": {
"type": "integer"
},
"shots": {
"type": "integer"
},
"method": {
"type": "string"
},
"factors": {
"type": "array",
"items": {
"type": "number"
}
},
"samples": {
"type": "integer"
},
"training": {
"type": "integer"
},
"learn_shots": {
"type": "integer"
},
"extrapolation": {
"enum": [
"richardson",
"linear",
"exponential"
]
}
},
"description": "The options it ran with, the defaults filled in."
},
"assumptions": {
"type": "object",
"properties": {
"bias": {
"type": "string"
},
"variance": {
"type": "string"
}
}
},
"observables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "number"
},
"coeff": {
"type": "number"
},
"ideal": {
"type": "number"
},
"stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
},
"observable": {
"type": "string"
},
"raw_stderr": {
"type": "number"
}
},
"description": "One observable: its raw value and the mitigated one, each with its standard error, and the ideal value a simulation knows."
}
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "number"
},
"bits": {
"type": "string"
},
"stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
}
}
},
"description": "readout: each outcome's raw share and its mitigated quasi-probability, with its standard error."
}
},
"description": "A job's mitigation (its request's mitigate, engine::mitigate), in its result: the method and the options it ran with, its bias and variance assumptions, each observable raw and mitigated with a standard error each and the ideal value (or, for readout, the counts inverted as a quasi-distribution), the method's own details and what it spent. docs/qec.md describes each method."
},
"provenance": {
"type": "object",
"title": "wai.quantum.provenance/1",
"required": [
"schema",
"circuit",
"computer",
"compilation",
"execution",
"software"
],
"properties": {
"schema": {
"const": "wai.quantum.provenance/1"
},
"circuit": {
"type": "object",
"required": [
"program"
],
"properties": {
"gates": {
"type": [
"integer",
"null"
]
},
"qubits": {
"type": "integer",
"minimum": 0
},
"program": {
"type": "string",
"description": "BLAKE3 of the program's text, in hex."
}
},
"description": "The program: the BLAKE3 digest of its text as given, its qubits and its gates."
},
"computer": {
"type": "object",
"required": [
"kind",
"method"
],
"properties": {
"kind": {
"const": "simulator"
},
"method": {
"type": "string"
},
"target": {
"type": "string",
"description": "The device target's hash; its layout, routes and noise are in the result's own target."
},
"accuracy": {
"type": [
"string",
"null"
]
}
},
"description": "What ran it: a classical simulator, the method and its accuracy class, and a device target's hash when the job named one."
},
"software": {
"type": "object",
"required": [
"engine",
"host"
],
"properties": {
"host": {
"type": "string"
},
"engine": {
"type": "string"
}
},
"description": "The engine's name and version, and the host's."
},
"execution": {
"type": "object",
"required": [
"plan"
],
"properties": {
"plan": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"work": {
"type": "integer",
"minimum": 0
},
"method": {
"type": "string"
},
"memory_bytes": {
"type": "integer",
"minimum": 0
}
}
},
"seed": {
"type": [
"integer",
"null"
]
},
"shots": {
"type": [
"integer",
"null"
]
}
},
"description": "The shots, the seed and the plan the job ran under; its identifier and times are the host's, outside the result."
},
"compilation": {
"type": "object",
"required": [
"asked"
],
"properties": {
"why": {
"type": "string"
},
"asked": {
"type": "boolean"
},
"basis": {
"type": [
"string",
"null"
],
"description": "The gate set compiled to: clifford_t or standard."
},
"level": {
"type": [
"integer",
"null"
]
},
"device": {
"type": "string",
"description": "A job on a device target, compiled exactly to its gates: where its layout and routes are."
},
"passes": {
"type": [
"array",
"null"
],
"items": {
"type": "object",
"properties": {
"pass": {
"type": "string"
},
"verdict": {
"type": [
"string",
"null"
]
}
}
}
},
"seeded": {
"const": false
},
"status": {
"const": "not-applicable"
},
"epsilon": {
"type": [
"number",
"null"
]
},
"distance": {
"type": [
"number",
"null"
]
},
"certificate": {
"type": [
"string",
"null"
]
}
},
"description": "Whether the job asked to be compiled; if it did, each pass in order with its check's verdict, the certificate's digest, the gate set compiled to (its basis), the level, the ε budget and the distance the result carries, and that no pass draws a random number."
}
},
"description": "What a result came from, under the five categories cross-platform provenance surveys use: the circuit, the computer, the compilation, the execution and the software. A host adds it to the results it seals (the job service does, and each item of a set); a result without it reads as it always did. wai-quantum-service/docs/provenance.md maps every field to where it is and whether the receipt seals it."
},
"state_hash": {
"type": "string",
"description": "The bit-exact method's statevector hash (BLAKE3, hex): the same on every machine."
},
"calibration": {
"type": [
"string",
"null"
],
"description": "A provider job: the calibration snapshot it ran under."
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
},
"description": "The reader's warnings and notes on the program, each with its code."
},
"expectations": {
"type": "array",
"items": {
"type": "object",
"required": [
"observable",
"coeff",
"value"
],
"properties": {
"bound": {
"type": "number",
"description": "A rigorous bound on |exact − value|, for the bounded class."
},
"coeff": {
"type": "number"
},
"value": {
"type": "number",
"description": "The coefficient times the expectation value."
},
"ladder": {
"type": "array",
"items": {
"type": "object",
"required": [
"threshold",
"value",
"bound"
],
"properties": {
"bound": {
"type": "number"
},
"value": {
"type": "number"
},
"threshold": {
"type": "number"
},
"peak_terms": {
"type": "integer"
},
"threshold_reached": {
"type": "number"
}
}
},
"description": "The value at thresholds a decade apart, the asked one last."
},
"stderr": {
"type": "number",
"description": "The standard error, for an estimate."
},
"max_terms": {
"type": "integer"
},
"observable": {
"type": "string"
},
"peak_terms": {
"type": "integer"
},
"threshold_reached": {
"type": "number"
}
}
}
},
"global_phase": {
"type": "string",
"description": "Why the amplitudes' global phase is not fixed, when it is not."
},
"omitted_shots": {
"type": "integer",
"minimum": 0
},
"contraction_flops": {
"type": "number",
"description": "The tensor network's contraction cost."
},
"distinct_outcomes": {
"type": "integer",
"minimum": 0
},
"outcome_dimension": {
"type": "integer",
"minimum": 0,
"description": "The stabilizer method: the dimension of the measured outcomes' affine space."
}
},
"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",
"title": "wai.quantum.set/1",
"required": [
"format",
"count",
"done",
"failed",
"root",
"items"
],
"properties": {
"done": {
"type": "integer",
"minimum": 0
},
"root": {
"type": "string",
"description": "The Merkle root of the items' leaves, in hex (domains moq-jwp:merkle-leaf and moq-jwp:merkle-node, version 1)."
},
"count": {
"type": "integer",
"minimum": 1
},
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"request",
"status",
"path"
],
"properties": {
"why": {
"type": "string"
},
"code": {
"type": "string",
"description": "A failed item's refusal code (engine::refusal)."
},
"path": {
"type": "array",
"items": {
"type": "string"
},
"description": "The item's leaf's sibling digests up to the root, in hex."
},
"error": {
"type": "string"
},
"index": {
"type": "integer",
"minimum": 0
},
"point": {
"type": "object",
"description": "A sweep's item: the value of each input it was run at."
},
"method": {
"type": "string"
},
"result": {
"type": "object",
"title": "wai.quantum.job-result/1",
"required": [
"method",
"qubits",
"gates",
"accuracy"
],
"properties": {
"job": {
"type": "object",
"description": "A provider job: the provider's job id and its status checks."
},
"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."
},
"gates": {
"type": "integer",
"minimum": 0
},
"ideal": {
"anyOf": [
{
"type": "object",
"required": [
"computed",
"total_variation_distance",
"hellinger_fidelity"
],
"properties": {
"note": {
"type": "string"
},
"method": {
"type": "string"
},
"computed": {
"const": true
},
"ideal_outcomes": {
"type": "integer"
},
"hellinger_fidelity": {
"type": "number"
},
"sampling_tvd_expected": {
"type": "number"
},
"total_variation_distance": {
"type": "number"
}
}
},
{
"type": "object",
"required": [
"computed",
"why"
],
"properties": {
"why": {
"type": "string"
},
"computed": {
"const": false
}
}
}
],
"description": "A provider job: the circuit's exact distribution set beside the measured counts."
},
"shots": {
"type": "integer",
"minimum": 0,
"description": "The shots, where the method names them in the result (trajectories, provider)."
},
"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
}
},
"energy": {
"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": {
"covers": {
"type": "string"
},
"cpu_ms": {
"type": "integer"
},
"source": {
"type": "string"
},
"counter": {
"type": "object",
"properties": {
"step_uj": {
"type": "integer",
"minimum": 0
},
"update_us": {
"type": "integer",
"minimum": 0
}
},
"description": "The package counter as seen: the longest it went between updates, and the smallest step it took."
},
"coverage": {
"enum": [
"whole",
"partial"
]
},
"declared": {
"type": "string",
"description": "What the stated uncertainty covers, and what it does not."
},
"excludes": {
"type": "array",
"items": {
"type": "string"
}
},
"packages": {
"type": "integer",
"minimum": 1,
"description": "The processor packages read."
},
"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)."
},
"joules_micro": {
"type": "integer",
"minimum": 1
},
"concurrent_jobs": {
"type": "integer",
"minimum": 0,
"description": "Other jobs that ran on the host during the window."
},
"energy_provenance": {
"type": "string"
},
"energy_uncertainty": {
"type": "object",
"properties": {
"window_us": {
"type": "integer"
},
"relative_ppm": {
"type": "integer"
}
}
},
"energy_counter_filtering": {
"type": "string"
}
}
}
],
"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."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string",
"description": "Its semantic version, as MAJOR.MINOR.PATCH."
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"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
},
"schema": {
"const": "wai.quantum.job-result/1",
"description": "The schema the result follows."
},
"target": {
"type": "object",
"required": [
"name",
"hash"
],
"properties": {
"hash": {
"type": "string"
},
"name": {
"type": "string"
},
"noise": {
"type": "object",
"description": "The noise model derived from the target's calibration: its channels, durations and idling, and each qubit's readout."
},
"source": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"format": {
"type": "string"
}
}
},
"hash_is": {
"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 the check of the compiled program."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"timestamp": {
"type": "string"
}
}
}
},
"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."
},
"timing": {
"type": "object",
"required": [
"applied",
"why"
],
"properties": {
"why": {
"type": "string"
},
"code": {
"type": "string"
},
"applied": {
"type": "boolean"
}
},
"description": "A program that states durations (delay, box, stretch) the method does not apply: said so, with the reader's code."
},
"dynamic": {
"type": "object",
"properties": {
"branches_run": {
"type": "integer",
"minimum": 0
},
"states_at_once": {
"type": "integer",
"minimum": 0
},
"branches_weighed": {
"type": "integer",
"minimum": 0
},
"measurements_and_resets": {
"type": "integer",
"minimum": 0
}
},
"description": "A program that measures in the middle, resets or branches on a measured bit: how it ran."
},
"outputs": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"type"
],
"properties": {
"bits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
}
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"value": {
"description": "A number, a boolean, a bit string, a duration's text, {\"re\", \"im\"}, or an array of them."
}
}
},
"description": "The program's output declarations: each its name and type, and its value, or the places of its bits in each outcome."
},
"receipt": {
"anyOf": [
{
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
{
"type": "object",
"required": [
"alg",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128
}
},
"description": "The first form, before canon: the digest is over serde_json's own text of each, under the domain ending \\x01. Never written now; still verified."
}
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"warning": {
"type": "string"
},
"accuracy": {
"type": "object",
"required": [
"class"
],
"properties": {
"note": {
"type": "string"
},
"batch": {
"type": "integer"
},
"class": {
"enum": [
"bit-exact",
"exact",
"single",
"bounded",
"estimate",
"heuristic",
"measured"
],
"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 device returned, not reproducible by recomputation."
},
"shots": {
"type": "integer"
},
"device": {
"type": "string"
},
"fusion": {
"type": "integer"
},
"max_cut": {
"type": "integer"
},
"max_bond": {
"type": "integer"
},
"histories": {
"type": "integer"
},
"threshold": {
"type": "number"
},
"max_weight": {
"type": [
"integer",
"null"
]
},
"order_work": {
"type": "number"
},
"truncations": {
"type": "integer"
},
"trajectories": {
"type": "integer"
},
"max_bond_used": {
"type": "integer"
},
"discarded_weight": {
"type": "number"
},
"fidelity_estimate": {
"type": "number"
},
"gate_applications": {
"type": "integer"
}
},
"description": "What the method promises of the numbers it gave."
},
"compiled": {
"anyOf": [
{
"type": "object",
"required": [
"basis",
"program"
],
"properties": {
"hash": {
"type": "string"
},
"basis": {
"type": "string"
},
"swaps": {
"type": "integer"
},
"layout": {
"type": "array",
"items": {
"type": "integer"
}
},
"checked": {
"type": "string"
},
"program": {
"type": "string"
},
"placement": {
"type": "object",
"description": "Where the program was placed on the device's qubits, and why."
},
"final_layout": {
"type": "array",
"items": {
"type": "integer"
}
},
"native_gates": {
"type": "integer"
},
"two_qubit_gates": {
"type": "integer"
}
},
"description": "A provider job: the program sent, compiled exactly to the device's own gates: its basis (the device's gate set), the BLAKE3 of its OpenQASM 3 text, its counts of gates and swaps, its layouts, and the check it passed before it was sent."
},
{
"type": "object",
"required": [
"basis",
"verdict"
],
"properties": {
"note": {
"type": "string"
},
"basis": {
"enum": [
"clifford_t",
"standard"
],
"description": "The gate set the program was compiled to."
},
"level": {
"type": "integer",
"minimum": 0
},
"output": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"source": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"epsilon": {
"type": "number",
"description": "The budget asked for."
},
"verdict": {
"type": "string"
},
"distance": {
"type": [
"number",
"null"
],
"description": "The bound the passes' distances add to."
},
"certificate": {
"type": [
"string",
"null"
],
"description": "The BLAKE3 of the compile certificate's RFC 8785 text, in hex."
}
},
"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."
}
],
"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."
},
"provider": {
"type": "object",
"description": "A provider job: the provider's name, kind and protocol, the device, its provenance, and the hash of its description."
},
"repaired": {
"type": "object",
"properties": {
"qasm": {
"type": "string"
},
"repairs": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"by",
"edits"
],
"properties": {
"by": {
"enum": [
"engine",
"proposal"
]
},
"code": {
"type": "string"
},
"rule": {
"type": "string"
},
"edits": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"after": {
"type": [
"string",
"null"
]
},
"before": {
"type": [
"string",
"null"
]
}
}
}
},
"flagged": {
"type": "array",
"items": {
"type": "integer"
}
}
}
}
},
"needs_person": {
"type": "array",
"items": {
"type": "object"
}
}
},
"description": "A job asked to repair its program first: the program that ran, each repair, and what needs a person."
},
"amplitudes": {
"type": "array",
"items": {
"type": "object",
"required": [
"bits",
"re",
"im"
],
"properties": {
"im": {
"type": "number"
},
"re": {
"type": "number"
},
"bits": {
"type": "string",
"description": "One 0 or 1 per qubit, qubit n-1 first."
}
}
}
},
"elapsed_ms": {
"type": "integer",
"minimum": 0,
"description": "Wall time of the run, where the host has a clock (not in a browser tab)."
},
"mitigation": {
"type": "object",
"title": "wai.quantum.mitigation/1",
"required": [
"method",
"options",
"assumptions"
],
"properties": {
"cost": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"shots": {
"type": "integer",
"minimum": 0
},
"circuits": {
"type": "integer",
"minimum": 0
}
},
"description": "The circuits and shots it spent beyond the job's own."
},
"note": {
"type": "string"
},
"noise": {
"type": "string",
"description": "How the job's noise model is read for the method."
},
"method": {
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
"details": {
"type": "object",
"description": "The method's own: the folded scales and the folding check (zne), the learned model and the amplified values (pea), the quasi-probability and the value it converges to (pec), the training fits (cdr), the purity (vd), the flip and its amplification (readout).",
"additionalProperties": true
},
"options": {
"type": "object",
"properties": {
"keep": {
"type": "integer"
},
"seed": {
"type": "integer"
},
"shots": {
"type": "integer"
},
"method": {
"type": "string"
},
"factors": {
"type": "array",
"items": {
"type": "number"
}
},
"samples": {
"type": "integer"
},
"training": {
"type": "integer"
},
"learn_shots": {
"type": "integer"
},
"extrapolation": {
"enum": [
"richardson",
"linear",
"exponential"
]
}
},
"description": "The options it ran with, the defaults filled in."
},
"assumptions": {
"type": "object",
"properties": {
"bias": {
"type": "string"
},
"variance": {
"type": "string"
}
}
},
"observables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "number"
},
"coeff": {
"type": "number"
},
"ideal": {
"type": "number"
},
"stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
},
"observable": {
"type": "string"
},
"raw_stderr": {
"type": "number"
}
},
"description": "One observable: its raw value and the mitigated one, each with its standard error, and the ideal value a simulation knows."
}
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "number"
},
"bits": {
"type": "string"
},
"stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
}
}
},
"description": "readout: each outcome's raw share and its mitigated quasi-probability, with its standard error."
}
},
"description": "A job's mitigation (its request's mitigate, engine::mitigate), in its result: the method and the options it ran with, its bias and variance assumptions, each observable raw and mitigated with a standard error each and the ideal value (or, for readout, the counts inverted as a quasi-distribution), the method's own details and what it spent. docs/qec.md describes each method."
},
"provenance": {
"type": "object",
"title": "wai.quantum.provenance/1",
"required": [
"schema",
"circuit",
"computer",
"compilation",
"execution",
"software"
],
"properties": {
"schema": {
"const": "wai.quantum.provenance/1"
},
"circuit": {
"type": "object",
"required": [
"program"
],
"properties": {
"gates": {
"type": [
"integer",
"null"
]
},
"qubits": {
"type": "integer",
"minimum": 0
},
"program": {
"type": "string",
"description": "BLAKE3 of the program's text, in hex."
}
},
"description": "The program: the BLAKE3 digest of its text as given, its qubits and its gates."
},
"computer": {
"type": "object",
"required": [
"kind",
"method"
],
"properties": {
"kind": {
"const": "simulator"
},
"method": {
"type": "string"
},
"target": {
"type": "string",
"description": "The device target's hash; its layout, routes and noise are in the result's own target."
},
"accuracy": {
"type": [
"string",
"null"
]
}
},
"description": "What ran it: a classical simulator, the method and its accuracy class, and a device target's hash when the job named one."
},
"software": {
"type": "object",
"required": [
"engine",
"host"
],
"properties": {
"host": {
"type": "string"
},
"engine": {
"type": "string"
}
},
"description": "The engine's name and version, and the host's."
},
"execution": {
"type": "object",
"required": [
"plan"
],
"properties": {
"plan": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"work": {
"type": "integer",
"minimum": 0
},
"method": {
"type": "string"
},
"memory_bytes": {
"type": "integer",
"minimum": 0
}
}
},
"seed": {
"type": [
"integer",
"null"
]
},
"shots": {
"type": [
"integer",
"null"
]
}
},
"description": "The shots, the seed and the plan the job ran under; its identifier and times are the host's, outside the result."
},
"compilation": {
"type": "object",
"required": [
"asked"
],
"properties": {
"why": {
"type": "string"
},
"asked": {
"type": "boolean"
},
"basis": {
"type": [
"string",
"null"
],
"description": "The gate set compiled to: clifford_t or standard."
},
"level": {
"type": [
"integer",
"null"
]
},
"device": {
"type": "string",
"description": "A job on a device target, compiled exactly to its gates: where its layout and routes are."
},
"passes": {
"type": [
"array",
"null"
],
"items": {
"type": "object",
"properties": {
"pass": {
"type": "string"
},
"verdict": {
"type": [
"string",
"null"
]
}
}
}
},
"seeded": {
"const": false
},
"status": {
"const": "not-applicable"
},
"epsilon": {
"type": [
"number",
"null"
]
},
"distance": {
"type": [
"number",
"null"
]
},
"certificate": {
"type": [
"string",
"null"
]
}
},
"description": "Whether the job asked to be compiled; if it did, each pass in order with its check's verdict, the certificate's digest, the gate set compiled to (its basis), the level, the ε budget and the distance the result carries, and that no pass draws a random number."
}
},
"description": "What a result came from, under the five categories cross-platform provenance surveys use: the circuit, the computer, the compilation, the execution and the software. A host adds it to the results it seals (the job service does, and each item of a set); a result without it reads as it always did. wai-quantum-service/docs/provenance.md maps every field to where it is and whether the receipt seals it."
},
"state_hash": {
"type": "string",
"description": "The bit-exact method's statevector hash (BLAKE3, hex): the same on every machine."
},
"calibration": {
"type": [
"string",
"null"
],
"description": "A provider job: the calibration snapshot it ran under."
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
},
"description": "The reader's warnings and notes on the program, each with its code."
},
"expectations": {
"type": "array",
"items": {
"type": "object",
"required": [
"observable",
"coeff",
"value"
],
"properties": {
"bound": {
"type": "number",
"description": "A rigorous bound on |exact − value|, for the bounded class."
},
"coeff": {
"type": "number"
},
"value": {
"type": "number",
"description": "The coefficient times the expectation value."
},
"ladder": {
"type": "array",
"items": {
"type": "object",
"required": [
"threshold",
"value",
"bound"
],
"properties": {
"bound": {
"type": "number"
},
"value": {
"type": "number"
},
"threshold": {
"type": "number"
},
"peak_terms": {
"type": "integer"
},
"threshold_reached": {
"type": "number"
}
}
},
"description": "The value at thresholds a decade apart, the asked one last."
},
"stderr": {
"type": "number",
"description": "The standard error, for an estimate."
},
"max_terms": {
"type": "integer"
},
"observable": {
"type": "string"
},
"peak_terms": {
"type": "integer"
},
"threshold_reached": {
"type": "number"
}
}
}
},
"global_phase": {
"type": "string",
"description": "Why the amplitudes' global phase is not fixed, when it is not."
},
"omitted_shots": {
"type": "integer",
"minimum": 0
},
"contraction_flops": {
"type": "number",
"description": "The tensor network's contraction cost."
},
"distinct_outcomes": {
"type": "integer",
"minimum": 0
},
"outcome_dimension": {
"type": "integer",
"minimum": 0,
"description": "The stabilizer method: the dimension of the measured outcomes' affine space."
}
},
"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."
},
"status": {
"enum": [
"done",
"failed"
]
},
"request": {
"type": "object",
"anyOf": [
{
"required": [
"qasm"
]
},
{
"required": [
"programs"
]
}
],
"title": "wai.quantum.job-request/1",
"properties": {
"qasm": {
"type": "string",
"description": "The program, in OpenQASM 3 or the OpenQASM 2 forms in common use."
},
"seed": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "The sampling seed (1 when not given): the same job and seed give the same counts."
},
"noise": {
"type": "object",
"properties": {
"readout": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"dephasing": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_1q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_2q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"amplitude_damping": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"description": "A noise model, each channel a probability. A channel not listed here is refused.",
"additionalProperties": false
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Measurement shots; 1024 when no observables or amplitudes are asked for, otherwise 0."
},
"sweep": {
"type": "object",
"description": "A set over the request's own qasm: values for each of the program's inputs (integer, float or angle), every combination run, the names in sorted order and the first varying slowest.",
"additionalProperties": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 1
}
},
"intent": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
"minItems": 1
}
],
"description": "What the program must do, checked with the run: one intent or a list. The result's verdict says how far it was checked."
},
"method": {
"type": "string",
"description": "auto (the default: the strongest method the program admits), or a method by its name as the methods list names it."
},
"repair": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sizes": {
"type": "object",
"additionalProperties": {
"type": "integer",
"minimum": 1
}
},
"dyadic_bits": {
"type": "integer",
"maximum": 32,
"minimum": 1
},
"max_iterations": {
"type": "integer",
"minimum": 1
}
}
}
],
"description": "Repair the program first on its flagged lines: true, or the choices."
},
"target": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"title": "wai.quantum.target/1",
"required": [
"format",
"name",
"source",
"qubits",
"gates",
"coupling"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"gates": {
"type": "array",
"items": {
"type": "object",
"required": [
"gate",
"qubits"
],
"properties": {
"gate": {
"type": "string",
"pattern": "^[a-z0-9_]{1,40}$"
},
"error": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "The average gate infidelity."
},
"qubits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 1
},
"duration_ns": {
"type": "number",
"minimum": 0,
"description": "Nanoseconds."
}
},
"additionalProperties": false
},
"maxItems": 262144,
"description": "Each native gate where the device runs it, sorted by gate then qubits."
},
"format": {
"const": "wai.quantum.target/1"
},
"qubits": {
"type": "array",
"items": {
"type": "object",
"required": [
"qubit"
],
"properties": {
"label": {
"type": "string",
"description": "The source's own name for it, when that is not its index."
},
"qubit": {
"type": "integer",
"minimum": 0,
"description": "Its index: its place in the list."
},
"t1_us": {
"type": "number",
"minimum": 0,
"description": "T1, microseconds."
},
"t2_us": {
"type": "number",
"minimum": 0,
"description": "T2 (the echo or Ramsey time the source reports), microseconds."
},
"readout": {
"type": "object",
"required": [
"p01",
"p10"
],
"properties": {
"p01": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 1 | holds 0)."
},
"p10": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 0 | holds 1)."
}
},
"additionalProperties": false
},
"measure_ns": {
"type": "number",
"minimum": 0,
"description": "The measurement's duration, nanoseconds."
},
"frequency_ghz": {
"type": "number",
"minimum": 0,
"description": "Its frequency, gigahertz."
}
},
"additionalProperties": false
},
"maxItems": 2048,
"minItems": 1,
"description": "Every qubit, in order."
},
"source": {
"type": "object",
"required": [
"format"
],
"properties": {
"note": {
"type": "string",
"maxLength": 400
},
"format": {
"type": "string",
"description": "The format the target was read from (wai-quantum targets import --help lists them)."
}
},
"additionalProperties": false
},
"coupling": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 2
},
"description": "The pairs a two-qubit gate may act on, each once, the lower qubit first, sorted."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 400,
"description": "The calibration snapshot's id, as the source names it, or a content id of the snapshot read."
},
"timestamp": {
"type": "string",
"maxLength": 400,
"description": "When the snapshot was taken, as the source writes it."
}
},
"additionalProperties": false
}
},
"description": "A device target: its qubits, the pairs it couples, its native gates with their errors and durations, and the calibration snapshot they come from. A value not known is left out, never written as zero. Every field but format, name, source, qubits, gates and coupling is optional, and a field the format does not name is refused, so a misspelt one never reads as absent. Its canonical text is its RFC 8785 form, and the BLAKE3 of that text, the target's hash, names the snapshot in a receipt.",
"additionalProperties": false
}
],
"description": "A device target: a built-in target's name, or a target document. The program is compiled to it, placed and simulated under its noise; noise may not be given beside it."
},
"compile": {
"type": "object",
"properties": {
"dd": {
"anyOf": [
{
"enum": [
"xx",
"xy4"
]
},
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sequence": {
"enum": [
"xx",
"xy4"
]
}
}
}
],
"description": "Dynamical decoupling in each window where a qubit idles long enough: xx or xy4 (or {\"sequence\": …}), checked to change nothing without noise."
},
"basis": {
"enum": [
"clifford_t",
"standard"
]
},
"level": {
"type": "integer",
"maximum": 2,
"minimum": 0
},
"twirl": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [
"seed"
],
"properties": {
"seed": {
"type": "integer",
"minimum": 0
}
}
}
],
"description": "Twirl each two-qubit Clifford gate with Paulis drawn from a seeded stream: true (seed 1), or {\"seed\": N}. One seed is one instance, checked to be the same circuit."
},
"stages": {
"type": "boolean"
},
"epsilon": {
"type": "number",
"exclusiveMinimum": 0
}
},
"description": "What a compile is asked for, each optional: the most the output may differ from the program (epsilon, in the operator norm up to a global phase), the level (0 lowers and approximates; 1 also rewrites and folds phases; 2 also resynthesises), the basis, the gate set it writes the program in (clifford_t: every rotation off the multiples of π/4 a Clifford+T word; standard: nothing approximated), whether to give the circuit after each pass (stages), and the twirl and dd passes, last (twirl, with its seed; dd, with its sequence)."
},
"dry_run": {
"type": "boolean",
"description": "With true: what the host would do with the job or set, running nothing."
},
"history": {
"type": "object",
"description": "The program's history's account of the version the job runs: its digest, and the gates and lines in each hand. The receipt binds it; a history recomputes and checks it."
},
"options": {
"type": "object",
"description": "Options of the method that runs the job, as the methods list names them (max_bond, cutoff, fusion, trajectories, threshold, max_weight, ladder, max_terms, path_restarts), and memory_gb."
},
"verdict": {
"type": "boolean",
"description": "true: the result carries a verdict even with no intent."
},
"mitigate": {
"anyOf": [
{
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
{
"type": "object",
"required": [
"method"
]
}
],
"description": "Mitigate the job's expectation values (or, for readout, its counts) under its noise (engine::mitigate): zne, pea, pec, cdr, vd or readout, or {\"method\", …} with its options. The result's mitigation gives each value raw and mitigated."
},
"programs": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A program's text."
},
{
"type": "object",
"required": [
"qasm"
],
"description": "A job of its own, read as a job request is (no programs or sweep in it); each item of the set's result holds its request in full."
}
]
},
"minItems": 1,
"description": "A set (engine::sets): the programs to run as one job, each a program's text or a job of its own; the request's other fields apply to every item that does not set them itself."
},
"provider": {
"type": "string",
"description": "The person's own provider to run on, by the name their registry gives it. Only a host that holds their credentials runs such a job; every other host refuses it."
},
"amplitudes": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 64,
"description": "Basis states whose amplitudes to return: one 0 or 1 per qubit, qubit n-1 first."
},
"observables": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A Pauli string, as \"Z0 Z1\"; qubits count from 0."
},
{
"type": "object",
"required": [
"pauli"
],
"properties": {
"coeff": {
"type": "number",
"description": "Its coefficient (1 when not given)."
},
"pauli": {
"type": "string",
"description": "A Pauli string, as \"X3\"."
}
}
}
]
},
"maxItems": 256,
"description": "Pauli observables to take the expectation values of."
}
},
"description": "A job as a client submits it: a program and what is asked of it, or a set: many programs (programs), or one over a grid of its inputs (sweep), run as one job. The command line, both MCP servers, the job service, the desktop app and the Studio read it alike, and a receipt seals it as it was given. A member the engine does not read is ignored, and sealed with the rest."
}
},
"description": "One item: its index, its point in a sweep, its request (a plain job, complete in itself), and its result with its own receipt, or why it failed; and its path to the set's root."
}
},
"energy": {
"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": {
"covers": {
"type": "string"
},
"cpu_ms": {
"type": "integer"
},
"source": {
"type": "string"
},
"counter": {
"type": "object",
"properties": {
"step_uj": {
"type": "integer",
"minimum": 0
},
"update_us": {
"type": "integer",
"minimum": 0
}
},
"description": "The package counter as seen: the longest it went between updates, and the smallest step it took."
},
"coverage": {
"enum": [
"whole",
"partial"
]
},
"declared": {
"type": "string",
"description": "What the stated uncertainty covers, and what it does not."
},
"excludes": {
"type": "array",
"items": {
"type": "string"
}
},
"packages": {
"type": "integer",
"minimum": 1,
"description": "The processor packages read."
},
"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)."
},
"joules_micro": {
"type": "integer",
"minimum": 1
},
"concurrent_jobs": {
"type": "integer",
"minimum": 0,
"description": "Other jobs that ran on the host during the window."
},
"energy_provenance": {
"type": "string"
},
"energy_uncertainty": {
"type": "object",
"properties": {
"window_us": {
"type": "integer"
},
"relative_ppm": {
"type": "integer"
}
}
},
"energy_counter_filtering": {
"type": "string"
}
}
}
],
"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."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"failed": {
"type": "integer",
"minimum": 0
},
"format": {
"const": "wai.quantum.set/1"
},
"schema": {
"const": "wai.quantum.set/1"
},
"receipt": {
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
"elapsed_ms": {
"type": "integer",
"minimum": 0
}
},
"description": "A set's result: many programs, or one program over a grid of its inputs, run as one job (engine::sets). Its head holds the count, how many items finished and failed, the Merkle root over the items' leaves, the set's energy and time; the set's receipt seals the set's request and its head. Each item is a plain job with its own receipt, its index, its point in a sweep, and its path to the root, so it is shown sealed by the set alone. A result names the engine that made it and this schema (engine and schema)."
}
]
},
"status": {
"enum": [
"queued",
"running",
"done",
"failed",
"cancelled"
]
},
"digests": {
"type": "object",
"properties": {
"result": {
"type": "string"
},
"receipt": {
"type": "string"
},
"request": {
"type": [
"string",
"null"
]
},
"programs": {
"type": "array",
"items": {
"type": "string"
}
},
"algorithm": {
"const": "blake3"
}
},
"description": "The job service: the BLAKE3 digests its store keeps the job's objects under (the request, each program, the result and the receipt)."
},
"request": {
"type": "object",
"anyOf": [
{
"required": [
"qasm"
]
},
{
"required": [
"programs"
]
}
],
"title": "wai.quantum.job-request/1",
"properties": {
"qasm": {
"type": "string",
"description": "The program, in OpenQASM 3 or the OpenQASM 2 forms in common use."
},
"seed": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "The sampling seed (1 when not given): the same job and seed give the same counts."
},
"noise": {
"type": "object",
"properties": {
"readout": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"dephasing": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_1q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_2q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"amplitude_damping": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"description": "A noise model, each channel a probability. A channel not listed here is refused.",
"additionalProperties": false
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Measurement shots; 1024 when no observables or amplitudes are asked for, otherwise 0."
},
"sweep": {
"type": "object",
"description": "A set over the request's own qasm: values for each of the program's inputs (integer, float or angle), every combination run, the names in sorted order and the first varying slowest.",
"additionalProperties": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 1
}
},
"intent": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
"minItems": 1
}
],
"description": "What the program must do, checked with the run: one intent or a list. The result's verdict says how far it was checked."
},
"method": {
"type": "string",
"description": "auto (the default: the strongest method the program admits), or a method by its name as the methods list names it."
},
"repair": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sizes": {
"type": "object",
"additionalProperties": {
"type": "integer",
"minimum": 1
}
},
"dyadic_bits": {
"type": "integer",
"maximum": 32,
"minimum": 1
},
"max_iterations": {
"type": "integer",
"minimum": 1
}
}
}
],
"description": "Repair the program first on its flagged lines: true, or the choices."
},
"target": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"title": "wai.quantum.target/1",
"required": [
"format",
"name",
"source",
"qubits",
"gates",
"coupling"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"gates": {
"type": "array",
"items": {
"type": "object",
"required": [
"gate",
"qubits"
],
"properties": {
"gate": {
"type": "string",
"pattern": "^[a-z0-9_]{1,40}$"
},
"error": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "The average gate infidelity."
},
"qubits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 1
},
"duration_ns": {
"type": "number",
"minimum": 0,
"description": "Nanoseconds."
}
},
"additionalProperties": false
},
"maxItems": 262144,
"description": "Each native gate where the device runs it, sorted by gate then qubits."
},
"format": {
"const": "wai.quantum.target/1"
},
"qubits": {
"type": "array",
"items": {
"type": "object",
"required": [
"qubit"
],
"properties": {
"label": {
"type": "string",
"description": "The source's own name for it, when that is not its index."
},
"qubit": {
"type": "integer",
"minimum": 0,
"description": "Its index: its place in the list."
},
"t1_us": {
"type": "number",
"minimum": 0,
"description": "T1, microseconds."
},
"t2_us": {
"type": "number",
"minimum": 0,
"description": "T2 (the echo or Ramsey time the source reports), microseconds."
},
"readout": {
"type": "object",
"required": [
"p01",
"p10"
],
"properties": {
"p01": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 1 | holds 0)."
},
"p10": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 0 | holds 1)."
}
},
"additionalProperties": false
},
"measure_ns": {
"type": "number",
"minimum": 0,
"description": "The measurement's duration, nanoseconds."
},
"frequency_ghz": {
"type": "number",
"minimum": 0,
"description": "Its frequency, gigahertz."
}
},
"additionalProperties": false
},
"maxItems": 2048,
"minItems": 1,
"description": "Every qubit, in order."
},
"source": {
"type": "object",
"required": [
"format"
],
"properties": {
"note": {
"type": "string",
"maxLength": 400
},
"format": {
"type": "string",
"description": "The format the target was read from (wai-quantum targets import --help lists them)."
}
},
"additionalProperties": false
},
"coupling": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 2
},
"description": "The pairs a two-qubit gate may act on, each once, the lower qubit first, sorted."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 400,
"description": "The calibration snapshot's id, as the source names it, or a content id of the snapshot read."
},
"timestamp": {
"type": "string",
"maxLength": 400,
"description": "When the snapshot was taken, as the source writes it."
}
},
"additionalProperties": false
}
},
"description": "A device target: its qubits, the pairs it couples, its native gates with their errors and durations, and the calibration snapshot they come from. A value not known is left out, never written as zero. Every field but format, name, source, qubits, gates and coupling is optional, and a field the format does not name is refused, so a misspelt one never reads as absent. Its canonical text is its RFC 8785 form, and the BLAKE3 of that text, the target's hash, names the snapshot in a receipt.",
"additionalProperties": false
}
],
"description": "A device target: a built-in target's name, or a target document. The program is compiled to it, placed and simulated under its noise; noise may not be given beside it."
},
"compile": {
"type": "object",
"properties": {
"dd": {
"anyOf": [
{
"enum": [
"xx",
"xy4"
]
},
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sequence": {
"enum": [
"xx",
"xy4"
]
}
}
}
],
"description": "Dynamical decoupling in each window where a qubit idles long enough: xx or xy4 (or {\"sequence\": …}), checked to change nothing without noise."
},
"basis": {
"enum": [
"clifford_t",
"standard"
]
},
"level": {
"type": "integer",
"maximum": 2,
"minimum": 0
},
"twirl": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [
"seed"
],
"properties": {
"seed": {
"type": "integer",
"minimum": 0
}
}
}
],
"description": "Twirl each two-qubit Clifford gate with Paulis drawn from a seeded stream: true (seed 1), or {\"seed\": N}. One seed is one instance, checked to be the same circuit."
},
"stages": {
"type": "boolean"
},
"epsilon": {
"type": "number",
"exclusiveMinimum": 0
}
},
"description": "What a compile is asked for, each optional: the most the output may differ from the program (epsilon, in the operator norm up to a global phase), the level (0 lowers and approximates; 1 also rewrites and folds phases; 2 also resynthesises), the basis, the gate set it writes the program in (clifford_t: every rotation off the multiples of π/4 a Clifford+T word; standard: nothing approximated), whether to give the circuit after each pass (stages), and the twirl and dd passes, last (twirl, with its seed; dd, with its sequence)."
},
"dry_run": {
"type": "boolean",
"description": "With true: what the host would do with the job or set, running nothing."
},
"history": {
"type": "object",
"description": "The program's history's account of the version the job runs: its digest, and the gates and lines in each hand. The receipt binds it; a history recomputes and checks it."
},
"options": {
"type": "object",
"description": "Options of the method that runs the job, as the methods list names them (max_bond, cutoff, fusion, trajectories, threshold, max_weight, ladder, max_terms, path_restarts), and memory_gb."
},
"verdict": {
"type": "boolean",
"description": "true: the result carries a verdict even with no intent."
},
"mitigate": {
"anyOf": [
{
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
{
"type": "object",
"required": [
"method"
]
}
],
"description": "Mitigate the job's expectation values (or, for readout, its counts) under its noise (engine::mitigate): zne, pea, pec, cdr, vd or readout, or {\"method\", …} with its options. The result's mitigation gives each value raw and mitigated."
},
"programs": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A program's text."
},
{
"type": "object",
"required": [
"qasm"
],
"description": "A job of its own, read as a job request is (no programs or sweep in it); each item of the set's result holds its request in full."
}
]
},
"minItems": 1,
"description": "A set (engine::sets): the programs to run as one job, each a program's text or a job of its own; the request's other fields apply to every item that does not set them itself."
},
"provider": {
"type": "string",
"description": "The person's own provider to run on, by the name their registry gives it. Only a host that holds their credentials runs such a job; every other host refuses it."
},
"amplitudes": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 64,
"description": "Basis states whose amplitudes to return: one 0 or 1 per qubit, qubit n-1 first."
},
"observables": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A Pauli string, as \"Z0 Z1\"; qubits count from 0."
},
{
"type": "object",
"required": [
"pauli"
],
"properties": {
"coeff": {
"type": "number",
"description": "Its coefficient (1 when not given)."
},
"pauli": {
"type": "string",
"description": "A Pauli string, as \"X3\"."
}
}
}
]
},
"maxItems": 256,
"description": "Pauli observables to take the expectation values of."
}
},
"description": "A job as a client submits it: a program and what is asked of it, or a set: many programs (programs), or one over a grid of its inputs (sweep), run as one job. The command line, both MCP servers, the job service, the desktop app and the Studio read it alike, and a receipt seals it as it was given. A member the engine does not read is ignored, and sealed with the rest."
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"estimate": {
"type": "object",
"required": [
"memory_bytes",
"work"
],
"properties": {
"work": {
"type": "integer",
"minimum": 0,
"description": "In the method's own unit."
},
"memory_bytes": {
"type": "integer",
"minimum": 0
}
},
"description": "What the plan admitted the job with."
},
"started_ms": {
"type": "integer"
},
"finished_ms": {
"type": "integer"
},
"submitted_ms": {
"type": "integer",
"description": "The job service: when it was submitted, in milliseconds since 1970."
},
"peak_rss_bytes": {
"type": "integer",
"description": "The job service: the most memory the job's process held."
}
},
"description": "A job as a host returns it: its status, the method its plan chose and why, the request as submitted, and, once it is done, the result with its receipt: a job's result, or for a set (a request with programs or a sweep, its method set) the set's result. The command line's run --json, the local MCP server's run_quantum_circuit and a run on the person's own provider give a finished job; the job service also gives its id and times, and a job still queued or running, or failed with its error. A job's receipt verifies from this document alone: request and result."
},
{
"type": "object",
"required": [
"dry_run",
"ran",
"accepted",
"bounds",
"client"
],
"properties": {
"ran": {
"const": false
},
"why": {
"type": "string"
},
"time": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"note": {
"type": "string"
},
"rate": {
"type": "object"
},
"basis": {
"type": "string"
},
"at_most": {
"type": "integer"
},
"seconds": {
"type": [
"number",
"null"
]
}
},
"description": "The estimated time: seconds and its basis, or null and why, with the most the job may take.",
"additionalProperties": true
},
"work": {
"type": "integer",
"minimum": 0
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"time": {
"type": "object",
"additionalProperties": true
},
"work": {
"type": "integer"
},
"index": {
"type": "integer"
},
"point": {
"type": "object"
},
"energy": {
"type": "object",
"additionalProperties": true
},
"method": {
"type": "string"
},
"qubits": {
"type": "integer"
},
"memory_bytes": {
"type": "integer"
}
}
},
"description": "A set: each item's plan and estimates."
},
"bounds": {
"type": "object",
"description": "The bounds that apply here: memory, time, queue and items of a set.",
"additionalProperties": true
},
"client": {
"type": "object",
"properties": {
"active_jobs": {
"type": "integer"
},
"submissions_left": {
"type": "integer"
},
"memory_held_bytes": {
"type": "integer"
},
"window_resets_in_seconds": {
"type": "integer"
}
},
"description": "Where the client stands: its active jobs, the memory they hold, the submissions left in its window and when the window resets."
},
"energy": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"basis": {
"type": "string"
},
"unestimated": {
"type": "string"
},
"energy_provenance": {
"type": "string"
},
"joules_micro_estimate": {
"type": "integer",
"minimum": 0
}
},
"description": "The estimated energy, never a reading of this job: microjoules, its provenance and basis, or why there is none.",
"additionalProperties": true
},
"method": {
"type": "string"
},
"qubits": {
"type": "integer",
"minimum": 0
},
"status": {
"type": "integer",
"description": "The HTTP status a refusal would carry."
},
"target": {
"type": "object",
"description": "A job on a device target: the target the plan placed it on."
},
"dry_run": {
"const": true
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"accepted": {
"type": "boolean",
"description": "Whether the service would take it now, by every limit."
},
"memory_bytes": {
"type": "integer",
"minimum": 0
},
"within_time_limit": {
"type": [
"boolean",
"null"
]
}
},
"description": "What the service would do with a job or a set, running nothing: the plan's method and why, its qubits, memory and work, the estimated time and energy (each with its basis, or why there is none), the bounds that apply, where the client stands against its limits, each item of a set, and whether the service would take it now, or the refusal it would give."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
},
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A job the service no longer holds, known only by its id."
}
],
"description": "A job: queued, running, done with its result and receipt, or failed with its error; a set's job holds the set's result; with dry_run true, what the service would do with it, running nothing."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"required": [
"verdict"
],
"description": "A job: queued, running, done with its result and receipt, or failed with its error; a set's job holds the set's result; with dry_run true, what the service would do with it, running nothing."
}{
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true
}dry_run_quantum_job — Plan a quantum job or set without running it
What the service would do with a job or a set, running nothing: the method and why, the memory, the estimated time and energy (each with its basis: this service's own timings and readings where it has them, otherwise the planner's nominal rate, and no energy figure without readings), the bounds that apply, where you stand against your limits, and whether the service would take it now, or the refusal it would give, with its code. Takes what run_quantum_circuit or run_quantum_set takes. It counts as one submission.
{
"type": "object",
"properties": {
"qasm": {
"type": "string",
"description": "The program, OpenQASM 3 (or 2), read as the whole language: registers, aliases and slices; the standard gates, `U` and `gphase`; user `gate` definitions and `def` subroutines, inlined; every modifier (`ctrl @`, `negctrl @`, `inv @`, `pow(k) @`) on any gate, lowered exactly; classical types (int, uint, float, angle, complex, bool, bit, arrays), their arithmetic and built-in functions, computed on reading; `for`, `while`, `switch`, `break`, `continue`; measurement and `reset` anywhere; classical control on measured bits (`if (c[0]) x q[1];`, `if (c >= 2) { … } else { … }`, `&&`, `||`); a `while` on measured bits takes `@wai.max_iterations N` before it. `output` declarations come back in the result; `delay`, `box` and `stretch` are carried and labelled as not applied; `defcal` and `cal` are kept, not run. A program that measures in the middle or acts on what it measured runs on statevector or stabilizer: counts split their shots at each measurement; expectation values are exact, of the state before the final measurements. What the reader refuses comes back with a code, as `[Q103]`; qasm_diagnostics says what each code means."
},
"seed": {
"type": "integer",
"description": "Sampling seed (default 1); the same job and seed give the same counts."
},
"noise": {
"type": "object",
"properties": {
"readout": {
"type": "number"
},
"dephasing": {
"type": "number"
},
"depolarizing_1q": {
"type": "number"
},
"depolarizing_2q": {
"type": "number"
},
"amplitude_damping": {
"type": "number"
}
},
"description": "Optional noise, each a probability: depolarizing_1q, depolarizing_2q, amplitude_damping, dephasing (after each gate on its qubits), readout (each measured bit)."
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Measurement shots. Default 1024 when no observables or amplitudes are asked for."
},
"sweep": {
"type": "object",
"description": "Each input of qasm and its values: every combination runs, the names in sorted order, the first varying slowest; an integer input's values are whole numbers.",
"additionalProperties": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 1
}
},
"intent": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0,
"description": "For a sampled intent: the sampling seed (default: the job's)."
},
"test": {
"enum": [
"chi_squared",
"g_test"
],
"description": "For a sampled intent: Pearson's chi-squared test, or the G-test (the likelihood ratio)."
},
"alpha": {
"type": "number",
"description": "For a sampled intent: the significance level, as 0.01.",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1,
"description": "For a sampled intent: the samples the test takes."
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"description": "A distribution the program's samples are held to: the program run as the job runs it for `shots` at `seed`, and the counts tested by `test` at the significance level `alpha` (all three required). Evidence, never proof.",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string",
"description": "A reference program's text: the same state from |0…0⟩, the same qubits measured into the same bits."
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "For a distribution: the total variation distance it is held within (default 1e-9)."
},
"equivalent": {
"type": "string",
"description": "A reference program's text: the same circuit up to a global phase, by the equivalence ladder."
},
"distribution": {
"type": "object",
"description": "The exact distribution of the measured bits, keyed by the classical bits with the highest bit first, as {\"00\": 0.5, \"11\": 0.5}.",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled; with note, name, and \"require\": \"proof\" (evidence then counts as unchecked)."
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0,
"description": "For a sampled intent: the sampling seed (default: the job's)."
},
"test": {
"enum": [
"chi_squared",
"g_test"
],
"description": "For a sampled intent: Pearson's chi-squared test, or the G-test (the likelihood ratio)."
},
"alpha": {
"type": "number",
"description": "For a sampled intent: the significance level, as 0.01.",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1,
"description": "For a sampled intent: the samples the test takes."
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"description": "A distribution the program's samples are held to: the program run as the job runs it for `shots` at `seed`, and the counts tested by `test` at the significance level `alpha` (all three required). Evidence, never proof.",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string",
"description": "A reference program's text: the same state from |0…0⟩, the same qubits measured into the same bits."
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "For a distribution: the total variation distance it is held within (default 1e-9)."
},
"equivalent": {
"type": "string",
"description": "A reference program's text: the same circuit up to a global phase, by the equivalence ladder."
},
"distribution": {
"type": "object",
"description": "The exact distribution of the measured bits, keyed by the classical bits with the highest bit first, as {\"00\": 0.5, \"11\": 0.5}.",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled; with note, name, and \"require\": \"proof\" (evidence then counts as unchecked)."
},
"minItems": 1
}
],
"description": "What the program must do, checked by the engine with the run: the result's `verdict` states how far it checked (proof, evidence, executed, parsed, refused) and whether the intent holds, sealed by the receipt."
},
"method": {
"enum": [
"auto",
"exact",
"statevector",
"statevector_single",
"stabilizer",
"pauli",
"mps",
"tensor_network",
"cutrank",
"cutrank_single",
"density_matrix",
"trajectories"
],
"type": "string",
"description": "Leave as auto unless you need a particular method."
},
"repair": {
"description": "Repair the program first, on the lines its diagnostics flag alone (as repair_qasm does): true, or the choices {\"max_iterations\": N, \"dyadic_bits\": K, \"sizes\": {\"q\": 3}}. The result's `repaired` holds the program that ran and each repair."
},
"target": {
"description": "A device target: a built-in target's name (list_targets) or a target document (wai.quantum.target/1). The program is then compiled to its gates, placed where it is most likely to succeed and simulated under its noise, its hash in the receipt; not with noise or amplitudes. The service reads the document given and fetches nothing."
},
"compile": {
"type": "object",
"properties": {
"dd": {
"enum": [
"xx",
"xy4"
],
"type": "string",
"description": "Dynamical decoupling in each window where a qubit idles long enough, checked to change nothing without noise."
},
"basis": {
"enum": [
"clifford_t",
"standard"
],
"type": "string",
"description": "clifford_t (default): every rotation off the multiples of π/4 written as a Clifford+T word within its share of epsilon; standard: nothing approximated."
},
"level": {
"type": "integer",
"maximum": 2,
"minimum": 0,
"description": "0: lower and approximate; 1 (default): also checked rewrites and phase folding; 2: also one- and two-qubit resynthesis."
},
"twirl": {
"description": "Twirl each two-qubit Clifford gate with Paulis from a seeded stream: true, or {\"seed\": N}. One seed is one instance, checked to be the same circuit."
},
"epsilon": {
"type": "number",
"description": "The most the output may differ from the program in the operator norm, up to a global phase, shared by its rotations (default 1e-6).",
"exclusiveMinimum": 0
}
},
"description": "Compile the program first (as compile_qasm does) and run the compiled circuit: with basis clifford_t it runs bit-exact, and the result's `compiled` states its distance from the program."
},
"options": {
"type": "object",
"description": "Advanced, per method: max_bond (mps), threshold and max_terms (pauli), fusion (statevector), trajectories."
},
"mitigate": {
"anyOf": [
{
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
],
"type": "string"
},
{
"type": "object",
"required": [
"method"
],
"properties": {
"keep": {
"type": "integer",
"minimum": 0,
"description": "cdr: non-Clifford gates each training circuit keeps (default 2, and always one fewer than the program has)."
},
"seed": {
"type": "integer",
"minimum": 0
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 1,
"description": "Shots per circuit (default 10000; 2000 per sampled circuit for pec)."
},
"method": {
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
],
"type": "string"
},
"factors": {
"type": "array",
"items": {
"type": "number"
},
"description": "zne: odd whole numbers (default 1, 3, 5); pea: factors from 1 to 10 (default 1, 1.5, 2)."
},
"samples": {
"type": "integer",
"minimum": 2,
"description": "pec: sampled circuits (default 200)."
},
"training": {
"type": "integer",
"minimum": 3,
"description": "cdr: training circuits (default 16)."
},
"learn_shots": {
"type": "integer",
"minimum": 100,
"description": "pea, pec: shots per depth of the cycle benchmarking that learns the noise (default 60000)."
},
"extrapolation": {
"enum": [
"richardson",
"linear",
"exponential"
],
"type": "string"
}
}
}
],
"description": "Mitigate the job's expectation values (or, for readout, its counts) under its own noise: zne (the whole program folded U(U†U)^k and extrapolated), pea (the noise learned as a sparse Pauli–Lindblad model and amplified), pec (the learned channels inverted and sampled), cdr (a line fitted over near-Clifford training circuits), vd (two copies), readout (the counts' flips inverted). Needs noise and observables (shots for readout), at most 8 qubits. The result's `mitigation` gives raw and mitigated values with standard errors, the ideal value (known because this is a simulation), the method's bias and variance assumptions and its cost. A method's name, or an object."
},
"programs": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"required": [
"qasm"
]
}
]
},
"maxItems": 100,
"minItems": 1,
"description": "The set's programs: each a program's text, or a job ({\"qasm\", …}) whose own fields win over the set's."
},
"amplitudes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Basis states to give amplitudes of: one character per qubit, qubit n-1 first, e.g. \"0011\"."
},
"observables": {
"type": "array",
"items": {
"type": "string"
},
"description": "Pauli strings to take expectation values of, e.g. [\"Z0\", \"Z0 Z1\", \"X2 Y3\"]. Qubits count from 0."
}
}
}{
"$id": "wai-quantum://schemas/dry_run_quantum_job/1",
"type": "object",
"anyOf": [
{
"type": "object",
"required": [
"dry_run",
"ran",
"accepted",
"bounds",
"client"
],
"properties": {
"ran": {
"const": false
},
"why": {
"type": "string"
},
"time": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"note": {
"type": "string"
},
"rate": {
"type": "object"
},
"basis": {
"type": "string"
},
"at_most": {
"type": "integer"
},
"seconds": {
"type": [
"number",
"null"
]
}
},
"description": "The estimated time: seconds and its basis, or null and why, with the most the job may take.",
"additionalProperties": true
},
"work": {
"type": "integer",
"minimum": 0
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"time": {
"type": "object",
"additionalProperties": true
},
"work": {
"type": "integer"
},
"index": {
"type": "integer"
},
"point": {
"type": "object"
},
"energy": {
"type": "object",
"additionalProperties": true
},
"method": {
"type": "string"
},
"qubits": {
"type": "integer"
},
"memory_bytes": {
"type": "integer"
}
}
},
"description": "A set: each item's plan and estimates."
},
"bounds": {
"type": "object",
"description": "The bounds that apply here: memory, time, queue and items of a set.",
"additionalProperties": true
},
"client": {
"type": "object",
"properties": {
"active_jobs": {
"type": "integer"
},
"submissions_left": {
"type": "integer"
},
"memory_held_bytes": {
"type": "integer"
},
"window_resets_in_seconds": {
"type": "integer"
}
},
"description": "Where the client stands: its active jobs, the memory they hold, the submissions left in its window and when the window resets."
},
"energy": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"basis": {
"type": "string"
},
"unestimated": {
"type": "string"
},
"energy_provenance": {
"type": "string"
},
"joules_micro_estimate": {
"type": "integer",
"minimum": 0
}
},
"description": "The estimated energy, never a reading of this job: microjoules, its provenance and basis, or why there is none.",
"additionalProperties": true
},
"method": {
"type": "string"
},
"qubits": {
"type": "integer",
"minimum": 0
},
"status": {
"type": "integer",
"description": "The HTTP status a refusal would carry."
},
"target": {
"type": "object",
"description": "A job on a device target: the target the plan placed it on."
},
"dry_run": {
"const": true
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"accepted": {
"type": "boolean",
"description": "Whether the service would take it now, by every limit."
},
"memory_bytes": {
"type": "integer",
"minimum": 0
},
"within_time_limit": {
"type": [
"boolean",
"null"
]
}
},
"description": "What the service would do with a job or a set, running nothing: the plan's method and why, its qubits, memory and work, the estimated time and energy (each with its basis, or why there is none), the bounds that apply, where the client stands against its limits, each item of a set, and whether the service would take it now, or the refusal it would give."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"required": [
"verdict"
],
"description": "What the service would do with a job or a set, running nothing: the plan's method and why, its qubits, memory and work, the estimated time and energy (each with its basis, or why there is none), the bounds that apply, where the client stands against its limits, each item of a set, and whether the service would take it now, or the refusal it would give."
}{
"readOnlyHint": true
}get_quantum_job — Read a quantum job
A job's status, and its result when it is done. The service keeps every job across its restarts for its retention (a day on the public service); a job that was running when it stopped comes back interrupted, with the reason.
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
}{
"$id": "wai-quantum://schemas/get_quantum_job/1",
"type": "object",
"anyOf": [
{
"anyOf": [
{
"type": "object",
"title": "wai.quantum.job/1",
"required": [
"status",
"request"
],
"properties": {
"id": {
"type": "string",
"description": "The job service's id for the job."
},
"why": {
"type": "string",
"description": "Why the plan chose the method."
},
"error": {
"type": "string",
"description": "Why a job failed."
},
"method": {
"type": "string",
"description": "The method the plan chose; set for a set."
},
"result": {
"anyOf": [
{
"type": "object",
"title": "wai.quantum.job-result/1",
"required": [
"method",
"qubits",
"gates",
"accuracy"
],
"properties": {
"job": {
"type": "object",
"description": "A provider job: the provider's job id and its status checks."
},
"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."
},
"gates": {
"type": "integer",
"minimum": 0
},
"ideal": {
"anyOf": [
{
"type": "object",
"required": [
"computed",
"total_variation_distance",
"hellinger_fidelity"
],
"properties": {
"note": {
"type": "string"
},
"method": {
"type": "string"
},
"computed": {
"const": true
},
"ideal_outcomes": {
"type": "integer"
},
"hellinger_fidelity": {
"type": "number"
},
"sampling_tvd_expected": {
"type": "number"
},
"total_variation_distance": {
"type": "number"
}
}
},
{
"type": "object",
"required": [
"computed",
"why"
],
"properties": {
"why": {
"type": "string"
},
"computed": {
"const": false
}
}
}
],
"description": "A provider job: the circuit's exact distribution set beside the measured counts."
},
"shots": {
"type": "integer",
"minimum": 0,
"description": "The shots, where the method names them in the result (trajectories, provider)."
},
"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
}
},
"energy": {
"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": {
"covers": {
"type": "string"
},
"cpu_ms": {
"type": "integer"
},
"source": {
"type": "string"
},
"counter": {
"type": "object",
"properties": {
"step_uj": {
"type": "integer",
"minimum": 0
},
"update_us": {
"type": "integer",
"minimum": 0
}
},
"description": "The package counter as seen: the longest it went between updates, and the smallest step it took."
},
"coverage": {
"enum": [
"whole",
"partial"
]
},
"declared": {
"type": "string",
"description": "What the stated uncertainty covers, and what it does not."
},
"excludes": {
"type": "array",
"items": {
"type": "string"
}
},
"packages": {
"type": "integer",
"minimum": 1,
"description": "The processor packages read."
},
"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)."
},
"joules_micro": {
"type": "integer",
"minimum": 1
},
"concurrent_jobs": {
"type": "integer",
"minimum": 0,
"description": "Other jobs that ran on the host during the window."
},
"energy_provenance": {
"type": "string"
},
"energy_uncertainty": {
"type": "object",
"properties": {
"window_us": {
"type": "integer"
},
"relative_ppm": {
"type": "integer"
}
}
},
"energy_counter_filtering": {
"type": "string"
}
}
}
],
"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."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string",
"description": "Its semantic version, as MAJOR.MINOR.PATCH."
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"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
},
"schema": {
"const": "wai.quantum.job-result/1",
"description": "The schema the result follows."
},
"target": {
"type": "object",
"required": [
"name",
"hash"
],
"properties": {
"hash": {
"type": "string"
},
"name": {
"type": "string"
},
"noise": {
"type": "object",
"description": "The noise model derived from the target's calibration: its channels, durations and idling, and each qubit's readout."
},
"source": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"format": {
"type": "string"
}
}
},
"hash_is": {
"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 the check of the compiled program."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"timestamp": {
"type": "string"
}
}
}
},
"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."
},
"timing": {
"type": "object",
"required": [
"applied",
"why"
],
"properties": {
"why": {
"type": "string"
},
"code": {
"type": "string"
},
"applied": {
"type": "boolean"
}
},
"description": "A program that states durations (delay, box, stretch) the method does not apply: said so, with the reader's code."
},
"dynamic": {
"type": "object",
"properties": {
"branches_run": {
"type": "integer",
"minimum": 0
},
"states_at_once": {
"type": "integer",
"minimum": 0
},
"branches_weighed": {
"type": "integer",
"minimum": 0
},
"measurements_and_resets": {
"type": "integer",
"minimum": 0
}
},
"description": "A program that measures in the middle, resets or branches on a measured bit: how it ran."
},
"outputs": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"type"
],
"properties": {
"bits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
}
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"value": {
"description": "A number, a boolean, a bit string, a duration's text, {\"re\", \"im\"}, or an array of them."
}
}
},
"description": "The program's output declarations: each its name and type, and its value, or the places of its bits in each outcome."
},
"receipt": {
"anyOf": [
{
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
{
"type": "object",
"required": [
"alg",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128
}
},
"description": "The first form, before canon: the digest is over serde_json's own text of each, under the domain ending \\x01. Never written now; still verified."
}
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"warning": {
"type": "string"
},
"accuracy": {
"type": "object",
"required": [
"class"
],
"properties": {
"note": {
"type": "string"
},
"batch": {
"type": "integer"
},
"class": {
"enum": [
"bit-exact",
"exact",
"single",
"bounded",
"estimate",
"heuristic",
"measured"
],
"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 device returned, not reproducible by recomputation."
},
"shots": {
"type": "integer"
},
"device": {
"type": "string"
},
"fusion": {
"type": "integer"
},
"max_cut": {
"type": "integer"
},
"max_bond": {
"type": "integer"
},
"histories": {
"type": "integer"
},
"threshold": {
"type": "number"
},
"max_weight": {
"type": [
"integer",
"null"
]
},
"order_work": {
"type": "number"
},
"truncations": {
"type": "integer"
},
"trajectories": {
"type": "integer"
},
"max_bond_used": {
"type": "integer"
},
"discarded_weight": {
"type": "number"
},
"fidelity_estimate": {
"type": "number"
},
"gate_applications": {
"type": "integer"
}
},
"description": "What the method promises of the numbers it gave."
},
"compiled": {
"anyOf": [
{
"type": "object",
"required": [
"basis",
"program"
],
"properties": {
"hash": {
"type": "string"
},
"basis": {
"type": "string"
},
"swaps": {
"type": "integer"
},
"layout": {
"type": "array",
"items": {
"type": "integer"
}
},
"checked": {
"type": "string"
},
"program": {
"type": "string"
},
"placement": {
"type": "object",
"description": "Where the program was placed on the device's qubits, and why."
},
"final_layout": {
"type": "array",
"items": {
"type": "integer"
}
},
"native_gates": {
"type": "integer"
},
"two_qubit_gates": {
"type": "integer"
}
},
"description": "A provider job: the program sent, compiled exactly to the device's own gates: its basis (the device's gate set), the BLAKE3 of its OpenQASM 3 text, its counts of gates and swaps, its layouts, and the check it passed before it was sent."
},
{
"type": "object",
"required": [
"basis",
"verdict"
],
"properties": {
"note": {
"type": "string"
},
"basis": {
"enum": [
"clifford_t",
"standard"
],
"description": "The gate set the program was compiled to."
},
"level": {
"type": "integer",
"minimum": 0
},
"output": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"source": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"epsilon": {
"type": "number",
"description": "The budget asked for."
},
"verdict": {
"type": "string"
},
"distance": {
"type": [
"number",
"null"
],
"description": "The bound the passes' distances add to."
},
"certificate": {
"type": [
"string",
"null"
],
"description": "The BLAKE3 of the compile certificate's RFC 8785 text, in hex."
}
},
"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."
}
],
"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."
},
"provider": {
"type": "object",
"description": "A provider job: the provider's name, kind and protocol, the device, its provenance, and the hash of its description."
},
"repaired": {
"type": "object",
"properties": {
"qasm": {
"type": "string"
},
"repairs": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"by",
"edits"
],
"properties": {
"by": {
"enum": [
"engine",
"proposal"
]
},
"code": {
"type": "string"
},
"rule": {
"type": "string"
},
"edits": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"after": {
"type": [
"string",
"null"
]
},
"before": {
"type": [
"string",
"null"
]
}
}
}
},
"flagged": {
"type": "array",
"items": {
"type": "integer"
}
}
}
}
},
"needs_person": {
"type": "array",
"items": {
"type": "object"
}
}
},
"description": "A job asked to repair its program first: the program that ran, each repair, and what needs a person."
},
"amplitudes": {
"type": "array",
"items": {
"type": "object",
"required": [
"bits",
"re",
"im"
],
"properties": {
"im": {
"type": "number"
},
"re": {
"type": "number"
},
"bits": {
"type": "string",
"description": "One 0 or 1 per qubit, qubit n-1 first."
}
}
}
},
"elapsed_ms": {
"type": "integer",
"minimum": 0,
"description": "Wall time of the run, where the host has a clock (not in a browser tab)."
},
"mitigation": {
"type": "object",
"title": "wai.quantum.mitigation/1",
"required": [
"method",
"options",
"assumptions"
],
"properties": {
"cost": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"shots": {
"type": "integer",
"minimum": 0
},
"circuits": {
"type": "integer",
"minimum": 0
}
},
"description": "The circuits and shots it spent beyond the job's own."
},
"note": {
"type": "string"
},
"noise": {
"type": "string",
"description": "How the job's noise model is read for the method."
},
"method": {
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
"details": {
"type": "object",
"description": "The method's own: the folded scales and the folding check (zne), the learned model and the amplified values (pea), the quasi-probability and the value it converges to (pec), the training fits (cdr), the purity (vd), the flip and its amplification (readout).",
"additionalProperties": true
},
"options": {
"type": "object",
"properties": {
"keep": {
"type": "integer"
},
"seed": {
"type": "integer"
},
"shots": {
"type": "integer"
},
"method": {
"type": "string"
},
"factors": {
"type": "array",
"items": {
"type": "number"
}
},
"samples": {
"type": "integer"
},
"training": {
"type": "integer"
},
"learn_shots": {
"type": "integer"
},
"extrapolation": {
"enum": [
"richardson",
"linear",
"exponential"
]
}
},
"description": "The options it ran with, the defaults filled in."
},
"assumptions": {
"type": "object",
"properties": {
"bias": {
"type": "string"
},
"variance": {
"type": "string"
}
}
},
"observables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "number"
},
"coeff": {
"type": "number"
},
"ideal": {
"type": "number"
},
"stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
},
"observable": {
"type": "string"
},
"raw_stderr": {
"type": "number"
}
},
"description": "One observable: its raw value and the mitigated one, each with its standard error, and the ideal value a simulation knows."
}
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "number"
},
"bits": {
"type": "string"
},
"stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
}
}
},
"description": "readout: each outcome's raw share and its mitigated quasi-probability, with its standard error."
}
},
"description": "A job's mitigation (its request's mitigate, engine::mitigate), in its result: the method and the options it ran with, its bias and variance assumptions, each observable raw and mitigated with a standard error each and the ideal value (or, for readout, the counts inverted as a quasi-distribution), the method's own details and what it spent. docs/qec.md describes each method."
},
"provenance": {
"type": "object",
"title": "wai.quantum.provenance/1",
"required": [
"schema",
"circuit",
"computer",
"compilation",
"execution",
"software"
],
"properties": {
"schema": {
"const": "wai.quantum.provenance/1"
},
"circuit": {
"type": "object",
"required": [
"program"
],
"properties": {
"gates": {
"type": [
"integer",
"null"
]
},
"qubits": {
"type": "integer",
"minimum": 0
},
"program": {
"type": "string",
"description": "BLAKE3 of the program's text, in hex."
}
},
"description": "The program: the BLAKE3 digest of its text as given, its qubits and its gates."
},
"computer": {
"type": "object",
"required": [
"kind",
"method"
],
"properties": {
"kind": {
"const": "simulator"
},
"method": {
"type": "string"
},
"target": {
"type": "string",
"description": "The device target's hash; its layout, routes and noise are in the result's own target."
},
"accuracy": {
"type": [
"string",
"null"
]
}
},
"description": "What ran it: a classical simulator, the method and its accuracy class, and a device target's hash when the job named one."
},
"software": {
"type": "object",
"required": [
"engine",
"host"
],
"properties": {
"host": {
"type": "string"
},
"engine": {
"type": "string"
}
},
"description": "The engine's name and version, and the host's."
},
"execution": {
"type": "object",
"required": [
"plan"
],
"properties": {
"plan": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"work": {
"type": "integer",
"minimum": 0
},
"method": {
"type": "string"
},
"memory_bytes": {
"type": "integer",
"minimum": 0
}
}
},
"seed": {
"type": [
"integer",
"null"
]
},
"shots": {
"type": [
"integer",
"null"
]
}
},
"description": "The shots, the seed and the plan the job ran under; its identifier and times are the host's, outside the result."
},
"compilation": {
"type": "object",
"required": [
"asked"
],
"properties": {
"why": {
"type": "string"
},
"asked": {
"type": "boolean"
},
"basis": {
"type": [
"string",
"null"
],
"description": "The gate set compiled to: clifford_t or standard."
},
"level": {
"type": [
"integer",
"null"
]
},
"device": {
"type": "string",
"description": "A job on a device target, compiled exactly to its gates: where its layout and routes are."
},
"passes": {
"type": [
"array",
"null"
],
"items": {
"type": "object",
"properties": {
"pass": {
"type": "string"
},
"verdict": {
"type": [
"string",
"null"
]
}
}
}
},
"seeded": {
"const": false
},
"status": {
"const": "not-applicable"
},
"epsilon": {
"type": [
"number",
"null"
]
},
"distance": {
"type": [
"number",
"null"
]
},
"certificate": {
"type": [
"string",
"null"
]
}
},
"description": "Whether the job asked to be compiled; if it did, each pass in order with its check's verdict, the certificate's digest, the gate set compiled to (its basis), the level, the ε budget and the distance the result carries, and that no pass draws a random number."
}
},
"description": "What a result came from, under the five categories cross-platform provenance surveys use: the circuit, the computer, the compilation, the execution and the software. A host adds it to the results it seals (the job service does, and each item of a set); a result without it reads as it always did. wai-quantum-service/docs/provenance.md maps every field to where it is and whether the receipt seals it."
},
"state_hash": {
"type": "string",
"description": "The bit-exact method's statevector hash (BLAKE3, hex): the same on every machine."
},
"calibration": {
"type": [
"string",
"null"
],
"description": "A provider job: the calibration snapshot it ran under."
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
},
"description": "The reader's warnings and notes on the program, each with its code."
},
"expectations": {
"type": "array",
"items": {
"type": "object",
"required": [
"observable",
"coeff",
"value"
],
"properties": {
"bound": {
"type": "number",
"description": "A rigorous bound on |exact − value|, for the bounded class."
},
"coeff": {
"type": "number"
},
"value": {
"type": "number",
"description": "The coefficient times the expectation value."
},
"ladder": {
"type": "array",
"items": {
"type": "object",
"required": [
"threshold",
"value",
"bound"
],
"properties": {
"bound": {
"type": "number"
},
"value": {
"type": "number"
},
"threshold": {
"type": "number"
},
"peak_terms": {
"type": "integer"
},
"threshold_reached": {
"type": "number"
}
}
},
"description": "The value at thresholds a decade apart, the asked one last."
},
"stderr": {
"type": "number",
"description": "The standard error, for an estimate."
},
"max_terms": {
"type": "integer"
},
"observable": {
"type": "string"
},
"peak_terms": {
"type": "integer"
},
"threshold_reached": {
"type": "number"
}
}
}
},
"global_phase": {
"type": "string",
"description": "Why the amplitudes' global phase is not fixed, when it is not."
},
"omitted_shots": {
"type": "integer",
"minimum": 0
},
"contraction_flops": {
"type": "number",
"description": "The tensor network's contraction cost."
},
"distinct_outcomes": {
"type": "integer",
"minimum": 0
},
"outcome_dimension": {
"type": "integer",
"minimum": 0,
"description": "The stabilizer method: the dimension of the measured outcomes' affine space."
}
},
"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",
"title": "wai.quantum.set/1",
"required": [
"format",
"count",
"done",
"failed",
"root",
"items"
],
"properties": {
"done": {
"type": "integer",
"minimum": 0
},
"root": {
"type": "string",
"description": "The Merkle root of the items' leaves, in hex (domains moq-jwp:merkle-leaf and moq-jwp:merkle-node, version 1)."
},
"count": {
"type": "integer",
"minimum": 1
},
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"request",
"status",
"path"
],
"properties": {
"why": {
"type": "string"
},
"code": {
"type": "string",
"description": "A failed item's refusal code (engine::refusal)."
},
"path": {
"type": "array",
"items": {
"type": "string"
},
"description": "The item's leaf's sibling digests up to the root, in hex."
},
"error": {
"type": "string"
},
"index": {
"type": "integer",
"minimum": 0
},
"point": {
"type": "object",
"description": "A sweep's item: the value of each input it was run at."
},
"method": {
"type": "string"
},
"result": {
"type": "object",
"title": "wai.quantum.job-result/1",
"required": [
"method",
"qubits",
"gates",
"accuracy"
],
"properties": {
"job": {
"type": "object",
"description": "A provider job: the provider's job id and its status checks."
},
"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."
},
"gates": {
"type": "integer",
"minimum": 0
},
"ideal": {
"anyOf": [
{
"type": "object",
"required": [
"computed",
"total_variation_distance",
"hellinger_fidelity"
],
"properties": {
"note": {
"type": "string"
},
"method": {
"type": "string"
},
"computed": {
"const": true
},
"ideal_outcomes": {
"type": "integer"
},
"hellinger_fidelity": {
"type": "number"
},
"sampling_tvd_expected": {
"type": "number"
},
"total_variation_distance": {
"type": "number"
}
}
},
{
"type": "object",
"required": [
"computed",
"why"
],
"properties": {
"why": {
"type": "string"
},
"computed": {
"const": false
}
}
}
],
"description": "A provider job: the circuit's exact distribution set beside the measured counts."
},
"shots": {
"type": "integer",
"minimum": 0,
"description": "The shots, where the method names them in the result (trajectories, provider)."
},
"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
}
},
"energy": {
"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": {
"covers": {
"type": "string"
},
"cpu_ms": {
"type": "integer"
},
"source": {
"type": "string"
},
"counter": {
"type": "object",
"properties": {
"step_uj": {
"type": "integer",
"minimum": 0
},
"update_us": {
"type": "integer",
"minimum": 0
}
},
"description": "The package counter as seen: the longest it went between updates, and the smallest step it took."
},
"coverage": {
"enum": [
"whole",
"partial"
]
},
"declared": {
"type": "string",
"description": "What the stated uncertainty covers, and what it does not."
},
"excludes": {
"type": "array",
"items": {
"type": "string"
}
},
"packages": {
"type": "integer",
"minimum": 1,
"description": "The processor packages read."
},
"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)."
},
"joules_micro": {
"type": "integer",
"minimum": 1
},
"concurrent_jobs": {
"type": "integer",
"minimum": 0,
"description": "Other jobs that ran on the host during the window."
},
"energy_provenance": {
"type": "string"
},
"energy_uncertainty": {
"type": "object",
"properties": {
"window_us": {
"type": "integer"
},
"relative_ppm": {
"type": "integer"
}
}
},
"energy_counter_filtering": {
"type": "string"
}
}
}
],
"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."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string",
"description": "Its semantic version, as MAJOR.MINOR.PATCH."
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"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
},
"schema": {
"const": "wai.quantum.job-result/1",
"description": "The schema the result follows."
},
"target": {
"type": "object",
"required": [
"name",
"hash"
],
"properties": {
"hash": {
"type": "string"
},
"name": {
"type": "string"
},
"noise": {
"type": "object",
"description": "The noise model derived from the target's calibration: its channels, durations and idling, and each qubit's readout."
},
"source": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"format": {
"type": "string"
}
}
},
"hash_is": {
"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 the check of the compiled program."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"timestamp": {
"type": "string"
}
}
}
},
"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."
},
"timing": {
"type": "object",
"required": [
"applied",
"why"
],
"properties": {
"why": {
"type": "string"
},
"code": {
"type": "string"
},
"applied": {
"type": "boolean"
}
},
"description": "A program that states durations (delay, box, stretch) the method does not apply: said so, with the reader's code."
},
"dynamic": {
"type": "object",
"properties": {
"branches_run": {
"type": "integer",
"minimum": 0
},
"states_at_once": {
"type": "integer",
"minimum": 0
},
"branches_weighed": {
"type": "integer",
"minimum": 0
},
"measurements_and_resets": {
"type": "integer",
"minimum": 0
}
},
"description": "A program that measures in the middle, resets or branches on a measured bit: how it ran."
},
"outputs": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"type"
],
"properties": {
"bits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
}
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"value": {
"description": "A number, a boolean, a bit string, a duration's text, {\"re\", \"im\"}, or an array of them."
}
}
},
"description": "The program's output declarations: each its name and type, and its value, or the places of its bits in each outcome."
},
"receipt": {
"anyOf": [
{
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
{
"type": "object",
"required": [
"alg",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128
}
},
"description": "The first form, before canon: the digest is over serde_json's own text of each, under the domain ending \\x01. Never written now; still verified."
}
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"warning": {
"type": "string"
},
"accuracy": {
"type": "object",
"required": [
"class"
],
"properties": {
"note": {
"type": "string"
},
"batch": {
"type": "integer"
},
"class": {
"enum": [
"bit-exact",
"exact",
"single",
"bounded",
"estimate",
"heuristic",
"measured"
],
"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 device returned, not reproducible by recomputation."
},
"shots": {
"type": "integer"
},
"device": {
"type": "string"
},
"fusion": {
"type": "integer"
},
"max_cut": {
"type": "integer"
},
"max_bond": {
"type": "integer"
},
"histories": {
"type": "integer"
},
"threshold": {
"type": "number"
},
"max_weight": {
"type": [
"integer",
"null"
]
},
"order_work": {
"type": "number"
},
"truncations": {
"type": "integer"
},
"trajectories": {
"type": "integer"
},
"max_bond_used": {
"type": "integer"
},
"discarded_weight": {
"type": "number"
},
"fidelity_estimate": {
"type": "number"
},
"gate_applications": {
"type": "integer"
}
},
"description": "What the method promises of the numbers it gave."
},
"compiled": {
"anyOf": [
{
"type": "object",
"required": [
"basis",
"program"
],
"properties": {
"hash": {
"type": "string"
},
"basis": {
"type": "string"
},
"swaps": {
"type": "integer"
},
"layout": {
"type": "array",
"items": {
"type": "integer"
}
},
"checked": {
"type": "string"
},
"program": {
"type": "string"
},
"placement": {
"type": "object",
"description": "Where the program was placed on the device's qubits, and why."
},
"final_layout": {
"type": "array",
"items": {
"type": "integer"
}
},
"native_gates": {
"type": "integer"
},
"two_qubit_gates": {
"type": "integer"
}
},
"description": "A provider job: the program sent, compiled exactly to the device's own gates: its basis (the device's gate set), the BLAKE3 of its OpenQASM 3 text, its counts of gates and swaps, its layouts, and the check it passed before it was sent."
},
{
"type": "object",
"required": [
"basis",
"verdict"
],
"properties": {
"note": {
"type": "string"
},
"basis": {
"enum": [
"clifford_t",
"standard"
],
"description": "The gate set the program was compiled to."
},
"level": {
"type": "integer",
"minimum": 0
},
"output": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"source": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"epsilon": {
"type": "number",
"description": "The budget asked for."
},
"verdict": {
"type": "string"
},
"distance": {
"type": [
"number",
"null"
],
"description": "The bound the passes' distances add to."
},
"certificate": {
"type": [
"string",
"null"
],
"description": "The BLAKE3 of the compile certificate's RFC 8785 text, in hex."
}
},
"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."
}
],
"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."
},
"provider": {
"type": "object",
"description": "A provider job: the provider's name, kind and protocol, the device, its provenance, and the hash of its description."
},
"repaired": {
"type": "object",
"properties": {
"qasm": {
"type": "string"
},
"repairs": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"by",
"edits"
],
"properties": {
"by": {
"enum": [
"engine",
"proposal"
]
},
"code": {
"type": "string"
},
"rule": {
"type": "string"
},
"edits": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"after": {
"type": [
"string",
"null"
]
},
"before": {
"type": [
"string",
"null"
]
}
}
}
},
"flagged": {
"type": "array",
"items": {
"type": "integer"
}
}
}
}
},
"needs_person": {
"type": "array",
"items": {
"type": "object"
}
}
},
"description": "A job asked to repair its program first: the program that ran, each repair, and what needs a person."
},
"amplitudes": {
"type": "array",
"items": {
"type": "object",
"required": [
"bits",
"re",
"im"
],
"properties": {
"im": {
"type": "number"
},
"re": {
"type": "number"
},
"bits": {
"type": "string",
"description": "One 0 or 1 per qubit, qubit n-1 first."
}
}
}
},
"elapsed_ms": {
"type": "integer",
"minimum": 0,
"description": "Wall time of the run, where the host has a clock (not in a browser tab)."
},
"mitigation": {
"type": "object",
"title": "wai.quantum.mitigation/1",
"required": [
"method",
"options",
"assumptions"
],
"properties": {
"cost": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"shots": {
"type": "integer",
"minimum": 0
},
"circuits": {
"type": "integer",
"minimum": 0
}
},
"description": "The circuits and shots it spent beyond the job's own."
},
"note": {
"type": "string"
},
"noise": {
"type": "string",
"description": "How the job's noise model is read for the method."
},
"method": {
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
"details": {
"type": "object",
"description": "The method's own: the folded scales and the folding check (zne), the learned model and the amplified values (pea), the quasi-probability and the value it converges to (pec), the training fits (cdr), the purity (vd), the flip and its amplification (readout).",
"additionalProperties": true
},
"options": {
"type": "object",
"properties": {
"keep": {
"type": "integer"
},
"seed": {
"type": "integer"
},
"shots": {
"type": "integer"
},
"method": {
"type": "string"
},
"factors": {
"type": "array",
"items": {
"type": "number"
}
},
"samples": {
"type": "integer"
},
"training": {
"type": "integer"
},
"learn_shots": {
"type": "integer"
},
"extrapolation": {
"enum": [
"richardson",
"linear",
"exponential"
]
}
},
"description": "The options it ran with, the defaults filled in."
},
"assumptions": {
"type": "object",
"properties": {
"bias": {
"type": "string"
},
"variance": {
"type": "string"
}
}
},
"observables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "number"
},
"coeff": {
"type": "number"
},
"ideal": {
"type": "number"
},
"stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
},
"observable": {
"type": "string"
},
"raw_stderr": {
"type": "number"
}
},
"description": "One observable: its raw value and the mitigated one, each with its standard error, and the ideal value a simulation knows."
}
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "number"
},
"bits": {
"type": "string"
},
"stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
}
}
},
"description": "readout: each outcome's raw share and its mitigated quasi-probability, with its standard error."
}
},
"description": "A job's mitigation (its request's mitigate, engine::mitigate), in its result: the method and the options it ran with, its bias and variance assumptions, each observable raw and mitigated with a standard error each and the ideal value (or, for readout, the counts inverted as a quasi-distribution), the method's own details and what it spent. docs/qec.md describes each method."
},
"provenance": {
"type": "object",
"title": "wai.quantum.provenance/1",
"required": [
"schema",
"circuit",
"computer",
"compilation",
"execution",
"software"
],
"properties": {
"schema": {
"const": "wai.quantum.provenance/1"
},
"circuit": {
"type": "object",
"required": [
"program"
],
"properties": {
"gates": {
"type": [
"integer",
"null"
]
},
"qubits": {
"type": "integer",
"minimum": 0
},
"program": {
"type": "string",
"description": "BLAKE3 of the program's text, in hex."
}
},
"description": "The program: the BLAKE3 digest of its text as given, its qubits and its gates."
},
"computer": {
"type": "object",
"required": [
"kind",
"method"
],
"properties": {
"kind": {
"const": "simulator"
},
"method": {
"type": "string"
},
"target": {
"type": "string",
"description": "The device target's hash; its layout, routes and noise are in the result's own target."
},
"accuracy": {
"type": [
"string",
"null"
]
}
},
"description": "What ran it: a classical simulator, the method and its accuracy class, and a device target's hash when the job named one."
},
"software": {
"type": "object",
"required": [
"engine",
"host"
],
"properties": {
"host": {
"type": "string"
},
"engine": {
"type": "string"
}
},
"description": "The engine's name and version, and the host's."
},
"execution": {
"type": "object",
"required": [
"plan"
],
"properties": {
"plan": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"work": {
"type": "integer",
"minimum": 0
},
"method": {
"type": "string"
},
"memory_bytes": {
"type": "integer",
"minimum": 0
}
}
},
"seed": {
"type": [
"integer",
"null"
]
},
"shots": {
"type": [
"integer",
"null"
]
}
},
"description": "The shots, the seed and the plan the job ran under; its identifier and times are the host's, outside the result."
},
"compilation": {
"type": "object",
"required": [
"asked"
],
"properties": {
"why": {
"type": "string"
},
"asked": {
"type": "boolean"
},
"basis": {
"type": [
"string",
"null"
],
"description": "The gate set compiled to: clifford_t or standard."
},
"level": {
"type": [
"integer",
"null"
]
},
"device": {
"type": "string",
"description": "A job on a device target, compiled exactly to its gates: where its layout and routes are."
},
"passes": {
"type": [
"array",
"null"
],
"items": {
"type": "object",
"properties": {
"pass": {
"type": "string"
},
"verdict": {
"type": [
"string",
"null"
]
}
}
}
},
"seeded": {
"const": false
},
"status": {
"const": "not-applicable"
},
"epsilon": {
"type": [
"number",
"null"
]
},
"distance": {
"type": [
"number",
"null"
]
},
"certificate": {
"type": [
"string",
"null"
]
}
},
"description": "Whether the job asked to be compiled; if it did, each pass in order with its check's verdict, the certificate's digest, the gate set compiled to (its basis), the level, the ε budget and the distance the result carries, and that no pass draws a random number."
}
},
"description": "What a result came from, under the five categories cross-platform provenance surveys use: the circuit, the computer, the compilation, the execution and the software. A host adds it to the results it seals (the job service does, and each item of a set); a result without it reads as it always did. wai-quantum-service/docs/provenance.md maps every field to where it is and whether the receipt seals it."
},
"state_hash": {
"type": "string",
"description": "The bit-exact method's statevector hash (BLAKE3, hex): the same on every machine."
},
"calibration": {
"type": [
"string",
"null"
],
"description": "A provider job: the calibration snapshot it ran under."
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
},
"description": "The reader's warnings and notes on the program, each with its code."
},
"expectations": {
"type": "array",
"items": {
"type": "object",
"required": [
"observable",
"coeff",
"value"
],
"properties": {
"bound": {
"type": "number",
"description": "A rigorous bound on |exact − value|, for the bounded class."
},
"coeff": {
"type": "number"
},
"value": {
"type": "number",
"description": "The coefficient times the expectation value."
},
"ladder": {
"type": "array",
"items": {
"type": "object",
"required": [
"threshold",
"value",
"bound"
],
"properties": {
"bound": {
"type": "number"
},
"value": {
"type": "number"
},
"threshold": {
"type": "number"
},
"peak_terms": {
"type": "integer"
},
"threshold_reached": {
"type": "number"
}
}
},
"description": "The value at thresholds a decade apart, the asked one last."
},
"stderr": {
"type": "number",
"description": "The standard error, for an estimate."
},
"max_terms": {
"type": "integer"
},
"observable": {
"type": "string"
},
"peak_terms": {
"type": "integer"
},
"threshold_reached": {
"type": "number"
}
}
}
},
"global_phase": {
"type": "string",
"description": "Why the amplitudes' global phase is not fixed, when it is not."
},
"omitted_shots": {
"type": "integer",
"minimum": 0
},
"contraction_flops": {
"type": "number",
"description": "The tensor network's contraction cost."
},
"distinct_outcomes": {
"type": "integer",
"minimum": 0
},
"outcome_dimension": {
"type": "integer",
"minimum": 0,
"description": "The stabilizer method: the dimension of the measured outcomes' affine space."
}
},
"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."
},
"status": {
"enum": [
"done",
"failed"
]
},
"request": {
"type": "object",
"anyOf": [
{
"required": [
"qasm"
]
},
{
"required": [
"programs"
]
}
],
"title": "wai.quantum.job-request/1",
"properties": {
"qasm": {
"type": "string",
"description": "The program, in OpenQASM 3 or the OpenQASM 2 forms in common use."
},
"seed": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "The sampling seed (1 when not given): the same job and seed give the same counts."
},
"noise": {
"type": "object",
"properties": {
"readout": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"dephasing": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_1q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_2q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"amplitude_damping": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"description": "A noise model, each channel a probability. A channel not listed here is refused.",
"additionalProperties": false
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Measurement shots; 1024 when no observables or amplitudes are asked for, otherwise 0."
},
"sweep": {
"type": "object",
"description": "A set over the request's own qasm: values for each of the program's inputs (integer, float or angle), every combination run, the names in sorted order and the first varying slowest.",
"additionalProperties": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 1
}
},
"intent": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
"minItems": 1
}
],
"description": "What the program must do, checked with the run: one intent or a list. The result's verdict says how far it was checked."
},
"method": {
"type": "string",
"description": "auto (the default: the strongest method the program admits), or a method by its name as the methods list names it."
},
"repair": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sizes": {
"type": "object",
"additionalProperties": {
"type": "integer",
"minimum": 1
}
},
"dyadic_bits": {
"type": "integer",
"maximum": 32,
"minimum": 1
},
"max_iterations": {
"type": "integer",
"minimum": 1
}
}
}
],
"description": "Repair the program first on its flagged lines: true, or the choices."
},
"target": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"title": "wai.quantum.target/1",
"required": [
"format",
"name",
"source",
"qubits",
"gates",
"coupling"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"gates": {
"type": "array",
"items": {
"type": "object",
"required": [
"gate",
"qubits"
],
"properties": {
"gate": {
"type": "string",
"pattern": "^[a-z0-9_]{1,40}$"
},
"error": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "The average gate infidelity."
},
"qubits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 1
},
"duration_ns": {
"type": "number",
"minimum": 0,
"description": "Nanoseconds."
}
},
"additionalProperties": false
},
"maxItems": 262144,
"description": "Each native gate where the device runs it, sorted by gate then qubits."
},
"format": {
"const": "wai.quantum.target/1"
},
"qubits": {
"type": "array",
"items": {
"type": "object",
"required": [
"qubit"
],
"properties": {
"label": {
"type": "string",
"description": "The source's own name for it, when that is not its index."
},
"qubit": {
"type": "integer",
"minimum": 0,
"description": "Its index: its place in the list."
},
"t1_us": {
"type": "number",
"minimum": 0,
"description": "T1, microseconds."
},
"t2_us": {
"type": "number",
"minimum": 0,
"description": "T2 (the echo or Ramsey time the source reports), microseconds."
},
"readout": {
"type": "object",
"required": [
"p01",
"p10"
],
"properties": {
"p01": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 1 | holds 0)."
},
"p10": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 0 | holds 1)."
}
},
"additionalProperties": false
},
"measure_ns": {
"type": "number",
"minimum": 0,
"description": "The measurement's duration, nanoseconds."
},
"frequency_ghz": {
"type": "number",
"minimum": 0,
"description": "Its frequency, gigahertz."
}
},
"additionalProperties": false
},
"maxItems": 2048,
"minItems": 1,
"description": "Every qubit, in order."
},
"source": {
"type": "object",
"required": [
"format"
],
"properties": {
"note": {
"type": "string",
"maxLength": 400
},
"format": {
"type": "string",
"description": "The format the target was read from (wai-quantum targets import --help lists them)."
}
},
"additionalProperties": false
},
"coupling": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 2
},
"description": "The pairs a two-qubit gate may act on, each once, the lower qubit first, sorted."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 400,
"description": "The calibration snapshot's id, as the source names it, or a content id of the snapshot read."
},
"timestamp": {
"type": "string",
"maxLength": 400,
"description": "When the snapshot was taken, as the source writes it."
}
},
"additionalProperties": false
}
},
"description": "A device target: its qubits, the pairs it couples, its native gates with their errors and durations, and the calibration snapshot they come from. A value not known is left out, never written as zero. Every field but format, name, source, qubits, gates and coupling is optional, and a field the format does not name is refused, so a misspelt one never reads as absent. Its canonical text is its RFC 8785 form, and the BLAKE3 of that text, the target's hash, names the snapshot in a receipt.",
"additionalProperties": false
}
],
"description": "A device target: a built-in target's name, or a target document. The program is compiled to it, placed and simulated under its noise; noise may not be given beside it."
},
"compile": {
"type": "object",
"properties": {
"dd": {
"anyOf": [
{
"enum": [
"xx",
"xy4"
]
},
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sequence": {
"enum": [
"xx",
"xy4"
]
}
}
}
],
"description": "Dynamical decoupling in each window where a qubit idles long enough: xx or xy4 (or {\"sequence\": …}), checked to change nothing without noise."
},
"basis": {
"enum": [
"clifford_t",
"standard"
]
},
"level": {
"type": "integer",
"maximum": 2,
"minimum": 0
},
"twirl": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [
"seed"
],
"properties": {
"seed": {
"type": "integer",
"minimum": 0
}
}
}
],
"description": "Twirl each two-qubit Clifford gate with Paulis drawn from a seeded stream: true (seed 1), or {\"seed\": N}. One seed is one instance, checked to be the same circuit."
},
"stages": {
"type": "boolean"
},
"epsilon": {
"type": "number",
"exclusiveMinimum": 0
}
},
"description": "What a compile is asked for, each optional: the most the output may differ from the program (epsilon, in the operator norm up to a global phase), the level (0 lowers and approximates; 1 also rewrites and folds phases; 2 also resynthesises), the basis, the gate set it writes the program in (clifford_t: every rotation off the multiples of π/4 a Clifford+T word; standard: nothing approximated), whether to give the circuit after each pass (stages), and the twirl and dd passes, last (twirl, with its seed; dd, with its sequence)."
},
"dry_run": {
"type": "boolean",
"description": "With true: what the host would do with the job or set, running nothing."
},
"history": {
"type": "object",
"description": "The program's history's account of the version the job runs: its digest, and the gates and lines in each hand. The receipt binds it; a history recomputes and checks it."
},
"options": {
"type": "object",
"description": "Options of the method that runs the job, as the methods list names them (max_bond, cutoff, fusion, trajectories, threshold, max_weight, ladder, max_terms, path_restarts), and memory_gb."
},
"verdict": {
"type": "boolean",
"description": "true: the result carries a verdict even with no intent."
},
"mitigate": {
"anyOf": [
{
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
{
"type": "object",
"required": [
"method"
]
}
],
"description": "Mitigate the job's expectation values (or, for readout, its counts) under its noise (engine::mitigate): zne, pea, pec, cdr, vd or readout, or {\"method\", …} with its options. The result's mitigation gives each value raw and mitigated."
},
"programs": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A program's text."
},
{
"type": "object",
"required": [
"qasm"
],
"description": "A job of its own, read as a job request is (no programs or sweep in it); each item of the set's result holds its request in full."
}
]
},
"minItems": 1,
"description": "A set (engine::sets): the programs to run as one job, each a program's text or a job of its own; the request's other fields apply to every item that does not set them itself."
},
"provider": {
"type": "string",
"description": "The person's own provider to run on, by the name their registry gives it. Only a host that holds their credentials runs such a job; every other host refuses it."
},
"amplitudes": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 64,
"description": "Basis states whose amplitudes to return: one 0 or 1 per qubit, qubit n-1 first."
},
"observables": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A Pauli string, as \"Z0 Z1\"; qubits count from 0."
},
{
"type": "object",
"required": [
"pauli"
],
"properties": {
"coeff": {
"type": "number",
"description": "Its coefficient (1 when not given)."
},
"pauli": {
"type": "string",
"description": "A Pauli string, as \"X3\"."
}
}
}
]
},
"maxItems": 256,
"description": "Pauli observables to take the expectation values of."
}
},
"description": "A job as a client submits it: a program and what is asked of it, or a set: many programs (programs), or one over a grid of its inputs (sweep), run as one job. The command line, both MCP servers, the job service, the desktop app and the Studio read it alike, and a receipt seals it as it was given. A member the engine does not read is ignored, and sealed with the rest."
}
},
"description": "One item: its index, its point in a sweep, its request (a plain job, complete in itself), and its result with its own receipt, or why it failed; and its path to the set's root."
}
},
"energy": {
"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": {
"covers": {
"type": "string"
},
"cpu_ms": {
"type": "integer"
},
"source": {
"type": "string"
},
"counter": {
"type": "object",
"properties": {
"step_uj": {
"type": "integer",
"minimum": 0
},
"update_us": {
"type": "integer",
"minimum": 0
}
},
"description": "The package counter as seen: the longest it went between updates, and the smallest step it took."
},
"coverage": {
"enum": [
"whole",
"partial"
]
},
"declared": {
"type": "string",
"description": "What the stated uncertainty covers, and what it does not."
},
"excludes": {
"type": "array",
"items": {
"type": "string"
}
},
"packages": {
"type": "integer",
"minimum": 1,
"description": "The processor packages read."
},
"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)."
},
"joules_micro": {
"type": "integer",
"minimum": 1
},
"concurrent_jobs": {
"type": "integer",
"minimum": 0,
"description": "Other jobs that ran on the host during the window."
},
"energy_provenance": {
"type": "string"
},
"energy_uncertainty": {
"type": "object",
"properties": {
"window_us": {
"type": "integer"
},
"relative_ppm": {
"type": "integer"
}
}
},
"energy_counter_filtering": {
"type": "string"
}
}
}
],
"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."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"failed": {
"type": "integer",
"minimum": 0
},
"format": {
"const": "wai.quantum.set/1"
},
"schema": {
"const": "wai.quantum.set/1"
},
"receipt": {
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
"elapsed_ms": {
"type": "integer",
"minimum": 0
}
},
"description": "A set's result: many programs, or one program over a grid of its inputs, run as one job (engine::sets). Its head holds the count, how many items finished and failed, the Merkle root over the items' leaves, the set's energy and time; the set's receipt seals the set's request and its head. Each item is a plain job with its own receipt, its index, its point in a sweep, and its path to the root, so it is shown sealed by the set alone. A result names the engine that made it and this schema (engine and schema)."
}
]
},
"status": {
"enum": [
"queued",
"running",
"done",
"failed",
"cancelled"
]
},
"digests": {
"type": "object",
"properties": {
"result": {
"type": "string"
},
"receipt": {
"type": "string"
},
"request": {
"type": [
"string",
"null"
]
},
"programs": {
"type": "array",
"items": {
"type": "string"
}
},
"algorithm": {
"const": "blake3"
}
},
"description": "The job service: the BLAKE3 digests its store keeps the job's objects under (the request, each program, the result and the receipt)."
},
"request": {
"type": "object",
"anyOf": [
{
"required": [
"qasm"
]
},
{
"required": [
"programs"
]
}
],
"title": "wai.quantum.job-request/1",
"properties": {
"qasm": {
"type": "string",
"description": "The program, in OpenQASM 3 or the OpenQASM 2 forms in common use."
},
"seed": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "The sampling seed (1 when not given): the same job and seed give the same counts."
},
"noise": {
"type": "object",
"properties": {
"readout": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"dephasing": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_1q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_2q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"amplitude_damping": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"description": "A noise model, each channel a probability. A channel not listed here is refused.",
"additionalProperties": false
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Measurement shots; 1024 when no observables or amplitudes are asked for, otherwise 0."
},
"sweep": {
"type": "object",
"description": "A set over the request's own qasm: values for each of the program's inputs (integer, float or angle), every combination run, the names in sorted order and the first varying slowest.",
"additionalProperties": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 1
}
},
"intent": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
"minItems": 1
}
],
"description": "What the program must do, checked with the run: one intent or a list. The result's verdict says how far it was checked."
},
"method": {
"type": "string",
"description": "auto (the default: the strongest method the program admits), or a method by its name as the methods list names it."
},
"repair": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sizes": {
"type": "object",
"additionalProperties": {
"type": "integer",
"minimum": 1
}
},
"dyadic_bits": {
"type": "integer",
"maximum": 32,
"minimum": 1
},
"max_iterations": {
"type": "integer",
"minimum": 1
}
}
}
],
"description": "Repair the program first on its flagged lines: true, or the choices."
},
"target": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"title": "wai.quantum.target/1",
"required": [
"format",
"name",
"source",
"qubits",
"gates",
"coupling"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"gates": {
"type": "array",
"items": {
"type": "object",
"required": [
"gate",
"qubits"
],
"properties": {
"gate": {
"type": "string",
"pattern": "^[a-z0-9_]{1,40}$"
},
"error": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "The average gate infidelity."
},
"qubits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 1
},
"duration_ns": {
"type": "number",
"minimum": 0,
"description": "Nanoseconds."
}
},
"additionalProperties": false
},
"maxItems": 262144,
"description": "Each native gate where the device runs it, sorted by gate then qubits."
},
"format": {
"const": "wai.quantum.target/1"
},
"qubits": {
"type": "array",
"items": {
"type": "object",
"required": [
"qubit"
],
"properties": {
"label": {
"type": "string",
"description": "The source's own name for it, when that is not its index."
},
"qubit": {
"type": "integer",
"minimum": 0,
"description": "Its index: its place in the list."
},
"t1_us": {
"type": "number",
"minimum": 0,
"description": "T1, microseconds."
},
"t2_us": {
"type": "number",
"minimum": 0,
"description": "T2 (the echo or Ramsey time the source reports), microseconds."
},
"readout": {
"type": "object",
"required": [
"p01",
"p10"
],
"properties": {
"p01": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 1 | holds 0)."
},
"p10": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 0 | holds 1)."
}
},
"additionalProperties": false
},
"measure_ns": {
"type": "number",
"minimum": 0,
"description": "The measurement's duration, nanoseconds."
},
"frequency_ghz": {
"type": "number",
"minimum": 0,
"description": "Its frequency, gigahertz."
}
},
"additionalProperties": false
},
"maxItems": 2048,
"minItems": 1,
"description": "Every qubit, in order."
},
"source": {
"type": "object",
"required": [
"format"
],
"properties": {
"note": {
"type": "string",
"maxLength": 400
},
"format": {
"type": "string",
"description": "The format the target was read from (wai-quantum targets import --help lists them)."
}
},
"additionalProperties": false
},
"coupling": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 2
},
"description": "The pairs a two-qubit gate may act on, each once, the lower qubit first, sorted."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 400,
"description": "The calibration snapshot's id, as the source names it, or a content id of the snapshot read."
},
"timestamp": {
"type": "string",
"maxLength": 400,
"description": "When the snapshot was taken, as the source writes it."
}
},
"additionalProperties": false
}
},
"description": "A device target: its qubits, the pairs it couples, its native gates with their errors and durations, and the calibration snapshot they come from. A value not known is left out, never written as zero. Every field but format, name, source, qubits, gates and coupling is optional, and a field the format does not name is refused, so a misspelt one never reads as absent. Its canonical text is its RFC 8785 form, and the BLAKE3 of that text, the target's hash, names the snapshot in a receipt.",
"additionalProperties": false
}
],
"description": "A device target: a built-in target's name, or a target document. The program is compiled to it, placed and simulated under its noise; noise may not be given beside it."
},
"compile": {
"type": "object",
"properties": {
"dd": {
"anyOf": [
{
"enum": [
"xx",
"xy4"
]
},
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sequence": {
"enum": [
"xx",
"xy4"
]
}
}
}
],
"description": "Dynamical decoupling in each window where a qubit idles long enough: xx or xy4 (or {\"sequence\": …}), checked to change nothing without noise."
},
"basis": {
"enum": [
"clifford_t",
"standard"
]
},
"level": {
"type": "integer",
"maximum": 2,
"minimum": 0
},
"twirl": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [
"seed"
],
"properties": {
"seed": {
"type": "integer",
"minimum": 0
}
}
}
],
"description": "Twirl each two-qubit Clifford gate with Paulis drawn from a seeded stream: true (seed 1), or {\"seed\": N}. One seed is one instance, checked to be the same circuit."
},
"stages": {
"type": "boolean"
},
"epsilon": {
"type": "number",
"exclusiveMinimum": 0
}
},
"description": "What a compile is asked for, each optional: the most the output may differ from the program (epsilon, in the operator norm up to a global phase), the level (0 lowers and approximates; 1 also rewrites and folds phases; 2 also resynthesises), the basis, the gate set it writes the program in (clifford_t: every rotation off the multiples of π/4 a Clifford+T word; standard: nothing approximated), whether to give the circuit after each pass (stages), and the twirl and dd passes, last (twirl, with its seed; dd, with its sequence)."
},
"dry_run": {
"type": "boolean",
"description": "With true: what the host would do with the job or set, running nothing."
},
"history": {
"type": "object",
"description": "The program's history's account of the version the job runs: its digest, and the gates and lines in each hand. The receipt binds it; a history recomputes and checks it."
},
"options": {
"type": "object",
"description": "Options of the method that runs the job, as the methods list names them (max_bond, cutoff, fusion, trajectories, threshold, max_weight, ladder, max_terms, path_restarts), and memory_gb."
},
"verdict": {
"type": "boolean",
"description": "true: the result carries a verdict even with no intent."
},
"mitigate": {
"anyOf": [
{
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
{
"type": "object",
"required": [
"method"
]
}
],
"description": "Mitigate the job's expectation values (or, for readout, its counts) under its noise (engine::mitigate): zne, pea, pec, cdr, vd or readout, or {\"method\", …} with its options. The result's mitigation gives each value raw and mitigated."
},
"programs": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A program's text."
},
{
"type": "object",
"required": [
"qasm"
],
"description": "A job of its own, read as a job request is (no programs or sweep in it); each item of the set's result holds its request in full."
}
]
},
"minItems": 1,
"description": "A set (engine::sets): the programs to run as one job, each a program's text or a job of its own; the request's other fields apply to every item that does not set them itself."
},
"provider": {
"type": "string",
"description": "The person's own provider to run on, by the name their registry gives it. Only a host that holds their credentials runs such a job; every other host refuses it."
},
"amplitudes": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 64,
"description": "Basis states whose amplitudes to return: one 0 or 1 per qubit, qubit n-1 first."
},
"observables": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A Pauli string, as \"Z0 Z1\"; qubits count from 0."
},
{
"type": "object",
"required": [
"pauli"
],
"properties": {
"coeff": {
"type": "number",
"description": "Its coefficient (1 when not given)."
},
"pauli": {
"type": "string",
"description": "A Pauli string, as \"X3\"."
}
}
}
]
},
"maxItems": 256,
"description": "Pauli observables to take the expectation values of."
}
},
"description": "A job as a client submits it: a program and what is asked of it, or a set: many programs (programs), or one over a grid of its inputs (sweep), run as one job. The command line, both MCP servers, the job service, the desktop app and the Studio read it alike, and a receipt seals it as it was given. A member the engine does not read is ignored, and sealed with the rest."
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"estimate": {
"type": "object",
"required": [
"memory_bytes",
"work"
],
"properties": {
"work": {
"type": "integer",
"minimum": 0,
"description": "In the method's own unit."
},
"memory_bytes": {
"type": "integer",
"minimum": 0
}
},
"description": "What the plan admitted the job with."
},
"started_ms": {
"type": "integer"
},
"finished_ms": {
"type": "integer"
},
"submitted_ms": {
"type": "integer",
"description": "The job service: when it was submitted, in milliseconds since 1970."
},
"peak_rss_bytes": {
"type": "integer",
"description": "The job service: the most memory the job's process held."
}
},
"description": "A job as a host returns it: its status, the method its plan chose and why, the request as submitted, and, once it is done, the result with its receipt: a job's result, or for a set (a request with programs or a sweep, its method set) the set's result. The command line's run --json, the local MCP server's run_quantum_circuit and a run on the person's own provider give a finished job; the job service also gives its id and times, and a job still queued or running, or failed with its error. A job's receipt verifies from this document alone: request and result."
},
{
"type": "object",
"required": [
"dry_run",
"ran",
"accepted",
"bounds",
"client"
],
"properties": {
"ran": {
"const": false
},
"why": {
"type": "string"
},
"time": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"note": {
"type": "string"
},
"rate": {
"type": "object"
},
"basis": {
"type": "string"
},
"at_most": {
"type": "integer"
},
"seconds": {
"type": [
"number",
"null"
]
}
},
"description": "The estimated time: seconds and its basis, or null and why, with the most the job may take.",
"additionalProperties": true
},
"work": {
"type": "integer",
"minimum": 0
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"time": {
"type": "object",
"additionalProperties": true
},
"work": {
"type": "integer"
},
"index": {
"type": "integer"
},
"point": {
"type": "object"
},
"energy": {
"type": "object",
"additionalProperties": true
},
"method": {
"type": "string"
},
"qubits": {
"type": "integer"
},
"memory_bytes": {
"type": "integer"
}
}
},
"description": "A set: each item's plan and estimates."
},
"bounds": {
"type": "object",
"description": "The bounds that apply here: memory, time, queue and items of a set.",
"additionalProperties": true
},
"client": {
"type": "object",
"properties": {
"active_jobs": {
"type": "integer"
},
"submissions_left": {
"type": "integer"
},
"memory_held_bytes": {
"type": "integer"
},
"window_resets_in_seconds": {
"type": "integer"
}
},
"description": "Where the client stands: its active jobs, the memory they hold, the submissions left in its window and when the window resets."
},
"energy": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"basis": {
"type": "string"
},
"unestimated": {
"type": "string"
},
"energy_provenance": {
"type": "string"
},
"joules_micro_estimate": {
"type": "integer",
"minimum": 0
}
},
"description": "The estimated energy, never a reading of this job: microjoules, its provenance and basis, or why there is none.",
"additionalProperties": true
},
"method": {
"type": "string"
},
"qubits": {
"type": "integer",
"minimum": 0
},
"status": {
"type": "integer",
"description": "The HTTP status a refusal would carry."
},
"target": {
"type": "object",
"description": "A job on a device target: the target the plan placed it on."
},
"dry_run": {
"const": true
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"accepted": {
"type": "boolean",
"description": "Whether the service would take it now, by every limit."
},
"memory_bytes": {
"type": "integer",
"minimum": 0
},
"within_time_limit": {
"type": [
"boolean",
"null"
]
}
},
"description": "What the service would do with a job or a set, running nothing: the plan's method and why, its qubits, memory and work, the estimated time and energy (each with its basis, or why there is none), the bounds that apply, where the client stands against its limits, each item of a set, and whether the service would take it now, or the refusal it would give."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
},
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A job the service no longer holds, known only by its id."
}
],
"description": "A job: queued, running, done with its result and receipt, or failed with its error; a set's job holds the set's result; with dry_run true, what the service would do with it, running nothing."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"required": [
"verdict"
],
"description": "A job: queued, running, done with its result and receipt, or failed with its error; a set's job holds the set's result; with dry_run true, what the service would do with it, running nothing."
}{
"readOnlyHint": true
}verify_quantum_receipt — Verify a result's receipt
Whether a result's receipt (an Ed25519 signature by the service) seals exactly that request and that result. Pass the job's own `request` (as run_quantum_circuit or get_quantum_job returns it: a run here asks for its verdict, so the request it seals says so) and its result.
{
"type": "object",
"required": [
"request",
"result"
],
"properties": {
"result": {
"type": "object"
},
"request": {
"type": "object"
}
}
}{
"$id": "wai-quantum://schemas/verify_quantum_receipt/1",
"type": "object",
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"valid"
],
"properties": {
"key": {
"type": [
"string",
"null"
]
},
"valid": {
"type": "boolean"
}
},
"description": "Whether a result's receipt seals exactly that request and that result, and the key it names."
},
{
"type": "object",
"required": [
"valid",
"signed",
"receipts",
"reproduced"
],
"properties": {
"key": {
"type": [
"string",
"null"
]
},
"valid": {
"type": "boolean"
},
"signed": {
"type": "boolean"
},
"signer": {
"type": [
"string",
"null"
]
},
"receipts": {
"type": "boolean"
},
"estimates": {
"type": "integer"
},
"reproduced": {
"type": "boolean"
}
},
"description": "An estimate's check: its seal, every estimate's receipt, and the request re-run here giving the same figures."
},
{
"type": "object",
"required": [
"valid",
"signed",
"derived",
"items",
"items_sealed",
"root"
],
"properties": {
"key": {
"type": [
"string",
"null"
]
},
"root": {
"type": "boolean"
},
"items": {
"type": "integer",
"minimum": 0
},
"valid": {
"type": "boolean"
},
"signed": {
"type": "boolean"
},
"derived": {
"type": "boolean"
},
"items_sealed": {
"type": "boolean"
}
},
"description": "A set's check: the set's receipt over its request and head, the items the request gives at their indices, every item's own receipt, the root over the leaves and each item's path."
}
],
"description": "Whether a result's receipt seals exactly that request and that result, and the key it names; for an estimate, also every estimate's receipt and the request re-run here; for a set, also every item's receipt, the root over them and each item's path."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"description": "Whether a result's receipt seals exactly that request and that result, and the key it names; for an estimate, also every estimate's receipt and the request re-run here; for a set, also every item's receipt, the root over them and each item's path."
}{
"readOnlyHint": true
}critique_qasm — Critique a quantum program
A program's measures, computed by the engine: gates by kind, two-qubit gates, depth and two-qubit depth, T count, whether it is a Clifford circuit, and a fidelity under reference error rates (a model, not a run). Also its smells, each with its lines: gates that cancel, rotations that merge or do nothing, idle qubits, and qubits acted on but never measured.
{
"type": "object",
"required": [
"qasm"
],
"properties": {
"qasm": {
"type": "string"
}
}
}{
"$id": "wai-quantum://schemas/critique_qasm/1",
"type": "object",
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"ok",
"qubits",
"gates",
"depth",
"two_qubit",
"t_count",
"clifford"
],
"properties": {
"ok": {
"const": true
},
"bits": {
"type": "integer"
},
"depth": {
"type": "integer"
},
"gates": {
"type": "integer"
},
"inputs": {
"type": "object",
"description": "A generator's inputs, when it was read at them.",
"additionalProperties": {
"type": "integer"
}
},
"qubits": {
"type": "integer"
},
"smells": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"message",
"lines",
"fixable"
],
"properties": {
"ops": {
"type": "array",
"items": {
"type": "integer"
}
},
"kind": {
"type": "string"
},
"lines": {
"type": "array",
"items": {
"type": "integer"
}
},
"qubits": {
"type": "array",
"items": {
"type": "integer"
}
},
"fixable": {
"type": "boolean"
},
"message": {
"type": "string"
}
}
}
},
"by_gate": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"dynamic": {
"type": "boolean"
},
"t_count": {
"type": "integer"
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"clifford": {
"type": "boolean"
},
"measured": {
"type": "integer"
},
"one_qubit": {
"type": "integer"
},
"two_qubit": {
"type": "integer"
},
"three_qubit": {
"type": "integer"
},
"non_clifford": {
"type": "integer"
},
"fidelity_model": {
"type": "object",
"required": [
"estimate"
],
"properties": {
"note": {
"type": "string"
},
"rates": {
"type": "object",
"properties": {
"readout": {
"type": "number"
},
"one_qubit": {
"type": "number"
},
"two_qubit": {
"type": "number"
}
}
},
"estimate": {
"type": "number"
}
},
"description": "A fidelity under reference error rates: a model of a device, not a run."
},
"two_qubit_depth": {
"type": "integer"
}
},
"description": "A program's measures, computed by the engine."
},
{
"type": "object",
"required": [
"ok",
"error"
],
"properties": {
"ok": {
"const": false
},
"code": {
"type": "string",
"description": "The reader's diagnostic code, as Q103; qasm_diagnostics says what each means."
},
"line": {
"type": [
"integer",
"null"
]
},
"error": {
"type": "string"
},
"column": {
"type": "integer",
"minimum": 1,
"description": "Where the problem starts on its line, in characters from 1."
},
"length": {
"type": "integer",
"minimum": 0,
"description": "Its length on that line, in characters."
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A program that does not read: the problem, and its line, its diagnostic code, column and length when the reader names them."
}
],
"description": "A program's measures and its smells, each with its lines; or why it does not read."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
]
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"required": [
"verdict"
],
"description": "What critique_qasm answers."
}{
"readOnlyHint": true
}check_equivalent — Check two quantum programs are the same circuit
Whether two programs are the same circuit up to a global phase, and how the engine knows: Clifford circuits by their tableaus at any size, others on every basis state to 8 qubits, then by checked rewrites of one followed by the other's inverse to nothing (a proof at any width), then on random product states to 22 (evidence, not proof), otherwise unchecked with the reason. Its `verdict` is that decision; `verification` is the level it reached, as every tool's verdict states it. A check that would take long here is refused with the command that runs it locally.
{
"type": "object",
"required": [
"a",
"b"
],
"properties": {
"a": {
"type": "string"
},
"b": {
"type": "string"
}
}
}{
"$id": "wai-quantum://schemas/check_equivalent/1",
"type": "object",
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"verdict",
"how",
"why"
],
"properties": {
"how": {
"enum": [
"tableau",
"exact",
"rewrites",
"random",
"state",
"shape",
"none"
],
"description": "tableau, exact and rewrites are proofs; state is a proof of the same state from |0…0⟩; random is evidence, not proof; shape: they differ in their shape; none: unchecked."
},
"why": {
"type": "string"
},
"steps": {
"type": "integer",
"description": "rewrites: the checked steps to nothing."
},
"verdict": {
"enum": [
"equivalent",
"different",
"unchecked"
]
},
"global_phase": {
"type": [
"number",
"null"
],
"description": "The global phase between them, in units of π."
},
"verification": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "Whether two programs are the same circuit up to a global phase, and how the engine decided."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verification": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
]
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verification": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"required": [
"verification"
],
"description": "What check_equivalent answers."
}{
"readOnlyHint": true
}improve_qasm — Improve a quantum program
The program with its smells fixed in its own text (all of them, and each alone), each candidate with its measures and the equivalence check's verdict against the program. A candidate the check finds different is never returned.
{
"type": "object",
"required": [
"qasm"
],
"properties": {
"qasm": {
"type": "string"
}
}
}{
"$id": "wai-quantum://schemas/improve_qasm/1",
"type": "object",
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"ok",
"base",
"candidates"
],
"properties": {
"ok": {
"const": true
},
"base": {
"type": "object",
"required": [
"ok",
"qubits",
"gates",
"depth",
"two_qubit",
"t_count",
"clifford"
],
"properties": {
"ok": {
"const": true
},
"bits": {
"type": "integer"
},
"depth": {
"type": "integer"
},
"gates": {
"type": "integer"
},
"inputs": {
"type": "object",
"description": "A generator's inputs, when it was read at them.",
"additionalProperties": {
"type": "integer"
}
},
"qubits": {
"type": "integer"
},
"smells": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"message",
"lines",
"fixable"
],
"properties": {
"ops": {
"type": "array",
"items": {
"type": "integer"
}
},
"kind": {
"type": "string"
},
"lines": {
"type": "array",
"items": {
"type": "integer"
}
},
"qubits": {
"type": "array",
"items": {
"type": "integer"
}
},
"fixable": {
"type": "boolean"
},
"message": {
"type": "string"
}
}
}
},
"by_gate": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"dynamic": {
"type": "boolean"
},
"t_count": {
"type": "integer"
},
"clifford": {
"type": "boolean"
},
"measured": {
"type": "integer"
},
"one_qubit": {
"type": "integer"
},
"two_qubit": {
"type": "integer"
},
"three_qubit": {
"type": "integer"
},
"non_clifford": {
"type": "integer"
},
"fidelity_model": {
"type": "object",
"required": [
"estimate"
],
"properties": {
"note": {
"type": "string"
},
"rates": {
"type": "object",
"properties": {
"readout": {
"type": "number"
},
"one_qubit": {
"type": "number"
},
"two_qubit": {
"type": "number"
}
}
},
"estimate": {
"type": "number"
}
},
"description": "A fidelity under reference error rates: a model of a device, not a run."
},
"two_qubit_depth": {
"type": "integer"
}
},
"description": "A program's measures, computed by the engine."
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"candidates": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"qasm",
"changes",
"measures",
"equivalence"
],
"properties": {
"qasm": {
"type": "string"
},
"label": {
"type": "string"
},
"changes": {
"type": "array",
"items": {
"type": "string"
}
},
"measures": {
"type": "object",
"required": [
"ok",
"qubits",
"gates",
"depth",
"two_qubit",
"t_count",
"clifford"
],
"properties": {
"ok": {
"const": true
},
"bits": {
"type": "integer"
},
"depth": {
"type": "integer"
},
"gates": {
"type": "integer"
},
"inputs": {
"type": "object",
"description": "A generator's inputs, when it was read at them.",
"additionalProperties": {
"type": "integer"
}
},
"qubits": {
"type": "integer"
},
"smells": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"message",
"lines",
"fixable"
],
"properties": {
"ops": {
"type": "array",
"items": {
"type": "integer"
}
},
"kind": {
"type": "string"
},
"lines": {
"type": "array",
"items": {
"type": "integer"
}
},
"qubits": {
"type": "array",
"items": {
"type": "integer"
}
},
"fixable": {
"type": "boolean"
},
"message": {
"type": "string"
}
}
}
},
"by_gate": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"dynamic": {
"type": "boolean"
},
"t_count": {
"type": "integer"
},
"clifford": {
"type": "boolean"
},
"measured": {
"type": "integer"
},
"one_qubit": {
"type": "integer"
},
"two_qubit": {
"type": "integer"
},
"three_qubit": {
"type": "integer"
},
"non_clifford": {
"type": "integer"
},
"fidelity_model": {
"type": "object",
"required": [
"estimate"
],
"properties": {
"note": {
"type": "string"
},
"rates": {
"type": "object",
"properties": {
"readout": {
"type": "number"
},
"one_qubit": {
"type": "number"
},
"two_qubit": {
"type": "number"
}
}
},
"estimate": {
"type": "number"
}
},
"description": "A fidelity under reference error rates: a model of a device, not a run."
},
"two_qubit_depth": {
"type": "integer"
}
},
"description": "A program's measures, computed by the engine."
},
"equivalence": {
"type": "object",
"required": [
"verdict",
"how",
"why"
],
"properties": {
"how": {
"enum": [
"tableau",
"exact",
"rewrites",
"random",
"state",
"shape",
"none"
],
"description": "tableau, exact and rewrites are proofs; state is a proof of the same state from |0…0⟩; random is evidence, not proof; shape: they differ in their shape; none: unchecked."
},
"why": {
"type": "string"
},
"steps": {
"type": "integer",
"description": "rewrites: the checked steps to nothing."
},
"verdict": {
"enum": [
"equivalent",
"different",
"unchecked"
]
},
"global_phase": {
"type": [
"number",
"null"
],
"description": "The global phase between them, in units of π."
}
},
"description": "Whether two programs are the same circuit up to a global phase, and how the engine decided."
}
}
}
}
}
},
{
"type": "object",
"required": [
"ok",
"error"
],
"properties": {
"ok": {
"const": false
},
"code": {
"type": "string",
"description": "The reader's diagnostic code, as Q103; qasm_diagnostics says what each means."
},
"line": {
"type": [
"integer",
"null"
]
},
"error": {
"type": "string"
},
"column": {
"type": "integer",
"minimum": 1,
"description": "Where the problem starts on its line, in characters from 1."
},
"length": {
"type": "integer",
"minimum": 0,
"description": "Its length on that line, in characters."
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A program that does not read: the problem, and its line, its diagnostic code, column and length when the reader names them."
}
],
"description": "The program with its smells fixed, all together and each alone, each candidate checked against the program; a candidate found different is never given."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
]
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"required": [
"verdict"
],
"description": "What improve_qasm answers."
}{
"readOnlyHint": true
}classical_shortcuts — Find a quantum program's classical shortcuts
Every exact classical route to simulating a program, priced on it: the stabilizer tableau, the cut-rank sum, an exact matrix product state at a rigorous bond bound, the light cone of a one-qubit expectation value, and the state vector. The cheapest is named for each question. A cheap route proves the program classically easy; none being cheap proves nothing about hardness. A thorough search, with a contraction tree, runs locally: wai-quantum shortcuts --thorough.
{
"type": "object",
"required": [
"qasm"
],
"properties": {
"qasm": {
"type": "string"
}
}
}{
"$id": "wai-quantum://schemas/classical_shortcuts/1",
"type": "object",
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"ok",
"qubits",
"gates",
"routes",
"cheapest",
"summary"
],
"properties": {
"ok": {
"const": true
},
"note": {
"type": "string"
},
"gates": {
"type": "integer"
},
"qubits": {
"type": "integer"
},
"routes": {
"type": "array",
"items": {
"type": "object",
"required": [
"route",
"answers",
"applies",
"why"
],
"properties": {
"why": {
"type": "string"
},
"size": {
"type": "object"
},
"route": {
"type": "string"
},
"answers": {
"type": "array",
"items": {
"type": "string"
}
},
"applies": {
"type": "boolean"
},
"log2_work": {
"type": "number"
},
"memory_bytes": {
"type": "number"
},
"seconds_at_reference": {
"type": "number"
}
}
}
},
"summary": {
"type": "string"
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"cheapest": {
"type": "object",
"description": "For counts, amplitudes, expectations and one_qubit_expectations: the cheapest route that answers it, or null.",
"additionalProperties": {
"anyOf": [
{
"type": "null"
},
{
"type": "object",
"required": [
"route"
],
"properties": {
"route": {
"type": "string"
},
"log2_work": {
"type": "number"
},
"memory_bytes": {
"type": "number"
},
"seconds_at_reference": {
"type": "number"
}
}
}
]
}
},
"thorough": {
"type": "boolean"
},
"reference_rate": {
"type": "number",
"description": "Operations a second the times assume."
}
}
},
{
"type": "object",
"required": [
"ok",
"error"
],
"properties": {
"ok": {
"const": false
},
"code": {
"type": "string",
"description": "The reader's diagnostic code, as Q103; qasm_diagnostics says what each means."
},
"line": {
"type": [
"integer",
"null"
]
},
"error": {
"type": "string"
},
"column": {
"type": "integer",
"minimum": 1,
"description": "Where the problem starts on its line, in characters from 1."
},
"length": {
"type": "integer",
"minimum": 0,
"description": "Its length on that line, in characters."
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A program that does not read: the problem, and its line, its diagnostic code, column and length when the reader names them."
}
],
"description": "Every exact classical route the engine knows for a program, priced on it, and the cheapest for each question."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
]
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"required": [
"verdict"
],
"description": "What classical_shortcuts answers."
}{
"readOnlyHint": true
}compile_qasm — Compile a quantum program, every pass checked
Compile an OpenQASM program through named passes (lowering, checked rewrites, phase folding, one- and two-qubit resynthesis, and every rotation off the multiples of π/4 written as a Clifford+T word within its share of the ε budget), each checked where it acts. Returns the compiled program and a certificate sealed with the service's key: each pass's counts before and after, its check and verdict (proof, exact or approximate with its distance), the budget and the bound the distances add to. verify_quantum_receipt checks it. Quote the bound; an approximate compile is not exact. A large or very fine compile is refused with the local command.
{
"type": "object",
"required": [
"qasm"
],
"properties": {
"qasm": {
"type": "string"
},
"basis": {
"enum": [
"clifford_t",
"standard"
],
"type": "string",
"description": "clifford_t (default): every rotation off the multiples of π/4 written as a Clifford+T word within its share of epsilon; standard: nothing approximated."
},
"level": {
"type": "integer",
"maximum": 2,
"minimum": 0,
"description": "0: lower and approximate; 1 (default): also checked rewrites and phase folding; 2: also one- and two-qubit resynthesis."
},
"epsilon": {
"type": "number",
"description": "The most the output may differ from the program in the operator norm, up to a global phase, shared by its rotations (default 1e-6).",
"exclusiveMinimum": 0
}
}
}{
"$id": "wai-quantum://schemas/compile_qasm/1",
"type": "object",
"anyOf": [
{
"anyOf": [
{
"type": "object",
"title": "wai.quantum.compile-result/1",
"required": [
"request",
"result"
],
"properties": {
"result": {
"type": "object",
"required": [
"ok",
"options",
"qasm",
"certificate"
],
"properties": {
"ok": {
"const": true
},
"qasm": {
"type": "string",
"description": "The compiled program, as OpenQASM 3."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"schema": {
"const": "wai.quantum.compile-result/1"
},
"stages": {
"type": "array",
"items": {
"type": "object",
"required": [
"pass",
"qasm"
],
"properties": {
"pass": {
"type": "string"
},
"qasm": {
"type": "string"
}
}
},
"description": "With stages: the circuit after each pass."
},
"options": {
"type": "object",
"required": [
"epsilon",
"level",
"basis"
],
"properties": {
"dd": {
"enum": [
"xx",
"xy4"
],
"description": "The decoupling pass's sequence."
},
"basis": {
"enum": [
"clifford_t",
"standard"
]
},
"level": {
"type": "integer"
},
"twirl": {
"type": "object",
"properties": {
"seed": {
"type": "integer",
"minimum": 0
}
},
"description": "The twirl pass's seed."
},
"epsilon": {
"type": "number"
}
},
"description": "The options the compile ran with, the defaults filled in."
},
"receipt": {
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
"certificate": {
"type": "object",
"required": [
"format",
"basis",
"level",
"source",
"output",
"epsilon",
"passes",
"verdict"
],
"properties": {
"basis": {
"enum": [
"clifford_t",
"standard"
]
},
"level": {
"type": "integer"
},
"whole": {
"type": "object",
"description": "The check of the whole output against the whole program, where it was made."
},
"format": {
"const": "wai.quantum.compile/1"
},
"output": {
"type": "object",
"properties": {
"hash": {
"type": "string"
},
"counts": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
}
}
},
"passes": {
"type": "array",
"items": {
"type": "object",
"required": [
"pass",
"check"
],
"properties": {
"pass": {
"type": "string"
},
"after": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"check": {
"type": "object"
},
"before": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
}
}
},
"description": "Each pass: its name, the counts before and after, and its check (how, the verdict, and its distance where it has one)."
},
"source": {
"type": "object",
"properties": {
"hash": {
"type": "string"
},
"counts": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"qubits": {
"type": "integer"
}
}
},
"epsilon": {
"type": "object",
"properties": {
"each": {
"type": "number"
},
"bound": {
"type": "number"
},
"budget": {
"type": "number"
},
"rotations": {
"type": "integer"
}
},
"description": "The budget, the bound the passes' distances add to, and how the budget was shared among the rotations."
},
"reading": {
"type": "string",
"description": "What the certificate says of the output, in words."
},
"verdict": {
"type": "string",
"description": "proof, exact or approximate."
},
"rotations": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each rotation written as a Clifford+T word: its angle, its T count, its distance."
}
},
"description": "What the compile did and how each step was checked. Hashes are BLAKE3, in hex, of the program as read (written out as OpenQASM 3) and of the output text."
}
}
},
"request": {
"type": "object",
"required": [
"qasm"
],
"properties": {
"dd": {
"anyOf": [
{
"enum": [
"xx",
"xy4"
]
},
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sequence": {
"enum": [
"xx",
"xy4"
]
}
}
}
],
"description": "Dynamical decoupling in each window where a qubit idles long enough: xx or xy4 (or {\"sequence\": …}), checked to change nothing without noise."
},
"qasm": {
"type": "string"
},
"basis": {
"type": "string"
},
"level": {
"type": "integer"
},
"twirl": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [
"seed"
],
"properties": {
"seed": {
"type": "integer",
"minimum": 0
}
}
}
],
"description": "Twirl each two-qubit Clifford gate with Paulis drawn from a seeded stream: true (seed 1), or {\"seed\": N}. One seed is one instance, checked to be the same circuit."
},
"stages": {
"type": "boolean"
},
"epsilon": {
"type": "number"
}
},
"description": "The program and the compile's options, as given."
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A compile as a host returns it (the command line's compile --json, both servers' compile_qasm, the job service's POST /v1/compile): the request as given, and the result, which its receipt seals in the form every job's receipt takes. The result holds the compiled program and its certificate (wai.quantum.compile/1): each pass's counts before and after, its check and verdict, the budget and the bound the passes' distances add to. A result names the engine that made it and this schema (engine and schema); results made before results carried them have neither."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"description": "A compile sealed with the service's key, or why it was refused."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"required": [
"verdict"
],
"description": "A compile sealed with the service's key, or why it was refused."
}{
"readOnlyHint": true
}estimate_resources — Estimate a quantum program's fault-tolerant resources
What a fault-tolerant quantum computer would need to run a program. First its logical counts: T gates, Toffolis, rotations (each costed at the T count of its own synthesised Clifford+T word, within its share of the budget), measurements, T depth and total depth, and logical qubits with the ancillas that gates under several controls need. Then, on a physical qubit, the planar model's code distance (the gate-based surface code's model fitted to this engine's own decoders), T factories, physical qubits and runtime, and the frontier of estimates trading qubits for time. Takes a program, or a logical-counts or routine document. Every estimate is sealed in the resource-estimate receipt family, binding the program's digest and the ε budget; the answer's notes state the model's assumptions. Quote the figures with the qubit and the budget, and call them an estimate. Sealed with the service's key; verify_quantum_receipt checks the seals and re-runs it. A program with more than 256 distinct rotation angles, or a budget too fine for its rotations, is refused with the local command.
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The program's name in a routine document."
},
"qasm": {
"type": "string",
"description": "The program, OpenQASM 3 or 2. Give this, counts or routine."
},
"qubit": {
"anyOf": [
{
"enum": [
"us-e3",
"us-e4",
"ns-e3",
"ns-e4",
"meas-e4",
"meas-e6"
],
"type": "string"
},
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"gate_ns": {
"type": "number"
},
"meas_ns": {
"type": "number"
},
"t_error": {
"type": "number"
},
"clifford_error": {
"type": "number"
},
"instruction_set": {
"enum": [
"gate",
"measurement"
],
"type": "string"
}
}
}
],
"description": "The physical qubit: a reference qubit (ns-e4, the default: 50 ns gates, 1e-4 error; us-* are 100 µs gates, meas-* measurement-based), or one described."
},
"budget": {
"type": "number",
"description": "The probability the run may fail, shared by logical errors, distillation and the rotations' synthesis (default 1e-3).",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"counts": {
"type": "object",
"description": "A logical-counts document instead of a program: numQubits, tCount, rotationCount, rotationDepth, cczCount, ccixCount, measurementCount."
},
"export": {
"enum": [
"counts",
"routine"
],
"type": "string",
"description": "Also give the program's counts as a logical-counts or a routine document, under export."
},
"routine": {
"type": "object",
"description": "A routine document instead of a program (version v1: routines with their ports, resources, children and connections)."
},
"calibration": {
"enum": [
"exact_matching",
"union_find",
"assumed"
],
"type": "string",
"description": "The gate-based surface code's model: fitted to this engine's exact-matching decoder (default) or its union-find decoder, or the planar model's assumed one."
},
"max_slowdown": {
"type": "integer",
"maximum": 4096,
"minimum": 1,
"description": "The most the frontier slows the program by to need fewer factories (default 256)."
}
}
}{
"$id": "wai-quantum://schemas/estimate_resources/1",
"type": "object",
"anyOf": [
{
"type": "object",
"title": "wai.quantum.estimate/1",
"required": [
"request",
"result"
],
"properties": {
"result": {
"type": "object",
"required": [
"ok",
"format",
"program",
"counts",
"epsilon",
"options",
"estimate",
"frontier"
],
"properties": {
"ok": {
"const": true
},
"notes": {
"type": "array",
"items": {
"type": "string"
},
"description": "The model's assumptions."
},
"counts": {
"type": "object",
"description": "The program's logical counts: qubits and ancillas, measurements, Clifford gates, T gates, Toffolis, rotations (each costed at its own synthesised word's T count), T states, depths.",
"additionalProperties": {
"type": [
"integer",
"number",
"string",
"null",
"array"
]
}
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"export": {
"type": "object",
"description": "With export: the program's counts as a logical-counts or a routine document."
},
"format": {
"const": "wai.quantum.estimate/1"
},
"schema": {
"const": "wai.quantum.estimate/1"
},
"epsilon": {
"type": "object",
"properties": {
"each": {
"type": [
"number",
"null"
]
},
"bound": {
"type": [
"number",
"null"
]
},
"angles": {
"type": [
"integer",
"null"
]
},
"budget": {
"type": [
"number",
"null"
]
},
"rotations": {
"type": [
"integer",
"null"
]
},
"synthesis": {
"type": [
"number",
"null"
]
},
"t_per_rotation": {
"type": [
"object",
"null"
]
}
},
"description": "The error budget, the synthesis share and each rotation's share, the bound the rotations' distances add to, and their T counts."
},
"options": {
"type": "object",
"description": "The options the estimate ran with, the defaults filled in."
},
"program": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"bound": {
"type": "string"
},
"digest": {
"type": "string"
},
"origin": {
"enum": [
"circuit",
"counts",
"routine"
]
},
"qubits": {
"type": "integer"
}
},
"description": "What was estimated: a circuit (its digest, BLAKE3 of the program's text), or a document's counts."
},
"receipt": {
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
"estimate": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"qubit": {
"type": "string"
},
"steps": {
"type": "integer"
},
"tiles": {
"type": "integer"
},
"budget": {
"type": "object",
"properties": {
"logical": {
"type": "number"
},
"synthesis": {
"type": "number"
},
"distillation": {
"type": "number"
}
}
},
"factory": {
"type": [
"object",
"null"
]
},
"receipt": {
"type": "object",
"required": [
"kind",
"receipt_hash",
"sig",
"signer_pubkey"
],
"properties": {
"sig": {
"type": "string"
},
"kind": {
"const": "quantum-resource"
},
"estimate": {
"type": "object"
},
"job_hash": {
"type": "string"
},
"root_hash": {
"type": "string"
},
"signer_id": {
"type": "string"
},
"result_hash": {
"type": "string"
},
"joules_micro": {
"type": "integer"
},
"receipt_hash": {
"type": "string"
},
"signer_pubkey": {
"type": "string"
},
"energy_provenance": {
"type": "string"
},
"energy_uncertainty": {
"type": "object"
},
"parent_receipt_hash": {
"type": [
"string",
"null"
]
}
},
"description": "A receipt of the resource-estimate family: the estimate, the hashes of its job and its result, its Merkle root, its signer and signature, and the receipt it names as parent."
},
"step_us": {
"type": "number"
},
"distance": {
"type": "integer"
},
"headline": {
"type": "boolean"
},
"slowdown": {
"type": "integer"
},
"t_states": {
"type": "integer"
},
"t_target": {
"type": "number"
},
"factories": {
"type": "integer"
},
"runtime_s": {
"type": "number"
},
"tile_qubits": {
"type": "integer"
},
"logical_error": {
"type": "number"
},
"factory_qubits": {
"type": "integer"
},
"physical_qubits": {
"type": "integer"
},
"algorithm_qubits": {
"type": "integer"
},
"factory_fraction": {
"type": "number"
}
},
"description": "One estimate on a physical qubit: the code and its distance, the slowdown, physical qubits (the algorithm's and the factories'), factories, runtime, logical steps and their length, tiles, the logical error, T states, and how the budget was shared; sealed by its resource-estimate receipt (receipt), or marked the headline."
},
"frontier": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"qubit": {
"type": "string"
},
"steps": {
"type": "integer"
},
"tiles": {
"type": "integer"
},
"budget": {
"type": "object",
"properties": {
"logical": {
"type": "number"
},
"synthesis": {
"type": "number"
},
"distillation": {
"type": "number"
}
}
},
"factory": {
"type": [
"object",
"null"
]
},
"receipt": {
"type": "object",
"required": [
"kind",
"receipt_hash",
"sig",
"signer_pubkey"
],
"properties": {
"sig": {
"type": "string"
},
"kind": {
"const": "quantum-resource"
},
"estimate": {
"type": "object"
},
"job_hash": {
"type": "string"
},
"root_hash": {
"type": "string"
},
"signer_id": {
"type": "string"
},
"result_hash": {
"type": "string"
},
"joules_micro": {
"type": "integer"
},
"receipt_hash": {
"type": "string"
},
"signer_pubkey": {
"type": "string"
},
"energy_provenance": {
"type": "string"
},
"energy_uncertainty": {
"type": "object"
},
"parent_receipt_hash": {
"type": [
"string",
"null"
]
}
},
"description": "A receipt of the resource-estimate family: the estimate, the hashes of its job and its result, its Merkle root, its signer and signature, and the receipt it names as parent."
},
"step_us": {
"type": "number"
},
"distance": {
"type": "integer"
},
"headline": {
"type": "boolean"
},
"slowdown": {
"type": "integer"
},
"t_states": {
"type": "integer"
},
"t_target": {
"type": "number"
},
"factories": {
"type": "integer"
},
"runtime_s": {
"type": "number"
},
"tile_qubits": {
"type": "integer"
},
"logical_error": {
"type": "number"
},
"factory_qubits": {
"type": "integer"
},
"physical_qubits": {
"type": "integer"
},
"algorithm_qubits": {
"type": "integer"
},
"factory_fraction": {
"type": "number"
}
},
"description": "One estimate on a physical qubit: the code and its distance, the slowdown, physical qubits (the algorithm's and the factories'), factories, runtime, logical steps and their length, tiles, the logical error, T states, and how the budget was shared; sealed by its resource-estimate receipt (receipt), or marked the headline."
},
"description": "Estimates no other beats on both physical qubits and runtime; the headline among them."
},
"rotations": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each distinct rotation angle: how many there are, its T count, gates and distance."
},
"calibration": {
"type": "object",
"description": "The decoder calibration the physical model uses: the decoder, the experiment, the fit, its measured range, and how to reproduce it."
}
}
},
"request": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"qasm": {
"type": "string"
},
"qubit": {
"type": [
"string",
"object"
]
},
"budget": {
"type": "number"
},
"counts": {
"type": "object"
},
"export": {
"enum": [
"counts",
"routine"
]
},
"inputs": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"routine": {
"type": "object"
},
"calibration": {
"type": "string"
},
"max_slowdown": {
"type": "integer"
}
},
"description": "A program (qasm), a logical-counts document (counts) or a routine document (routine), with the estimate's options, as given."
}
},
"description": "A resource estimate as a host returns it (the command line's estimate --json, both servers' estimate_resources, the job service's POST /v1/estimate): the request, and the result, which its receipt seals in a job's form. The result holds the program's logical counts, the error budget and how it was shared, the decoder calibration the physical model uses, the headline estimate and the frontier trading physical qubits for runtime, each estimate sealed in the resource-estimate receipt family (the frontier's naming the headline's as parent), and the model's notes. A result names the engine that made it and this schema (engine and schema); results made before results carried them have neither. docs/estimate.md explains every number."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"description": "A resource estimate as a host returns it (the command line's estimate --json, both servers' estimate_resources, the job service's POST /v1/estimate): the request, and the result, which its receipt seals in a job's form. The result holds the program's logical counts, the error budget and how it was shared, the decoder calibration the physical model uses, the headline estimate and the frontier trading physical qubits for runtime, each estimate sealed in the resource-estimate receipt family (the frontier's naming the headline's as parent), and the model's notes. A result names the engine that made it and this schema (engine and schema); results made before results carried them have neither. docs/estimate.md explains every number."
}{
"readOnlyHint": true
}repair_qasm — Repair a quantum program on its flagged lines
Repair a program the reader refuses, changing only the lines its diagnostics flag. The engine makes the fixes that are mechanical (a missing `;`, an undeclared register's size, a measurement with no target, an unbounded while given the bound chosen, an angle the bit-exact method refuses rounded to the bits chosen with its rounding stated), and holds a fix you propose (`proposed`) to the flagged lines: any change to another line is rejected (J021) and nothing is changed. Returns the repaired program, each repair with its code and every line it changed, what needs a person with the reader's advice, and the verdict.
{
"type": "object",
"required": [
"qasm"
],
"properties": {
"qasm": {
"type": "string"
},
"rules": {
"type": "boolean",
"description": "false: only check the proposal."
},
"sizes": {
"type": "object",
"description": "A register's size, for one used before it is declared (Q102).",
"additionalProperties": {
"type": "integer",
"minimum": 1
}
},
"proposed": {
"type": "string",
"description": "Your repaired version: taken only if every changed line is a flagged one (or a line added beside one)."
},
"diagnostics": {
"type": "array",
"description": "Codes you saw that reading the text does not raise (Q500)."
},
"dyadic_bits": {
"type": "integer",
"maximum": 32,
"minimum": 1,
"description": "Round each angle the bit-exact method refuses (Q500) to the nearest multiple of 2π/2^K."
},
"max_iterations": {
"type": "integer",
"minimum": 1,
"description": "The bound for an unbounded `while` on measured bits (Q310), as the person chose it."
}
}
}{
"$id": "wai-quantum://schemas/repair_qasm/1",
"type": "object",
"anyOf": [
{
"type": "object",
"required": [
"ok",
"changed",
"qasm",
"repairs",
"needs_person"
],
"properties": {
"ok": {
"type": "boolean",
"description": "Whether the program now reads."
},
"qasm": {
"type": "string"
},
"changed": {
"type": "boolean"
},
"repairs": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"by",
"edits"
],
"properties": {
"by": {
"enum": [
"engine",
"proposal"
]
},
"code": {
"type": "string"
},
"rule": {
"type": "string"
},
"edits": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"after": {
"type": [
"string",
"null"
]
},
"before": {
"type": [
"string",
"null"
]
}
}
}
},
"flagged": {
"type": "array",
"items": {
"type": "integer"
}
}
}
}
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"needs_person": {
"type": "array",
"items": {
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": [
"integer",
"null"
]
},
"advice": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
},
"description": "A program repaired on the lines its diagnostics flag alone: the program as it now is, each repair with the code it answered and every line it changed, and what needs a person, with the reader's advice."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"required": [
"verdict"
],
"description": "A program repaired on the lines its diagnostics flag alone: the program as it now is, each repair with the code it answered and every line it changed, and what needs a person, with the reader's advice."
}{
"readOnlyHint": true
}quantum_service_info — What the quantum service can do
The methods with their qubit limits and what each answers, the accuracy classes, the per-client limits, the current load, how jobs are kept and metered, the receipt keys, and the conventions (bit order, Pauli strings).
{
"type": "object",
"properties": {}
}{
"$id": "wai-quantum://schemas/quantum_service_info/1",
"type": "object",
"anyOf": [
{
"type": "object",
"required": [
"methods",
"accuracy_classes",
"conventions",
"limits",
"load",
"versions"
],
"properties": {
"api": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"load": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"sets": {
"type": "object",
"description": "What a set takes here: the most items, and the fields a set request gives.",
"additionalProperties": true
},
"store": {
"type": "object",
"description": "Where the service keeps jobs: the store's kind, whether it outlives a restart, and how it addresses objects.",
"additionalProperties": true
},
"energy": {
"type": "object",
"description": "How the service meters a job's energy here, or why it does not.",
"additionalProperties": true
},
"limits": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"methods": {
"type": "array",
"items": {
"type": "object",
"required": [
"method",
"accuracy",
"circuits",
"max_qubits",
"answers"
],
"properties": {
"method": {
"type": "string"
},
"answers": {
"type": "array",
"items": {
"type": "string"
}
},
"max_cut": {
"type": "integer"
},
"options": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"accuracy": {
"type": "string"
},
"circuits": {
"type": "string"
},
"available": {
"type": "boolean",
"description": "false when this build or this machine lacks it."
},
"max_qubits": {
"type": "integer"
}
}
}
},
"versions": {
"type": "object",
"title": "wai.quantum.versions/1",
"required": [
"schema",
"engine",
"schemas",
"policy",
"deprecations"
],
"properties": {
"host": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
}
},
"description": "The program reporting: its crate's name and version."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
}
},
"policy": {
"type": "string",
"description": "What is stable, for how long, and how a change is announced."
},
"schema": {
"const": "wai.quantum.versions/1"
},
"schemas": {
"type": "object",
"description": "Each document's schema, by its versioned name (wai.quantum.<document>/<major>, kept as <document>.v<major>.json).",
"additionalProperties": {
"type": "string"
}
},
"protocols": {
"type": "object",
"properties": {
"mcp": {
"type": "array",
"items": {
"type": "string"
}
},
"provider": {
"type": "string"
}
},
"description": "The protocols the host speaks: the Model Context Protocol versions its server answers, newest first, and the open provider protocol."
},
"deprecations": {
"type": "string",
"description": "Each deprecated item, the version that deprecated it, and its replacement."
}
},
"description": "What a host reports of its versions: the engine's name and version, the host's own (the command line, the job service), the schema of every document it writes by its versioned name, the protocols it speaks, and where the policy and the deprecations are. wai-quantum version --json prints it; both MCP servers give it in initialize (_meta) and the job service in quantum_service_info."
},
"conventions": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"receipt_keys": {
"type": "string",
"description": "Where the service publishes every key it has signed receipts with (the receipt key set, wai.quantum.receipt-keys/1)."
},
"accuracy_classes": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"description": "What the service can do: its methods and their limits here, the accuracy classes, the conventions, the per-client limits, the current load, its addresses, sets, its store, its energy metering, where its receipt keys are, and its versions."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"description": "What the service can do: its methods and their limits here, the accuracy classes, the conventions, the per-client limits, the current load, its addresses, sets, its store, its energy metering, where its receipt keys are, and its versions."
}{
"readOnlyHint": true
}qasm_diagnostics — The reader's diagnostic codes
Every code the OpenQASM reader gives (each refusal and warning carries one, as `[Q103]` at the end of its message): its outcome (refused, lowered, carried, preserved or warned) and its meaning; and beside them, under job_codes, the codes of what is asked of a program (`[J011]`: the request, the method, an intent, a repair, the host). A code never changes meaning once released. Give `code` for one of either.
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "One code, as Q103 or J011."
}
}
}{
"$id": "wai-quantum://schemas/qasm_diagnostics/1",
"type": "object",
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"codes"
],
"properties": {
"codes": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"meaning",
"retired"
],
"properties": {
"code": {
"type": "string"
},
"table": {
"enum": [
"reader",
"job"
],
"description": "Which table the code is in: the reader's (Q…) or the job layer's (J…)."
},
"meaning": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"retired": {
"type": "boolean"
}
},
"description": "A row of a table of codes, the reader's (Q…) or the job layer's (J…): a code, its outcome, its meaning, and whether it is retired (a retired code keeps its row and its meaning, and nothing gives it)."
}
},
"stable": {
"type": "string"
},
"job_codes": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"meaning",
"retired"
],
"properties": {
"code": {
"type": "string"
},
"table": {
"enum": [
"reader",
"job"
],
"description": "Which table the code is in: the reader's (Q…) or the job layer's (J…)."
},
"meaning": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"retired": {
"type": "boolean"
}
},
"description": "A row of a table of codes, the reader's (Q…) or the job layer's (J…): a code, its outcome, its meaning, and whether it is retired (a retired code keeps its row and its meaning, and nothing gives it)."
},
"description": "The job layer's codes (J…): what a host refuses of a job it read, and why."
}
}
},
{
"type": "object",
"required": [
"code",
"outcome",
"meaning",
"retired"
],
"properties": {
"code": {
"type": "string"
},
"table": {
"enum": [
"reader",
"job"
],
"description": "Which table the code is in: the reader's (Q…) or the job layer's (J…)."
},
"meaning": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"retired": {
"type": "boolean"
}
},
"description": "A row of a table of codes, the reader's (Q…) or the job layer's (J…): a code, its outcome, its meaning, and whether it is retired (a retired code keeps its row and its meaning, and nothing gives it)."
}
],
"description": "The codes of both tables, the reader's (Q…) and the job layer's (J…), or the row of one code."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"description": "The reader's diagnostic codes, or one code's row; an unknown code is refused."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"description": "The reader's diagnostic codes, or one code's row; an unknown code is refused."
}{
"readOnlyHint": true
}list_targets — List the device targets
The device targets the service knows by name: synthetic, made up in the shapes of published formats, each with its qubits, pairs, the gates a program compiles to, the spread of its T1 and readout errors, and its hash. A job may give its own target document instead.
{
"type": "object",
"properties": {}
}{
"$id": "wai-quantum://schemas/list_targets/1",
"type": "object",
"anyOf": [
{
"type": "object",
"required": [
"targets"
],
"properties": {
"targets": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"hash",
"qubits",
"pairs"
],
"properties": {
"hash": {
"type": "string",
"description": "BLAKE3 of the target document's RFC 8785 text: what a receipt names."
},
"name": {
"type": "string"
},
"view": {
"type": "object",
"description": "With view: each qubit's place and errors and each pair's error, to draw the coupling map."
},
"gates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gate": {
"type": "string"
},
"error": {
"type": [
"object",
"null"
],
"properties": {
"of": {
"type": "integer"
},
"max": {
"type": "number"
},
"min": {
"type": "number"
},
"median": {
"type": "number"
}
},
"description": "The least, the median and the most of a figure across the device, and how many it has; null when the target gives none."
},
"where": {
"type": "integer"
},
"qubits": {
"type": "integer"
},
"duration_ns": {
"type": [
"object",
"null"
],
"properties": {
"of": {
"type": "integer"
},
"max": {
"type": "number"
},
"min": {
"type": "number"
},
"median": {
"type": "number"
}
},
"description": "The least, the median and the most of a figure across the device, and how many it has; null when the target gives none."
}
}
}
},
"pairs": {
"type": "integer"
},
"t1_us": {
"type": [
"object",
"null"
],
"properties": {
"of": {
"type": "integer"
},
"max": {
"type": "number"
},
"min": {
"type": "number"
},
"median": {
"type": "number"
}
},
"description": "The least, the median and the most of a figure across the device, and how many it has; null when the target gives none."
},
"t2_us": {
"type": [
"object",
"null"
],
"properties": {
"of": {
"type": "integer"
},
"max": {
"type": "number"
},
"min": {
"type": "number"
},
"median": {
"type": "number"
}
},
"description": "The least, the median and the most of a figure across the device, and how many it has; null when the target gives none."
},
"native": {
"type": "object",
"description": "The compiler's gate set the target's gates hold, whether exactly, and how each is costed."
},
"qubits": {
"type": "integer"
},
"source": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"format": {
"type": "string"
}
}
},
"document": {
"type": "object",
"title": "wai.quantum.target/1",
"required": [
"format",
"name",
"source",
"qubits",
"gates",
"coupling"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"gates": {
"type": "array",
"items": {
"type": "object",
"required": [
"gate",
"qubits"
],
"properties": {
"gate": {
"type": "string",
"pattern": "^[a-z0-9_]{1,40}$"
},
"error": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "The average gate infidelity."
},
"qubits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 1
},
"duration_ns": {
"type": "number",
"minimum": 0,
"description": "Nanoseconds."
}
},
"additionalProperties": false
},
"maxItems": 262144,
"description": "Each native gate where the device runs it, sorted by gate then qubits."
},
"format": {
"const": "wai.quantum.target/1"
},
"qubits": {
"type": "array",
"items": {
"type": "object",
"required": [
"qubit"
],
"properties": {
"label": {
"type": "string",
"description": "The source's own name for it, when that is not its index."
},
"qubit": {
"type": "integer",
"minimum": 0,
"description": "Its index: its place in the list."
},
"t1_us": {
"type": "number",
"minimum": 0,
"description": "T1, microseconds."
},
"t2_us": {
"type": "number",
"minimum": 0,
"description": "T2 (the echo or Ramsey time the source reports), microseconds."
},
"readout": {
"type": "object",
"required": [
"p01",
"p10"
],
"properties": {
"p01": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 1 | holds 0)."
},
"p10": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 0 | holds 1)."
}
},
"additionalProperties": false
},
"measure_ns": {
"type": "number",
"minimum": 0,
"description": "The measurement's duration, nanoseconds."
},
"frequency_ghz": {
"type": "number",
"minimum": 0,
"description": "Its frequency, gigahertz."
}
},
"additionalProperties": false
},
"maxItems": 2048,
"minItems": 1,
"description": "Every qubit, in order."
},
"source": {
"type": "object",
"required": [
"format"
],
"properties": {
"note": {
"type": "string",
"maxLength": 400
},
"format": {
"type": "string",
"description": "The format the target was read from (wai-quantum targets import --help lists them)."
}
},
"additionalProperties": false
},
"coupling": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 2
},
"description": "The pairs a two-qubit gate may act on, each once, the lower qubit first, sorted."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 400,
"description": "The calibration snapshot's id, as the source names it, or a content id of the snapshot read."
},
"timestamp": {
"type": "string",
"maxLength": 400,
"description": "When the snapshot was taken, as the source writes it."
}
},
"additionalProperties": false
}
},
"description": "A device target: its qubits, the pairs it couples, its native gates with their errors and durations, and the calibration snapshot they come from. A value not known is left out, never written as zero. Every field but format, name, source, qubits, gates and coupling is optional, and a field the format does not name is refused, so a misspelt one never reads as absent. Its canonical text is its RFC 8785 form, and the BLAKE3 of that text, the target's hash, names the snapshot in a receipt.",
"additionalProperties": false
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"timestamp": {
"type": "string"
}
}
},
"readout_error": {
"type": [
"object",
"null"
],
"properties": {
"of": {
"type": "integer"
},
"max": {
"type": "number"
},
"min": {
"type": "number"
},
"median": {
"type": "number"
}
},
"description": "The least, the median and the most of a figure across the device, and how many it has; null when the target gives none."
}
},
"description": "A device target in brief: its name and hash, where it came from, its calibration snapshot, its qubits and pairs, each native gate's error and duration across the device, the native gate set it is compiled to, and its qubits' T1, T2 and readout error."
}
}
},
"description": "The device targets the service knows by name, all synthetic."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"description": "The device targets the service knows by name, all synthetic."
}{
"readOnlyHint": true
}show_target — Show a device target
A device target's qubits, pairs, native gates with the spread of their errors and durations, its calibration snapshot and its hash; with view, each qubit's place for drawing its coupling map with its readout and one-qubit errors, and each pair's two-qubit error. Give a built-in target's name or a target document.
{
"type": "object",
"required": [
"target"
],
"properties": {
"view": {
"type": "boolean"
},
"target": {
"description": "A built-in target's name, or a target document."
}
}
}{
"$id": "wai-quantum://schemas/show_target/1",
"type": "object",
"anyOf": [
{
"type": "object",
"required": [
"name",
"hash",
"qubits",
"pairs"
],
"properties": {
"hash": {
"type": "string",
"description": "BLAKE3 of the target document's RFC 8785 text: what a receipt names."
},
"name": {
"type": "string"
},
"view": {
"type": "object",
"description": "With view: each qubit's place and errors and each pair's error, to draw the coupling map."
},
"gates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gate": {
"type": "string"
},
"error": {
"type": [
"object",
"null"
],
"properties": {
"of": {
"type": "integer"
},
"max": {
"type": "number"
},
"min": {
"type": "number"
},
"median": {
"type": "number"
}
},
"description": "The least, the median and the most of a figure across the device, and how many it has; null when the target gives none."
},
"where": {
"type": "integer"
},
"qubits": {
"type": "integer"
},
"duration_ns": {
"type": [
"object",
"null"
],
"properties": {
"of": {
"type": "integer"
},
"max": {
"type": "number"
},
"min": {
"type": "number"
},
"median": {
"type": "number"
}
},
"description": "The least, the median and the most of a figure across the device, and how many it has; null when the target gives none."
}
}
}
},
"pairs": {
"type": "integer"
},
"t1_us": {
"type": [
"object",
"null"
],
"properties": {
"of": {
"type": "integer"
},
"max": {
"type": "number"
},
"min": {
"type": "number"
},
"median": {
"type": "number"
}
},
"description": "The least, the median and the most of a figure across the device, and how many it has; null when the target gives none."
},
"t2_us": {
"type": [
"object",
"null"
],
"properties": {
"of": {
"type": "integer"
},
"max": {
"type": "number"
},
"min": {
"type": "number"
},
"median": {
"type": "number"
}
},
"description": "The least, the median and the most of a figure across the device, and how many it has; null when the target gives none."
},
"native": {
"type": "object",
"description": "The compiler's gate set the target's gates hold, whether exactly, and how each is costed."
},
"qubits": {
"type": "integer"
},
"source": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"format": {
"type": "string"
}
}
},
"document": {
"type": "object",
"title": "wai.quantum.target/1",
"required": [
"format",
"name",
"source",
"qubits",
"gates",
"coupling"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"gates": {
"type": "array",
"items": {
"type": "object",
"required": [
"gate",
"qubits"
],
"properties": {
"gate": {
"type": "string",
"pattern": "^[a-z0-9_]{1,40}$"
},
"error": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "The average gate infidelity."
},
"qubits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 1
},
"duration_ns": {
"type": "number",
"minimum": 0,
"description": "Nanoseconds."
}
},
"additionalProperties": false
},
"maxItems": 262144,
"description": "Each native gate where the device runs it, sorted by gate then qubits."
},
"format": {
"const": "wai.quantum.target/1"
},
"qubits": {
"type": "array",
"items": {
"type": "object",
"required": [
"qubit"
],
"properties": {
"label": {
"type": "string",
"description": "The source's own name for it, when that is not its index."
},
"qubit": {
"type": "integer",
"minimum": 0,
"description": "Its index: its place in the list."
},
"t1_us": {
"type": "number",
"minimum": 0,
"description": "T1, microseconds."
},
"t2_us": {
"type": "number",
"minimum": 0,
"description": "T2 (the echo or Ramsey time the source reports), microseconds."
},
"readout": {
"type": "object",
"required": [
"p01",
"p10"
],
"properties": {
"p01": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 1 | holds 0)."
},
"p10": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 0 | holds 1)."
}
},
"additionalProperties": false
},
"measure_ns": {
"type": "number",
"minimum": 0,
"description": "The measurement's duration, nanoseconds."
},
"frequency_ghz": {
"type": "number",
"minimum": 0,
"description": "Its frequency, gigahertz."
}
},
"additionalProperties": false
},
"maxItems": 2048,
"minItems": 1,
"description": "Every qubit, in order."
},
"source": {
"type": "object",
"required": [
"format"
],
"properties": {
"note": {
"type": "string",
"maxLength": 400
},
"format": {
"type": "string",
"description": "The format the target was read from (wai-quantum targets import --help lists them)."
}
},
"additionalProperties": false
},
"coupling": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 2
},
"description": "The pairs a two-qubit gate may act on, each once, the lower qubit first, sorted."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 400,
"description": "The calibration snapshot's id, as the source names it, or a content id of the snapshot read."
},
"timestamp": {
"type": "string",
"maxLength": 400,
"description": "When the snapshot was taken, as the source writes it."
}
},
"additionalProperties": false
}
},
"description": "A device target: its qubits, the pairs it couples, its native gates with their errors and durations, and the calibration snapshot they come from. A value not known is left out, never written as zero. Every field but format, name, source, qubits, gates and coupling is optional, and a field the format does not name is refused, so a misspelt one never reads as absent. Its canonical text is its RFC 8785 form, and the BLAKE3 of that text, the target's hash, names the snapshot in a receipt.",
"additionalProperties": false
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"timestamp": {
"type": "string"
}
}
},
"readout_error": {
"type": [
"object",
"null"
],
"properties": {
"of": {
"type": "integer"
},
"max": {
"type": "number"
},
"min": {
"type": "number"
},
"median": {
"type": "number"
}
},
"description": "The least, the median and the most of a figure across the device, and how many it has; null when the target gives none."
}
},
"description": "A device target in brief: its name and hash, where it came from, its calibration snapshot, its qubits and pairs, each native gate's error and duration across the device, the native gate set it is compiled to, and its qubits' T1, T2 and readout error."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"description": "A device target in brief: its name and hash, where it came from, its calibration snapshot, its qubits and pairs, each native gate's error and duration across the device, the native gate set it is compiled to, and its qubits' T1, T2 and readout error."
}{
"readOnlyHint": true
}run_on_target — Run a program as a device would
Run an OpenQASM program as it would run on a device target: compiled exactly to its gates, placed on its most reliable qubits and routes (the expected success given), checked against the circuit, and simulated under the noise its calibration gives, on the density matrix or by trajectories. Counts and expectation values with their distance from the ideal distribution, the noise derived, and a receipt that binds the target's hash. A model of the device, not a run on it. Every angle must be a dyadic multiple of 2π. Waits up to 50 s, as run_quantum_circuit does.
{
"type": "object",
"required": [
"qasm",
"target"
],
"properties": {
"qasm": {
"type": "string",
"description": "The program, OpenQASM 3 (or 2), read as the whole language: registers, aliases and slices; the standard gates, `U` and `gphase`; user `gate` definitions and `def` subroutines, inlined; every modifier (`ctrl @`, `negctrl @`, `inv @`, `pow(k) @`) on any gate, lowered exactly; classical types (int, uint, float, angle, complex, bool, bit, arrays), their arithmetic and built-in functions, computed on reading; `for`, `while`, `switch`, `break`, `continue`; measurement and `reset` anywhere; classical control on measured bits (`if (c[0]) x q[1];`, `if (c >= 2) { … } else { … }`, `&&`, `||`); a `while` on measured bits takes `@wai.max_iterations N` before it. `output` declarations come back in the result; `delay`, `box` and `stretch` are carried and labelled as not applied; `defcal` and `cal` are kept, not run. A program that measures in the middle or acts on what it measured runs on statevector or stabilizer: counts split their shots at each measurement; expectation values are exact, of the state before the final measurements. What the reader refuses comes back with a code, as `[Q103]`; qasm_diagnostics says what each code means."
},
"seed": {
"type": "integer",
"description": "Sampling seed (default 1); the same job and seed give the same counts."
},
"noise": {
"type": "object",
"properties": {
"readout": {
"type": "number"
},
"dephasing": {
"type": "number"
},
"depolarizing_1q": {
"type": "number"
},
"depolarizing_2q": {
"type": "number"
},
"amplitude_damping": {
"type": "number"
}
},
"description": "Optional noise, each a probability: depolarizing_1q, depolarizing_2q, amplitude_damping, dephasing (after each gate on its qubits), readout (each measured bit)."
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Measurement shots. Default 1024 when no observables or amplitudes are asked for."
},
"intent": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0,
"description": "For a sampled intent: the sampling seed (default: the job's)."
},
"test": {
"enum": [
"chi_squared",
"g_test"
],
"description": "For a sampled intent: Pearson's chi-squared test, or the G-test (the likelihood ratio)."
},
"alpha": {
"type": "number",
"description": "For a sampled intent: the significance level, as 0.01.",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1,
"description": "For a sampled intent: the samples the test takes."
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"description": "A distribution the program's samples are held to: the program run as the job runs it for `shots` at `seed`, and the counts tested by `test` at the significance level `alpha` (all three required). Evidence, never proof.",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string",
"description": "A reference program's text: the same state from |0…0⟩, the same qubits measured into the same bits."
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "For a distribution: the total variation distance it is held within (default 1e-9)."
},
"equivalent": {
"type": "string",
"description": "A reference program's text: the same circuit up to a global phase, by the equivalence ladder."
},
"distribution": {
"type": "object",
"description": "The exact distribution of the measured bits, keyed by the classical bits with the highest bit first, as {\"00\": 0.5, \"11\": 0.5}.",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled; with note, name, and \"require\": \"proof\" (evidence then counts as unchecked)."
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0,
"description": "For a sampled intent: the sampling seed (default: the job's)."
},
"test": {
"enum": [
"chi_squared",
"g_test"
],
"description": "For a sampled intent: Pearson's chi-squared test, or the G-test (the likelihood ratio)."
},
"alpha": {
"type": "number",
"description": "For a sampled intent: the significance level, as 0.01.",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1,
"description": "For a sampled intent: the samples the test takes."
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"description": "A distribution the program's samples are held to: the program run as the job runs it for `shots` at `seed`, and the counts tested by `test` at the significance level `alpha` (all three required). Evidence, never proof.",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string",
"description": "A reference program's text: the same state from |0…0⟩, the same qubits measured into the same bits."
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "For a distribution: the total variation distance it is held within (default 1e-9)."
},
"equivalent": {
"type": "string",
"description": "A reference program's text: the same circuit up to a global phase, by the equivalence ladder."
},
"distribution": {
"type": "object",
"description": "The exact distribution of the measured bits, keyed by the classical bits with the highest bit first, as {\"00\": 0.5, \"11\": 0.5}.",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled; with note, name, and \"require\": \"proof\" (evidence then counts as unchecked)."
},
"minItems": 1
}
],
"description": "What the program must do, checked by the engine with the run: the result's `verdict` states how far it checked (proof, evidence, executed, parsed, refused) and whether the intent holds, sealed by the receipt."
},
"repair": {
"description": "Repair the program first, on the lines its diagnostics flag alone (as repair_qasm does): true, or the choices {\"max_iterations\": N, \"dyadic_bits\": K, \"sizes\": {\"q\": 3}}. The result's `repaired` holds the program that ran and each repair."
},
"target": {
"description": "A device target: a built-in target's name (list_targets) or a target document (wai.quantum.target/1). The program is then compiled to its gates, placed where it is most likely to succeed and simulated under its noise, its hash in the receipt; not with noise or amplitudes. The service reads the document given and fetches nothing."
},
"compile": {
"type": "object",
"properties": {
"dd": {
"enum": [
"xx",
"xy4"
],
"type": "string",
"description": "Dynamical decoupling in each window where a qubit idles long enough, checked to change nothing without noise."
},
"basis": {
"enum": [
"clifford_t",
"standard"
],
"type": "string",
"description": "clifford_t (default): every rotation off the multiples of π/4 written as a Clifford+T word within its share of epsilon; standard: nothing approximated."
},
"level": {
"type": "integer",
"maximum": 2,
"minimum": 0,
"description": "0: lower and approximate; 1 (default): also checked rewrites and phase folding; 2: also one- and two-qubit resynthesis."
},
"twirl": {
"description": "Twirl each two-qubit Clifford gate with Paulis from a seeded stream: true, or {\"seed\": N}. One seed is one instance, checked to be the same circuit."
},
"epsilon": {
"type": "number",
"description": "The most the output may differ from the program in the operator norm, up to a global phase, shared by its rotations (default 1e-6).",
"exclusiveMinimum": 0
}
},
"description": "Compile the program first (as compile_qasm does) and run the compiled circuit: with basis clifford_t it runs bit-exact, and the result's `compiled` states its distance from the program."
},
"options": {
"type": "object",
"description": "Advanced, per method: max_bond (mps), threshold and max_terms (pauli), fusion (statevector), trajectories."
},
"mitigate": {
"anyOf": [
{
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
],
"type": "string"
},
{
"type": "object",
"required": [
"method"
],
"properties": {
"keep": {
"type": "integer",
"minimum": 0,
"description": "cdr: non-Clifford gates each training circuit keeps (default 2, and always one fewer than the program has)."
},
"seed": {
"type": "integer",
"minimum": 0
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 1,
"description": "Shots per circuit (default 10000; 2000 per sampled circuit for pec)."
},
"method": {
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
],
"type": "string"
},
"factors": {
"type": "array",
"items": {
"type": "number"
},
"description": "zne: odd whole numbers (default 1, 3, 5); pea: factors from 1 to 10 (default 1, 1.5, 2)."
},
"samples": {
"type": "integer",
"minimum": 2,
"description": "pec: sampled circuits (default 200)."
},
"training": {
"type": "integer",
"minimum": 3,
"description": "cdr: training circuits (default 16)."
},
"learn_shots": {
"type": "integer",
"minimum": 100,
"description": "pea, pec: shots per depth of the cycle benchmarking that learns the noise (default 60000)."
},
"extrapolation": {
"enum": [
"richardson",
"linear",
"exponential"
],
"type": "string"
}
}
}
],
"description": "Mitigate the job's expectation values (or, for readout, its counts) under its own noise: zne (the whole program folded U(U†U)^k and extrapolated), pea (the noise learned as a sparse Pauli–Lindblad model and amplified), pec (the learned channels inverted and sampled), cdr (a line fitted over near-Clifford training circuits), vd (two copies), readout (the counts' flips inverted). Needs noise and observables (shots for readout), at most 8 qubits. The result's `mitigation` gives raw and mitigated values with standard errors, the ideal value (known because this is a simulation), the method's bias and variance assumptions and its cost. A method's name, or an object."
},
"amplitudes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Basis states to give amplitudes of: one character per qubit, qubit n-1 first, e.g. \"0011\"."
},
"observables": {
"type": "array",
"items": {
"type": "string"
},
"description": "Pauli strings to take expectation values of, e.g. [\"Z0\", \"Z0 Z1\", \"X2 Y3\"]. Qubits count from 0."
}
}
}{
"$id": "wai-quantum://schemas/run_on_target/1",
"type": "object",
"anyOf": [
{
"anyOf": [
{
"type": "object",
"title": "wai.quantum.job/1",
"required": [
"status",
"request"
],
"properties": {
"id": {
"type": "string",
"description": "The job service's id for the job."
},
"why": {
"type": "string",
"description": "Why the plan chose the method."
},
"error": {
"type": "string",
"description": "Why a job failed."
},
"method": {
"type": "string",
"description": "The method the plan chose; set for a set."
},
"result": {
"anyOf": [
{
"type": "object",
"title": "wai.quantum.job-result/1",
"required": [
"method",
"qubits",
"gates",
"accuracy"
],
"properties": {
"job": {
"type": "object",
"description": "A provider job: the provider's job id and its status checks."
},
"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."
},
"gates": {
"type": "integer",
"minimum": 0
},
"ideal": {
"anyOf": [
{
"type": "object",
"required": [
"computed",
"total_variation_distance",
"hellinger_fidelity"
],
"properties": {
"note": {
"type": "string"
},
"method": {
"type": "string"
},
"computed": {
"const": true
},
"ideal_outcomes": {
"type": "integer"
},
"hellinger_fidelity": {
"type": "number"
},
"sampling_tvd_expected": {
"type": "number"
},
"total_variation_distance": {
"type": "number"
}
}
},
{
"type": "object",
"required": [
"computed",
"why"
],
"properties": {
"why": {
"type": "string"
},
"computed": {
"const": false
}
}
}
],
"description": "A provider job: the circuit's exact distribution set beside the measured counts."
},
"shots": {
"type": "integer",
"minimum": 0,
"description": "The shots, where the method names them in the result (trajectories, provider)."
},
"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
}
},
"energy": {
"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": {
"covers": {
"type": "string"
},
"cpu_ms": {
"type": "integer"
},
"source": {
"type": "string"
},
"counter": {
"type": "object",
"properties": {
"step_uj": {
"type": "integer",
"minimum": 0
},
"update_us": {
"type": "integer",
"minimum": 0
}
},
"description": "The package counter as seen: the longest it went between updates, and the smallest step it took."
},
"coverage": {
"enum": [
"whole",
"partial"
]
},
"declared": {
"type": "string",
"description": "What the stated uncertainty covers, and what it does not."
},
"excludes": {
"type": "array",
"items": {
"type": "string"
}
},
"packages": {
"type": "integer",
"minimum": 1,
"description": "The processor packages read."
},
"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)."
},
"joules_micro": {
"type": "integer",
"minimum": 1
},
"concurrent_jobs": {
"type": "integer",
"minimum": 0,
"description": "Other jobs that ran on the host during the window."
},
"energy_provenance": {
"type": "string"
},
"energy_uncertainty": {
"type": "object",
"properties": {
"window_us": {
"type": "integer"
},
"relative_ppm": {
"type": "integer"
}
}
},
"energy_counter_filtering": {
"type": "string"
}
}
}
],
"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."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string",
"description": "Its semantic version, as MAJOR.MINOR.PATCH."
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"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
},
"schema": {
"const": "wai.quantum.job-result/1",
"description": "The schema the result follows."
},
"target": {
"type": "object",
"required": [
"name",
"hash"
],
"properties": {
"hash": {
"type": "string"
},
"name": {
"type": "string"
},
"noise": {
"type": "object",
"description": "The noise model derived from the target's calibration: its channels, durations and idling, and each qubit's readout."
},
"source": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"format": {
"type": "string"
}
}
},
"hash_is": {
"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 the check of the compiled program."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"timestamp": {
"type": "string"
}
}
}
},
"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."
},
"timing": {
"type": "object",
"required": [
"applied",
"why"
],
"properties": {
"why": {
"type": "string"
},
"code": {
"type": "string"
},
"applied": {
"type": "boolean"
}
},
"description": "A program that states durations (delay, box, stretch) the method does not apply: said so, with the reader's code."
},
"dynamic": {
"type": "object",
"properties": {
"branches_run": {
"type": "integer",
"minimum": 0
},
"states_at_once": {
"type": "integer",
"minimum": 0
},
"branches_weighed": {
"type": "integer",
"minimum": 0
},
"measurements_and_resets": {
"type": "integer",
"minimum": 0
}
},
"description": "A program that measures in the middle, resets or branches on a measured bit: how it ran."
},
"outputs": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"type"
],
"properties": {
"bits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
}
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"value": {
"description": "A number, a boolean, a bit string, a duration's text, {\"re\", \"im\"}, or an array of them."
}
}
},
"description": "The program's output declarations: each its name and type, and its value, or the places of its bits in each outcome."
},
"receipt": {
"anyOf": [
{
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
{
"type": "object",
"required": [
"alg",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128
}
},
"description": "The first form, before canon: the digest is over serde_json's own text of each, under the domain ending \\x01. Never written now; still verified."
}
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"warning": {
"type": "string"
},
"accuracy": {
"type": "object",
"required": [
"class"
],
"properties": {
"note": {
"type": "string"
},
"batch": {
"type": "integer"
},
"class": {
"enum": [
"bit-exact",
"exact",
"single",
"bounded",
"estimate",
"heuristic",
"measured"
],
"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 device returned, not reproducible by recomputation."
},
"shots": {
"type": "integer"
},
"device": {
"type": "string"
},
"fusion": {
"type": "integer"
},
"max_cut": {
"type": "integer"
},
"max_bond": {
"type": "integer"
},
"histories": {
"type": "integer"
},
"threshold": {
"type": "number"
},
"max_weight": {
"type": [
"integer",
"null"
]
},
"order_work": {
"type": "number"
},
"truncations": {
"type": "integer"
},
"trajectories": {
"type": "integer"
},
"max_bond_used": {
"type": "integer"
},
"discarded_weight": {
"type": "number"
},
"fidelity_estimate": {
"type": "number"
},
"gate_applications": {
"type": "integer"
}
},
"description": "What the method promises of the numbers it gave."
},
"compiled": {
"anyOf": [
{
"type": "object",
"required": [
"basis",
"program"
],
"properties": {
"hash": {
"type": "string"
},
"basis": {
"type": "string"
},
"swaps": {
"type": "integer"
},
"layout": {
"type": "array",
"items": {
"type": "integer"
}
},
"checked": {
"type": "string"
},
"program": {
"type": "string"
},
"placement": {
"type": "object",
"description": "Where the program was placed on the device's qubits, and why."
},
"final_layout": {
"type": "array",
"items": {
"type": "integer"
}
},
"native_gates": {
"type": "integer"
},
"two_qubit_gates": {
"type": "integer"
}
},
"description": "A provider job: the program sent, compiled exactly to the device's own gates: its basis (the device's gate set), the BLAKE3 of its OpenQASM 3 text, its counts of gates and swaps, its layouts, and the check it passed before it was sent."
},
{
"type": "object",
"required": [
"basis",
"verdict"
],
"properties": {
"note": {
"type": "string"
},
"basis": {
"enum": [
"clifford_t",
"standard"
],
"description": "The gate set the program was compiled to."
},
"level": {
"type": "integer",
"minimum": 0
},
"output": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"source": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"epsilon": {
"type": "number",
"description": "The budget asked for."
},
"verdict": {
"type": "string"
},
"distance": {
"type": [
"number",
"null"
],
"description": "The bound the passes' distances add to."
},
"certificate": {
"type": [
"string",
"null"
],
"description": "The BLAKE3 of the compile certificate's RFC 8785 text, in hex."
}
},
"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."
}
],
"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."
},
"provider": {
"type": "object",
"description": "A provider job: the provider's name, kind and protocol, the device, its provenance, and the hash of its description."
},
"repaired": {
"type": "object",
"properties": {
"qasm": {
"type": "string"
},
"repairs": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"by",
"edits"
],
"properties": {
"by": {
"enum": [
"engine",
"proposal"
]
},
"code": {
"type": "string"
},
"rule": {
"type": "string"
},
"edits": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"after": {
"type": [
"string",
"null"
]
},
"before": {
"type": [
"string",
"null"
]
}
}
}
},
"flagged": {
"type": "array",
"items": {
"type": "integer"
}
}
}
}
},
"needs_person": {
"type": "array",
"items": {
"type": "object"
}
}
},
"description": "A job asked to repair its program first: the program that ran, each repair, and what needs a person."
},
"amplitudes": {
"type": "array",
"items": {
"type": "object",
"required": [
"bits",
"re",
"im"
],
"properties": {
"im": {
"type": "number"
},
"re": {
"type": "number"
},
"bits": {
"type": "string",
"description": "One 0 or 1 per qubit, qubit n-1 first."
}
}
}
},
"elapsed_ms": {
"type": "integer",
"minimum": 0,
"description": "Wall time of the run, where the host has a clock (not in a browser tab)."
},
"mitigation": {
"type": "object",
"title": "wai.quantum.mitigation/1",
"required": [
"method",
"options",
"assumptions"
],
"properties": {
"cost": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"shots": {
"type": "integer",
"minimum": 0
},
"circuits": {
"type": "integer",
"minimum": 0
}
},
"description": "The circuits and shots it spent beyond the job's own."
},
"note": {
"type": "string"
},
"noise": {
"type": "string",
"description": "How the job's noise model is read for the method."
},
"method": {
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
"details": {
"type": "object",
"description": "The method's own: the folded scales and the folding check (zne), the learned model and the amplified values (pea), the quasi-probability and the value it converges to (pec), the training fits (cdr), the purity (vd), the flip and its amplification (readout).",
"additionalProperties": true
},
"options": {
"type": "object",
"properties": {
"keep": {
"type": "integer"
},
"seed": {
"type": "integer"
},
"shots": {
"type": "integer"
},
"method": {
"type": "string"
},
"factors": {
"type": "array",
"items": {
"type": "number"
}
},
"samples": {
"type": "integer"
},
"training": {
"type": "integer"
},
"learn_shots": {
"type": "integer"
},
"extrapolation": {
"enum": [
"richardson",
"linear",
"exponential"
]
}
},
"description": "The options it ran with, the defaults filled in."
},
"assumptions": {
"type": "object",
"properties": {
"bias": {
"type": "string"
},
"variance": {
"type": "string"
}
}
},
"observables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "number"
},
"coeff": {
"type": "number"
},
"ideal": {
"type": "number"
},
"stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
},
"observable": {
"type": "string"
},
"raw_stderr": {
"type": "number"
}
},
"description": "One observable: its raw value and the mitigated one, each with its standard error, and the ideal value a simulation knows."
}
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "number"
},
"bits": {
"type": "string"
},
"stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
}
}
},
"description": "readout: each outcome's raw share and its mitigated quasi-probability, with its standard error."
}
},
"description": "A job's mitigation (its request's mitigate, engine::mitigate), in its result: the method and the options it ran with, its bias and variance assumptions, each observable raw and mitigated with a standard error each and the ideal value (or, for readout, the counts inverted as a quasi-distribution), the method's own details and what it spent. docs/qec.md describes each method."
},
"provenance": {
"type": "object",
"title": "wai.quantum.provenance/1",
"required": [
"schema",
"circuit",
"computer",
"compilation",
"execution",
"software"
],
"properties": {
"schema": {
"const": "wai.quantum.provenance/1"
},
"circuit": {
"type": "object",
"required": [
"program"
],
"properties": {
"gates": {
"type": [
"integer",
"null"
]
},
"qubits": {
"type": "integer",
"minimum": 0
},
"program": {
"type": "string",
"description": "BLAKE3 of the program's text, in hex."
}
},
"description": "The program: the BLAKE3 digest of its text as given, its qubits and its gates."
},
"computer": {
"type": "object",
"required": [
"kind",
"method"
],
"properties": {
"kind": {
"const": "simulator"
},
"method": {
"type": "string"
},
"target": {
"type": "string",
"description": "The device target's hash; its layout, routes and noise are in the result's own target."
},
"accuracy": {
"type": [
"string",
"null"
]
}
},
"description": "What ran it: a classical simulator, the method and its accuracy class, and a device target's hash when the job named one."
},
"software": {
"type": "object",
"required": [
"engine",
"host"
],
"properties": {
"host": {
"type": "string"
},
"engine": {
"type": "string"
}
},
"description": "The engine's name and version, and the host's."
},
"execution": {
"type": "object",
"required": [
"plan"
],
"properties": {
"plan": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"work": {
"type": "integer",
"minimum": 0
},
"method": {
"type": "string"
},
"memory_bytes": {
"type": "integer",
"minimum": 0
}
}
},
"seed": {
"type": [
"integer",
"null"
]
},
"shots": {
"type": [
"integer",
"null"
]
}
},
"description": "The shots, the seed and the plan the job ran under; its identifier and times are the host's, outside the result."
},
"compilation": {
"type": "object",
"required": [
"asked"
],
"properties": {
"why": {
"type": "string"
},
"asked": {
"type": "boolean"
},
"basis": {
"type": [
"string",
"null"
],
"description": "The gate set compiled to: clifford_t or standard."
},
"level": {
"type": [
"integer",
"null"
]
},
"device": {
"type": "string",
"description": "A job on a device target, compiled exactly to its gates: where its layout and routes are."
},
"passes": {
"type": [
"array",
"null"
],
"items": {
"type": "object",
"properties": {
"pass": {
"type": "string"
},
"verdict": {
"type": [
"string",
"null"
]
}
}
}
},
"seeded": {
"const": false
},
"status": {
"const": "not-applicable"
},
"epsilon": {
"type": [
"number",
"null"
]
},
"distance": {
"type": [
"number",
"null"
]
},
"certificate": {
"type": [
"string",
"null"
]
}
},
"description": "Whether the job asked to be compiled; if it did, each pass in order with its check's verdict, the certificate's digest, the gate set compiled to (its basis), the level, the ε budget and the distance the result carries, and that no pass draws a random number."
}
},
"description": "What a result came from, under the five categories cross-platform provenance surveys use: the circuit, the computer, the compilation, the execution and the software. A host adds it to the results it seals (the job service does, and each item of a set); a result without it reads as it always did. wai-quantum-service/docs/provenance.md maps every field to where it is and whether the receipt seals it."
},
"state_hash": {
"type": "string",
"description": "The bit-exact method's statevector hash (BLAKE3, hex): the same on every machine."
},
"calibration": {
"type": [
"string",
"null"
],
"description": "A provider job: the calibration snapshot it ran under."
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
},
"description": "The reader's warnings and notes on the program, each with its code."
},
"expectations": {
"type": "array",
"items": {
"type": "object",
"required": [
"observable",
"coeff",
"value"
],
"properties": {
"bound": {
"type": "number",
"description": "A rigorous bound on |exact − value|, for the bounded class."
},
"coeff": {
"type": "number"
},
"value": {
"type": "number",
"description": "The coefficient times the expectation value."
},
"ladder": {
"type": "array",
"items": {
"type": "object",
"required": [
"threshold",
"value",
"bound"
],
"properties": {
"bound": {
"type": "number"
},
"value": {
"type": "number"
},
"threshold": {
"type": "number"
},
"peak_terms": {
"type": "integer"
},
"threshold_reached": {
"type": "number"
}
}
},
"description": "The value at thresholds a decade apart, the asked one last."
},
"stderr": {
"type": "number",
"description": "The standard error, for an estimate."
},
"max_terms": {
"type": "integer"
},
"observable": {
"type": "string"
},
"peak_terms": {
"type": "integer"
},
"threshold_reached": {
"type": "number"
}
}
}
},
"global_phase": {
"type": "string",
"description": "Why the amplitudes' global phase is not fixed, when it is not."
},
"omitted_shots": {
"type": "integer",
"minimum": 0
},
"contraction_flops": {
"type": "number",
"description": "The tensor network's contraction cost."
},
"distinct_outcomes": {
"type": "integer",
"minimum": 0
},
"outcome_dimension": {
"type": "integer",
"minimum": 0,
"description": "The stabilizer method: the dimension of the measured outcomes' affine space."
}
},
"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",
"title": "wai.quantum.set/1",
"required": [
"format",
"count",
"done",
"failed",
"root",
"items"
],
"properties": {
"done": {
"type": "integer",
"minimum": 0
},
"root": {
"type": "string",
"description": "The Merkle root of the items' leaves, in hex (domains moq-jwp:merkle-leaf and moq-jwp:merkle-node, version 1)."
},
"count": {
"type": "integer",
"minimum": 1
},
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"request",
"status",
"path"
],
"properties": {
"why": {
"type": "string"
},
"code": {
"type": "string",
"description": "A failed item's refusal code (engine::refusal)."
},
"path": {
"type": "array",
"items": {
"type": "string"
},
"description": "The item's leaf's sibling digests up to the root, in hex."
},
"error": {
"type": "string"
},
"index": {
"type": "integer",
"minimum": 0
},
"point": {
"type": "object",
"description": "A sweep's item: the value of each input it was run at."
},
"method": {
"type": "string"
},
"result": {
"type": "object",
"title": "wai.quantum.job-result/1",
"required": [
"method",
"qubits",
"gates",
"accuracy"
],
"properties": {
"job": {
"type": "object",
"description": "A provider job: the provider's job id and its status checks."
},
"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."
},
"gates": {
"type": "integer",
"minimum": 0
},
"ideal": {
"anyOf": [
{
"type": "object",
"required": [
"computed",
"total_variation_distance",
"hellinger_fidelity"
],
"properties": {
"note": {
"type": "string"
},
"method": {
"type": "string"
},
"computed": {
"const": true
},
"ideal_outcomes": {
"type": "integer"
},
"hellinger_fidelity": {
"type": "number"
},
"sampling_tvd_expected": {
"type": "number"
},
"total_variation_distance": {
"type": "number"
}
}
},
{
"type": "object",
"required": [
"computed",
"why"
],
"properties": {
"why": {
"type": "string"
},
"computed": {
"const": false
}
}
}
],
"description": "A provider job: the circuit's exact distribution set beside the measured counts."
},
"shots": {
"type": "integer",
"minimum": 0,
"description": "The shots, where the method names them in the result (trajectories, provider)."
},
"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
}
},
"energy": {
"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": {
"covers": {
"type": "string"
},
"cpu_ms": {
"type": "integer"
},
"source": {
"type": "string"
},
"counter": {
"type": "object",
"properties": {
"step_uj": {
"type": "integer",
"minimum": 0
},
"update_us": {
"type": "integer",
"minimum": 0
}
},
"description": "The package counter as seen: the longest it went between updates, and the smallest step it took."
},
"coverage": {
"enum": [
"whole",
"partial"
]
},
"declared": {
"type": "string",
"description": "What the stated uncertainty covers, and what it does not."
},
"excludes": {
"type": "array",
"items": {
"type": "string"
}
},
"packages": {
"type": "integer",
"minimum": 1,
"description": "The processor packages read."
},
"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)."
},
"joules_micro": {
"type": "integer",
"minimum": 1
},
"concurrent_jobs": {
"type": "integer",
"minimum": 0,
"description": "Other jobs that ran on the host during the window."
},
"energy_provenance": {
"type": "string"
},
"energy_uncertainty": {
"type": "object",
"properties": {
"window_us": {
"type": "integer"
},
"relative_ppm": {
"type": "integer"
}
}
},
"energy_counter_filtering": {
"type": "string"
}
}
}
],
"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."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string",
"description": "Its semantic version, as MAJOR.MINOR.PATCH."
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"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
},
"schema": {
"const": "wai.quantum.job-result/1",
"description": "The schema the result follows."
},
"target": {
"type": "object",
"required": [
"name",
"hash"
],
"properties": {
"hash": {
"type": "string"
},
"name": {
"type": "string"
},
"noise": {
"type": "object",
"description": "The noise model derived from the target's calibration: its channels, durations and idling, and each qubit's readout."
},
"source": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"format": {
"type": "string"
}
}
},
"hash_is": {
"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 the check of the compiled program."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"timestamp": {
"type": "string"
}
}
}
},
"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."
},
"timing": {
"type": "object",
"required": [
"applied",
"why"
],
"properties": {
"why": {
"type": "string"
},
"code": {
"type": "string"
},
"applied": {
"type": "boolean"
}
},
"description": "A program that states durations (delay, box, stretch) the method does not apply: said so, with the reader's code."
},
"dynamic": {
"type": "object",
"properties": {
"branches_run": {
"type": "integer",
"minimum": 0
},
"states_at_once": {
"type": "integer",
"minimum": 0
},
"branches_weighed": {
"type": "integer",
"minimum": 0
},
"measurements_and_resets": {
"type": "integer",
"minimum": 0
}
},
"description": "A program that measures in the middle, resets or branches on a measured bit: how it ran."
},
"outputs": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"type"
],
"properties": {
"bits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
}
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"value": {
"description": "A number, a boolean, a bit string, a duration's text, {\"re\", \"im\"}, or an array of them."
}
}
},
"description": "The program's output declarations: each its name and type, and its value, or the places of its bits in each outcome."
},
"receipt": {
"anyOf": [
{
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
{
"type": "object",
"required": [
"alg",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128
}
},
"description": "The first form, before canon: the digest is over serde_json's own text of each, under the domain ending \\x01. Never written now; still verified."
}
]
},
"verdict": {
"type": "object",
"title": "wai.quantum.verdict/1",
"required": [
"schema",
"level",
"rank",
"holds",
"statement",
"parsed",
"executed",
"intent",
"critique",
"repairs"
],
"properties": {
"rank": {
"type": "integer",
"maximum": 4,
"minimum": 0,
"description": "The level's place on the ladder, from 0 (refused) to 4 (proof)."
},
"holds": {
"type": [
"boolean",
"null"
]
},
"level": {
"enum": [
"refused",
"parsed",
"executed",
"evidence",
"proof"
]
},
"intent": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind",
"outcome",
"strength",
"how"
],
"properties": {
"fit": {
"type": "object",
"properties": {
"dof": {
"type": "integer"
},
"note": {
"type": "string"
},
"test": {
"type": "string"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"p_value": {
"type": "number"
},
"rejected": {
"type": "boolean"
},
"statistic": {
"type": "number"
},
"impossible": {
"type": [
"integer",
"array",
"boolean"
]
},
"smallest_expected": {
"type": [
"number",
"null"
]
}
},
"description": "A sampled intent: the test, its statistic, degrees of freedom and p-value, the level, and whether it rejected."
},
"how": {
"type": "string"
},
"why": {
"type": "string"
},
"kind": {
"enum": [
"distribution",
"equivalent",
"prepares",
"sampled",
"compiled"
]
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer"
},
"alpha": {
"type": "number"
},
"shots": {
"type": "integer"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"method": {
"type": "string",
"description": "A sampled intent: the method the samples were run by."
},
"outcome": {
"enum": [
"holds",
"fails",
"unchecked"
]
},
"distance": {
"type": "number"
},
"outcomes": {
"type": "integer",
"description": "The outcomes the distribution holds, or the samples' distinct outcomes."
},
"strength": {
"enum": [
"proof",
"evidence",
"none"
]
},
"tolerance": {
"type": "number"
},
"distribution": {
"type": "object",
"description": "The program's distribution, when its outcomes are few enough to list.",
"additionalProperties": {
"type": "number"
}
},
"global_phase": {
"type": [
"number",
"null"
]
},
"largest_gaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "number"
},
"outcome": {
"type": "string"
},
"program": {
"type": "number"
}
}
}
}
},
"description": "One intent's check: what it asked, whether it held, how strong the check was and how it was made."
}
},
"parsed": {
"type": "object",
"required": [
"ok"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"description": "The refusal as the reader wrote it, with its line and code."
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
}
}
},
"description": "Whether the reader took the program, and its warnings and notes with their codes, or its refusal."
},
"schema": {
"const": "wai.quantum.verdict/1"
},
"sealed": {
"type": "boolean"
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"repairs": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each edit a repair made, with the code it answered and the lines it changed."
},
"critique": {
"type": "array",
"items": {
"type": "object"
},
"description": "The program's smells, each with its lines."
},
"executed": {
"type": [
"object",
"null"
],
"properties": {
"method": {
"type": "string"
},
"accuracy": {
"type": [
"string",
"null"
]
},
"compiled_distance": {
"type": [
"number",
"null"
]
}
},
"description": "The method that ran and its accuracy class, and the distance a compile put between the program and what ran."
},
"statement": {
"type": "string",
"description": "The level in one plain line."
}
},
"description": "How far the engine checked an answer about a program, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof. A level says how far the engine checked, not that the answer is good: holds says whether the intents held (true, false, or null when none was decided). A job's result carries one under verdict when the job gives an intent or asks for one, and the receipt seals it; both MCP servers state one beside every answer about a program."
},
"warning": {
"type": "string"
},
"accuracy": {
"type": "object",
"required": [
"class"
],
"properties": {
"note": {
"type": "string"
},
"batch": {
"type": "integer"
},
"class": {
"enum": [
"bit-exact",
"exact",
"single",
"bounded",
"estimate",
"heuristic",
"measured"
],
"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 device returned, not reproducible by recomputation."
},
"shots": {
"type": "integer"
},
"device": {
"type": "string"
},
"fusion": {
"type": "integer"
},
"max_cut": {
"type": "integer"
},
"max_bond": {
"type": "integer"
},
"histories": {
"type": "integer"
},
"threshold": {
"type": "number"
},
"max_weight": {
"type": [
"integer",
"null"
]
},
"order_work": {
"type": "number"
},
"truncations": {
"type": "integer"
},
"trajectories": {
"type": "integer"
},
"max_bond_used": {
"type": "integer"
},
"discarded_weight": {
"type": "number"
},
"fidelity_estimate": {
"type": "number"
},
"gate_applications": {
"type": "integer"
}
},
"description": "What the method promises of the numbers it gave."
},
"compiled": {
"anyOf": [
{
"type": "object",
"required": [
"basis",
"program"
],
"properties": {
"hash": {
"type": "string"
},
"basis": {
"type": "string"
},
"swaps": {
"type": "integer"
},
"layout": {
"type": "array",
"items": {
"type": "integer"
}
},
"checked": {
"type": "string"
},
"program": {
"type": "string"
},
"placement": {
"type": "object",
"description": "Where the program was placed on the device's qubits, and why."
},
"final_layout": {
"type": "array",
"items": {
"type": "integer"
}
},
"native_gates": {
"type": "integer"
},
"two_qubit_gates": {
"type": "integer"
}
},
"description": "A provider job: the program sent, compiled exactly to the device's own gates: its basis (the device's gate set), the BLAKE3 of its OpenQASM 3 text, its counts of gates and swaps, its layouts, and the check it passed before it was sent."
},
{
"type": "object",
"required": [
"basis",
"verdict"
],
"properties": {
"note": {
"type": "string"
},
"basis": {
"enum": [
"clifford_t",
"standard"
],
"description": "The gate set the program was compiled to."
},
"level": {
"type": "integer",
"minimum": 0
},
"output": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"source": {
"type": "object",
"properties": {
"cnots": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
},
"gates": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
}
},
"description": "A circuit's counts, as the compiler counts them."
},
"epsilon": {
"type": "number",
"description": "The budget asked for."
},
"verdict": {
"type": "string"
},
"distance": {
"type": [
"number",
"null"
],
"description": "The bound the passes' distances add to."
},
"certificate": {
"type": [
"string",
"null"
],
"description": "The BLAKE3 of the compile certificate's RFC 8785 text, in hex."
}
},
"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."
}
],
"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."
},
"provider": {
"type": "object",
"description": "A provider job: the provider's name, kind and protocol, the device, its provenance, and the hash of its description."
},
"repaired": {
"type": "object",
"properties": {
"qasm": {
"type": "string"
},
"repairs": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"by",
"edits"
],
"properties": {
"by": {
"enum": [
"engine",
"proposal"
]
},
"code": {
"type": "string"
},
"rule": {
"type": "string"
},
"edits": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"after": {
"type": [
"string",
"null"
]
},
"before": {
"type": [
"string",
"null"
]
}
}
}
},
"flagged": {
"type": "array",
"items": {
"type": "integer"
}
}
}
}
},
"needs_person": {
"type": "array",
"items": {
"type": "object"
}
}
},
"description": "A job asked to repair its program first: the program that ran, each repair, and what needs a person."
},
"amplitudes": {
"type": "array",
"items": {
"type": "object",
"required": [
"bits",
"re",
"im"
],
"properties": {
"im": {
"type": "number"
},
"re": {
"type": "number"
},
"bits": {
"type": "string",
"description": "One 0 or 1 per qubit, qubit n-1 first."
}
}
}
},
"elapsed_ms": {
"type": "integer",
"minimum": 0,
"description": "Wall time of the run, where the host has a clock (not in a browser tab)."
},
"mitigation": {
"type": "object",
"title": "wai.quantum.mitigation/1",
"required": [
"method",
"options",
"assumptions"
],
"properties": {
"cost": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"shots": {
"type": "integer",
"minimum": 0
},
"circuits": {
"type": "integer",
"minimum": 0
}
},
"description": "The circuits and shots it spent beyond the job's own."
},
"note": {
"type": "string"
},
"noise": {
"type": "string",
"description": "How the job's noise model is read for the method."
},
"method": {
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
"details": {
"type": "object",
"description": "The method's own: the folded scales and the folding check (zne), the learned model and the amplified values (pea), the quasi-probability and the value it converges to (pec), the training fits (cdr), the purity (vd), the flip and its amplification (readout).",
"additionalProperties": true
},
"options": {
"type": "object",
"properties": {
"keep": {
"type": "integer"
},
"seed": {
"type": "integer"
},
"shots": {
"type": "integer"
},
"method": {
"type": "string"
},
"factors": {
"type": "array",
"items": {
"type": "number"
}
},
"samples": {
"type": "integer"
},
"training": {
"type": "integer"
},
"learn_shots": {
"type": "integer"
},
"extrapolation": {
"enum": [
"richardson",
"linear",
"exponential"
]
}
},
"description": "The options it ran with, the defaults filled in."
},
"assumptions": {
"type": "object",
"properties": {
"bias": {
"type": "string"
},
"variance": {
"type": "string"
}
}
},
"observables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "number"
},
"coeff": {
"type": "number"
},
"ideal": {
"type": "number"
},
"stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
},
"observable": {
"type": "string"
},
"raw_stderr": {
"type": "number"
}
},
"description": "One observable: its raw value and the mitigated one, each with its standard error, and the ideal value a simulation knows."
}
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "number"
},
"bits": {
"type": "string"
},
"stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
}
}
},
"description": "readout: each outcome's raw share and its mitigated quasi-probability, with its standard error."
}
},
"description": "A job's mitigation (its request's mitigate, engine::mitigate), in its result: the method and the options it ran with, its bias and variance assumptions, each observable raw and mitigated with a standard error each and the ideal value (or, for readout, the counts inverted as a quasi-distribution), the method's own details and what it spent. docs/qec.md describes each method."
},
"provenance": {
"type": "object",
"title": "wai.quantum.provenance/1",
"required": [
"schema",
"circuit",
"computer",
"compilation",
"execution",
"software"
],
"properties": {
"schema": {
"const": "wai.quantum.provenance/1"
},
"circuit": {
"type": "object",
"required": [
"program"
],
"properties": {
"gates": {
"type": [
"integer",
"null"
]
},
"qubits": {
"type": "integer",
"minimum": 0
},
"program": {
"type": "string",
"description": "BLAKE3 of the program's text, in hex."
}
},
"description": "The program: the BLAKE3 digest of its text as given, its qubits and its gates."
},
"computer": {
"type": "object",
"required": [
"kind",
"method"
],
"properties": {
"kind": {
"const": "simulator"
},
"method": {
"type": "string"
},
"target": {
"type": "string",
"description": "The device target's hash; its layout, routes and noise are in the result's own target."
},
"accuracy": {
"type": [
"string",
"null"
]
}
},
"description": "What ran it: a classical simulator, the method and its accuracy class, and a device target's hash when the job named one."
},
"software": {
"type": "object",
"required": [
"engine",
"host"
],
"properties": {
"host": {
"type": "string"
},
"engine": {
"type": "string"
}
},
"description": "The engine's name and version, and the host's."
},
"execution": {
"type": "object",
"required": [
"plan"
],
"properties": {
"plan": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"work": {
"type": "integer",
"minimum": 0
},
"method": {
"type": "string"
},
"memory_bytes": {
"type": "integer",
"minimum": 0
}
}
},
"seed": {
"type": [
"integer",
"null"
]
},
"shots": {
"type": [
"integer",
"null"
]
}
},
"description": "The shots, the seed and the plan the job ran under; its identifier and times are the host's, outside the result."
},
"compilation": {
"type": "object",
"required": [
"asked"
],
"properties": {
"why": {
"type": "string"
},
"asked": {
"type": "boolean"
},
"basis": {
"type": [
"string",
"null"
],
"description": "The gate set compiled to: clifford_t or standard."
},
"level": {
"type": [
"integer",
"null"
]
},
"device": {
"type": "string",
"description": "A job on a device target, compiled exactly to its gates: where its layout and routes are."
},
"passes": {
"type": [
"array",
"null"
],
"items": {
"type": "object",
"properties": {
"pass": {
"type": "string"
},
"verdict": {
"type": [
"string",
"null"
]
}
}
}
},
"seeded": {
"const": false
},
"status": {
"const": "not-applicable"
},
"epsilon": {
"type": [
"number",
"null"
]
},
"distance": {
"type": [
"number",
"null"
]
},
"certificate": {
"type": [
"string",
"null"
]
}
},
"description": "Whether the job asked to be compiled; if it did, each pass in order with its check's verdict, the certificate's digest, the gate set compiled to (its basis), the level, the ε budget and the distance the result carries, and that no pass draws a random number."
}
},
"description": "What a result came from, under the five categories cross-platform provenance surveys use: the circuit, the computer, the compilation, the execution and the software. A host adds it to the results it seals (the job service does, and each item of a set); a result without it reads as it always did. wai-quantum-service/docs/provenance.md maps every field to where it is and whether the receipt seals it."
},
"state_hash": {
"type": "string",
"description": "The bit-exact method's statevector hash (BLAKE3, hex): the same on every machine."
},
"calibration": {
"type": [
"string",
"null"
],
"description": "A provider job: the calibration snapshot it ran under."
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"outcome",
"message"
],
"properties": {
"code": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
},
"length": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"lowered",
"carried",
"preserved",
"warned"
]
}
},
"description": "One of the reader's diagnostics: its code, what happens to the construct it is about, its message (without the line or the code), and where it stands."
},
"description": "The reader's warnings and notes on the program, each with its code."
},
"expectations": {
"type": "array",
"items": {
"type": "object",
"required": [
"observable",
"coeff",
"value"
],
"properties": {
"bound": {
"type": "number",
"description": "A rigorous bound on |exact − value|, for the bounded class."
},
"coeff": {
"type": "number"
},
"value": {
"type": "number",
"description": "The coefficient times the expectation value."
},
"ladder": {
"type": "array",
"items": {
"type": "object",
"required": [
"threshold",
"value",
"bound"
],
"properties": {
"bound": {
"type": "number"
},
"value": {
"type": "number"
},
"threshold": {
"type": "number"
},
"peak_terms": {
"type": "integer"
},
"threshold_reached": {
"type": "number"
}
}
},
"description": "The value at thresholds a decade apart, the asked one last."
},
"stderr": {
"type": "number",
"description": "The standard error, for an estimate."
},
"max_terms": {
"type": "integer"
},
"observable": {
"type": "string"
},
"peak_terms": {
"type": "integer"
},
"threshold_reached": {
"type": "number"
}
}
}
},
"global_phase": {
"type": "string",
"description": "Why the amplitudes' global phase is not fixed, when it is not."
},
"omitted_shots": {
"type": "integer",
"minimum": 0
},
"contraction_flops": {
"type": "number",
"description": "The tensor network's contraction cost."
},
"distinct_outcomes": {
"type": "integer",
"minimum": 0
},
"outcome_dimension": {
"type": "integer",
"minimum": 0,
"description": "The stabilizer method: the dimension of the measured outcomes' affine space."
}
},
"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."
},
"status": {
"enum": [
"done",
"failed"
]
},
"request": {
"type": "object",
"anyOf": [
{
"required": [
"qasm"
]
},
{
"required": [
"programs"
]
}
],
"title": "wai.quantum.job-request/1",
"properties": {
"qasm": {
"type": "string",
"description": "The program, in OpenQASM 3 or the OpenQASM 2 forms in common use."
},
"seed": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "The sampling seed (1 when not given): the same job and seed give the same counts."
},
"noise": {
"type": "object",
"properties": {
"readout": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"dephasing": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_1q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_2q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"amplitude_damping": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"description": "A noise model, each channel a probability. A channel not listed here is refused.",
"additionalProperties": false
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Measurement shots; 1024 when no observables or amplitudes are asked for, otherwise 0."
},
"sweep": {
"type": "object",
"description": "A set over the request's own qasm: values for each of the program's inputs (integer, float or angle), every combination run, the names in sorted order and the first varying slowest.",
"additionalProperties": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 1
}
},
"intent": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
"minItems": 1
}
],
"description": "What the program must do, checked with the run: one intent or a list. The result's verdict says how far it was checked."
},
"method": {
"type": "string",
"description": "auto (the default: the strongest method the program admits), or a method by its name as the methods list names it."
},
"repair": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sizes": {
"type": "object",
"additionalProperties": {
"type": "integer",
"minimum": 1
}
},
"dyadic_bits": {
"type": "integer",
"maximum": 32,
"minimum": 1
},
"max_iterations": {
"type": "integer",
"minimum": 1
}
}
}
],
"description": "Repair the program first on its flagged lines: true, or the choices."
},
"target": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"title": "wai.quantum.target/1",
"required": [
"format",
"name",
"source",
"qubits",
"gates",
"coupling"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"gates": {
"type": "array",
"items": {
"type": "object",
"required": [
"gate",
"qubits"
],
"properties": {
"gate": {
"type": "string",
"pattern": "^[a-z0-9_]{1,40}$"
},
"error": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "The average gate infidelity."
},
"qubits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 1
},
"duration_ns": {
"type": "number",
"minimum": 0,
"description": "Nanoseconds."
}
},
"additionalProperties": false
},
"maxItems": 262144,
"description": "Each native gate where the device runs it, sorted by gate then qubits."
},
"format": {
"const": "wai.quantum.target/1"
},
"qubits": {
"type": "array",
"items": {
"type": "object",
"required": [
"qubit"
],
"properties": {
"label": {
"type": "string",
"description": "The source's own name for it, when that is not its index."
},
"qubit": {
"type": "integer",
"minimum": 0,
"description": "Its index: its place in the list."
},
"t1_us": {
"type": "number",
"minimum": 0,
"description": "T1, microseconds."
},
"t2_us": {
"type": "number",
"minimum": 0,
"description": "T2 (the echo or Ramsey time the source reports), microseconds."
},
"readout": {
"type": "object",
"required": [
"p01",
"p10"
],
"properties": {
"p01": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 1 | holds 0)."
},
"p10": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 0 | holds 1)."
}
},
"additionalProperties": false
},
"measure_ns": {
"type": "number",
"minimum": 0,
"description": "The measurement's duration, nanoseconds."
},
"frequency_ghz": {
"type": "number",
"minimum": 0,
"description": "Its frequency, gigahertz."
}
},
"additionalProperties": false
},
"maxItems": 2048,
"minItems": 1,
"description": "Every qubit, in order."
},
"source": {
"type": "object",
"required": [
"format"
],
"properties": {
"note": {
"type": "string",
"maxLength": 400
},
"format": {
"type": "string",
"description": "The format the target was read from (wai-quantum targets import --help lists them)."
}
},
"additionalProperties": false
},
"coupling": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 2
},
"description": "The pairs a two-qubit gate may act on, each once, the lower qubit first, sorted."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 400,
"description": "The calibration snapshot's id, as the source names it, or a content id of the snapshot read."
},
"timestamp": {
"type": "string",
"maxLength": 400,
"description": "When the snapshot was taken, as the source writes it."
}
},
"additionalProperties": false
}
},
"description": "A device target: its qubits, the pairs it couples, its native gates with their errors and durations, and the calibration snapshot they come from. A value not known is left out, never written as zero. Every field but format, name, source, qubits, gates and coupling is optional, and a field the format does not name is refused, so a misspelt one never reads as absent. Its canonical text is its RFC 8785 form, and the BLAKE3 of that text, the target's hash, names the snapshot in a receipt.",
"additionalProperties": false
}
],
"description": "A device target: a built-in target's name, or a target document. The program is compiled to it, placed and simulated under its noise; noise may not be given beside it."
},
"compile": {
"type": "object",
"properties": {
"dd": {
"anyOf": [
{
"enum": [
"xx",
"xy4"
]
},
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sequence": {
"enum": [
"xx",
"xy4"
]
}
}
}
],
"description": "Dynamical decoupling in each window where a qubit idles long enough: xx or xy4 (or {\"sequence\": …}), checked to change nothing without noise."
},
"basis": {
"enum": [
"clifford_t",
"standard"
]
},
"level": {
"type": "integer",
"maximum": 2,
"minimum": 0
},
"twirl": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [
"seed"
],
"properties": {
"seed": {
"type": "integer",
"minimum": 0
}
}
}
],
"description": "Twirl each two-qubit Clifford gate with Paulis drawn from a seeded stream: true (seed 1), or {\"seed\": N}. One seed is one instance, checked to be the same circuit."
},
"stages": {
"type": "boolean"
},
"epsilon": {
"type": "number",
"exclusiveMinimum": 0
}
},
"description": "What a compile is asked for, each optional: the most the output may differ from the program (epsilon, in the operator norm up to a global phase), the level (0 lowers and approximates; 1 also rewrites and folds phases; 2 also resynthesises), the basis, the gate set it writes the program in (clifford_t: every rotation off the multiples of π/4 a Clifford+T word; standard: nothing approximated), whether to give the circuit after each pass (stages), and the twirl and dd passes, last (twirl, with its seed; dd, with its sequence)."
},
"dry_run": {
"type": "boolean",
"description": "With true: what the host would do with the job or set, running nothing."
},
"history": {
"type": "object",
"description": "The program's history's account of the version the job runs: its digest, and the gates and lines in each hand. The receipt binds it; a history recomputes and checks it."
},
"options": {
"type": "object",
"description": "Options of the method that runs the job, as the methods list names them (max_bond, cutoff, fusion, trajectories, threshold, max_weight, ladder, max_terms, path_restarts), and memory_gb."
},
"verdict": {
"type": "boolean",
"description": "true: the result carries a verdict even with no intent."
},
"mitigate": {
"anyOf": [
{
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
{
"type": "object",
"required": [
"method"
]
}
],
"description": "Mitigate the job's expectation values (or, for readout, its counts) under its noise (engine::mitigate): zne, pea, pec, cdr, vd or readout, or {\"method\", …} with its options. The result's mitigation gives each value raw and mitigated."
},
"programs": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A program's text."
},
{
"type": "object",
"required": [
"qasm"
],
"description": "A job of its own, read as a job request is (no programs or sweep in it); each item of the set's result holds its request in full."
}
]
},
"minItems": 1,
"description": "A set (engine::sets): the programs to run as one job, each a program's text or a job of its own; the request's other fields apply to every item that does not set them itself."
},
"provider": {
"type": "string",
"description": "The person's own provider to run on, by the name their registry gives it. Only a host that holds their credentials runs such a job; every other host refuses it."
},
"amplitudes": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 64,
"description": "Basis states whose amplitudes to return: one 0 or 1 per qubit, qubit n-1 first."
},
"observables": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A Pauli string, as \"Z0 Z1\"; qubits count from 0."
},
{
"type": "object",
"required": [
"pauli"
],
"properties": {
"coeff": {
"type": "number",
"description": "Its coefficient (1 when not given)."
},
"pauli": {
"type": "string",
"description": "A Pauli string, as \"X3\"."
}
}
}
]
},
"maxItems": 256,
"description": "Pauli observables to take the expectation values of."
}
},
"description": "A job as a client submits it: a program and what is asked of it, or a set: many programs (programs), or one over a grid of its inputs (sweep), run as one job. The command line, both MCP servers, the job service, the desktop app and the Studio read it alike, and a receipt seals it as it was given. A member the engine does not read is ignored, and sealed with the rest."
}
},
"description": "One item: its index, its point in a sweep, its request (a plain job, complete in itself), and its result with its own receipt, or why it failed; and its path to the set's root."
}
},
"energy": {
"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": {
"covers": {
"type": "string"
},
"cpu_ms": {
"type": "integer"
},
"source": {
"type": "string"
},
"counter": {
"type": "object",
"properties": {
"step_uj": {
"type": "integer",
"minimum": 0
},
"update_us": {
"type": "integer",
"minimum": 0
}
},
"description": "The package counter as seen: the longest it went between updates, and the smallest step it took."
},
"coverage": {
"enum": [
"whole",
"partial"
]
},
"declared": {
"type": "string",
"description": "What the stated uncertainty covers, and what it does not."
},
"excludes": {
"type": "array",
"items": {
"type": "string"
}
},
"packages": {
"type": "integer",
"minimum": 1,
"description": "The processor packages read."
},
"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)."
},
"joules_micro": {
"type": "integer",
"minimum": 1
},
"concurrent_jobs": {
"type": "integer",
"minimum": 0,
"description": "Other jobs that ran on the host during the window."
},
"energy_provenance": {
"type": "string"
},
"energy_uncertainty": {
"type": "object",
"properties": {
"window_us": {
"type": "integer"
},
"relative_ppm": {
"type": "integer"
}
}
},
"energy_counter_filtering": {
"type": "string"
}
}
}
],
"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."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"failed": {
"type": "integer",
"minimum": 0
},
"format": {
"const": "wai.quantum.set/1"
},
"schema": {
"const": "wai.quantum.set/1"
},
"receipt": {
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
"elapsed_ms": {
"type": "integer",
"minimum": 0
}
},
"description": "A set's result: many programs, or one program over a grid of its inputs, run as one job (engine::sets). Its head holds the count, how many items finished and failed, the Merkle root over the items' leaves, the set's energy and time; the set's receipt seals the set's request and its head. Each item is a plain job with its own receipt, its index, its point in a sweep, and its path to the root, so it is shown sealed by the set alone. A result names the engine that made it and this schema (engine and schema)."
}
]
},
"status": {
"enum": [
"queued",
"running",
"done",
"failed",
"cancelled"
]
},
"digests": {
"type": "object",
"properties": {
"result": {
"type": "string"
},
"receipt": {
"type": "string"
},
"request": {
"type": [
"string",
"null"
]
},
"programs": {
"type": "array",
"items": {
"type": "string"
}
},
"algorithm": {
"const": "blake3"
}
},
"description": "The job service: the BLAKE3 digests its store keeps the job's objects under (the request, each program, the result and the receipt)."
},
"request": {
"type": "object",
"anyOf": [
{
"required": [
"qasm"
]
},
{
"required": [
"programs"
]
}
],
"title": "wai.quantum.job-request/1",
"properties": {
"qasm": {
"type": "string",
"description": "The program, in OpenQASM 3 or the OpenQASM 2 forms in common use."
},
"seed": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "The sampling seed (1 when not given): the same job and seed give the same counts."
},
"noise": {
"type": "object",
"properties": {
"readout": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"dephasing": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_1q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_2q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"amplitude_damping": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"description": "A noise model, each channel a probability. A channel not listed here is refused.",
"additionalProperties": false
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Measurement shots; 1024 when no observables or amplitudes are asked for, otherwise 0."
},
"sweep": {
"type": "object",
"description": "A set over the request's own qasm: values for each of the program's inputs (integer, float or angle), every combination run, the names in sorted order and the first varying slowest.",
"additionalProperties": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 1
}
},
"intent": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
"minItems": 1
}
],
"description": "What the program must do, checked with the run: one intent or a list. The result's verdict says how far it was checked."
},
"method": {
"type": "string",
"description": "auto (the default: the strongest method the program admits), or a method by its name as the methods list names it."
},
"repair": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sizes": {
"type": "object",
"additionalProperties": {
"type": "integer",
"minimum": 1
}
},
"dyadic_bits": {
"type": "integer",
"maximum": 32,
"minimum": 1
},
"max_iterations": {
"type": "integer",
"minimum": 1
}
}
}
],
"description": "Repair the program first on its flagged lines: true, or the choices."
},
"target": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"title": "wai.quantum.target/1",
"required": [
"format",
"name",
"source",
"qubits",
"gates",
"coupling"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"gates": {
"type": "array",
"items": {
"type": "object",
"required": [
"gate",
"qubits"
],
"properties": {
"gate": {
"type": "string",
"pattern": "^[a-z0-9_]{1,40}$"
},
"error": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "The average gate infidelity."
},
"qubits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 1
},
"duration_ns": {
"type": "number",
"minimum": 0,
"description": "Nanoseconds."
}
},
"additionalProperties": false
},
"maxItems": 262144,
"description": "Each native gate where the device runs it, sorted by gate then qubits."
},
"format": {
"const": "wai.quantum.target/1"
},
"qubits": {
"type": "array",
"items": {
"type": "object",
"required": [
"qubit"
],
"properties": {
"label": {
"type": "string",
"description": "The source's own name for it, when that is not its index."
},
"qubit": {
"type": "integer",
"minimum": 0,
"description": "Its index: its place in the list."
},
"t1_us": {
"type": "number",
"minimum": 0,
"description": "T1, microseconds."
},
"t2_us": {
"type": "number",
"minimum": 0,
"description": "T2 (the echo or Ramsey time the source reports), microseconds."
},
"readout": {
"type": "object",
"required": [
"p01",
"p10"
],
"properties": {
"p01": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 1 | holds 0)."
},
"p10": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 0 | holds 1)."
}
},
"additionalProperties": false
},
"measure_ns": {
"type": "number",
"minimum": 0,
"description": "The measurement's duration, nanoseconds."
},
"frequency_ghz": {
"type": "number",
"minimum": 0,
"description": "Its frequency, gigahertz."
}
},
"additionalProperties": false
},
"maxItems": 2048,
"minItems": 1,
"description": "Every qubit, in order."
},
"source": {
"type": "object",
"required": [
"format"
],
"properties": {
"note": {
"type": "string",
"maxLength": 400
},
"format": {
"type": "string",
"description": "The format the target was read from (wai-quantum targets import --help lists them)."
}
},
"additionalProperties": false
},
"coupling": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 2
},
"description": "The pairs a two-qubit gate may act on, each once, the lower qubit first, sorted."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 400,
"description": "The calibration snapshot's id, as the source names it, or a content id of the snapshot read."
},
"timestamp": {
"type": "string",
"maxLength": 400,
"description": "When the snapshot was taken, as the source writes it."
}
},
"additionalProperties": false
}
},
"description": "A device target: its qubits, the pairs it couples, its native gates with their errors and durations, and the calibration snapshot they come from. A value not known is left out, never written as zero. Every field but format, name, source, qubits, gates and coupling is optional, and a field the format does not name is refused, so a misspelt one never reads as absent. Its canonical text is its RFC 8785 form, and the BLAKE3 of that text, the target's hash, names the snapshot in a receipt.",
"additionalProperties": false
}
],
"description": "A device target: a built-in target's name, or a target document. The program is compiled to it, placed and simulated under its noise; noise may not be given beside it."
},
"compile": {
"type": "object",
"properties": {
"dd": {
"anyOf": [
{
"enum": [
"xx",
"xy4"
]
},
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sequence": {
"enum": [
"xx",
"xy4"
]
}
}
}
],
"description": "Dynamical decoupling in each window where a qubit idles long enough: xx or xy4 (or {\"sequence\": …}), checked to change nothing without noise."
},
"basis": {
"enum": [
"clifford_t",
"standard"
]
},
"level": {
"type": "integer",
"maximum": 2,
"minimum": 0
},
"twirl": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [
"seed"
],
"properties": {
"seed": {
"type": "integer",
"minimum": 0
}
}
}
],
"description": "Twirl each two-qubit Clifford gate with Paulis drawn from a seeded stream: true (seed 1), or {\"seed\": N}. One seed is one instance, checked to be the same circuit."
},
"stages": {
"type": "boolean"
},
"epsilon": {
"type": "number",
"exclusiveMinimum": 0
}
},
"description": "What a compile is asked for, each optional: the most the output may differ from the program (epsilon, in the operator norm up to a global phase), the level (0 lowers and approximates; 1 also rewrites and folds phases; 2 also resynthesises), the basis, the gate set it writes the program in (clifford_t: every rotation off the multiples of π/4 a Clifford+T word; standard: nothing approximated), whether to give the circuit after each pass (stages), and the twirl and dd passes, last (twirl, with its seed; dd, with its sequence)."
},
"dry_run": {
"type": "boolean",
"description": "With true: what the host would do with the job or set, running nothing."
},
"history": {
"type": "object",
"description": "The program's history's account of the version the job runs: its digest, and the gates and lines in each hand. The receipt binds it; a history recomputes and checks it."
},
"options": {
"type": "object",
"description": "Options of the method that runs the job, as the methods list names them (max_bond, cutoff, fusion, trajectories, threshold, max_weight, ladder, max_terms, path_restarts), and memory_gb."
},
"verdict": {
"type": "boolean",
"description": "true: the result carries a verdict even with no intent."
},
"mitigate": {
"anyOf": [
{
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
{
"type": "object",
"required": [
"method"
]
}
],
"description": "Mitigate the job's expectation values (or, for readout, its counts) under its noise (engine::mitigate): zne, pea, pec, cdr, vd or readout, or {\"method\", …} with its options. The result's mitigation gives each value raw and mitigated."
},
"programs": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A program's text."
},
{
"type": "object",
"required": [
"qasm"
],
"description": "A job of its own, read as a job request is (no programs or sweep in it); each item of the set's result holds its request in full."
}
]
},
"minItems": 1,
"description": "A set (engine::sets): the programs to run as one job, each a program's text or a job of its own; the request's other fields apply to every item that does not set them itself."
},
"provider": {
"type": "string",
"description": "The person's own provider to run on, by the name their registry gives it. Only a host that holds their credentials runs such a job; every other host refuses it."
},
"amplitudes": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 64,
"description": "Basis states whose amplitudes to return: one 0 or 1 per qubit, qubit n-1 first."
},
"observables": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A Pauli string, as \"Z0 Z1\"; qubits count from 0."
},
{
"type": "object",
"required": [
"pauli"
],
"properties": {
"coeff": {
"type": "number",
"description": "Its coefficient (1 when not given)."
},
"pauli": {
"type": "string",
"description": "A Pauli string, as \"X3\"."
}
}
}
]
},
"maxItems": 256,
"description": "Pauli observables to take the expectation values of."
}
},
"description": "A job as a client submits it: a program and what is asked of it, or a set: many programs (programs), or one over a grid of its inputs (sweep), run as one job. The command line, both MCP servers, the job service, the desktop app and the Studio read it alike, and a receipt seals it as it was given. A member the engine does not read is ignored, and sealed with the rest."
},
"estimate": {
"type": "object",
"required": [
"memory_bytes",
"work"
],
"properties": {
"work": {
"type": "integer",
"minimum": 0,
"description": "In the method's own unit."
},
"memory_bytes": {
"type": "integer",
"minimum": 0
}
},
"description": "What the plan admitted the job with."
},
"started_ms": {
"type": "integer"
},
"finished_ms": {
"type": "integer"
},
"submitted_ms": {
"type": "integer",
"description": "The job service: when it was submitted, in milliseconds since 1970."
},
"peak_rss_bytes": {
"type": "integer",
"description": "The job service: the most memory the job's process held."
}
},
"description": "A job as a host returns it: its status, the method its plan chose and why, the request as submitted, and, once it is done, the result with its receipt: a job's result, or for a set (a request with programs or a sweep, its method set) the set's result. The command line's run --json, the local MCP server's run_quantum_circuit and a run on the person's own provider give a finished job; the job service also gives its id and times, and a job still queued or running, or failed with its error. A job's receipt verifies from this document alone: request and result."
},
{
"type": "object",
"required": [
"dry_run",
"ran",
"accepted",
"bounds",
"client"
],
"properties": {
"ran": {
"const": false
},
"why": {
"type": "string"
},
"time": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"note": {
"type": "string"
},
"rate": {
"type": "object"
},
"basis": {
"type": "string"
},
"at_most": {
"type": "integer"
},
"seconds": {
"type": [
"number",
"null"
]
}
},
"description": "The estimated time: seconds and its basis, or null and why, with the most the job may take.",
"additionalProperties": true
},
"work": {
"type": "integer",
"minimum": 0
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"time": {
"type": "object",
"additionalProperties": true
},
"work": {
"type": "integer"
},
"index": {
"type": "integer"
},
"point": {
"type": "object"
},
"energy": {
"type": "object",
"additionalProperties": true
},
"method": {
"type": "string"
},
"qubits": {
"type": "integer"
},
"memory_bytes": {
"type": "integer"
}
}
},
"description": "A set: each item's plan and estimates."
},
"bounds": {
"type": "object",
"description": "The bounds that apply here: memory, time, queue and items of a set.",
"additionalProperties": true
},
"client": {
"type": "object",
"properties": {
"active_jobs": {
"type": "integer"
},
"submissions_left": {
"type": "integer"
},
"memory_held_bytes": {
"type": "integer"
},
"window_resets_in_seconds": {
"type": "integer"
}
},
"description": "Where the client stands: its active jobs, the memory they hold, the submissions left in its window and when the window resets."
},
"energy": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"basis": {
"type": "string"
},
"unestimated": {
"type": "string"
},
"energy_provenance": {
"type": "string"
},
"joules_micro_estimate": {
"type": "integer",
"minimum": 0
}
},
"description": "The estimated energy, never a reading of this job: microjoules, its provenance and basis, or why there is none.",
"additionalProperties": true
},
"method": {
"type": "string"
},
"qubits": {
"type": "integer",
"minimum": 0
},
"status": {
"type": "integer",
"description": "The HTTP status a refusal would carry."
},
"target": {
"type": "object",
"description": "A job on a device target: the target the plan placed it on."
},
"dry_run": {
"const": true
},
"refusal": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "For a refused job: its message and its codes."
},
"accepted": {
"type": "boolean",
"description": "Whether the service would take it now, by every limit."
},
"memory_bytes": {
"type": "integer",
"minimum": 0
},
"within_time_limit": {
"type": [
"boolean",
"null"
]
}
},
"description": "What the service would do with a job or a set, running nothing: the plan's method and why, its qubits, memory and work, the estimated time and energy (each with its basis, or why there is none), the bounds that apply, where the client stands against its limits, each item of a set, and whether the service would take it now, or the refusal it would give."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
},
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
},
"description": "A job the service no longer holds, known only by its id."
}
],
"description": "A job: queued, running, done with its result and receipt, or failed with its error; a set's job holds the set's result; with dry_run true, what the service would do with it, running nothing."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"description": "A job: queued, running, done with its result and receipt, or failed with its error; a set's job holds the set's result; with dry_run true, what the service would do with it, running nothing."
}{
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true
}quantum_circuit_examples — Ready-to-run quantum examples
Worked examples, each a complete job (OpenQASM program and arguments) with what it shows: a Bell pair, a rotation, QAOA, noise, a 1000-qubit GHZ state, 100-qubit dynamics, 200 qubits as a matrix product state. Pass an example's job to run_quantum_circuit as it is, or adapt it.
{
"type": "object",
"properties": {}
}{
"$id": "wai-quantum://schemas/quantum_circuit_examples/1",
"type": "object",
"anyOf": [
{
"type": "object",
"required": [
"examples"
],
"properties": {
"examples": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"title",
"shows",
"job"
],
"properties": {
"job": {
"type": "object",
"anyOf": [
{
"required": [
"qasm"
]
},
{
"required": [
"programs"
]
}
],
"title": "wai.quantum.job-request/1",
"properties": {
"qasm": {
"type": "string",
"description": "The program, in OpenQASM 3 or the OpenQASM 2 forms in common use."
},
"seed": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "The sampling seed (1 when not given): the same job and seed give the same counts."
},
"noise": {
"type": "object",
"properties": {
"readout": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"dephasing": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_1q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"depolarizing_2q": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"amplitude_damping": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"description": "A noise model, each channel a probability. A channel not listed here is refused.",
"additionalProperties": false
},
"shots": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Measurement shots; 1024 when no observables or amplitudes are asked for, otherwise 0."
},
"sweep": {
"type": "object",
"description": "A set over the request's own qasm: values for each of the program's inputs (integer, float or angle), every combination run, the names in sorted order and the first varying slowest.",
"additionalProperties": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 1
}
},
"intent": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"seed": {
"type": "integer",
"minimum": 0
},
"test": {
"enum": [
"chi_squared",
"g_test"
]
},
"alpha": {
"type": "number",
"exclusiveMaximum": 1,
"exclusiveMinimum": 0
},
"shots": {
"type": "integer",
"minimum": 1
},
"require": {
"const": "proof"
},
"sampled": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
},
"prepares": {
"type": "string"
},
"tolerance": {
"type": "number",
"maximum": 1,
"minimum": 0
},
"equivalent": {
"type": "string"
},
"distribution": {
"type": "object",
"additionalProperties": {
"type": "number",
"maximum": 1,
"minimum": 0
}
}
},
"description": "One of distribution, equivalent, prepares or sampled, with its options."
},
"minItems": 1
}
],
"description": "What the program must do, checked with the run: one intent or a list. The result's verdict says how far it was checked."
},
"method": {
"type": "string",
"description": "auto (the default: the strongest method the program admits), or a method by its name as the methods list names it."
},
"repair": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sizes": {
"type": "object",
"additionalProperties": {
"type": "integer",
"minimum": 1
}
},
"dyadic_bits": {
"type": "integer",
"maximum": 32,
"minimum": 1
},
"max_iterations": {
"type": "integer",
"minimum": 1
}
}
}
],
"description": "Repair the program first on its flagged lines: true, or the choices."
},
"target": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"title": "wai.quantum.target/1",
"required": [
"format",
"name",
"source",
"qubits",
"gates",
"coupling"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"gates": {
"type": "array",
"items": {
"type": "object",
"required": [
"gate",
"qubits"
],
"properties": {
"gate": {
"type": "string",
"pattern": "^[a-z0-9_]{1,40}$"
},
"error": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "The average gate infidelity."
},
"qubits": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 1
},
"duration_ns": {
"type": "number",
"minimum": 0,
"description": "Nanoseconds."
}
},
"additionalProperties": false
},
"maxItems": 262144,
"description": "Each native gate where the device runs it, sorted by gate then qubits."
},
"format": {
"const": "wai.quantum.target/1"
},
"qubits": {
"type": "array",
"items": {
"type": "object",
"required": [
"qubit"
],
"properties": {
"label": {
"type": "string",
"description": "The source's own name for it, when that is not its index."
},
"qubit": {
"type": "integer",
"minimum": 0,
"description": "Its index: its place in the list."
},
"t1_us": {
"type": "number",
"minimum": 0,
"description": "T1, microseconds."
},
"t2_us": {
"type": "number",
"minimum": 0,
"description": "T2 (the echo or Ramsey time the source reports), microseconds."
},
"readout": {
"type": "object",
"required": [
"p01",
"p10"
],
"properties": {
"p01": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 1 | holds 0)."
},
"p10": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "P(reads 0 | holds 1)."
}
},
"additionalProperties": false
},
"measure_ns": {
"type": "number",
"minimum": 0,
"description": "The measurement's duration, nanoseconds."
},
"frequency_ghz": {
"type": "number",
"minimum": 0,
"description": "Its frequency, gigahertz."
}
},
"additionalProperties": false
},
"maxItems": 2048,
"minItems": 1,
"description": "Every qubit, in order."
},
"source": {
"type": "object",
"required": [
"format"
],
"properties": {
"note": {
"type": "string",
"maxLength": 400
},
"format": {
"type": "string",
"description": "The format the target was read from (wai-quantum targets import --help lists them)."
}
},
"additionalProperties": false
},
"coupling": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"maxItems": 2,
"minItems": 2
},
"description": "The pairs a two-qubit gate may act on, each once, the lower qubit first, sorted."
},
"calibration": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 400,
"description": "The calibration snapshot's id, as the source names it, or a content id of the snapshot read."
},
"timestamp": {
"type": "string",
"maxLength": 400,
"description": "When the snapshot was taken, as the source writes it."
}
},
"additionalProperties": false
}
},
"description": "A device target: its qubits, the pairs it couples, its native gates with their errors and durations, and the calibration snapshot they come from. A value not known is left out, never written as zero. Every field but format, name, source, qubits, gates and coupling is optional, and a field the format does not name is refused, so a misspelt one never reads as absent. Its canonical text is its RFC 8785 form, and the BLAKE3 of that text, the target's hash, names the snapshot in a receipt.",
"additionalProperties": false
}
],
"description": "A device target: a built-in target's name, or a target document. The program is compiled to it, placed and simulated under its noise; noise may not be given beside it."
},
"compile": {
"type": "object",
"properties": {
"dd": {
"anyOf": [
{
"enum": [
"xx",
"xy4"
]
},
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sequence": {
"enum": [
"xx",
"xy4"
]
}
}
}
],
"description": "Dynamical decoupling in each window where a qubit idles long enough: xx or xy4 (or {\"sequence\": …}), checked to change nothing without noise."
},
"basis": {
"enum": [
"clifford_t",
"standard"
]
},
"level": {
"type": "integer",
"maximum": 2,
"minimum": 0
},
"twirl": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [
"seed"
],
"properties": {
"seed": {
"type": "integer",
"minimum": 0
}
}
}
],
"description": "Twirl each two-qubit Clifford gate with Paulis drawn from a seeded stream: true (seed 1), or {\"seed\": N}. One seed is one instance, checked to be the same circuit."
},
"stages": {
"type": "boolean"
},
"epsilon": {
"type": "number",
"exclusiveMinimum": 0
}
},
"description": "What a compile is asked for, each optional: the most the output may differ from the program (epsilon, in the operator norm up to a global phase), the level (0 lowers and approximates; 1 also rewrites and folds phases; 2 also resynthesises), the basis, the gate set it writes the program in (clifford_t: every rotation off the multiples of π/4 a Clifford+T word; standard: nothing approximated), whether to give the circuit after each pass (stages), and the twirl and dd passes, last (twirl, with its seed; dd, with its sequence)."
},
"dry_run": {
"type": "boolean",
"description": "With true: what the host would do with the job or set, running nothing."
},
"history": {
"type": "object",
"description": "The program's history's account of the version the job runs: its digest, and the gates and lines in each hand. The receipt binds it; a history recomputes and checks it."
},
"options": {
"type": "object",
"description": "Options of the method that runs the job, as the methods list names them (max_bond, cutoff, fusion, trajectories, threshold, max_weight, ladder, max_terms, path_restarts), and memory_gb."
},
"verdict": {
"type": "boolean",
"description": "true: the result carries a verdict even with no intent."
},
"mitigate": {
"anyOf": [
{
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
{
"type": "object",
"required": [
"method"
]
}
],
"description": "Mitigate the job's expectation values (or, for readout, its counts) under its noise (engine::mitigate): zne, pea, pec, cdr, vd or readout, or {\"method\", …} with its options. The result's mitigation gives each value raw and mitigated."
},
"programs": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A program's text."
},
{
"type": "object",
"required": [
"qasm"
],
"description": "A job of its own, read as a job request is (no programs or sweep in it); each item of the set's result holds its request in full."
}
]
},
"minItems": 1,
"description": "A set (engine::sets): the programs to run as one job, each a program's text or a job of its own; the request's other fields apply to every item that does not set them itself."
},
"provider": {
"type": "string",
"description": "The person's own provider to run on, by the name their registry gives it. Only a host that holds their credentials runs such a job; every other host refuses it."
},
"amplitudes": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 64,
"description": "Basis states whose amplitudes to return: one 0 or 1 per qubit, qubit n-1 first."
},
"observables": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A Pauli string, as \"Z0 Z1\"; qubits count from 0."
},
{
"type": "object",
"required": [
"pauli"
],
"properties": {
"coeff": {
"type": "number",
"description": "Its coefficient (1 when not given)."
},
"pauli": {
"type": "string",
"description": "A Pauli string, as \"X3\"."
}
}
}
]
},
"maxItems": 256,
"description": "Pauli observables to take the expectation values of."
}
},
"description": "A job as a client submits it: a program and what is asked of it, or a set: many programs (programs), or one over a grid of its inputs (sweep), run as one job. The command line, both MCP servers, the job service, the desktop app and the Studio read it alike, and a receipt seals it as it was given. A member the engine does not read is ignored, and sealed with the rest."
},
"name": {
"type": "string"
},
"shows": {
"type": "string",
"description": "What the example shows."
},
"title": {
"type": "string"
}
}
}
}
}
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"description": "What quantum_circuit_examples answers."
}{
"readOnlyHint": true
}qec_code — Show an error-correcting code and certify its distance
Show an error-correcting code and certify its distance: its checks (Z-type: they see X errors) and stabilizers (X-type), k counted by rank, a layout to draw it, the decoders it admits, and its distance certificate. In each sector the certificate gives the least weight of a logical found, a witness of that weight, and every lighter support ruled out by an exhaustive search over connected supports (a bivariate-bicycle code's translations checked as symmetries before use), re-checkable node for node. Give `certificate` to check one: its witnesses and the search run again. Sealed with the service's key. Quote the certificate's distance and its reading; a search stopped by `bound` settles nothing past it.
{
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"description": "A code by name: surface:D (the rotated surface code, odd D from 3 to 15), toric:L (2 to 12), steane, color:D (the triangular 6.6.6 colour code, odd D from 3 to 15), bb:72, bb:90, bb:108, bb:144 (or gross) or bb:288 (bivariate-bicycle codes); or {\"family\", \"distance\" | \"size\" | \"n\"}."
},
"bound": {
"type": "integer",
"maximum": 24,
"minimum": 1,
"description": "The heaviest support to search (default the code's nominal distance)."
},
"certify": {
"type": "boolean",
"description": "Certify the distance (default true)."
},
"certificate": {
"type": "object",
"description": "A certificate (wai.quantum.distance/1) to check against the code."
}
}
}{
"$id": "wai-quantum://schemas/qec_code/1",
"type": "object",
"anyOf": [
{
"type": "object",
"title": "wai.quantum.qec/1",
"required": [
"request",
"result"
],
"properties": {
"result": {
"anyOf": [
{
"type": "object",
"required": [
"ok",
"code"
],
"properties": {
"ok": {
"const": true
},
"code": {
"type": "object",
"properties": {
"k": {
"type": "integer"
},
"n": {
"type": "integer"
},
"name": {
"type": "string"
},
"stabs": {
"type": "array"
},
"checks": {
"type": "array"
},
"colors": {
"type": "array"
},
"family": {
"type": "string"
},
"layout": {
"type": "object"
},
"sectors": {
"type": "string"
},
"decoders": {
"type": "array",
"items": {
"type": "string"
}
},
"families_hash": {
"type": "string"
},
"nominal_distance": {
"type": "integer"
}
}
},
"check": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"verified": {
"type": "boolean"
},
"witnesses": {
"type": "boolean"
},
"search_reproduced": {
"type": "boolean"
}
},
"description": "A given certificate's check: its witnesses, and the search run again."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"schema": {
"const": "wai.quantum.qec/1"
},
"receipt": {
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
"certificate": {
"type": "object",
"title": "wai.quantum.distance/1",
"required": [
"format",
"code",
"n",
"k",
"distance",
"x",
"z"
],
"properties": {
"k": {
"type": "integer",
"minimum": 0
},
"n": {
"type": "integer",
"minimum": 1
},
"x": {
"type": "object",
"properties": {
"nodes": {
"type": "integer",
"minimum": 0
},
"witness": {
"type": [
"array",
"null"
],
"items": {
"type": "integer",
"minimum": 0
}
},
"distance": {
"type": [
"integer",
"null"
]
},
"no_logical_below": {
"type": [
"integer",
"null"
]
}
},
"description": "One sector: the least weight of a logical found, a witness of that weight, and the weight below which the search ruled every support out."
},
"z": {
"type": "object",
"properties": {
"nodes": {
"type": "integer",
"minimum": 0
},
"witness": {
"type": [
"array",
"null"
],
"items": {
"type": "integer",
"minimum": 0
}
},
"distance": {
"type": [
"integer",
"null"
]
},
"no_logical_below": {
"type": [
"integer",
"null"
]
}
},
"description": "One sector: the least weight of a logical found, a witness of that weight, and the weight below which the search ruled every support out."
},
"code": {
"type": "string"
},
"bound": {
"type": "integer",
"minimum": 1
},
"format": {
"const": "wai.quantum.distance/1"
},
"method": {
"type": "string"
},
"orbits": {
"type": [
"integer",
"array",
"null"
]
},
"reading": {
"type": "string"
},
"distance": {
"type": [
"integer",
"null"
],
"description": "The distance, when both sectors settle it; null when the search stopped at its bound first."
},
"families": {
"type": "string",
"description": "BLAKE3 of the code's check families, in hex."
},
"symmetries": {
"type": [
"integer",
"array",
"null"
]
}
},
"description": "A code's distance certificate (quantum_distance): in each sector, a witness logical of the least weight found and every lighter support ruled out by an exhaustive search over connected supports, re-checkable node for node; the code's families hash, the search's bound, the symmetries checked and used, and its reading. Given back to qec_code, it is checked against the code."
}
},
"description": "A code: its checks and stabilizers, k, its layout, the decoders it takes, and its distance certificate (or a given one's check)."
},
{
"type": "object",
"required": [
"decoder"
],
"properties": {
"code": {
"type": "string"
},
"rate": {
"type": "number"
},
"seed": {
"type": "integer"
},
"error": {
"type": "array",
"items": {
"type": "integer"
}
},
"fired": {
"type": "array",
"items": {
"type": "integer"
}
},
"shots": {
"type": "integer"
},
"detail": {
"type": "object",
"description": "The decoder's own: its passes, its convergence, its windows.",
"additionalProperties": true
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"schema": {
"const": "wai.quantum.qec/1"
},
"stderr": {
"type": "number"
},
"weight": {
"type": "integer"
},
"decoder": {
"type": "string"
},
"receipt": {
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
"explains": {
"type": "boolean"
},
"failures": {
"type": "integer"
},
"residual": {
"type": "object",
"properties": {
"qubits": {
"type": "array",
"items": {
"type": "integer"
}
},
"logical": {
"type": "boolean"
},
"reading": {
"type": "string"
}
}
},
"syndrome": {
"type": "array",
"items": {
"type": "integer"
}
},
"detectors": {
"type": "integer"
},
"predicted": {
"type": "array",
"items": {
"type": "integer"
}
},
"correction": {
"type": "array",
"items": {
"type": "integer"
}
},
"mechanisms": {
"type": "integer"
},
"observables": {
"type": "integer"
}
},
"description": "A decode: at code capacity the syndrome, the correction and whether it explains the syndrome (and with an error, its residual); at circuit level the model's size, the fired detectors and the observables predicted, or the shots sampled and their failure rate."
},
{
"type": "object",
"required": [
"points",
"below_threshold"
],
"properties": {
"fit": {
"type": [
"object",
"null"
],
"properties": {
"model": {
"type": "string"
},
"prefactor": {
"type": "number"
},
"threshold": {
"type": "number"
}
}
},
"seed": {
"type": "integer"
},
"noise": {
"type": [
"string",
"object",
"null"
]
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"family": {
"type": "string"
},
"points": {
"type": "array",
"items": {
"type": "object",
"properties": {
"p": {
"type": "number"
},
"rate": {
"type": "number"
},
"shots": {
"type": "integer"
},
"rounds": {
"type": "integer"
},
"stderr": {
"type": "number"
},
"distance": {
"type": "integer"
},
"failures": {
"type": "integer"
},
"per_round": {
"type": [
"number",
"null"
]
}
}
}
},
"schema": {
"const": "wai.quantum.qec/1"
},
"decoder": {
"type": [
"string",
"null"
]
},
"reading": {
"type": "string"
},
"receipt": {
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
"below_threshold": {
"type": "array",
"items": {
"type": "object",
"properties": {
"p": {
"type": "number"
},
"distance_helps": {
"type": "boolean"
}
}
}
}
},
"description": "Logical failure rates: each point's shots, failures, rate and standard error, the code model fitted at circuit level, and at each physical rate whether every larger distance failed less."
}
],
"description": "A code, a decode or a threshold, with its receipt."
},
"request": {
"type": "object",
"description": "The call's request, as given."
}
},
"description": "An error-correction answer as every host gives it (engine::qec: qec_code, qec_decode and qec_threshold on both servers, wai-quantum qec, POST /v1/qec/*, the Studio and Python): the request, and the result sealed in a job's form. A code with its distance certificate (or a given certificate checked); a syndrome, an error or a circuit's detectors decoded, or shots sampled and decoded; logical failure rates over distances and physical rates. A result names the engine that made it and this schema (engine and schema). docs/qec.md explains each."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"description": "An error-correction answer as every host gives it (engine::qec: qec_code, qec_decode and qec_threshold on both servers, wai-quantum qec, POST /v1/qec/*, the Studio and Python): the request, and the result sealed in a job's form. A code with its distance certificate (or a given certificate checked); a syndrome, an error or a circuit's detectors decoded, or shots sampled and decoded; logical failure rates over distances and physical rates. A result names the engine that made it and this schema (engine and schema). docs/qec.md explains each."
}{
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true
}qec_decode — Decode a syndrome or a circuit's detectors
Decode with the engine's decoders. At code capacity, give `code` and a `syndrome` (the violated checks) or an `error` (the flipped qubits: its syndrome is taken and its residual judged, logical or not): matching (exact) and union_find for codes whose qubits sit in at most two checks; color for colour codes (restriction to matching on the three restricted lattices, lifted at each colour, completed below half the distance by an exact search); relay_bp for any code (it can stall on a degenerate error of a topological code, and then says it did not converge); search for the lightest error with the syndrome up to max_weight. At circuit level, give `memory` ({distance, rounds, p}: the rotated surface-code memory experiment), `circuit` (the circuit text: tags, Pauli-target observables and coordinates read) or `model` (detector error model text, decompositions with ^ read), with the fired `detectors` (the prediction: which observables flipped) or `shots` (sampled and decoded: the failure rate and its standard error): matching (exact), correlated (exact matching twice through the model's decomposed faults, the second answer kept only when the model's mechanisms explain it more cheaply), union_find, bp_osd, or window (a sliding window: `window` {commit, buffer} rounds; every edge set below half the distance is corrected once the buffer is at least (d + 1)/2). Sealed with the service's key.
{
"type": "object",
"properties": {
"code": {
"description": "A code by name: surface:D (the rotated surface code, odd D from 3 to 15), toric:L (2 to 12), steane, color:D (the triangular 6.6.6 colour code, odd D from 3 to 15), bb:72, bb:90, bb:108, bb:144 (or gross) or bb:288 (bivariate-bicycle codes); or {\"family\", \"distance\" | \"size\" | \"n\"}."
},
"seed": {
"type": "integer",
"minimum": 0,
"description": "The sampling seed (default 1)."
},
"error": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"description": "The flipped qubits, by index."
},
"model": {
"type": "string",
"description": "A detector error model in its text."
},
"shots": {
"type": "integer",
"minimum": 1,
"description": "Sample this many shots of the circuit and decode each."
},
"memory": {
"type": "object",
"properties": {
"p": {
"type": "number"
},
"rounds": {
"type": "integer"
},
"distance": {
"type": "integer"
}
},
"description": "The rotated surface-code memory experiment at circuit level."
},
"window": {
"type": "object",
"properties": {
"buffer": {
"type": "integer"
},
"commit": {
"type": "integer"
},
"budget_ns": {
"type": "integer"
}
},
"description": "window: rounds each window commits and the rounds after them it sees."
},
"circuit": {
"type": "string",
"description": "A noisy Clifford circuit in the circuit text."
},
"decoder": {
"enum": [
"matching",
"union_find",
"color",
"relay_bp",
"search",
"correlated",
"bp_osd",
"window"
],
"type": "string",
"description": "The decoder (default: matching, or color for a colour code, relay_bp for a bivariate-bicycle code)."
},
"syndrome": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"description": "The violated checks, by index."
},
"detectors": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"description": "The detectors that fired."
},
"max_weight": {
"type": "integer",
"maximum": 8,
"minimum": 0,
"description": "search: the heaviest error to try."
}
}
}{
"$id": "wai-quantum://schemas/qec_decode/1",
"type": "object",
"anyOf": [
{
"type": "object",
"title": "wai.quantum.qec/1",
"required": [
"request",
"result"
],
"properties": {
"result": {
"anyOf": [
{
"type": "object",
"required": [
"ok",
"code"
],
"properties": {
"ok": {
"const": true
},
"code": {
"type": "object",
"properties": {
"k": {
"type": "integer"
},
"n": {
"type": "integer"
},
"name": {
"type": "string"
},
"stabs": {
"type": "array"
},
"checks": {
"type": "array"
},
"colors": {
"type": "array"
},
"family": {
"type": "string"
},
"layout": {
"type": "object"
},
"sectors": {
"type": "string"
},
"decoders": {
"type": "array",
"items": {
"type": "string"
}
},
"families_hash": {
"type": "string"
},
"nominal_distance": {
"type": "integer"
}
}
},
"check": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"verified": {
"type": "boolean"
},
"witnesses": {
"type": "boolean"
},
"search_reproduced": {
"type": "boolean"
}
},
"description": "A given certificate's check: its witnesses, and the search run again."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"schema": {
"const": "wai.quantum.qec/1"
},
"receipt": {
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
"certificate": {
"type": "object",
"title": "wai.quantum.distance/1",
"required": [
"format",
"code",
"n",
"k",
"distance",
"x",
"z"
],
"properties": {
"k": {
"type": "integer",
"minimum": 0
},
"n": {
"type": "integer",
"minimum": 1
},
"x": {
"type": "object",
"properties": {
"nodes": {
"type": "integer",
"minimum": 0
},
"witness": {
"type": [
"array",
"null"
],
"items": {
"type": "integer",
"minimum": 0
}
},
"distance": {
"type": [
"integer",
"null"
]
},
"no_logical_below": {
"type": [
"integer",
"null"
]
}
},
"description": "One sector: the least weight of a logical found, a witness of that weight, and the weight below which the search ruled every support out."
},
"z": {
"type": "object",
"properties": {
"nodes": {
"type": "integer",
"minimum": 0
},
"witness": {
"type": [
"array",
"null"
],
"items": {
"type": "integer",
"minimum": 0
}
},
"distance": {
"type": [
"integer",
"null"
]
},
"no_logical_below": {
"type": [
"integer",
"null"
]
}
},
"description": "One sector: the least weight of a logical found, a witness of that weight, and the weight below which the search ruled every support out."
},
"code": {
"type": "string"
},
"bound": {
"type": "integer",
"minimum": 1
},
"format": {
"const": "wai.quantum.distance/1"
},
"method": {
"type": "string"
},
"orbits": {
"type": [
"integer",
"array",
"null"
]
},
"reading": {
"type": "string"
},
"distance": {
"type": [
"integer",
"null"
],
"description": "The distance, when both sectors settle it; null when the search stopped at its bound first."
},
"families": {
"type": "string",
"description": "BLAKE3 of the code's check families, in hex."
},
"symmetries": {
"type": [
"integer",
"array",
"null"
]
}
},
"description": "A code's distance certificate (quantum_distance): in each sector, a witness logical of the least weight found and every lighter support ruled out by an exhaustive search over connected supports, re-checkable node for node; the code's families hash, the search's bound, the symmetries checked and used, and its reading. Given back to qec_code, it is checked against the code."
}
},
"description": "A code: its checks and stabilizers, k, its layout, the decoders it takes, and its distance certificate (or a given one's check)."
},
{
"type": "object",
"required": [
"decoder"
],
"properties": {
"code": {
"type": "string"
},
"rate": {
"type": "number"
},
"seed": {
"type": "integer"
},
"error": {
"type": "array",
"items": {
"type": "integer"
}
},
"fired": {
"type": "array",
"items": {
"type": "integer"
}
},
"shots": {
"type": "integer"
},
"detail": {
"type": "object",
"description": "The decoder's own: its passes, its convergence, its windows.",
"additionalProperties": true
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"schema": {
"const": "wai.quantum.qec/1"
},
"stderr": {
"type": "number"
},
"weight": {
"type": "integer"
},
"decoder": {
"type": "string"
},
"receipt": {
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
"explains": {
"type": "boolean"
},
"failures": {
"type": "integer"
},
"residual": {
"type": "object",
"properties": {
"qubits": {
"type": "array",
"items": {
"type": "integer"
}
},
"logical": {
"type": "boolean"
},
"reading": {
"type": "string"
}
}
},
"syndrome": {
"type": "array",
"items": {
"type": "integer"
}
},
"detectors": {
"type": "integer"
},
"predicted": {
"type": "array",
"items": {
"type": "integer"
}
},
"correction": {
"type": "array",
"items": {
"type": "integer"
}
},
"mechanisms": {
"type": "integer"
},
"observables": {
"type": "integer"
}
},
"description": "A decode: at code capacity the syndrome, the correction and whether it explains the syndrome (and with an error, its residual); at circuit level the model's size, the fired detectors and the observables predicted, or the shots sampled and their failure rate."
},
{
"type": "object",
"required": [
"points",
"below_threshold"
],
"properties": {
"fit": {
"type": [
"object",
"null"
],
"properties": {
"model": {
"type": "string"
},
"prefactor": {
"type": "number"
},
"threshold": {
"type": "number"
}
}
},
"seed": {
"type": "integer"
},
"noise": {
"type": [
"string",
"object",
"null"
]
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"family": {
"type": "string"
},
"points": {
"type": "array",
"items": {
"type": "object",
"properties": {
"p": {
"type": "number"
},
"rate": {
"type": "number"
},
"shots": {
"type": "integer"
},
"rounds": {
"type": "integer"
},
"stderr": {
"type": "number"
},
"distance": {
"type": "integer"
},
"failures": {
"type": "integer"
},
"per_round": {
"type": [
"number",
"null"
]
}
}
}
},
"schema": {
"const": "wai.quantum.qec/1"
},
"decoder": {
"type": [
"string",
"null"
]
},
"reading": {
"type": "string"
},
"receipt": {
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
"below_threshold": {
"type": "array",
"items": {
"type": "object",
"properties": {
"p": {
"type": "number"
},
"distance_helps": {
"type": "boolean"
}
}
}
}
},
"description": "Logical failure rates: each point's shots, failures, rate and standard error, the code model fitted at circuit level, and at each physical rate whether every larger distance failed less."
}
],
"description": "A code, a decode or a threshold, with its receipt."
},
"request": {
"type": "object",
"description": "The call's request, as given."
}
},
"description": "An error-correction answer as every host gives it (engine::qec: qec_code, qec_decode and qec_threshold on both servers, wai-quantum qec, POST /v1/qec/*, the Studio and Python): the request, and the result sealed in a job's form. A code with its distance certificate (or a given certificate checked); a syndrome, an error or a circuit's detectors decoded, or shots sampled and decoded; logical failure rates over distances and physical rates. A result names the engine that made it and this schema (engine and schema). docs/qec.md explains each."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"description": "An error-correction answer as every host gives it (engine::qec: qec_code, qec_decode and qec_threshold on both servers, wai-quantum qec, POST /v1/qec/*, the Studio and Python): the request, and the result sealed in a job's form. A code with its distance certificate (or a given certificate checked); a syndrome, an error or a circuit's detectors decoded, or shots sampled and decoded; logical failure rates over distances and physical rates. A result names the engine that made it and this schema (engine and schema). docs/qec.md explains each."
}{
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true
}qec_threshold — Measure logical failure rates over distances
Measure logical failure rates over distances and physical error rates: family surface at circuit level (decoders matching, correlated or union_find; the code model P(d) = a·(p/p*)^((d+1)/2) per round fitted to the points), or color, toric or surface_capacity at code capacity. Each point gives its shots, failures, rate and standard error; below_threshold says, at each p, whether every larger distance failed less. Sealed with the service's key. Report rates with their errors: a crossing measured on few shots is not a threshold.
{
"type": "object",
"properties": {
"p": {
"type": "array",
"items": {
"type": "number",
"maximum": 0.5,
"minimum": 0
},
"description": "Physical error rates."
},
"seed": {
"type": "integer",
"minimum": 0
},
"shots": {
"type": "integer",
"minimum": 1,
"description": "Shots at each point (default 10000)."
},
"family": {
"enum": [
"surface",
"color",
"toric",
"surface_capacity"
],
"type": "string",
"description": "surface (circuit level, the default) or a code at code capacity."
},
"rounds": {
"type": "integer",
"minimum": 1,
"description": "surface: rounds (default the distance)."
},
"decoder": {
"enum": [
"matching",
"correlated",
"union_find"
],
"type": "string",
"description": "surface: the decoder (default matching)."
},
"distances": {
"type": "array",
"items": {
"type": "integer"
},
"description": "Odd distances (default 3, 5, 7)."
}
}
}{
"$id": "wai-quantum://schemas/qec_threshold/1",
"type": "object",
"anyOf": [
{
"type": "object",
"title": "wai.quantum.qec/1",
"required": [
"request",
"result"
],
"properties": {
"result": {
"anyOf": [
{
"type": "object",
"required": [
"ok",
"code"
],
"properties": {
"ok": {
"const": true
},
"code": {
"type": "object",
"properties": {
"k": {
"type": "integer"
},
"n": {
"type": "integer"
},
"name": {
"type": "string"
},
"stabs": {
"type": "array"
},
"checks": {
"type": "array"
},
"colors": {
"type": "array"
},
"family": {
"type": "string"
},
"layout": {
"type": "object"
},
"sectors": {
"type": "string"
},
"decoders": {
"type": "array",
"items": {
"type": "string"
}
},
"families_hash": {
"type": "string"
},
"nominal_distance": {
"type": "integer"
}
}
},
"check": {
"type": "object",
"properties": {
"why": {
"type": "string"
},
"verified": {
"type": "boolean"
},
"witnesses": {
"type": "boolean"
},
"search_reproduced": {
"type": "boolean"
}
},
"description": "A given certificate's check: its witnesses, and the search run again."
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"schema": {
"const": "wai.quantum.qec/1"
},
"receipt": {
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
"certificate": {
"type": "object",
"title": "wai.quantum.distance/1",
"required": [
"format",
"code",
"n",
"k",
"distance",
"x",
"z"
],
"properties": {
"k": {
"type": "integer",
"minimum": 0
},
"n": {
"type": "integer",
"minimum": 1
},
"x": {
"type": "object",
"properties": {
"nodes": {
"type": "integer",
"minimum": 0
},
"witness": {
"type": [
"array",
"null"
],
"items": {
"type": "integer",
"minimum": 0
}
},
"distance": {
"type": [
"integer",
"null"
]
},
"no_logical_below": {
"type": [
"integer",
"null"
]
}
},
"description": "One sector: the least weight of a logical found, a witness of that weight, and the weight below which the search ruled every support out."
},
"z": {
"type": "object",
"properties": {
"nodes": {
"type": "integer",
"minimum": 0
},
"witness": {
"type": [
"array",
"null"
],
"items": {
"type": "integer",
"minimum": 0
}
},
"distance": {
"type": [
"integer",
"null"
]
},
"no_logical_below": {
"type": [
"integer",
"null"
]
}
},
"description": "One sector: the least weight of a logical found, a witness of that weight, and the weight below which the search ruled every support out."
},
"code": {
"type": "string"
},
"bound": {
"type": "integer",
"minimum": 1
},
"format": {
"const": "wai.quantum.distance/1"
},
"method": {
"type": "string"
},
"orbits": {
"type": [
"integer",
"array",
"null"
]
},
"reading": {
"type": "string"
},
"distance": {
"type": [
"integer",
"null"
],
"description": "The distance, when both sectors settle it; null when the search stopped at its bound first."
},
"families": {
"type": "string",
"description": "BLAKE3 of the code's check families, in hex."
},
"symmetries": {
"type": [
"integer",
"array",
"null"
]
}
},
"description": "A code's distance certificate (quantum_distance): in each sector, a witness logical of the least weight found and every lighter support ruled out by an exhaustive search over connected supports, re-checkable node for node; the code's families hash, the search's bound, the symmetries checked and used, and its reading. Given back to qec_code, it is checked against the code."
}
},
"description": "A code: its checks and stabilizers, k, its layout, the decoders it takes, and its distance certificate (or a given one's check)."
},
{
"type": "object",
"required": [
"decoder"
],
"properties": {
"code": {
"type": "string"
},
"rate": {
"type": "number"
},
"seed": {
"type": "integer"
},
"error": {
"type": "array",
"items": {
"type": "integer"
}
},
"fired": {
"type": "array",
"items": {
"type": "integer"
}
},
"shots": {
"type": "integer"
},
"detail": {
"type": "object",
"description": "The decoder's own: its passes, its convergence, its windows.",
"additionalProperties": true
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"schema": {
"const": "wai.quantum.qec/1"
},
"stderr": {
"type": "number"
},
"weight": {
"type": "integer"
},
"decoder": {
"type": "string"
},
"receipt": {
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
"explains": {
"type": "boolean"
},
"failures": {
"type": "integer"
},
"residual": {
"type": "object",
"properties": {
"qubits": {
"type": "array",
"items": {
"type": "integer"
}
},
"logical": {
"type": "boolean"
},
"reading": {
"type": "string"
}
}
},
"syndrome": {
"type": "array",
"items": {
"type": "integer"
}
},
"detectors": {
"type": "integer"
},
"predicted": {
"type": "array",
"items": {
"type": "integer"
}
},
"correction": {
"type": "array",
"items": {
"type": "integer"
}
},
"mechanisms": {
"type": "integer"
},
"observables": {
"type": "integer"
}
},
"description": "A decode: at code capacity the syndrome, the correction and whether it explains the syndrome (and with an error, its residual); at circuit level the model's size, the fired detectors and the observables predicted, or the shots sampled and their failure rate."
},
{
"type": "object",
"required": [
"points",
"below_threshold"
],
"properties": {
"fit": {
"type": [
"object",
"null"
],
"properties": {
"model": {
"type": "string"
},
"prefactor": {
"type": "number"
},
"threshold": {
"type": "number"
}
}
},
"seed": {
"type": "integer"
},
"noise": {
"type": [
"string",
"object",
"null"
]
},
"engine": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
},
"description": "The engine that made the result: the wai-quantum crate's name and version."
},
"family": {
"type": "string"
},
"points": {
"type": "array",
"items": {
"type": "object",
"properties": {
"p": {
"type": "number"
},
"rate": {
"type": "number"
},
"shots": {
"type": "integer"
},
"rounds": {
"type": "integer"
},
"stderr": {
"type": "number"
},
"distance": {
"type": "integer"
},
"failures": {
"type": "integer"
},
"per_round": {
"type": [
"number",
"null"
]
}
}
}
},
"schema": {
"const": "wai.quantum.qec/1"
},
"decoder": {
"type": [
"string",
"null"
]
},
"reading": {
"type": "string"
},
"receipt": {
"type": "object",
"title": "wai.quantum.receipt/2",
"required": [
"alg",
"canon",
"key",
"digest",
"signature"
],
"properties": {
"alg": {
"const": "ed25519"
},
"key": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The signing key, 32 bytes in hex."
},
"canon": {
"const": "rfc8785",
"description": "The canonical form the digest is taken over."
},
"digest": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "The digest signed, 32 bytes in hex."
},
"signature": {
"type": "string",
"maxLength": 128,
"minLength": 128,
"description": "The signature, 64 bytes in hex."
}
},
"description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify."
},
"below_threshold": {
"type": "array",
"items": {
"type": "object",
"properties": {
"p": {
"type": "number"
},
"distance_helps": {
"type": "boolean"
}
}
}
}
},
"description": "Logical failure rates: each point's shots, failures, rate and standard error, the code model fitted at circuit level, and at each physical rate whether every larger distance failed less."
}
],
"description": "A code, a decode or a threshold, with its receipt."
},
"request": {
"type": "object",
"description": "The call's request, as given."
}
},
"description": "An error-correction answer as every host gives it (engine::qec: qec_code, qec_decode and qec_threshold on both servers, wai-quantum qec, POST /v1/qec/*, the Studio and Python): the request, and the result sealed in a job's form. A code with its distance certificate (or a given certificate checked); a syndrome, an error or a circuit's detectors decoded, or shots sampled and decoded; logical failure rates over distances and physical rates. A result names the engine that made it and this schema (engine and schema). docs/qec.md explains each."
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"meaning": {
"type": "string"
},
"message": {
"type": "string"
},
"outcome": {
"enum": [
"refused",
"retry",
"failed",
"lowered",
"carried",
"preserved",
"warned",
"dropped",
"defaulted"
]
}
},
"description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone."
}
],
"description": "An error-correction answer as every host gives it (engine::qec: qec_code, qec_decode and qec_threshold on both servers, wai-quantum qec, POST /v1/qec/*, the Studio and Python): the request, and the result sealed in a job's form. A code with its distance certificate (or a given certificate checked); a syndrome, an error or a circuit's detectors decoded, or shots sampled and decoded; logical failure rates over distances and physical rates. A result names the engine that made it and this schema (engine and schema). docs/qec.md explains each."
}{
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true
}Prompts
3 advertised
write_verified_circuit — Write and verify a circuit for an intent
Write an OpenQASM 3 program for what it must do, read it with the engine, and check it against that intent before calling it done.
- intent
- What the program must do: an exact distribution over its measured bits (as {"00": 0.5, "11": 0.5}), or a reference program it must equal or whose state it must prepare. (required)
- qubits
- How many qubits it may use.
explain_result — Explain a result and its receipt
Check a job's receipt, then explain the job from its own fields: the method and why, the accuracy class, the numbers, the energy, and what the receipt does and does not show.
- job
- The job as a run returned it: {"request": …, "result": …} as JSON. (required)
repair_from_diagnostics — Repair a program from its diagnostics
Fix a program the reader refuses, changing only the lines its diagnostics name, until it reads.
- qasm
- The program. (required)
- diagnostics
- The problems the engine reported, if you have them; otherwise they are found first.
Resources
9 advertised
language — The OpenQASM the engine reads
What the reader takes and refuses, the conventions for counts, amplitudes and observables, the limits, and where a program runs.
wai-quantum://docs/languagediagnostics — The reader's diagnostics
Each refusal: what the reader says, the line it names, and what to write instead, with a program that shows it.
wai-quantum://docs/diagnosticsmethods — The methods and their accuracy classes
Each simulation method: the circuits it takes, what it answers, its accuracy class and its reach in a job's memory here; the accuracy classes; the order auto tries them in.
wai-quantum://docs/methodsverdicts — The verdict: how far the engine checked
The levels every answer states (refused, parsed, executed, evidence, proof), what a verdict records, the intents a job may give, and the repairs the engine makes.
wai-quantum://docs/verdictsexamples — Worked examples, each with what it must do
Programs with their intent (an exact distribution, or a reference program to equal or whose state to prepare) and how each is run.
wai-quantum://examplesbell.qasm — A Bell pair
Two qubits entangled: half the shots read 00 and half 11, never 01 or 10. The intent is the exact distribution.
wai-quantum://examples/bell.qasmghz.qasm — A GHZ state in fewer layers
A four-qubit GHZ state in three layers of gates rather than four. It is not the same circuit as the chain of CNOTs, but it prepares the same state from |0000⟩, which the engine checks against the chain.
wai-quantum://examples/ghz.qasmgrover.qasm — Grover's search over four items
One round of search over four items finds the marked one, 11, on every shot. The engine checks it is the same circuit as the same search written with cx in place of cz, and that its distribution is all 11.
wai-quantum://examples/grover.qasmnoisy-bell.qasm — A Bell pair under noise
The Bell pair with gate errors and readout flips: 01 and 10 appear. The engine computes the noisy distribution exactly, by the density matrix, and checks it is within the tolerance of the ideal pair.
wai-quantum://examples/noisy-bell.qasm30-day availability
Aggregated from read-only remote checks; this is not a tool-execution or security guarantee.
- Successful checks
- 1 of 1 (100%)
- Average latency
- 1516 ms
- 95th percentile latency
- 1516 ms
Maintenance history
Public check and source-refresh events. Editorial and ownership records remain private.
- · probe · passed · 1516 ms · metadata changed · 21 tool(s), 9 resource(s), 0 resource template(s), 3 prompt(s)
Connect from your client
Each snippet registers the same endpoint; pick the client you use.
Claude Code
claude mcp add --transport http wai-quantum-mcp https://wai.transaction.science/quantum-jobs/mcpCodex
codex mcp add wai-quantum-mcp --url https://wai.transaction.science/quantum-jobs/mcpCursor
{
"mcpServers": {
"wai-quantum-mcp": {
"url": "https://wai.transaction.science/quantum-jobs/mcp"
}
}
}Cline
{
"mcpServers": {
"wai-quantum-mcp": {
"type": "streamableHttp",
"url": "https://wai.transaction.science/quantum-jobs/mcp",
"disabled": false
}
}
}VS Code
{
"servers": {
"wai-quantum-mcp": {
"type": "http",
"url": "https://wai.transaction.science/quantum-jobs/mcp"
}
}
}Gemini CLI
gemini mcp add --transport http wai-quantum-mcp https://wai.transaction.science/quantum-jobs/mcpClaude Desktop
{
"mcpServers": {
"wai-quantum-mcp": {
"url": "https://wai.transaction.science/quantum-jobs/mcp"
}
}
}Windsurf
{
"mcpServers": {
"wai-quantum-mcp": {
"serverUrl": "https://wai.transaction.science/quantum-jobs/mcp"
}
}
}Let your agent find its tools
Find servers like WAI Quantum MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.
Other ai and machine learning servers
Do you run WAI Quantum MCP?
Prove ownership with a DNS record, a well-known file, or your Official MCP Registry entry, and your edits publish immediately. Proofs are re-checked weekly; admins can still hide or remove a listing.