{
  "notice": "bxzxxr MCP archive: a record of what public MCP servers declared when we listed them (we never call their tools). It is data, not a rating: nothing here says a server is safe, secure, verified or trustworthy, and a server can change after we looked. Secrets we detected are redacted; redacted tool lists are withheld and only their hash is shown.",
  "infrastructure": {
    "host": "wai.transaction.science",
    "site": "transaction.science",
    "addresses": [
      {
        "address": "104.21.2.154",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "104.21.0.0/19",
          "country": "US"
        }
      },
      {
        "address": "172.67.129.89",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": null
      },
      {
        "address": "2606:4700:3036::ac43:8159",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": null
      },
      {
        "address": "2606:4700:3034::6815:29a",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": null
      }
    ],
    "addresses_recorded": true,
    "address_history": [
      {
        "addresses": [
          "172.67.129.89",
          "104.21.2.154",
          "2606:4700:3036::ac43:8159",
          "2606:4700:3034::6815:29a"
        ],
        "first_seen": "2026-11-22T22:46:03.866Z",
        "last_seen": "2026-11-22T22:46:03.866Z",
        "checks": 1
      },
      {
        "addresses": [
          "104.21.2.154",
          "172.67.129.89",
          "2606:4700:3036::ac43:8159",
          "2606:4700:3034::6815:29a"
        ],
        "first_seen": "2026-11-21T19:34:00.892Z",
        "last_seen": "2026-11-23T22:47:02.407Z",
        "checks": 2
      }
    ],
    "hosting": [
      {
        "value": "Cloudflare",
        "evidence": "Server header \"cloudflare\""
      }
    ],
    "software": [],
    "server_info": {
      "name": "wai-quantum",
      "version": "0.2.6",
      "protocol_version": "2025-06-18"
    },
    "headers": {
      "server": "cloudflare",
      "strict-transport-security": "max-age=31536000; includeSubDomains",
      "access-control-allow-origin": "*"
    },
    "auth": null
  },
  "related": {
    "same_address": {
      "total": 0,
      "sample": []
    },
    "same_site": {
      "total": 0,
      "sample": []
    },
    "same_tool_list": {
      "total": 0,
      "sample": []
    },
    "same_publisher": {
      "publisher": "science.transaction.wai",
      "total": 1,
      "sample": [
        {
          "name": "science.transaction.wai/quantum",
          "title": "WAI Quantum"
        }
      ]
    },
    "same_repository": null,
    "note": "Shared addresses on big platforms (Cloudflare, Vercel and the like) put unrelated servers together; those are marked shared_infrastructure. A match is a pivot, not a link between operators."
  },
  "endpoint": {
    "id": "45995",
    "server_name": "science.transaction.wai/quantum-jobs",
    "url": "https://wai.transaction.science/quantum-jobs/mcp",
    "host": "wai.transaction.science",
    "transport": "streamable-http",
    "last_checked_at": "2026-11-23T22:47:02.407Z",
    "last_state": "error",
    "last_detail": "too_large: The server's reply is larger than 2048 KB.",
    "consecutive_failures": 1,
    "current_sha": "1c64c57cc3c037ea47f7c88409cc205992a24bb53324028854b3b2704cf71dea",
    "first_listed_at": "2026-11-21T19:34:00.892Z",
    "created_at": "2026-11-21T13:20:12.553Z",
    "resolved_addresses": [
      "104.21.2.154",
      "172.67.129.89",
      "2606:4700:3036::ac43:8159",
      "2606:4700:3034::6815:29a"
    ]
  },
  "server": {
    "name": "science.transaction.wai/quantum-jobs",
    "title": "WAI Quantum job service",
    "description": "A free quantum job service: OpenQASM 3 run, checked and signed, with no account or key.",
    "version": "0.2.2",
    "registry_status": "active",
    "repository_url": null,
    "website_url": "https://wai.transaction.science/quantum-run/",
    "published_at": "2026-11-05T01:32:53.447Z",
    "updated_at": "2026-11-05T01:32:53.447Z",
    "first_seen": "2026-11-21T13:20:11.908Z"
  },
  "other_endpoints": [],
  "intel": {
    "capabilities": [],
    "evm_addresses": [],
    "chains": [],
    "tokens": [],
    "computed_at": "2026-11-22T15:59:17.984Z"
  },
  "operator": {
    "key": "transaction.science",
    "name": "transaction.science",
    "platform": false,
    "marketplace": false
  },
  "needs_sign_in": false,
  "reachability": {
    "window_days": 30,
    "checks": 3,
    "answered": 2,
    "answered_percent": 67,
    "avg_listing_latency_ms": 1255,
    "first_check_in_window": "2026-11-21T19:34:00.892Z",
    "consecutive_failures_now": 1,
    "days": [
      {
        "day": "2026-11-21",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-22",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-23",
        "checks": 1,
        "answered": 0,
        "last_state": "error"
      }
    ]
  },
  "tool_list": {
    "sha256": "1c64c57cc3c037ea47f7c88409cc205992a24bb53324028854b3b2704cf71dea",
    "tools": 37,
    "resources": 9,
    "prompts": 3,
    "first_seen": "2026-11-21T19:34:02.147Z",
    "tool_names": [
      "run_quantum_circuit",
      "run_quantum_set",
      "dry_run_quantum_job",
      "get_quantum_job",
      "verify_quantum_receipt",
      "critique_qasm",
      "check_equivalent",
      "convert_program",
      "improve_qasm",
      "classical_shortcuts",
      "compile_qasm",
      "estimate_resources",
      "repair_qasm",
      "quantum_service_info",
      "qasm_diagnostics",
      "list_components",
      "list_targets",
      "show_target",
      "run_on_target",
      "quantum_circuit_examples",
      "qec_code",
      "qec_decode",
      "qec_threshold",
      "pulse_schedule",
      "pulse_check",
      "gradient_qasm",
      "optimize_qasm",
      "vqe_ground_state",
      "qaoa_maxcut",
      "build_algorithm",
      "run_landscape",
      "run_qudit",
      "run_wasmq",
      "check_quantum_program",
      "grade_quantum_program",
      "attest_quantum_job",
      "write_circuit"
    ],
    "declared": {
      "tools": [
        {
          "name": "run_quantum_circuit",
          "title": "Run a quantum circuit",
          "description": "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. Each call is a new job unless it gives idempotency_key, which makes sending it again safe.",
          "inputSchema": {
            "type": "object",
            "anyOf": [
              {
                "required": [
                  "qasm"
                ]
              },
              {
                "required": [
                  "source"
                ]
              }
            ],
            "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)."
              },
              "pulse": {
                "type": "object",
                "properties": {
                  "dt_ns": {
                    "type": "number",
                    "maximum": 1000,
                    "description": "The sample period, ns (default 0.5).",
                    "exclusiveMinimum": 0
                  },
                  "ports": {
                    "type": "object",
                    "description": "Ports by name: what each is for and the qubit it reaches.",
                    "additionalProperties": {
                      "type": "object",
                      "required": [
                        "kind",
                        "qubit"
                      ],
                      "properties": {
                        "kind": {
                          "enum": [
                            "drive",
                            "measure",
                            "acquire"
                          ]
                        },
                        "qubit": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "levels": {
                    "enum": [
                      2,
                      3
                    ],
                    "type": "integer",
                    "description": "Levels kept per qubit (default 2; 3 shows leakage)."
                  },
                  "qubits": {
                    "type": "object",
                    "description": "Each qubit's parameters by its index, over the target's and the defaults.",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "t1_us": {
                          "type": "number",
                          "description": "Its relaxation time, µs."
                        },
                        "t2_us": {
                          "type": "number",
                          "description": "Its coherence time, µs (at most 2·T1)."
                        },
                        "rabi_mhz": {
                          "type": "number",
                          "description": "Its Rabi frequency at full amplitude, MHz."
                        },
                        "frequency_ghz": {
                          "type": "number",
                          "description": "Its frequency, GHz."
                        },
                        "anharmonicity_mhz": {
                          "type": "number",
                          "description": "Its anharmonicity, MHz."
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "substeps": {
                    "type": "integer",
                    "maximum": 4096,
                    "minimum": 1,
                    "description": "Steps per sample (default: chosen so each step times the generator's norm is at most 0.5)."
                  },
                  "couplings": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "qubits",
                        "zz_khz"
                      ],
                      "properties": {
                        "qubits": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "maxItems": 2,
                          "minItems": 2
                        },
                        "zz_khz": {
                          "type": "number",
                          "description": "The coupling's rate, kHz."
                        }
                      },
                      "additionalProperties": false
                    },
                    "description": "Static ZZ couplings."
                  },
                  "tolerance": {
                    "type": "number",
                    "description": "The most the stated error may be (default 1e-6): a run whose bound and rounding estimate pass it is refused, naming the steps that would meet it.",
                    "exclusiveMaximum": 1,
                    "exclusiveMinimum": 0
                  }
                },
                "description": "A pulse run's options (method \"pulse\"): the sample period, the levels kept, the tolerance on the stated error, the steps a sample is divided into, each qubit's parameters, static couplings, and ports beyond the names d0, m0, a0.",
                "additionalProperties": false
              },
              "shots": {
                "type": "integer",
                "maximum": 1000000,
                "minimum": 0,
                "description": "Measurement shots. Default 1024 when no observables or amplitudes are asked for."
              },
              "fabric": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "maxItems": 64,
                    "minItems": 2
                  }
                ],
                "description": "Where the statevector method's state runs: auto (the default: on a member only where the committed measurements show it faster than the host's CPU for the job's size and fusion, otherwise the CPU), cpu, accelerator (any certified accelerator member), a member's id or key, or a list of members, a power of two of them, the state split by its top qubits into one partition on each; a pauli job's sum of terms runs on the member accelerator or its id or key names. Every member placed is certified bit-exact against the CPU, so the answers are the CPU's; the result's `fabric` names where the state ran, sealed by the receipt. A placement the service cannot honour is refused (J013): it places only on its CPU."
              },
              "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",
                  "statevector_compact",
                  "stabilizer",
                  "pauli",
                  "mps",
                  "tensor_network",
                  "cutrank",
                  "cutrank_single",
                  "stabilizer_rank",
                  "density_matrix",
                  "trajectories",
                  "pulse"
                ],
                "type": "string",
                "description": "Leave as auto unless you need a particular method; pulse runs a pulse program (OpenPulse calibrations on physical qubits, see pulse_schedule) under the pulse options, its error bounded."
              },
              "params": {
                "type": "object",
                "description": "A value for each of the program's parameters (input float theta;, input angle phi;), as {\"theta\": 0.3}: bound exactly before the program is read; a parameter left without one is refused (J050). In a sweep, the parameters it fixes.",
                "additionalProperties": {
                  "type": "number"
                }
              },
              "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."
              },
              "source": {
                "type": "object",
                "required": [
                  "format"
                ],
                "properties": {
                  "format": {
                    "enum": [
                      "qasm",
                      "qir",
                      "jeff"
                    ],
                    "type": "string",
                    "description": "Its format."
                  },
                  "program": {
                    "type": "string",
                    "description": "The program's text: QIR (LLVM text) or OpenQASM."
                  },
                  "program_base64": {
                    "type": "string",
                    "description": "The program's bytes as base64: jeff."
                  }
                },
                "description": "The program in another format, in place of qasm: read to the job's qasm before the job is read (a module that does not read is refused with the reader's code, Q700 to Q721), the request keeping its source."
              },
              "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",
                      "cz",
                      "zz",
                      "xx"
                    ],
                    "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; cz, zz or xx: one-qubit gates around a device basis's own two-qubit gate (cz, rzz or rxx at an angle from 0 to π/2), each pair's block around at most three of it, 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, and with basis clifford_t each region of CNOT and phase gates written again with fewer T gates (phase_resynth). Above 0, the output is the best of this level's and every lower level's on the basis's objective (clifford_t: the fewest T gates, then CNOTs, then gates), and the certificate's guard records the comparison."
                  },
                  "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."
                  },
                  "passes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Passes to run after the level's, by name (list_components lists them): phase_resynth writes each region of CNOT and phase gates again with fewer T gates, at any level, each region proved in integers."
                  },
                  "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), controls (statevector and exact), trajectories."
              },
              "contract": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "max_cost": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "properties": {
                      "amount": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "An amount in decimals: digits, and optionally a point and digits, at most 64 characters."
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "description": "The most a provider's estimate of the run may come to, before it runs: it bounds the estimate, not the charge, which is stated after the run beside it (kept.cost). A route with an unknown cost, an estimate that is only the least it can come to, or a price in another currency does not meet it: nothing is converted.",
                    "additionalProperties": false
                  },
                  "exactness": {
                    "enum": [
                      "bit-exact",
                      "exact",
                      "single",
                      "bounded",
                      "estimate",
                      "heuristic",
                      "measured",
                      "simulated",
                      "any",
                      null
                    ],
                    "description": "The class wanted. Without it, the job keeps the class auto would give: auto's pick stands while it meets the rest of the contract, and only a route at least as exact may take its place. A device's counts are in no classical class: measured wants a processor's, simulated a provider's simulator's that its provider does not state is approximate, and any takes every route."
                  },
                  "providers": {
                    "enum": [
                      "never",
                      "allowed",
                      null
                    ],
                    "description": "Whether a route may be one of the person's providers. never is the default, given or not: a job that names a provider under a contract that does not allow one is refused (J070), and a host asks no provider anything under it. A host that reaches none (the job service) lists none. A provider that costs money is chosen only under max_cost, or when the job names it, and still runs only on the person's word for that route and its estimate."
                  },
                  "max_joules": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "The most energy it may take, held by a live reading while it runs: at the ceiling the run is stopped, gives no answer, and its receipt says so. A route nothing here can read and stop does not meet it, so on a host that reads none every route is rejected. An estimate can refuse a job clearly past it, and promises nothing.",
                    "exclusiveMinimum": 0
                  },
                  "deadline_seconds": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "When it must be done by, in seconds from when it starts. A route whose time is not known does not meet it. A host that can stop a run stops it there (J074); otherwise the result says whether it was kept.",
                    "exclusiveMinimum": 0
                  }
                },
                "description": "What the job wants of an answer (wai/extensions/quantum-providers.md section 8.7). Every route the host can see is priced with what is really known, those that cannot meet this are rejected, the cheapest of the rest runs, and the reasoning is sealed in the result as `planner`. Nothing falls back in silence, and a job no route can meet is refused (J071). A job without it plans as it always has, byte for byte. Refused on a set (J073).",
                "additionalProperties": false
              },
              "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."
              },
              "idempotency_key": {
                "type": "string",
                "pattern": "^[!#-\\[\\]-~]+$",
                "maxLength": 255,
                "minLength": 1,
                "description": "A key of your making that names this run, so that a call sent again is not a second job: the same key with the same arguments answers with the job it names, for as long as the job is kept, rather than running another; the same key with other arguments is refused (J034). Make it unguessable (a UUID). A job the service interrupted is run again under its key. Without a key, every call is a new job."
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 291188
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false
          }
        },
        {
          "name": "run_quantum_set",
          "title": "Run a set of quantum programs, or one over a grid",
          "description": "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. Each call is a new job unless it gives idempotency_key, which makes sending it again safe.",
          "inputSchema": {
            "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)."
              },
              "pulse": {
                "type": "object",
                "properties": {
                  "dt_ns": {
                    "type": "number",
                    "maximum": 1000,
                    "description": "The sample period, ns (default 0.5).",
                    "exclusiveMinimum": 0
                  },
                  "ports": {
                    "type": "object",
                    "description": "Ports by name: what each is for and the qubit it reaches.",
                    "additionalProperties": {
                      "type": "object",
                      "required": [
                        "kind",
                        "qubit"
                      ],
                      "properties": {
                        "kind": {
                          "enum": [
                            "drive",
                            "measure",
                            "acquire"
                          ]
                        },
                        "qubit": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "levels": {
                    "enum": [
                      2,
                      3
                    ],
                    "type": "integer",
                    "description": "Levels kept per qubit (default 2; 3 shows leakage)."
                  },
                  "qubits": {
                    "type": "object",
                    "description": "Each qubit's parameters by its index, over the target's and the defaults.",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "t1_us": {
                          "type": "number",
                          "description": "Its relaxation time, µs."
                        },
                        "t2_us": {
                          "type": "number",
                          "description": "Its coherence time, µs (at most 2·T1)."
                        },
                        "rabi_mhz": {
                          "type": "number",
                          "description": "Its Rabi frequency at full amplitude, MHz."
                        },
                        "frequency_ghz": {
                          "type": "number",
                          "description": "Its frequency, GHz."
                        },
                        "anharmonicity_mhz": {
                          "type": "number",
                          "description": "Its anharmonicity, MHz."
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "substeps": {
                    "type": "integer",
                    "maximum": 4096,
                    "minimum": 1,
                    "description": "Steps per sample (default: chosen so each step times the generator's norm is at most 0.5)."
                  },
                  "couplings": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "qubits",
                        "zz_khz"
                      ],
                      "properties": {
                        "qubits": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "maxItems": 2,
                          "minItems": 2
                        },
                        "zz_khz": {
                          "type": "number",
                          "description": "The coupling's rate, kHz."
                        }
                      },
                      "additionalProperties": false
                    },
                    "description": "Static ZZ couplings."
                  },
                  "tolerance": {
                    "type": "number",
                    "description": "The most the stated error may be (default 1e-6): a run whose bound and rounding estimate pass it is refused, naming the steps that would meet it.",
                    "exclusiveMaximum": 1,
                    "exclusiveMinimum": 0
                  }
                },
                "description": "A pulse run's options (method \"pulse\"): the sample period, the levels kept, the tolerance on the stated error, the steps a sample is divided into, each qubit's parameters, static couplings, and ports beyond the names d0, m0, a0.",
                "additionalProperties": false
              },
              "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
                }
              },
              "fabric": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "maxItems": 64,
                    "minItems": 2
                  }
                ],
                "description": "Where the statevector method's state runs: auto (the default: on a member only where the committed measurements show it faster than the host's CPU for the job's size and fusion, otherwise the CPU), cpu, accelerator (any certified accelerator member), a member's id or key, or a list of members, a power of two of them, the state split by its top qubits into one partition on each; a pauli job's sum of terms runs on the member accelerator or its id or key names. Every member placed is certified bit-exact against the CPU, so the answers are the CPU's; the result's `fabric` names where the state ran, sealed by the receipt. A placement the service cannot honour is refused (J013): it places only on its CPU."
              },
              "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",
                  "statevector_compact",
                  "stabilizer",
                  "pauli",
                  "mps",
                  "tensor_network",
                  "cutrank",
                  "cutrank_single",
                  "stabilizer_rank",
                  "density_matrix",
                  "trajectories",
                  "pulse"
                ],
                "type": "string",
                "description": "Leave as auto unless you need a particular method; pulse runs a pulse program (OpenPulse calibrations on physical qubits, see pulse_schedule) under the pulse options, its error bounded."
              },
              "params": {
                "type": "object",
                "description": "A value for each of the program's parameters (input float theta;, input angle phi;), as {\"theta\": 0.3}: bound exactly before the program is read; a parameter left without one is refused (J050). In a sweep, the parameters it fixes.",
                "additionalProperties": {
                  "type": "number"
                }
              },
              "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",
                      "cz",
                      "zz",
                      "xx"
                    ],
                    "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; cz, zz or xx: one-qubit gates around a device basis's own two-qubit gate (cz, rzz or rxx at an angle from 0 to π/2), each pair's block around at most three of it, 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, and with basis clifford_t each region of CNOT and phase gates written again with fewer T gates (phase_resynth). Above 0, the output is the best of this level's and every lower level's on the basis's objective (clifford_t: the fewest T gates, then CNOTs, then gates), and the certificate's guard records the comparison."
                  },
                  "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."
                  },
                  "passes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Passes to run after the level's, by name (list_components lists them): phase_resynth writes each region of CNOT and phase gates again with fewer T gates, at any level, each region proved in integers."
                  },
                  "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), controls (statevector and exact), 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."
              },
              "idempotency_key": {
                "type": "string",
                "pattern": "^[!#-\\[\\]-~]+$",
                "maxLength": 255,
                "minLength": 1,
                "description": "A key of your making that names this run, so that a call sent again is not a second job: the same key with the same arguments answers with the job it names, for as long as the job is kept, rather than running another; the same key with other arguments is refused (J034). Make it unguessable (a UUID). A job the service interrupted is run again under its key. Without a key, every call is a new job."
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 291184
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false
          }
        },
        {
          "name": "dry_run_quantum_job",
          "title": "Plan a quantum job or set without running it",
          "description": "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, and plans it as they run it, its verdict asked: what it says they take, they take. It counts as one submission.",
          "inputSchema": {
            "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)."
              },
              "pulse": {
                "type": "object",
                "properties": {
                  "dt_ns": {
                    "type": "number",
                    "maximum": 1000,
                    "description": "The sample period, ns (default 0.5).",
                    "exclusiveMinimum": 0
                  },
                  "ports": {
                    "type": "object",
                    "description": "Ports by name: what each is for and the qubit it reaches.",
                    "additionalProperties": {
                      "type": "object",
                      "required": [
                        "kind",
                        "qubit"
                      ],
                      "properties": {
                        "kind": {
                          "enum": [
                            "drive",
                            "measure",
                            "acquire"
                          ]
                        },
                        "qubit": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "levels": {
                    "enum": [
                      2,
                      3
                    ],
                    "type": "integer",
                    "description": "Levels kept per qubit (default 2; 3 shows leakage)."
                  },
                  "qubits": {
                    "type": "object",
                    "description": "Each qubit's parameters by its index, over the target's and the defaults.",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "t1_us": {
                          "type": "number",
                          "description": "Its relaxation time, µs."
                        },
                        "t2_us": {
                          "type": "number",
                          "description": "Its coherence time, µs (at most 2·T1)."
                        },
                        "rabi_mhz": {
                          "type": "number",
                          "description": "Its Rabi frequency at full amplitude, MHz."
                        },
                        "frequency_ghz": {
                          "type": "number",
                          "description": "Its frequency, GHz."
                        },
                        "anharmonicity_mhz": {
                          "type": "number",
                          "description": "Its anharmonicity, MHz."
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "substeps": {
                    "type": "integer",
                    "maximum": 4096,
                    "minimum": 1,
                    "description": "Steps per sample (default: chosen so each step times the generator's norm is at most 0.5)."
                  },
                  "couplings": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "qubits",
                        "zz_khz"
                      ],
                      "properties": {
                        "qubits": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "maxItems": 2,
                          "minItems": 2
                        },
                        "zz_khz": {
                          "type": "number",
                          "description": "The coupling's rate, kHz."
                        }
                      },
                      "additionalProperties": false
                    },
                    "description": "Static ZZ couplings."
                  },
                  "tolerance": {
                    "type": "number",
                    "description": "The most the stated error may be (default 1e-6): a run whose bound and rounding estimate pass it is refused, naming the steps that would meet it.",
                    "exclusiveMaximum": 1,
                    "exclusiveMinimum": 0
                  }
                },
                "description": "A pulse run's options (method \"pulse\"): the sample period, the levels kept, the tolerance on the stated error, the steps a sample is divided into, each qubit's parameters, static couplings, and ports beyond the names d0, m0, a0.",
                "additionalProperties": false
              },
              "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
                }
              },
              "fabric": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "maxItems": 64,
                    "minItems": 2
                  }
                ],
                "description": "Where the statevector method's state runs: auto (the default: on a member only where the committed measurements show it faster than the host's CPU for the job's size and fusion, otherwise the CPU), cpu, accelerator (any certified accelerator member), a member's id or key, or a list of members, a power of two of them, the state split by its top qubits into one partition on each; a pauli job's sum of terms runs on the member accelerator or its id or key names. Every member placed is certified bit-exact against the CPU, so the answers are the CPU's; the result's `fabric` names where the state ran, sealed by the receipt. A placement the service cannot honour is refused (J013): it places only on its CPU."
              },
              "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",
                  "statevector_compact",
                  "stabilizer",
                  "pauli",
                  "mps",
                  "tensor_network",
                  "cutrank",
                  "cutrank_single",
                  "stabilizer_rank",
                  "density_matrix",
                  "trajectories",
                  "pulse"
                ],
                "type": "string",
                "description": "Leave as auto unless you need a particular method; pulse runs a pulse program (OpenPulse calibrations on physical qubits, see pulse_schedule) under the pulse options, its error bounded."
              },
              "params": {
                "type": "object",
                "description": "A value for each of the program's parameters (input float theta;, input angle phi;), as {\"theta\": 0.3}: bound exactly before the program is read; a parameter left without one is refused (J050). In a sweep, the parameters it fixes.",
                "additionalProperties": {
                  "type": "number"
                }
              },
              "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."
              },
              "source": {
                "type": "object",
                "required": [
                  "format"
                ],
                "properties": {
                  "format": {
                    "enum": [
                      "qasm",
                      "qir",
                      "jeff"
                    ],
                    "type": "string",
                    "description": "Its format."
                  },
                  "program": {
                    "type": "string",
                    "description": "The program's text: QIR (LLVM text) or OpenQASM."
                  },
                  "program_base64": {
                    "type": "string",
                    "description": "The program's bytes as base64: jeff."
                  }
                },
                "description": "The program in another format, in place of qasm: read to the job's qasm before the job is read (a module that does not read is refused with the reader's code, Q700 to Q721), the request keeping its source."
              },
              "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",
                      "cz",
                      "zz",
                      "xx"
                    ],
                    "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; cz, zz or xx: one-qubit gates around a device basis's own two-qubit gate (cz, rzz or rxx at an angle from 0 to π/2), each pair's block around at most three of it, 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, and with basis clifford_t each region of CNOT and phase gates written again with fewer T gates (phase_resynth). Above 0, the output is the best of this level's and every lower level's on the basis's objective (clifford_t: the fewest T gates, then CNOTs, then gates), and the certificate's guard records the comparison."
                  },
                  "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."
                  },
                  "passes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Passes to run after the level's, by name (list_components lists them): phase_resynth writes each region of CNOT and phase gates again with fewer T gates, at any level, each region proved in integers."
                  },
                  "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), controls (statevector and exact), trajectories."
              },
              "contract": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "max_cost": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "properties": {
                      "amount": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "An amount in decimals: digits, and optionally a point and digits, at most 64 characters."
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "description": "The most a provider's estimate of the run may come to, before it runs: it bounds the estimate, not the charge, which is stated after the run beside it (kept.cost). A route with an unknown cost, an estimate that is only the least it can come to, or a price in another currency does not meet it: nothing is converted.",
                    "additionalProperties": false
                  },
                  "exactness": {
                    "enum": [
                      "bit-exact",
                      "exact",
                      "single",
                      "bounded",
                      "estimate",
                      "heuristic",
                      "measured",
                      "simulated",
                      "any",
                      null
                    ],
                    "description": "The class wanted. Without it, the job keeps the class auto would give: auto's pick stands while it meets the rest of the contract, and only a route at least as exact may take its place. A device's counts are in no classical class: measured wants a processor's, simulated a provider's simulator's that its provider does not state is approximate, and any takes every route."
                  },
                  "providers": {
                    "enum": [
                      "never",
                      "allowed",
                      null
                    ],
                    "description": "Whether a route may be one of the person's providers. never is the default, given or not: a job that names a provider under a contract that does not allow one is refused (J070), and a host asks no provider anything under it. A host that reaches none (the job service) lists none. A provider that costs money is chosen only under max_cost, or when the job names it, and still runs only on the person's word for that route and its estimate."
                  },
                  "max_joules": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "The most energy it may take, held by a live reading while it runs: at the ceiling the run is stopped, gives no answer, and its receipt says so. A route nothing here can read and stop does not meet it, so on a host that reads none every route is rejected. An estimate can refuse a job clearly past it, and promises nothing.",
                    "exclusiveMinimum": 0
                  },
                  "deadline_seconds": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "When it must be done by, in seconds from when it starts. A route whose time is not known does not meet it. A host that can stop a run stops it there (J074); otherwise the result says whether it was kept.",
                    "exclusiveMinimum": 0
                  }
                },
                "description": "What the job wants of an answer (wai/extensions/quantum-providers.md section 8.7). Every route the host can see is priced with what is really known, those that cannot meet this are rejected, the cheapest of the rest runs, and the reasoning is sealed in the result as `planner`. Nothing falls back in silence, and a job no route can meet is refused (J071). A job without it plans as it always has, byte for byte. Refused on a set (J073).",
                "additionalProperties": false
              },
              "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."
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 28590
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "get_quantum_job",
          "title": "Read a quantum job",
          "description": "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 is run again once from its request (its interruptions say when), and stopped again it comes back interrupted, with the reason.",
          "inputSchema": {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 312995
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "verify_quantum_receipt",
          "title": "Verify a result's receipt",
          "description": "Whether a result's receipt (an Ed25519 signature) seals exactly that request and that result, and every rule of its form holds (`reasons` names what does not). 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.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "job": {
                "type": [
                  "string",
                  "object"
                ],
                "description": "The job's text as it was given (preferred), or the job as an object. Either is read as the protocol reads a job's text, the job itself (or its members, given as this call's arguments) as this call writes it, so a member named twice or a whole number past a double is seen; `given` in the answer says which was judged"
              },
              "method": {
                "description": "The body's method as the host gave it: unsealed, and noted where it differs from what is sealed"
              },
              "result": {
                "type": "object"
              },
              "status": {
                "description": "The body's status as the host gave it: unsealed, and noted where it differs from what is sealed"
              },
              "request": {
                "type": "object"
              }
            }
          },
          "outputSchema": {
            "$id": "wai-quantum://schemas/verify_quantum_receipt/1",
            "type": "object",
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "object",
                    "required": [
                      "valid"
                    ],
                    "properties": {
                      "key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "form": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The receipt's form: rfc8785, or first."
                      },
                      "kind": {
                        "enum": [
                          "job",
                          "set",
                          "algorithm",
                          "estimate",
                          null
                        ],
                        "description": "The kind of answer the verifier judged it (WAI decision D164). job or set: a kind with no run again, whose verdict is its seal and every rule of the provider protocol's section 8.4, with what it works out again beside them (a sealed verdict, a compile's certificate, the equivalence checker's verdict); its figures are its host's word and are never run again. algorithm or estimate: an answer of a kind that is run again, here one whose receipt or rules failed, so it was not run again and is not valid. null: no kind could be told, and kind_refused says why; such an answer is never valid."
                      },
                      "time": {
                        "type": "object",
                        "required": [
                          "sealed"
                        ],
                        "properties": {
                          "sealed": {
                            "type": "boolean"
                          },
                          "issued_ms": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "minimum": 0
                          },
                          "not_after_ms": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "description": "The first moment the receipt is no longer offered; null when it states none."
                          }
                        },
                        "description": "What the receipt seals of when it was issued (the provider protocol's section 8.2), for a receipt of its form: the time, in milliseconds since 1970 by its signer's clock, or that it seals none."
                      },
                      "given": {
                        "enum": [
                          "text",
                          "members",
                          "parsed"
                        ],
                        "description": "How the job was given (section 9): its own text; its members, judged as the message wrote them; or a value already parsed, with no text to judge."
                      },
                      "valid": {
                        "type": "boolean"
                      },
                      "wasmq": {
                        "type": "object",
                        "required": [
                          "outcome",
                          "problems",
                          "notes"
                        ],
                        "properties": {
                          "notes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Where the body's unsealed status or method differs from what is sealed or is missing, and members nothing seals: told beside the verdict, and no part of it."
                          },
                          "outcome": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The sealed result's status: ok, or fault."
                          },
                          "problems": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Each rule of quantum-wasmq section 6.5 the job breaks, in words (the reason wasmq_form): the first 64, then how many more. Empty when it breaks none."
                          }
                        },
                        "description": "For a wasmQ job (quantum-wasmq section 6.5), beside the verdict: how the run ended, each rule of the profile's form it breaks, and where the host's unsealed words differ from what is sealed, which change no verdict.",
                        "additionalProperties": false
                      },
                      "answer": {
                        "type": "object",
                        "required": [
                          "level",
                          "holds",
                          "layer",
                          "again",
                          "checks",
                          "differences",
                          "statement"
                        ],
                        "properties": {
                          "again": {
                            "enum": [
                              "reproduced",
                              "partly",
                              "host_statement",
                              "differs"
                            ]
                          },
                          "holds": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "layer": {
                            "type": "string"
                          },
                          "level": {
                            "type": "string"
                          },
                          "checks": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          },
                          "limits": {
                            "type": "string"
                          },
                          "schema": {
                            "const": "wai.quantum.verdict/1"
                          },
                          "accuracy": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "statement": {
                            "type": "string"
                          },
                          "differences": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "description": "For a job whose result seals the engine's verdict of its answer (the provider protocol's section 8.9): the verdict worked out again here. Its level, whether it holds, the layer that decided it with that layer's limits, the result's accuracy class, and again: reproduced, partly, host_statement (nothing of it could be worked out again here: it is the host's statement under its seal) or differs (not the verdict the job bears out: the job is then not valid, though its seal holds)."
                      },
                      "signer": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "That key as a did:key."
                      },
                      "compile": {
                        "type": "object",
                        "required": [
                          "again",
                          "form",
                          "passes",
                          "differences",
                          "why"
                        ],
                        "properties": {
                          "why": {
                            "type": "string"
                          },
                          "form": {
                            "enum": [
                              "chained",
                              "earlier"
                            ],
                            "description": "chained: every pass names its digests, its layer and its distance. earlier: sealed before certificates carried them."
                          },
                          "again": {
                            "enum": [
                              "reproduced",
                              "partly",
                              "host_statement",
                              "differs"
                            ]
                          },
                          "layer": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The layer the whole compile stands on, as the certificate states it."
                          },
                          "whole": {
                            "type": "object",
                            "description": "With partly: the check of the whole output against the whole program made here, its layer among it."
                          },
                          "passes": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "weakest": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The weakest layer among its passes' checks, as the certificate states it."
                          },
                          "differences": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "description": "For a sealed compile, or a job that ran compiled and carries its certificate's chain (wai/extensions/quantum-compile.md section 6): what a second look at the certificate found. again is reproduced (compiled again here, the request gives this certificate byte for byte), partly (not reproduced; the output was held to the program here by a tableau, in exact arithmetic or on dense unitaries, and whole says which), host_statement (its form holds, and nothing more could be decided here) or differs (not the certificate the request bears out: the job is then not valid, though its seal holds; differences says why)."
                      },
                      "planner": {
                        "type": "object",
                        "description": "For a job under a contract, what its reasoning says: the route chosen, the class wanted and given, whether the choice depends on the host, what was kept, and the shadow."
                      },
                      "reasons": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Each rule the receipt breaks (the provider protocol's section 8.4, wasmq_form among them for a wasmQ job): none when it is valid."
                      },
                      "not_seen": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "For a job given parsed: what parsing loses, which this verdict could not see."
                      },
                      "provider": {
                        "type": "object",
                        "description": "For a provider's result, what it says of itself."
                      },
                      "kind_refused": {
                        "type": "string",
                        "description": "Why no kind could be told (D164): its result names a schema this verifier does not know; carries the engine's stamps apart, or an engine not of the form an engine writes; or is both an algorithm's answer and an estimate. The answer is not valid, whatever its seal."
                      }
                    },
                    "description": "Whether a result's receipt seals exactly that request and that result and every rule of its form holds, and the key it names."
                  },
                  {
                    "type": "object",
                    "required": [
                      "valid",
                      "signed",
                      "receipts",
                      "reproduced"
                    ],
                    "properties": {
                      "key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "kind": {
                        "const": "estimate",
                        "description": "The kind of answer the verifier judged it (WAI decision D164): an estimate, run again."
                      },
                      "time": {
                        "type": "object",
                        "required": [
                          "sealed"
                        ],
                        "properties": {
                          "sealed": {
                            "type": "boolean"
                          },
                          "issued_ms": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "minimum": 0
                          },
                          "not_after_ms": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "description": "The first moment the receipt is no longer offered; null when it states none."
                          }
                        },
                        "description": "What the receipt seals of when it was issued (the provider protocol's section 8.2): the time, in milliseconds since 1970 by its signer's clock, or that it seals none."
                      },
                      "given": {
                        "enum": [
                          "text",
                          "members",
                          "parsed"
                        ],
                        "description": "From a surface that says how the job was given (the provider protocol's section 9): its own text; its members, judged as the message wrote them; or a value already parsed, with no text to judge."
                      },
                      "trust": {
                        "type": "object",
                        "required": [
                          "listed"
                        ],
                        "properties": {
                          "listed": {
                            "type": "boolean"
                          },
                          "not_after_ms": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "maximum": 9007199254740991,
                            "minimum": 0
                          },
                          "not_before_ms": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "maximum": 9007199254740991,
                            "minimum": 0
                          },
                          "revoked_from_ms": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "maximum": 9007199254740991,
                            "minimum": 0
                          }
                        },
                        "description": "With a trust list (section 8.8): whether it lists the receipt's key, and the window and revocation its entry gives."
                      },
                      "valid": {
                        "type": "boolean"
                      },
                      "signed": {
                        "type": "boolean"
                      },
                      "signer": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "reasons": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The provider protocol's section 8.4 reasons: none, since an answer is run again only once its receipt and every rule hold; a receipt that fails is answered with its reasons alone."
                      },
                      "skew_ms": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "How far after checked_at_ms a receipt's issue may be."
                      },
                      "stamped": {
                        "type": "boolean",
                        "description": "Whether the result carries the engine's stamps as every engine that made one wrote them (D164): format and schema are both wai.quantum.estimate/1, and engine an object whose name is wai-quantum and whose version is MAJOR.MINOR.PATCH (with a pre-release or build where it has one). The run again leaves both out of what it compares (D158), and holds them to this all the same: an answer whose stamp is taken away or changed in form is not valid."
                      },
                      "not_seen": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "For a job given parsed: what parsing loses, which this verdict could not see."
                      },
                      "receipts": {
                        "type": "boolean"
                      },
                      "estimates": {
                        "type": "integer"
                      },
                      "reproduced": {
                        "type": "boolean"
                      },
                      "rerun_error": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Why the request could not be run again, when no host runs it (a request an estimate refuses): the answer is then not valid, and nothing is reproduced. Null when it ran."
                      },
                      "checked_at_ms": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0,
                        "description": "With a time to hold the receipt to (section 8.8): that time."
                      }
                    },
                    "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"
                        ]
                      },
                      "form": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "kind": {
                        "enum": [
                          "set",
                          null
                        ],
                        "description": "Where a surface gives the set's verdict: the kind of answer the verifier judged it (WAI decision D164), set, a kind with no run again; null when no kind could be told (kind_refused says why), which is never valid."
                      },
                      "root": {
                        "type": "boolean"
                      },
                      "time": {
                        "type": "object",
                        "required": [
                          "sealed"
                        ],
                        "properties": {
                          "sealed": {
                            "type": "boolean"
                          },
                          "issued_ms": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "minimum": 0
                          },
                          "not_after_ms": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "description": "The first moment the receipt is no longer offered; null when it states none."
                          }
                        },
                        "description": "What the set's receipt seals of when it was issued (the provider protocol's section 8.2): the time, in milliseconds since 1970 by its signer's clock, or that it seals none."
                      },
                      "given": {
                        "enum": [
                          "text",
                          "members",
                          "parsed"
                        ],
                        "description": "From a surface that says how the job was given (the provider protocol's section 9): its own text; its members, judged as the message wrote them; or a value already parsed, with no text to judge."
                      },
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "trust": {
                        "type": "object",
                        "required": [
                          "listed"
                        ],
                        "properties": {
                          "listed": {
                            "type": "boolean"
                          },
                          "not_after_ms": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "maximum": 9007199254740991,
                            "minimum": 0
                          },
                          "not_before_ms": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "maximum": 9007199254740991,
                            "minimum": 0
                          },
                          "revoked_from_ms": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "maximum": 9007199254740991,
                            "minimum": 0
                          }
                        },
                        "description": "With a trust list (section 8.8): whether it lists the receipt's key, and the window and revocation its entry gives."
                      },
                      "valid": {
                        "type": "boolean"
                      },
                      "signed": {
                        "type": "boolean"
                      },
                      "signer": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "That key as a did:key, where a surface gives it."
                      },
                      "derived": {
                        "type": "boolean"
                      },
                      "reasons": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Each rule the set's receipt breaks (the provider protocol's sections 8.4 and 8.6): none when it is valid."
                      },
                      "skew_ms": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "How far after checked_at_ms a receipt's issue may be."
                      },
                      "not_seen": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "For a job given parsed: what parsing loses, which this verdict could not see."
                      },
                      "items_sealed": {
                        "type": "boolean"
                      },
                      "kind_refused": {
                        "type": "string",
                        "description": "Why no kind could be told (D164): its result names a schema this verifier does not know; carries the engine's stamps apart, or an engine not of the form an engine writes; or is both an algorithm's answer and an estimate. The answer is not valid, whatever its seal."
                      },
                      "checked_at_ms": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0,
                        "description": "With a time to hold the receipt to (section 8.8): that time."
                      }
                    },
                    "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."
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "critique_qasm",
          "title": "Critique a quantum program",
          "description": "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "qasm"
            ],
            "properties": {
              "qasm": {
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 31394
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "check_equivalent",
          "title": "Check two quantum programs are the same circuit",
          "description": "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "a",
              "b"
            ],
            "properties": {
              "a": {
                "type": "string"
              },
              "b": {
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 22934
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "convert_program",
          "title": "Convert a program between formats",
          "description": "Carry a program between OpenQASM 3, QIR (LLVM text, read under its base and adaptive profiles, written as QIR 2.0) and jeff (its Cap'n Proto message, as base64). The answer is the program written, the program as OpenQASM 3 (what every other tool takes), each note with its code (a rotation at an arbitrary angle, a custom gate read by its name, what a format leaves out), what was read and written, and the check: the output read back and held to the program by the equivalence ladder. A construct a reader cannot hold exactly is refused with its code (Q700 to Q721) and its place: quote the code, and never guess around it. A conversion larger than the service takes is refused with the command that runs it locally.",
          "inputSchema": {
            "type": "object",
            "required": [
              "to"
            ],
            "properties": {
              "to": {
                "enum": [
                  "qasm",
                  "qir",
                  "jeff"
                ],
                "type": "string",
                "description": "The format to write."
              },
              "from": {
                "enum": [
                  "qasm",
                  "qir",
                  "jeff"
                ],
                "type": "string",
                "description": "Its format; found from its bytes when not given."
              },
              "check": {
                "type": "boolean",
                "description": "false: write it without the check."
              },
              "profile": {
                "enum": [
                  "base",
                  "adaptive"
                ],
                "type": "string",
                "description": "QIR's profile to write: by default base when the program's measurements all come at the end, else adaptive."
              },
              "program": {
                "type": "string",
                "description": "The program's text: OpenQASM or QIR."
              },
              "program_base64": {
                "type": "string",
                "description": "The program's bytes as base64: jeff."
              }
            }
          },
          "outputSchema": {
            "$id": "wai-quantum://schemas/convert_program/1",
            "type": "object",
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "object",
                    "required": [
                      "ok",
                      "format",
                      "from",
                      "to",
                      "qasm",
                      "notes",
                      "read",
                      "written",
                      "check"
                    ],
                    "properties": {
                      "ok": {
                        "const": true
                      },
                      "to": {
                        "enum": [
                          "qasm",
                          "qir",
                          "jeff"
                        ]
                      },
                      "from": {
                        "enum": [
                          "qasm",
                          "qir",
                          "jeff"
                        ]
                      },
                      "qasm": {
                        "type": "string",
                        "description": "The program as read, as OpenQASM 3: what every other tool takes."
                      },
                      "read": {
                        "type": "object",
                        "required": [
                          "format"
                        ],
                        "description": "What was read: the format, its version, a QIR module's profile, entry point, qubits, results and declared capabilities, a jeff module's tool, entry point, qubits and bits."
                      },
                      "check": {
                        "anyOf": [
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "required": [
                              "what",
                              "verdict"
                            ],
                            "properties": {
                              "what": {
                                "type": "string",
                                "description": "What was held to what."
                              },
                              "verdict": {
                                "type": "object",
                                "required": [
                                  "verdict",
                                  "how",
                                  "why"
                                ],
                                "properties": {
                                  "how": {
                                    "enum": [
                                      "tableau",
                                      "exact",
                                      "rewrites",
                                      "random",
                                      "state",
                                      "shape",
                                      "steps",
                                      "distribution",
                                      "identity",
                                      "none"
                                    ],
                                    "description": "The equivalence ladder's check (tableau, exact and rewrites are proofs; random is evidence); steps: the same steps one for one; distribution: every outcome's probability the same (evidence); identity: OpenQASM passed through; none: unchecked."
                                  },
                                  "why": {
                                    "type": "string"
                                  },
                                  "verdict": {
                                    "enum": [
                                      "equivalent",
                                      "different",
                                      "unchecked"
                                    ]
                                  },
                                  "global_phase": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        ],
                        "description": "The output read back and held to the program read (or, for a program read into OpenQASM, written back to its format and read again), or null when no check was asked."
                      },
                      "notes": {
                        "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": "Each warning and note, with its code (Q7xx for the formats) and, for QIR, its line."
                      },
                      "format": {
                        "const": "wai.quantum.convert/1"
                      },
                      "program": {
                        "type": "string",
                        "description": "The program written, for a text format (OpenQASM, QIR)."
                      },
                      "written": {
                        "type": "object",
                        "required": [
                          "format"
                        ],
                        "description": "What was written: the format, its version, and QIR's profile."
                      },
                      "components": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "kind",
                            "name",
                            "version",
                            "digest",
                            "origin"
                          ],
                          "properties": {
                            "kind": {
                              "enum": [
                                "method",
                                "pass",
                                "channel",
                                "front_end"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "digest": {
                              "type": "string",
                              "pattern": "^[0-9a-f]{64}$",
                              "description": "BLAKE3 of the component's descriptor in its canonical JSON (engine::registry::digest_of)."
                            },
                            "origin": {
                              "enum": [
                                "built-in",
                                "registered"
                              ],
                              "description": "built-in: the engine's own; registered: a host's own, added in its process, not part of the engine."
                            },
                            "version": {
                              "type": "string"
                            },
                            "certified": {
                              "const": false,
                              "description": "Beside a registered component: the engine does not certify it."
                            }
                          },
                          "description": "One component that made the result (engine::registry): its kind, name and version, the BLAKE3 digest of its descriptor, and whether it is built in. A result carries these only when a registered component took part; one made by built-ins alone names them as it always has (its method, its compile's passes, its noise's channels and the engine's version), the digests of that version listed by the components list."
                        },
                        "description": "The identities of the two formats, when a registered front end took part (engine::registry)."
                      },
                      "program_base64": {
                        "type": "string",
                        "description": "The program written, for a binary format (jeff), as standard base64."
                      }
                    },
                    "description": "A program carried from one format to another (OpenQASM 3, QIR as LLVM text, jeff as its Cap'n Proto message) and checked (engine::formats::convert_json): the program written, the program as read in OpenQASM 3, the readers' and writer's notes with their codes, what was read and written, and the check that holds the output to the input."
                  },
                  {
                    "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": [
                  "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 convert_program answers."
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "improve_qasm",
          "title": "Improve a quantum program",
          "description": "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "qasm"
            ],
            "properties": {
              "qasm": {
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 34014
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "classical_shortcuts",
          "title": "Find a quantum program's classical shortcuts",
          "description": "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "qasm"
            ],
            "properties": {
              "qasm": {
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 31060
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "compile_qasm",
          "title": "Compile a quantum program, every pass checked",
          "description": "Compile an OpenQASM program through named passes (lowering, checked rewrites, phase folding, regions of CNOT and phase gates written again with fewer T gates, 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. With basis cz, zz or xx the program is written instead as one-qubit gates around a device basis's own two-qubit gate, each pair's block around at most three of it, nothing approximated, placed or routed. Returns the compiled program and a certificate sealed with the service's key: each pass's counts before and after, the digests of the circuit it was given and the circuit it gave (they chain from the program to the output), the layer its check stands on (stabilizer and exact_arithmetic are proofs, exact_simulation a comparison in doubles, bounded within a stated distance), its check and verdict (proof, exact or approximate with its distance), the budget and the bound the distances add to, and the layer of the strongest check the whole output passed. verify_quantum_receipt checks its receipt and compiles it again. Quote the bound; an approximate compile is not exact. A large or very fine compile is refused with the local command.",
          "inputSchema": {
            "type": "object",
            "required": [
              "qasm"
            ],
            "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."
              },
              "qasm": {
                "type": "string"
              },
              "basis": {
                "enum": [
                  "clifford_t",
                  "standard",
                  "cz",
                  "zz",
                  "xx"
                ],
                "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; cz, zz or xx: one-qubit gates around a device basis's own two-qubit gate (cz, rzz or rxx at an angle from 0 to π/2), each pair's block around at most three of it, 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, and with basis clifford_t each region of CNOT and phase gates written again with fewer T gates (phase_resynth). Above 0, the output is the best of this level's and every lower level's on the basis's objective (clifford_t: the fewest T gates, then CNOTs, then gates), and the certificate's guard records the comparison."
              },
              "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."
              },
              "passes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Passes to run after the level's, by name (list_components lists them): phase_resynth writes each region of CNOT and phase gates again with fewer T gates, at any level, each region proved in integers."
              },
              "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
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 38801
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "estimate_resources",
          "title": "Estimate a quantum program's fault-tolerant resources",
          "description": "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, the budget and the clock, 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.",
          "inputSchema": {
            "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."
              },
              "clock": {
                "anyOf": [
                  {
                    "enum": [
                      "steps"
                    ],
                    "type": "string"
                  },
                  {
                    "type": "object",
                    "required": [
                      "reaction_us"
                    ],
                    "properties": {
                      "reaction_us": {
                        "type": "number",
                        "exclusiveMaximum": 1000000000,
                        "exclusiveMinimum": 0
                      }
                    },
                    "additionalProperties": false
                  }
                ],
                "description": "How long a Toffoli takes: steps (the default: three logical steps of d cycles), or {\"reaction_us\": t}, the reaction-limited clock: its Clifford fixups teleported away, one tick of the control system's reaction time t µs (never shorter than a measurement on the qubit), with enough factories to keep up."
              },
              "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)."
              }
            }
          },
          "outputSchema": {
            "$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",
                            "pattern": "^[0-9a-f]{64}$",
                            "maxLength": 64,
                            "minLength": 64,
                            "description": "The signing key, 32 bytes in lower-case hex."
                          },
                          "time": {
                            "type": "object",
                            "required": [
                              "issued_ms"
                            ],
                            "properties": {
                              "issued_ms": {
                                "type": "integer",
                                "maximum": 9007199254740991,
                                "minimum": 0
                              },
                              "not_after_ms": {
                                "type": "integer",
                                "maximum": 9007199254740991,
                                "minimum": 1,
                                "description": "The first moment the receipt is no longer offered: after issued_ms."
                              }
                            },
                            "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).",
                            "additionalProperties": false
                          },
                          "canon": {
                            "const": "rfc8785",
                            "description": "The canonical form the digest is taken over."
                          },
                          "digest": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{64}$",
                            "maxLength": 64,
                            "minLength": 64,
                            "description": "The digest signed, 32 bytes in lower-case hex."
                          },
                          "signature": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{128}$",
                            "maxLength": 128,
                            "minLength": 128,
                            "description": "The signature, 64 bytes in lower-case 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) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks."
                      },
                      "estimate": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "clock": {
                            "type": "object",
                            "required": [
                              "reaction_us",
                              "tick_us",
                              "toffolis"
                            ],
                            "properties": {
                              "tick_us": {
                                "type": "number"
                              },
                              "toffolis": {
                                "type": "integer"
                              },
                              "reaction_us": {
                                "type": "number"
                              }
                            },
                            "description": "On the reaction-limited clock only: its reaction time, one tick at this estimate's slowdown, and the Toffolis run on ticks. Then steps are the lattice-surgery steps alone, and runtime_s adds the ticks."
                          },
                          "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"
                              },
                              "clock": {
                                "type": "object",
                                "required": [
                                  "kind",
                                  "tick_time_ns_bits",
                                  "tick_time_s"
                                ],
                                "properties": {
                                  "kind": {
                                    "const": "reaction"
                                  },
                                  "tick_time_s": {
                                    "type": "number"
                                  },
                                  "tick_time_ns_bits": {
                                    "type": "string"
                                  }
                                },
                                "description": "On the reaction-limited clock only: the runtime the estimate's steps do not account for, read from its signed figures. How long one tick was is the job's, whose hash binds the reaction time.",
                                "additionalProperties": false
                              },
                              "estimate": {
                                "type": "object"
                              },
                              "job_hash": {
                                "type": "string"
                              },
                              "root_hash": {
                                "type": "string"
                              },
                              "signer_id": {
                                "type": "string"
                              },
                              "result_hash": {
                                "type": "string"
                              },
                              "joules_micro": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "The microjoules the estimate took, where something read them; null in the unmetered form (quantum-ops section 3.5), beside energy_unmetered. An unlabelled 0 is the legacy form of the unmetered statement, sealed before that form: never a figure of zero joules."
                              },
                              "receipt_hash": {
                                "type": "string"
                              },
                              "signer_pubkey": {
                                "type": "string"
                              },
                              "energy_unmetered": {
                                "type": "string",
                                "description": "The unmetered form (quantum-ops section 3.5): why nothing read the estimate's energy, inside the signature. Every receipt an estimate is sealed with now carries it."
                              },
                              "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"
                            },
                            "clock": {
                              "type": "object",
                              "required": [
                                "reaction_us",
                                "tick_us",
                                "toffolis"
                              ],
                              "properties": {
                                "tick_us": {
                                  "type": "number"
                                },
                                "toffolis": {
                                  "type": "integer"
                                },
                                "reaction_us": {
                                  "type": "number"
                                }
                              },
                              "description": "On the reaction-limited clock only: its reaction time, one tick at this estimate's slowdown, and the Toffolis run on ticks. Then steps are the lattice-surgery steps alone, and runtime_s adds the ticks."
                            },
                            "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"
                                },
                                "clock": {
                                  "type": "object",
                                  "required": [
                                    "kind",
                                    "tick_time_ns_bits",
                                    "tick_time_s"
                                  ],
                                  "properties": {
                                    "kind": {
                                      "const": "reaction"
                                    },
                                    "tick_time_s": {
                                      "type": "number"
                                    },
                                    "tick_time_ns_bits": {
                                      "type": "string"
                                    }
                                  },
                                  "description": "On the reaction-limited clock only: the runtime the estimate's steps do not account for, read from its signed figures. How long one tick was is the job's, whose hash binds the reaction time.",
                                  "additionalProperties": false
                                },
                                "estimate": {
                                  "type": "object"
                                },
                                "job_hash": {
                                  "type": "string"
                                },
                                "root_hash": {
                                  "type": "string"
                                },
                                "signer_id": {
                                  "type": "string"
                                },
                                "result_hash": {
                                  "type": "string"
                                },
                                "joules_micro": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "description": "The microjoules the estimate took, where something read them; null in the unmetered form (quantum-ops section 3.5), beside energy_unmetered. An unlabelled 0 is the legacy form of the unmetered statement, sealed before that form: never a figure of zero joules."
                                },
                                "receipt_hash": {
                                  "type": "string"
                                },
                                "signer_pubkey": {
                                  "type": "string"
                                },
                                "energy_unmetered": {
                                  "type": "string",
                                  "description": "The unmetered form (quantum-ops section 3.5): why nothing read the estimate's energy, inside the signature. Every receipt an estimate is sealed with now carries it."
                                },
                                "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"
                      },
                      "clock": {
                        "anyOf": [
                          {
                            "const": "steps"
                          },
                          {
                            "type": "object",
                            "required": [
                              "reaction_us"
                            ],
                            "properties": {
                              "reaction_us": {
                                "type": "number",
                                "exclusiveMaximum": 1000000000,
                                "exclusiveMinimum": 0
                              }
                            },
                            "additionalProperties": false
                          }
                        ],
                        "description": "How long a Toffoli takes: steps (the default: three logical steps of d cycles), or the reaction-limited clock, a Toffoli one tick of the control system's reaction time in µs, its Clifford fixups teleported away, with enough factories to keep up."
                      },
                      "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."
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "repair_qasm",
          "title": "Repair a quantum program on its flagged lines",
          "description": "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.",
          "inputSchema": {
            "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."
              }
            }
          },
          "outputSchema": {
            "$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"
                        ]
                      },
                      "layer": {
                        "enum": [
                          "unchecked",
                          "physical_consistency",
                          "samples",
                          "agreement",
                          "random_states",
                          "certificate",
                          "reading",
                          "pass_equivalence",
                          "stabilizer",
                          "exact_simulation"
                        ],
                        "description": "The layer that decided the intents: the weakest of the checks' layers, and unchecked when an intent was not decided or none was given. Absent from a verdict sealed before layers were named."
                      },
                      "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"
                                  ],
                                  "description": "The outcomes sampled that the stated distribution gives probability 0: the first 64, in order."
                                },
                                "smallest_expected": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "impossible_outcomes": {
                                  "type": "integer",
                                  "description": "How many outcomes sampled the stated distribution gives probability 0."
                                }
                              },
                              "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",
                                "expectation",
                                "outcomes",
                                "conserves",
                                "counts",
                                "agrees",
                                "landscape"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "note": {
                              "type": "string"
                            },
                            "said": {
                              "type": "string",
                              "description": "An energy-landscape job's own word: solved, missed, failed or unchecked."
                            },
                            "seed": {
                              "type": "integer"
                            },
                            "alpha": {
                              "type": "number"
                            },
                            "layer": {
                              "enum": [
                                "unchecked",
                                "physical_consistency",
                                "samples",
                                "agreement",
                                "random_states",
                                "certificate",
                                "reading",
                                "pass_equivalence",
                                "stabilizer",
                                "exact_simulation"
                              ],
                              "description": "The layer the check stands on: unchecked when it was not decided."
                            },
                            "shots": {
                              "type": "integer"
                            },
                            "value": {
                              "type": "number",
                              "description": "An expectation intent: the observable's exact value on the program's state."
                            },
                            "counts": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "integer"
                              }
                            },
                            "limits": {
                              "type": "string",
                              "description": "What that layer does not show."
                            },
                            "method": {
                              "type": "string",
                              "description": "A sampled intent: the method the samples were run by."
                            },
                            "outcome": {
                              "enum": [
                                "holds",
                                "fails",
                                "unchecked"
                              ]
                            },
                            "outside": {
                              "type": "number",
                              "description": "An outcomes or a conserves intent: how much lies outside, as probability of the exact distribution or as a fraction of the samples."
                            },
                            "samples": {
                              "type": "integer",
                              "description": "An outcomes or a conserves intent checked on the job's counts: how many samples."
                            },
                            "distance": {
                              "type": "number"
                            },
                            "expected": {
                              "type": "number",
                              "description": "An expectation intent: the value the intent states."
                            },
                            "outcomes": {
                              "type": "integer",
                              "description": "The outcomes the distribution holds, or the samples' distinct outcomes."
                            },
                            "strength": {
                              "enum": [
                                "proof",
                                "evidence",
                                "none"
                              ]
                            },
                            "tolerance": {
                              "type": "number"
                            },
                            "observable": {
                              "type": "string",
                              "description": "An expectation intent: the observable."
                            },
                            "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, how it was made, the layer it stands on and that layer's limits."
                        }
                      },
                      "limits": {
                        "type": "string",
                        "description": "What that layer does not show."
                      },
                      "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, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof; and the layer that decided it, with that layer's limits. 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), and layer names what decided them: exact simulation, a stabilizer check, checked rewrites, the answer held to its problem's own checks, agreement of the run's samples with a simulation, samples held to a distribution, physical consistency, random states, or unchecked. 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"
                        ]
                      },
                      "layer": {
                        "enum": [
                          "unchecked",
                          "physical_consistency",
                          "samples",
                          "agreement",
                          "random_states",
                          "certificate",
                          "reading",
                          "pass_equivalence",
                          "stabilizer",
                          "exact_simulation"
                        ],
                        "description": "The layer that decided the intents: the weakest of the checks' layers, and unchecked when an intent was not decided or none was given. Absent from a verdict sealed before layers were named."
                      },
                      "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"
                                  ],
                                  "description": "The outcomes sampled that the stated distribution gives probability 0: the first 64, in order."
                                },
                                "smallest_expected": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "impossible_outcomes": {
                                  "type": "integer",
                                  "description": "How many outcomes sampled the stated distribution gives probability 0."
                                }
                              },
                              "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",
                                "expectation",
                                "outcomes",
                                "conserves",
                                "counts",
                                "agrees",
                                "landscape"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "note": {
                              "type": "string"
                            },
                            "said": {
                              "type": "string",
                              "description": "An energy-landscape job's own word: solved, missed, failed or unchecked."
                            },
                            "seed": {
                              "type": "integer"
                            },
                            "alpha": {
                              "type": "number"
                            },
                            "layer": {
                              "enum": [
                                "unchecked",
                                "physical_consistency",
                                "samples",
                                "agreement",
                                "random_states",
                                "certificate",
                                "reading",
                                "pass_equivalence",
                                "stabilizer",
                                "exact_simulation"
                              ],
                              "description": "The layer the check stands on: unchecked when it was not decided."
                            },
                            "shots": {
                              "type": "integer"
                            },
                            "value": {
                              "type": "number",
                              "description": "An expectation intent: the observable's exact value on the program's state."
                            },
                            "counts": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "integer"
                              }
                            },
                            "limits": {
                              "type": "string",
                              "description": "What that layer does not show."
                            },
                            "method": {
                              "type": "string",
                              "description": "A sampled intent: the method the samples were run by."
                            },
                            "outcome": {
                              "enum": [
                                "holds",
                                "fails",
                                "unchecked"
                              ]
                            },
                            "outside": {
                              "type": "number",
                              "description": "An outcomes or a conserves intent: how much lies outside, as probability of the exact distribution or as a fraction of the samples."
                            },
                            "samples": {
                              "type": "integer",
                              "description": "An outcomes or a conserves intent checked on the job's counts: how many samples."
                            },
                            "distance": {
                              "type": "number"
                            },
                            "expected": {
                              "type": "number",
                              "description": "An expectation intent: the value the intent states."
                            },
                            "outcomes": {
                              "type": "integer",
                              "description": "The outcomes the distribution holds, or the samples' distinct outcomes."
                            },
                            "strength": {
                              "enum": [
                                "proof",
                                "evidence",
                                "none"
                              ]
                            },
                            "tolerance": {
                              "type": "number"
                            },
                            "observable": {
                              "type": "string",
                              "description": "An expectation intent: the observable."
                            },
                            "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, how it was made, the layer it stands on and that layer's limits."
                        }
                      },
                      "limits": {
                        "type": "string",
                        "description": "What that layer does not show."
                      },
                      "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, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof; and the layer that decided it, with that layer's limits. 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), and layer names what decided them: exact simulation, a stabilizer check, checked rewrites, the answer held to its problem's own checks, agreement of the run's samples with a simulation, samples held to a distribution, physical consistency, random states, or unchecked. 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."
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "quantum_service_info",
          "title": "What the quantum service can do",
          "description": "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).",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "outputSchema": {
            "$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
                  },
                  "write": {
                    "type": "object",
                    "description": "Whether the service writes programs for tasks (write_circuit, POST /v1/write): with a model, the model as a transcript names it once it is loaded, where the writer stands and a write's limits; without one, why.",
                    "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"
                        },
                        "max_qubits_by_encoding": {
                          "type": "object",
                          "description": "statevector_compact: the most qubits each encoding holds in one job's memory.",
                          "additionalProperties": {
                            "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."
                  },
                  "components": {
                    "type": "object",
                    "required": [
                      "format",
                      "engine",
                      "methods",
                      "passes",
                      "channels",
                      "front_ends",
                      "registered"
                    ],
                    "properties": {
                      "engine": {
                        "type": "object",
                        "required": [
                          "name",
                          "version"
                        ],
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "version": {
                            "type": "string"
                          }
                        }
                      },
                      "format": {
                        "const": "wai.quantum.components/1"
                      },
                      "passes": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "kind",
                            "name",
                            "version",
                            "digest",
                            "origin",
                            "descriptor"
                          ],
                          "properties": {
                            "kind": {
                              "enum": [
                                "method",
                                "pass",
                                "channel",
                                "front_end"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "digest": {
                              "type": "string",
                              "pattern": "^[0-9a-f]{64}$",
                              "description": "BLAKE3 of the component's descriptor in its canonical JSON (engine::registry::digest_of)."
                            },
                            "origin": {
                              "enum": [
                                "built-in",
                                "registered"
                              ],
                              "description": "built-in: the engine's own; registered: a host's own, added in its process, not part of the engine."
                            },
                            "version": {
                              "type": "string"
                            },
                            "certified": {
                              "const": false,
                              "description": "Beside a registered component: the engine does not certify it."
                            },
                            "descriptor": {
                              "type": "object",
                              "required": [
                                "declared"
                              ],
                              "description": "What the component declares of itself, as hashed into its digest: what it declares (declared) and what the engine reads of it (a method's accuracy classes, whether it models noise, where auto tries it; a pass's gates taken and given and its check; a channel's arity, placement and parameters; a format's title, extensions and profiles)."
                            }
                          }
                        }
                      },
                      "methods": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "kind",
                            "name",
                            "version",
                            "digest",
                            "origin",
                            "descriptor"
                          ],
                          "properties": {
                            "kind": {
                              "enum": [
                                "method",
                                "pass",
                                "channel",
                                "front_end"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "digest": {
                              "type": "string",
                              "pattern": "^[0-9a-f]{64}$",
                              "description": "BLAKE3 of the component's descriptor in its canonical JSON (engine::registry::digest_of)."
                            },
                            "origin": {
                              "enum": [
                                "built-in",
                                "registered"
                              ],
                              "description": "built-in: the engine's own; registered: a host's own, added in its process, not part of the engine."
                            },
                            "version": {
                              "type": "string"
                            },
                            "certified": {
                              "const": false,
                              "description": "Beside a registered component: the engine does not certify it."
                            },
                            "descriptor": {
                              "type": "object",
                              "required": [
                                "declared"
                              ],
                              "description": "What the component declares of itself, as hashed into its digest: what it declares (declared) and what the engine reads of it (a method's accuracy classes, whether it models noise, where auto tries it; a pass's gates taken and given and its check; a channel's arity, placement and parameters; a format's title, extensions and profiles)."
                            }
                          }
                        }
                      },
                      "channels": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "kind",
                            "name",
                            "version",
                            "digest",
                            "origin",
                            "descriptor"
                          ],
                          "properties": {
                            "kind": {
                              "enum": [
                                "method",
                                "pass",
                                "channel",
                                "front_end"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "digest": {
                              "type": "string",
                              "pattern": "^[0-9a-f]{64}$",
                              "description": "BLAKE3 of the component's descriptor in its canonical JSON (engine::registry::digest_of)."
                            },
                            "origin": {
                              "enum": [
                                "built-in",
                                "registered"
                              ],
                              "description": "built-in: the engine's own; registered: a host's own, added in its process, not part of the engine."
                            },
                            "version": {
                              "type": "string"
                            },
                            "certified": {
                              "const": false,
                              "description": "Beside a registered component: the engine does not certify it."
                            },
                            "descriptor": {
                              "type": "object",
                              "required": [
                                "declared"
                              ],
                              "description": "What the component declares of itself, as hashed into its digest: what it declares (declared) and what the engine reads of it (a method's accuracy classes, whether it models noise, where auto tries it; a pass's gates taken and given and its check; a channel's arity, placement and parameters; a format's title, extensions and profiles)."
                            }
                          }
                        }
                      },
                      "front_ends": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "kind",
                            "name",
                            "version",
                            "digest",
                            "origin",
                            "descriptor"
                          ],
                          "properties": {
                            "kind": {
                              "enum": [
                                "method",
                                "pass",
                                "channel",
                                "front_end"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "digest": {
                              "type": "string",
                              "pattern": "^[0-9a-f]{64}$",
                              "description": "BLAKE3 of the component's descriptor in its canonical JSON (engine::registry::digest_of)."
                            },
                            "origin": {
                              "enum": [
                                "built-in",
                                "registered"
                              ],
                              "description": "built-in: the engine's own; registered: a host's own, added in its process, not part of the engine."
                            },
                            "version": {
                              "type": "string"
                            },
                            "certified": {
                              "const": false,
                              "description": "Beside a registered component: the engine does not certify it."
                            },
                            "descriptor": {
                              "type": "object",
                              "required": [
                                "declared"
                              ],
                              "description": "What the component declares of itself, as hashed into its digest: what it declares (declared) and what the engine reads of it (a method's accuracy classes, whether it models noise, where auto tries it; a pass's gates taken and given and its check; a channel's arity, placement and parameters; a format's title, extensions and profiles)."
                            }
                          }
                        }
                      },
                      "registered": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "How many are registered (a host's own); 0 for the built-ins alone."
                      }
                    },
                    "description": "Every component the service runs through (the built-ins alone), each with its identity: what list_components gives."
                  },
                  "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."
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "qasm_diagnostics",
          "title": "The reader's diagnostic codes",
          "description": "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.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "One code, as Q103 or J011."
              }
            }
          },
          "outputSchema": {
            "$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."
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "list_components",
          "title": "List the engine's components",
          "description": "Every component the service plans, runs, compiles and converts through: the simulation methods, the compiler passes, the noise channels and the program formats, each with its version, its origin and the BLAKE3 digest of its descriptor, which is the identity a result is sealed with. The service runs the built-ins alone and never loads a component from a request.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "outputSchema": {
            "$id": "wai-quantum://schemas/list_components/1",
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "format",
                  "engine",
                  "methods",
                  "passes",
                  "channels",
                  "front_ends",
                  "registered"
                ],
                "properties": {
                  "engine": {
                    "type": "object",
                    "required": [
                      "name",
                      "version"
                    ],
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "version": {
                        "type": "string"
                      }
                    }
                  },
                  "format": {
                    "const": "wai.quantum.components/1"
                  },
                  "passes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "kind",
                        "name",
                        "version",
                        "digest",
                        "origin",
                        "descriptor"
                      ],
                      "properties": {
                        "kind": {
                          "enum": [
                            "method",
                            "pass",
                            "channel",
                            "front_end"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "digest": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$",
                          "description": "BLAKE3 of the component's descriptor in its canonical JSON (engine::registry::digest_of)."
                        },
                        "origin": {
                          "enum": [
                            "built-in",
                            "registered"
                          ],
                          "description": "built-in: the engine's own; registered: a host's own, added in its process, not part of the engine."
                        },
                        "version": {
                          "type": "string"
                        },
                        "certified": {
                          "const": false,
                          "description": "Beside a registered component: the engine does not certify it."
                        },
                        "descriptor": {
                          "type": "object",
                          "required": [
                            "declared"
                          ],
                          "description": "What the component declares of itself, as hashed into its digest: what it declares (declared) and what the engine reads of it (a method's accuracy classes, whether it models noise, where auto tries it; a pass's gates taken and given and its check; a channel's arity, placement and parameters; a format's title, extensions and profiles)."
                        }
                      }
                    }
                  },
                  "methods": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "kind",
                        "name",
                        "version",
                        "digest",
                        "origin",
                        "descriptor"
                      ],
                      "properties": {
                        "kind": {
                          "enum": [
                            "method",
                            "pass",
                            "channel",
                            "front_end"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "digest": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$",
                          "description": "BLAKE3 of the component's descriptor in its canonical JSON (engine::registry::digest_of)."
                        },
                        "origin": {
                          "enum": [
                            "built-in",
                            "registered"
                          ],
                          "description": "built-in: the engine's own; registered: a host's own, added in its process, not part of the engine."
                        },
                        "version": {
                          "type": "string"
                        },
                        "certified": {
                          "const": false,
                          "description": "Beside a registered component: the engine does not certify it."
                        },
                        "descriptor": {
                          "type": "object",
                          "required": [
                            "declared"
                          ],
                          "description": "What the component declares of itself, as hashed into its digest: what it declares (declared) and what the engine reads of it (a method's accuracy classes, whether it models noise, where auto tries it; a pass's gates taken and given and its check; a channel's arity, placement and parameters; a format's title, extensions and profiles)."
                        }
                      }
                    }
                  },
                  "channels": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "kind",
                        "name",
                        "version",
                        "digest",
                        "origin",
                        "descriptor"
                      ],
                      "properties": {
                        "kind": {
                          "enum": [
                            "method",
                            "pass",
                            "channel",
                            "front_end"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "digest": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$",
                          "description": "BLAKE3 of the component's descriptor in its canonical JSON (engine::registry::digest_of)."
                        },
                        "origin": {
                          "enum": [
                            "built-in",
                            "registered"
                          ],
                          "description": "built-in: the engine's own; registered: a host's own, added in its process, not part of the engine."
                        },
                        "version": {
                          "type": "string"
                        },
                        "certified": {
                          "const": false,
                          "description": "Beside a registered component: the engine does not certify it."
                        },
                        "descriptor": {
                          "type": "object",
                          "required": [
                            "declared"
                          ],
                          "description": "What the component declares of itself, as hashed into its digest: what it declares (declared) and what the engine reads of it (a method's accuracy classes, whether it models noise, where auto tries it; a pass's gates taken and given and its check; a channel's arity, placement and parameters; a format's title, extensions and profiles)."
                        }
                      }
                    }
                  },
                  "front_ends": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "kind",
                        "name",
                        "version",
                        "digest",
                        "origin",
                        "descriptor"
                      ],
                      "properties": {
                        "kind": {
                          "enum": [
                            "method",
                            "pass",
                            "channel",
                            "front_end"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "digest": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$",
                          "description": "BLAKE3 of the component's descriptor in its canonical JSON (engine::registry::digest_of)."
                        },
                        "origin": {
                          "enum": [
                            "built-in",
                            "registered"
                          ],
                          "description": "built-in: the engine's own; registered: a host's own, added in its process, not part of the engine."
                        },
                        "version": {
                          "type": "string"
                        },
                        "certified": {
                          "const": false,
                          "description": "Beside a registered component: the engine does not certify it."
                        },
                        "descriptor": {
                          "type": "object",
                          "required": [
                            "declared"
                          ],
                          "description": "What the component declares of itself, as hashed into its digest: what it declares (declared) and what the engine reads of it (a method's accuracy classes, whether it models noise, where auto tries it; a pass's gates taken and given and its check; a channel's arity, placement and parameters; a format's title, extensions and profiles)."
                        }
                      }
                    }
                  },
                  "registered": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "How many are registered (a host's own); 0 for the built-ins alone."
                  }
                },
                "description": "Every component the engine plans, runs, compiles and converts through (engine::registry::Registry::components): the simulation methods, the compiler passes, the noise channels and the program formats, each in the registry's order with its identity and its descriptor. The command line, both MCP servers and the job service serve the built-ins 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"
                    ]
                  }
                },
                "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": "Every component the engine plans, runs, compiles and converts through (engine::registry::Registry::components): the simulation methods, the compiler passes, the noise channels and the program formats, each in the registry's order with its identity and its descriptor. The command line, both MCP servers and the job service serve the built-ins alone."
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "list_targets",
          "title": "List the device targets",
          "description": "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.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "outputSchema": {
            "$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
                                  },
                                  "leakage": {
                                    "type": "number",
                                    "maximum": 1,
                                    "minimum": 0,
                                    "description": "Of the error, the chance the gate leaves a qubit outside its two levels."
                                  },
                                  "coherent": {
                                    "type": "object",
                                    "required": [
                                      "theta_rad",
                                      "phi_rad"
                                    ],
                                    "properties": {
                                      "phi_rad": {
                                        "type": "number",
                                        "maximum": 3.141592653589793,
                                        "minimum": -3.141592653589793,
                                        "description": "The difference in its conditional phase, radians."
                                      },
                                      "theta_rad": {
                                        "type": "number",
                                        "maximum": 3.141592653589793,
                                        "minimum": -3.141592653589793,
                                        "description": "The difference in its exchange (swap) angle, radians."
                                      }
                                    },
                                    "description": "A two-qubit gate's coherent error: the angles by which the gate it runs differs from the one it is meant to be, read as an exchange-and-phase gate.",
                                    "additionalProperties": false
                                  },
                                  "error_sd": {
                                    "type": "number",
                                    "maximum": 1,
                                    "minimum": 0,
                                    "description": "One standard deviation of the error, as the source states it."
                                  },
                                  "any_angle": {
                                    "const": true,
                                    "description": "A two-qubit zz the device runs at any angle, so that an angle between two qubits is one gate of that angle rather than two of the fully entangling one. Written only when true."
                                  },
                                  "duration_ns": {
                                    "type": "number",
                                    "minimum": 0,
                                    "description": "Nanoseconds."
                                  },
                                  "angle_errors": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "angle_rad",
                                        "error"
                                      ],
                                      "properties": {
                                        "error": {
                                          "type": "number",
                                          "maximum": 1,
                                          "minimum": 0,
                                          "description": "The average gate infidelity at that angle."
                                        },
                                        "angle_rad": {
                                          "type": "number",
                                          "maximum": 1.5707963267948966,
                                          "minimum": 0,
                                          "description": "The angle θ of exp(−iθ/2·Z⊗Z) (OpenQASM's rzz(θ)), radians: π/2 is the fully entangling gate."
                                        }
                                      },
                                      "additionalProperties": false
                                    },
                                    "minItems": 1,
                                    "description": "Of a zz the device runs at any angle, its error at each angle it was benchmarked at, sorted by angle, each angle once. A gate of an angle between two listed is costed by the straight line between them, one outside them at the nearest; its stated leakage keeps its share of the error."
                                  }
                                },
                                "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
                                  },
                                  "resonator": {
                                    "const": true,
                                    "description": "A computational resonator, not a qubit: a qubit's state is moved into it (move, listed on the qubit and the resonator) so that a cz on it acts on that state, and moved back out. It takes no one-qubit gate, is never measured and is never paired with another resonator. Written only when true."
                                  },
                                  "measure_ns": {
                                    "type": "number",
                                    "minimum": 0,
                                    "description": "The measurement's duration, nanoseconds."
                                  },
                                  "memory_error": {
                                    "type": "number",
                                    "maximum": 1,
                                    "minimum": 0,
                                    "description": "The average infidelity the qubit takes for each two-qubit layer of a program it waits through (the transport, cooling and idling between a device's layers of gates), as the source's memory benchmark measures it: one layer being a two-qubit gate on random pairs of every qubit."
                                  },
                                  "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."
                            },
                            "crosstalk": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "qubits",
                                  "zz_khz"
                                ],
                                "properties": {
                                  "qubits": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "maxItems": 2,
                                    "minItems": 2,
                                    "description": "The pair, the lower qubit first."
                                  },
                                  "zz_khz": {
                                    "type": "number",
                                    "description": "The shift of one qubit's frequency when the other holds 1 rather than 0, both idle, kilohertz; it may be negative."
                                  }
                                },
                                "additionalProperties": false
                              },
                              "description": "The static ZZ interaction between pairs of qubits, sorted by pair, each once. Written only when the source states one."
                            },
                            "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
                            },
                            "layer_fidelity": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "qubits",
                                  "fidelity"
                                ],
                                "properties": {
                                  "qubits": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "minItems": 2,
                                    "description": "The chain, in its order: each qubit coupled to the next."
                                  },
                                  "fidelity": {
                                    "type": "number",
                                    "maximum": 1,
                                    "minimum": 0,
                                    "description": "The fidelity of every two-qubit gate along the chain, run in two layers between random one-qubit gates on every qubit: the product of the layers' process fidelities."
                                  }
                                },
                                "additionalProperties": false
                              },
                              "description": "Layered benchmarks the source measured, sorted by the chain's length, then its qubits. Written only when the source states one."
                            }
                          },
                          "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."
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "show_target",
          "title": "Show a device target",
          "description": "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "target"
            ],
            "properties": {
              "view": {
                "type": "boolean"
              },
              "target": {
                "description": "A built-in target's name, or a target document."
              }
            }
          },
          "outputSchema": {
            "$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
                            },
                            "leakage": {
                              "type": "number",
                              "maximum": 1,
                              "minimum": 0,
                              "description": "Of the error, the chance the gate leaves a qubit outside its two levels."
                            },
                            "coherent": {
                              "type": "object",
                              "required": [
                                "theta_rad",
                                "phi_rad"
                              ],
                              "properties": {
                                "phi_rad": {
                                  "type": "number",
                                  "maximum": 3.141592653589793,
                                  "minimum": -3.141592653589793,
                                  "description": "The difference in its conditional phase, radians."
                                },
                                "theta_rad": {
                                  "type": "number",
                                  "maximum": 3.141592653589793,
                                  "minimum": -3.141592653589793,
                                  "description": "The difference in its exchange (swap) angle, radians."
                                }
                              },
                              "description": "A two-qubit gate's coherent error: the angles by which the gate it runs differs from the one it is meant to be, read as an exchange-and-phase gate.",
                              "additionalProperties": false
                            },
                            "error_sd": {
                              "type": "number",
                              "maximum": 1,
                              "minimum": 0,
                              "description": "One standard deviation of the error, as the source states it."
                            },
                            "any_angle": {
                              "const": true,
                              "description": "A two-qubit zz the device runs at any angle, so that an angle between two qubits is one gate of that angle rather than two of the fully entangling one. Written only when true."
                            },
                            "duration_ns": {
                              "type": "number",
                              "minimum": 0,
                              "description": "Nanoseconds."
                            },
                            "angle_errors": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "angle_rad",
                                  "error"
                                ],
                                "properties": {
                                  "error": {
                                    "type": "number",
                                    "maximum": 1,
                                    "minimum": 0,
                                    "description": "The average gate infidelity at that angle."
                                  },
                                  "angle_rad": {
                                    "type": "number",
                                    "maximum": 1.5707963267948966,
                                    "minimum": 0,
                                    "description": "The angle θ of exp(−iθ/2·Z⊗Z) (OpenQASM's rzz(θ)), radians: π/2 is the fully entangling gate."
                                  }
                                },
                                "additionalProperties": false
                              },
                              "minItems": 1,
                              "description": "Of a zz the device runs at any angle, its error at each angle it was benchmarked at, sorted by angle, each angle once. A gate of an angle between two listed is costed by the straight line between them, one outside them at the nearest; its stated leakage keeps its share of the error."
                            }
                          },
                          "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
                            },
                            "resonator": {
                              "const": true,
                              "description": "A computational resonator, not a qubit: a qubit's state is moved into it (move, listed on the qubit and the resonator) so that a cz on it acts on that state, and moved back out. It takes no one-qubit gate, is never measured and is never paired with another resonator. Written only when true."
                            },
                            "measure_ns": {
                              "type": "number",
                              "minimum": 0,
                              "description": "The measurement's duration, nanoseconds."
                            },
                            "memory_error": {
                              "type": "number",
                              "maximum": 1,
                              "minimum": 0,
                              "description": "The average infidelity the qubit takes for each two-qubit layer of a program it waits through (the transport, cooling and idling between a device's layers of gates), as the source's memory benchmark measures it: one layer being a two-qubit gate on random pairs of every qubit."
                            },
                            "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."
                      },
                      "crosstalk": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "qubits",
                            "zz_khz"
                          ],
                          "properties": {
                            "qubits": {
                              "type": "array",
                              "items": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "maxItems": 2,
                              "minItems": 2,
                              "description": "The pair, the lower qubit first."
                            },
                            "zz_khz": {
                              "type": "number",
                              "description": "The shift of one qubit's frequency when the other holds 1 rather than 0, both idle, kilohertz; it may be negative."
                            }
                          },
                          "additionalProperties": false
                        },
                        "description": "The static ZZ interaction between pairs of qubits, sorted by pair, each once. Written only when the source states one."
                      },
                      "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
                      },
                      "layer_fidelity": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "qubits",
                            "fidelity"
                          ],
                          "properties": {
                            "qubits": {
                              "type": "array",
                              "items": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "minItems": 2,
                              "description": "The chain, in its order: each qubit coupled to the next."
                            },
                            "fidelity": {
                              "type": "number",
                              "maximum": 1,
                              "minimum": 0,
                              "description": "The fidelity of every two-qubit gate along the chain, run in two layers between random one-qubit gates on every qubit: the product of the layers' process fidelities."
                            }
                          },
                          "additionalProperties": false
                        },
                        "description": "Layered benchmarks the source measured, sorted by the chain's length, then its qubits. Written only when the source states one."
                      }
                    },
                    "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."
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "run_on_target",
          "title": "Run a program as a device would",
          "description": "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, and like it, each call is a new job unless it gives idempotency_key.",
          "inputSchema": {
            "type": "object",
            "anyOf": [
              {
                "required": [
                  "qasm"
                ]
              },
              {
                "required": [
                  "source"
                ]
              }
            ],
            "required": [
              "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)."
              },
              "pulse": {
                "type": "object",
                "properties": {
                  "dt_ns": {
                    "type": "number",
                    "maximum": 1000,
                    "description": "The sample period, ns (default 0.5).",
                    "exclusiveMinimum": 0
                  },
                  "ports": {
                    "type": "object",
                    "description": "Ports by name: what each is for and the qubit it reaches.",
                    "additionalProperties": {
                      "type": "object",
                      "required": [
                        "kind",
                        "qubit"
                      ],
                      "properties": {
                        "kind": {
                          "enum": [
                            "drive",
                            "measure",
                            "acquire"
                          ]
                        },
                        "qubit": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "levels": {
                    "enum": [
                      2,
                      3
                    ],
                    "type": "integer",
                    "description": "Levels kept per qubit (default 2; 3 shows leakage)."
                  },
                  "qubits": {
                    "type": "object",
                    "description": "Each qubit's parameters by its index, over the target's and the defaults.",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "t1_us": {
                          "type": "number",
                          "description": "Its relaxation time, µs."
                        },
                        "t2_us": {
                          "type": "number",
                          "description": "Its coherence time, µs (at most 2·T1)."
                        },
                        "rabi_mhz": {
                          "type": "number",
                          "description": "Its Rabi frequency at full amplitude, MHz."
                        },
                        "frequency_ghz": {
                          "type": "number",
                          "description": "Its frequency, GHz."
                        },
                        "anharmonicity_mhz": {
                          "type": "number",
                          "description": "Its anharmonicity, MHz."
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "substeps": {
                    "type": "integer",
                    "maximum": 4096,
                    "minimum": 1,
                    "description": "Steps per sample (default: chosen so each step times the generator's norm is at most 0.5)."
                  },
                  "couplings": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "qubits",
                        "zz_khz"
                      ],
                      "properties": {
                        "qubits": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "maxItems": 2,
                          "minItems": 2
                        },
                        "zz_khz": {
                          "type": "number",
                          "description": "The coupling's rate, kHz."
                        }
                      },
                      "additionalProperties": false
                    },
                    "description": "Static ZZ couplings."
                  },
                  "tolerance": {
                    "type": "number",
                    "description": "The most the stated error may be (default 1e-6): a run whose bound and rounding estimate pass it is refused, naming the steps that would meet it.",
                    "exclusiveMaximum": 1,
                    "exclusiveMinimum": 0
                  }
                },
                "description": "A pulse run's options (method \"pulse\"): the sample period, the levels kept, the tolerance on the stated error, the steps a sample is divided into, each qubit's parameters, static couplings, and ports beyond the names d0, m0, a0.",
                "additionalProperties": false
              },
              "shots": {
                "type": "integer",
                "maximum": 1000000,
                "minimum": 0,
                "description": "Measurement shots. Default 1024 when no observables or amplitudes are asked for."
              },
              "fabric": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "maxItems": 64,
                    "minItems": 2
                  }
                ],
                "description": "Where the statevector method's state runs: auto (the default: on a member only where the committed measurements show it faster than the host's CPU for the job's size and fusion, otherwise the CPU), cpu, accelerator (any certified accelerator member), a member's id or key, or a list of members, a power of two of them, the state split by its top qubits into one partition on each; a pauli job's sum of terms runs on the member accelerator or its id or key names. Every member placed is certified bit-exact against the CPU, so the answers are the CPU's; the result's `fabric` names where the state ran, sealed by the receipt. A placement the service cannot honour is refused (J013): it places only on its CPU."
              },
              "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."
              },
              "params": {
                "type": "object",
                "description": "A value for each of the program's parameters (input float theta;, input angle phi;), as {\"theta\": 0.3}: bound exactly before the program is read; a parameter left without one is refused (J050). In a sweep, the parameters it fixes.",
                "additionalProperties": {
                  "type": "number"
                }
              },
              "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."
              },
              "source": {
                "type": "object",
                "required": [
                  "format"
                ],
                "properties": {
                  "format": {
                    "enum": [
                      "qasm",
                      "qir",
                      "jeff"
                    ],
                    "type": "string",
                    "description": "Its format."
                  },
                  "program": {
                    "type": "string",
                    "description": "The program's text: QIR (LLVM text) or OpenQASM."
                  },
                  "program_base64": {
                    "type": "string",
                    "description": "The program's bytes as base64: jeff."
                  }
                },
                "description": "The program in another format, in place of qasm: read to the job's qasm before the job is read (a module that does not read is refused with the reader's code, Q700 to Q721), the request keeping its source."
              },
              "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",
                      "cz",
                      "zz",
                      "xx"
                    ],
                    "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; cz, zz or xx: one-qubit gates around a device basis's own two-qubit gate (cz, rzz or rxx at an angle from 0 to π/2), each pair's block around at most three of it, 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, and with basis clifford_t each region of CNOT and phase gates written again with fewer T gates (phase_resynth). Above 0, the output is the best of this level's and every lower level's on the basis's objective (clifford_t: the fewest T gates, then CNOTs, then gates), and the certificate's guard records the comparison."
                  },
                  "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."
                  },
                  "passes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Passes to run after the level's, by name (list_components lists them): phase_resynth writes each region of CNOT and phase gates again with fewer T gates, at any level, each region proved in integers."
                  },
                  "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), controls (statevector and exact), trajectories."
              },
              "contract": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "max_cost": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "properties": {
                      "amount": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "An amount in decimals: digits, and optionally a point and digits, at most 64 characters."
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "description": "The most a provider's estimate of the run may come to, before it runs: it bounds the estimate, not the charge, which is stated after the run beside it (kept.cost). A route with an unknown cost, an estimate that is only the least it can come to, or a price in another currency does not meet it: nothing is converted.",
                    "additionalProperties": false
                  },
                  "exactness": {
                    "enum": [
                      "bit-exact",
                      "exact",
                      "single",
                      "bounded",
                      "estimate",
                      "heuristic",
                      "measured",
                      "simulated",
                      "any",
                      null
                    ],
                    "description": "The class wanted. Without it, the job keeps the class auto would give: auto's pick stands while it meets the rest of the contract, and only a route at least as exact may take its place. A device's counts are in no classical class: measured wants a processor's, simulated a provider's simulator's that its provider does not state is approximate, and any takes every route."
                  },
                  "providers": {
                    "enum": [
                      "never",
                      "allowed",
                      null
                    ],
                    "description": "Whether a route may be one of the person's providers. never is the default, given or not: a job that names a provider under a contract that does not allow one is refused (J070), and a host asks no provider anything under it. A host that reaches none (the job service) lists none. A provider that costs money is chosen only under max_cost, or when the job names it, and still runs only on the person's word for that route and its estimate."
                  },
                  "max_joules": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "The most energy it may take, held by a live reading while it runs: at the ceiling the run is stopped, gives no answer, and its receipt says so. A route nothing here can read and stop does not meet it, so on a host that reads none every route is rejected. An estimate can refuse a job clearly past it, and promises nothing.",
                    "exclusiveMinimum": 0
                  },
                  "deadline_seconds": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "When it must be done by, in seconds from when it starts. A route whose time is not known does not meet it. A host that can stop a run stops it there (J074); otherwise the result says whether it was kept.",
                    "exclusiveMinimum": 0
                  }
                },
                "description": "What the job wants of an answer (wai/extensions/quantum-providers.md section 8.7). Every route the host can see is priced with what is really known, those that cannot meet this are rejected, the cheapest of the rest runs, and the reasoning is sealed in the result as `planner`. Nothing falls back in silence, and a job no route can meet is refused (J071). A job without it plans as it always has, byte for byte. Refused on a set (J073).",
                "additionalProperties": false
              },
              "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."
              },
              "idempotency_key": {
                "type": "string",
                "pattern": "^[!#-\\[\\]-~]+$",
                "maxLength": 255,
                "minLength": 1,
                "description": "A key of your making that names this run, so that a call sent again is not a second job: the same key with the same arguments answers with the job it names, for as long as the job is kept, rather than running another; the same key with other arguments is refused (J034). Make it unguessable (a UUID). A job the service interrupted is run again under its key. Without a key, every call is a new job."
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 256214
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false
          }
        },
        {
          "name": "quantum_circuit_examples",
          "title": "Ready-to-run quantum examples",
          "description": "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.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "outputSchema": {
            "truncated": true,
            "chars": 26491
          },
          "annotations": {
            "readOnlyHint": true
          }
        },
        {
          "name": "qec_code",
          "title": "Show an error-correcting code and certify its distance",
          "description": "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.",
          "inputSchema": {
            "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."
              }
            }
          },
          "outputSchema": {
            "$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",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The signing key, 32 bytes in lower-case hex."
                              },
                              "time": {
                                "type": "object",
                                "required": [
                                  "issued_ms"
                                ],
                                "properties": {
                                  "issued_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 0
                                  },
                                  "not_after_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "description": "The first moment the receipt is no longer offered: after issued_ms."
                                  }
                                },
                                "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).",
                                "additionalProperties": false
                              },
                              "canon": {
                                "const": "rfc8785",
                                "description": "The canonical form the digest is taken over."
                              },
                              "digest": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The digest signed, 32 bytes in lower-case hex."
                              },
                              "signature": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{128}$",
                                "maxLength": 128,
                                "minLength": 128,
                                "description": "The signature, 64 bytes in lower-case 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) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks."
                          },
                          "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",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The signing key, 32 bytes in lower-case hex."
                              },
                              "time": {
                                "type": "object",
                                "required": [
                                  "issued_ms"
                                ],
                                "properties": {
                                  "issued_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 0
                                  },
                                  "not_after_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "description": "The first moment the receipt is no longer offered: after issued_ms."
                                  }
                                },
                                "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).",
                                "additionalProperties": false
                              },
                              "canon": {
                                "const": "rfc8785",
                                "description": "The canonical form the digest is taken over."
                              },
                              "digest": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The digest signed, 32 bytes in lower-case hex."
                              },
                              "signature": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{128}$",
                                "maxLength": 128,
                                "minLength": 128,
                                "description": "The signature, 64 bytes in lower-case 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) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks."
                          },
                          "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"
                            ]
                          },
                          "curves": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            },
                            "description": "bb: each code's curve as quantum_qldpc::run_curve gives it (wai.quantum.qldpc.curve/1), without its timing: both bases at each rate, their detection and prediction digests, and the curve's digest over all of it."
                          },
                          "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"
                                },
                                "code": {
                                  "type": "string",
                                  "description": "bb: the code."
                                },
                                "rate": {
                                  "type": "number"
                                },
                                "shots": {
                                  "type": "integer"
                                },
                                "digest": {
                                  "type": "string",
                                  "description": "bb: the point's digest, BLAKE3 over its compact JSON text without the digest."
                                },
                                "rounds": {
                                  "type": "integer"
                                },
                                "stderr": {
                                  "type": "number"
                                },
                                "distance": {
                                  "type": "integer"
                                },
                                "failures": {
                                  "type": "integer"
                                },
                                "per_round": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "per_round_95": {
                                  "type": "array",
                                  "items": {
                                    "type": "number"
                                  },
                                  "description": "bb: the 95% Wilson interval of the rate a cycle."
                                },
                                "x_basis_failures": {
                                  "type": "integer",
                                  "description": "bb: failures of the X-basis memory (Z-type faults)."
                                },
                                "z_basis_failures": {
                                  "type": "integer",
                                  "description": "bb: failures of the Z-basis memory (X-type faults)."
                                }
                              }
                            }
                          },
                          "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",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The signing key, 32 bytes in lower-case hex."
                              },
                              "time": {
                                "type": "object",
                                "required": [
                                  "issued_ms"
                                ],
                                "properties": {
                                  "issued_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 0
                                  },
                                  "not_after_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "description": "The first moment the receipt is no longer offered: after issued_ms."
                                  }
                                },
                                "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).",
                                "additionalProperties": false
                              },
                              "canon": {
                                "const": "rfc8785",
                                "description": "The canonical form the digest is taken over."
                              },
                              "digest": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The digest signed, 32 bytes in lower-case hex."
                              },
                              "signature": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{128}$",
                                "maxLength": 128,
                                "minLength": 128,
                                "description": "The signature, 64 bytes in lower-case 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) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks."
                          },
                          "settings": {
                            "type": "object",
                            "description": "bb: every setting of the decoder, named (quantum_qldpc::DecoderSpec)."
                          },
                          "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."
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "qec_decode",
          "title": "Decode a syndrome or a circuit's detectors",
          "description": "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, 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), or, on the model whole with its hyperedges, relay_bp (belief propagation with disordered memory, relayed leg to leg), bp_lsd (belief propagation, then clusters grown by its marginals and solved by elimination), mwpf (the minimum-weight parity factor with its dual bound: settled when the correction is proven a lightest explanation) or astar (the lightest explanation by A* search; settled when exact), each with `settings`. Sealed with the service's key.",
          "inputSchema": {
            "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",
                  "bp_lsd",
                  "mwpf",
                  "astar"
                ],
                "type": "string",
                "description": "The decoder (default: matching, or color for a colour code, relay_bp for a bivariate-bicycle code)."
              },
              "settings": {
                "type": "object",
                "description": "At circuit level, relay_bp, bp_lsd, mwpf and astar: the decoder's settings (relay_bp: gamma0, gamma_min, gamma_max, first_iterations, leg_iterations, legs, solutions, seed; bp_lsd: bp_iterations, scaling, order; mwpf: exhaustive, order; astar: max_nodes, beam); each not given takes its default."
              },
              "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."
              }
            }
          },
          "outputSchema": {
            "$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",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The signing key, 32 bytes in lower-case hex."
                              },
                              "time": {
                                "type": "object",
                                "required": [
                                  "issued_ms"
                                ],
                                "properties": {
                                  "issued_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 0
                                  },
                                  "not_after_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "description": "The first moment the receipt is no longer offered: after issued_ms."
                                  }
                                },
                                "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).",
                                "additionalProperties": false
                              },
                              "canon": {
                                "const": "rfc8785",
                                "description": "The canonical form the digest is taken over."
                              },
                              "digest": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The digest signed, 32 bytes in lower-case hex."
                              },
                              "signature": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{128}$",
                                "maxLength": 128,
                                "minLength": 128,
                                "description": "The signature, 64 bytes in lower-case 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) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks."
                          },
                          "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",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The signing key, 32 bytes in lower-case hex."
                              },
                              "time": {
                                "type": "object",
                                "required": [
                                  "issued_ms"
                                ],
                                "properties": {
                                  "issued_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 0
                                  },
                                  "not_after_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "description": "The first moment the receipt is no longer offered: after issued_ms."
                                  }
                                },
                                "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).",
                                "additionalProperties": false
                              },
                              "canon": {
                                "const": "rfc8785",
                                "description": "The canonical form the digest is taken over."
                              },
                              "digest": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The digest signed, 32 bytes in lower-case hex."
                              },
                              "signature": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{128}$",
                                "maxLength": 128,
                                "minLength": 128,
                                "description": "The signature, 64 bytes in lower-case 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) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks."
                          },
                          "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"
                            ]
                          },
                          "curves": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            },
                            "description": "bb: each code's curve as quantum_qldpc::run_curve gives it (wai.quantum.qldpc.curve/1), without its timing: both bases at each rate, their detection and prediction digests, and the curve's digest over all of it."
                          },
                          "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"
                                },
                                "code": {
                                  "type": "string",
                                  "description": "bb: the code."
                                },
                                "rate": {
                                  "type": "number"
                                },
                                "shots": {
                                  "type": "integer"
                                },
                                "digest": {
                                  "type": "string",
                                  "description": "bb: the point's digest, BLAKE3 over its compact JSON text without the digest."
                                },
                                "rounds": {
                                  "type": "integer"
                                },
                                "stderr": {
                                  "type": "number"
                                },
                                "distance": {
                                  "type": "integer"
                                },
                                "failures": {
                                  "type": "integer"
                                },
                                "per_round": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "per_round_95": {
                                  "type": "array",
                                  "items": {
                                    "type": "number"
                                  },
                                  "description": "bb: the 95% Wilson interval of the rate a cycle."
                                },
                                "x_basis_failures": {
                                  "type": "integer",
                                  "description": "bb: failures of the X-basis memory (Z-type faults)."
                                },
                                "z_basis_failures": {
                                  "type": "integer",
                                  "description": "bb: failures of the Z-basis memory (X-type faults)."
                                }
                              }
                            }
                          },
                          "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",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The signing key, 32 bytes in lower-case hex."
                              },
                              "time": {
                                "type": "object",
                                "required": [
                                  "issued_ms"
                                ],
                                "properties": {
                                  "issued_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 0
                                  },
                                  "not_after_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "description": "The first moment the receipt is no longer offered: after issued_ms."
                                  }
                                },
                                "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).",
                                "additionalProperties": false
                              },
                              "canon": {
                                "const": "rfc8785",
                                "description": "The canonical form the digest is taken over."
                              },
                              "digest": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The digest signed, 32 bytes in lower-case hex."
                              },
                              "signature": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{128}$",
                                "maxLength": 128,
                                "minLength": 128,
                                "description": "The signature, 64 bytes in lower-case 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) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks."
                          },
                          "settings": {
                            "type": "object",
                            "description": "bb: every setting of the decoder, named (quantum_qldpc::DecoderSpec)."
                          },
                          "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."
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "qec_threshold",
          "title": "Measure logical failure rates over distances",
          "description": "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, or bb: bivariate-bicycle memories at circuit level (`codes`, `cycles`, decoders bp_osd, relay_bp, bp_lsd, mwpf or astar with `settings`), both bases paired shot by shot, each point's rate a cycle with its Wilson interval and each curve's digests. 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.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "p": {
                "type": "array",
                "items": {
                  "type": "number",
                  "maximum": 0.5,
                  "minimum": 0
                },
                "description": "Physical error rates."
              },
              "seed": {
                "type": "integer",
                "minimum": 0
              },
              "codes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "bb: the codes (bb:72, bb:90, bb:108, bb:144 or gross, bb:288; default bb:72)."
              },
              "shots": {
                "type": "integer",
                "minimum": 1,
                "description": "Shots at each point (default 10000)."
              },
              "cycles": {
                "type": "integer",
                "minimum": 1,
                "description": "bb: noisy syndrome cycles (default each code's distance)."
              },
              "family": {
                "enum": [
                  "surface",
                  "color",
                  "toric",
                  "surface_capacity",
                  "bb"
                ],
                "type": "string",
                "description": "surface (circuit level, the default), a code at code capacity, or bb (bivariate-bicycle memories at circuit level)."
              },
              "rounds": {
                "type": "integer",
                "minimum": 1,
                "description": "surface: rounds (default the distance)."
              },
              "decoder": {
                "enum": [
                  "matching",
                  "correlated",
                  "union_find",
                  "bp_osd",
                  "relay_bp",
                  "bp_lsd",
                  "mwpf",
                  "astar"
                ],
                "type": "string",
                "description": "surface: matching (the default), correlated or union_find; bb: bp_osd, relay_bp (the default), bp_lsd, mwpf or astar."
              },
              "settings": {
                "type": "object",
                "description": "bb: the decoder's settings."
              },
              "distances": {
                "type": "array",
                "items": {
                  "type": "integer"
                },
                "description": "Odd distances (default 3, 5, 7)."
              }
            }
          },
          "outputSchema": {
            "$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",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The signing key, 32 bytes in lower-case hex."
                              },
                              "time": {
                                "type": "object",
                                "required": [
                                  "issued_ms"
                                ],
                                "properties": {
                                  "issued_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 0
                                  },
                                  "not_after_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "description": "The first moment the receipt is no longer offered: after issued_ms."
                                  }
                                },
                                "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).",
                                "additionalProperties": false
                              },
                              "canon": {
                                "const": "rfc8785",
                                "description": "The canonical form the digest is taken over."
                              },
                              "digest": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The digest signed, 32 bytes in lower-case hex."
                              },
                              "signature": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{128}$",
                                "maxLength": 128,
                                "minLength": 128,
                                "description": "The signature, 64 bytes in lower-case 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) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks."
                          },
                          "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",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The signing key, 32 bytes in lower-case hex."
                              },
                              "time": {
                                "type": "object",
                                "required": [
                                  "issued_ms"
                                ],
                                "properties": {
                                  "issued_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 0
                                  },
                                  "not_after_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "description": "The first moment the receipt is no longer offered: after issued_ms."
                                  }
                                },
                                "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).",
                                "additionalProperties": false
                              },
                              "canon": {
                                "const": "rfc8785",
                                "description": "The canonical form the digest is taken over."
                              },
                              "digest": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The digest signed, 32 bytes in lower-case hex."
                              },
                              "signature": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{128}$",
                                "maxLength": 128,
                                "minLength": 128,
                                "description": "The signature, 64 bytes in lower-case 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) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks."
                          },
                          "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"
                            ]
                          },
                          "curves": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            },
                            "description": "bb: each code's curve as quantum_qldpc::run_curve gives it (wai.quantum.qldpc.curve/1), without its timing: both bases at each rate, their detection and prediction digests, and the curve's digest over all of it."
                          },
                          "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"
                                },
                                "code": {
                                  "type": "string",
                                  "description": "bb: the code."
                                },
                                "rate": {
                                  "type": "number"
                                },
                                "shots": {
                                  "type": "integer"
                                },
                                "digest": {
                                  "type": "string",
                                  "description": "bb: the point's digest, BLAKE3 over its compact JSON text without the digest."
                                },
                                "rounds": {
                                  "type": "integer"
                                },
                                "stderr": {
                                  "type": "number"
                                },
                                "distance": {
                                  "type": "integer"
                                },
                                "failures": {
                                  "type": "integer"
                                },
                                "per_round": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "per_round_95": {
                                  "type": "array",
                                  "items": {
                                    "type": "number"
                                  },
                                  "description": "bb: the 95% Wilson interval of the rate a cycle."
                                },
                                "x_basis_failures": {
                                  "type": "integer",
                                  "description": "bb: failures of the X-basis memory (Z-type faults)."
                                },
                                "z_basis_failures": {
                                  "type": "integer",
                                  "description": "bb: failures of the Z-basis memory (X-type faults)."
                                }
                              }
                            }
                          },
                          "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",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The signing key, 32 bytes in lower-case hex."
                              },
                              "time": {
                                "type": "object",
                                "required": [
                                  "issued_ms"
                                ],
                                "properties": {
                                  "issued_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 0
                                  },
                                  "not_after_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "description": "The first moment the receipt is no longer offered: after issued_ms."
                                  }
                                },
                                "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).",
                                "additionalProperties": false
                              },
                              "canon": {
                                "const": "rfc8785",
                                "description": "The canonical form the digest is taken over."
                              },
                              "digest": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The digest signed, 32 bytes in lower-case hex."
                              },
                              "signature": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{128}$",
                                "maxLength": 128,
                                "minLength": 128,
                                "description": "The signature, 64 bytes in lower-case 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) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks."
                          },
                          "settings": {
                            "type": "object",
                            "description": "bb: every setting of the decoder, named (quantum_qldpc::DecoderSpec)."
                          },
                          "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."
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "pulse_schedule",
          "title": "Read a pulse program into its schedule",
          "description": "Read a pulse program (OpenPulse calibrations: ports, frames, waveforms, play, delay, shift_phase, set_phase, shift_frequency, set_frequency, captures and barriers) into its schedule on frames: every instruction at its sample, each waveform's samples (gaussian, drag, gaussian_square, constant, sech, sine, or explicit), each gate call with the samples its calibration spans, and the digests a pulse run's receipt binds (the program, its calibrations, the schedule). Durations are whole samples of dt (pulse.dt_ns, default 0.5 ns) or refused. A construct the reader does not take is refused with a Q code and its line. Sealed with the service's key. To run it, give the program to run_quantum_circuit with method \"pulse\".",
          "inputSchema": {
            "type": "object",
            "required": [
              "qasm"
            ],
            "properties": {
              "qasm": {
                "type": "string",
                "description": "A pulse program: OpenQASM 3 with `defcalgrammar \"openpulse\";`, `cal` blocks declaring ports (d0 drives qubit 0, m0 is its measurement port, a0 its acquisition port), frames (newframe(port, frequency Hz, phase)) and waveforms, a `defcal` for every gate it calls on physical qubits ($0), and the calls."
              },
              "pulse": {
                "type": "object",
                "properties": {
                  "dt_ns": {
                    "type": "number",
                    "maximum": 1000,
                    "description": "The sample period, ns (default 0.5).",
                    "exclusiveMinimum": 0
                  },
                  "ports": {
                    "type": "object",
                    "description": "Ports by name: what each is for and the qubit it reaches.",
                    "additionalProperties": {
                      "type": "object",
                      "required": [
                        "kind",
                        "qubit"
                      ],
                      "properties": {
                        "kind": {
                          "enum": [
                            "drive",
                            "measure",
                            "acquire"
                          ]
                        },
                        "qubit": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "levels": {
                    "enum": [
                      2,
                      3
                    ],
                    "type": "integer",
                    "description": "Levels kept per qubit (default 2; 3 shows leakage)."
                  },
                  "qubits": {
                    "type": "object",
                    "description": "Each qubit's parameters by its index, over the target's and the defaults.",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "t1_us": {
                          "type": "number",
                          "description": "Its relaxation time, µs."
                        },
                        "t2_us": {
                          "type": "number",
                          "description": "Its coherence time, µs (at most 2·T1)."
                        },
                        "rabi_mhz": {
                          "type": "number",
                          "description": "Its Rabi frequency at full amplitude, MHz."
                        },
                        "frequency_ghz": {
                          "type": "number",
                          "description": "Its frequency, GHz."
                        },
                        "anharmonicity_mhz": {
                          "type": "number",
                          "description": "Its anharmonicity, MHz."
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "substeps": {
                    "type": "integer",
                    "maximum": 4096,
                    "minimum": 1,
                    "description": "Steps per sample (default: chosen so each step times the generator's norm is at most 0.5)."
                  },
                  "couplings": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "qubits",
                        "zz_khz"
                      ],
                      "properties": {
                        "qubits": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "maxItems": 2,
                          "minItems": 2
                        },
                        "zz_khz": {
                          "type": "number",
                          "description": "The coupling's rate, kHz."
                        }
                      },
                      "additionalProperties": false
                    },
                    "description": "Static ZZ couplings."
                  },
                  "tolerance": {
                    "type": "number",
                    "description": "The most the stated error may be (default 1e-6): a run whose bound and rounding estimate pass it is refused, naming the steps that would meet it.",
                    "exclusiveMaximum": 1,
                    "exclusiveMinimum": 0
                  }
                },
                "description": "A pulse run's options (method \"pulse\"): the sample period, the levels kept, the tolerance on the stated error, the steps a sample is divided into, each qubit's parameters, static couplings, and ports beyond the names d0, m0, a0.",
                "additionalProperties": false
              }
            }
          },
          "outputSchema": {
            "$id": "wai-quantum://schemas/pulse_schedule/1",
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "title": "wai.quantum.pulse/1",
                "required": [
                  "request",
                  "result"
                ],
                "properties": {
                  "result": {
                    "anyOf": [
                      {
                        "type": "object",
                        "required": [
                          "answer",
                          "dt_ns",
                          "duration",
                          "frames",
                          "waveforms",
                          "instructions",
                          "calls",
                          "calibration"
                        ],
                        "properties": {
                          "bits": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "calls": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "end": {
                                  "type": "integer"
                                },
                                "line": {
                                  "type": "integer"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "start": {
                                  "type": "integer"
                                },
                                "params": {
                                  "type": "array",
                                  "items": {
                                    "type": "number"
                                  }
                                },
                                "qubits": {
                                  "type": "array",
                                  "items": {
                                    "type": "integer"
                                  }
                                }
                              }
                            }
                          },
                          "dt_ns": {
                            "type": "number",
                            "description": "The sample period, ns."
                          },
                          "ports": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "enum": [
                                    "drive",
                                    "measure",
                                    "acquire"
                                  ]
                                },
                                "name": {
                                  "type": "string"
                                },
                                "qubit": {
                                  "type": "integer"
                                }
                              }
                            }
                          },
                          "answer": {
                            "const": "schedule"
                          },
                          "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."
                          },
                          "frames": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "enum": [
                                    "drive",
                                    "measure",
                                    "acquire"
                                  ]
                                },
                                "name": {
                                  "type": "string"
                                },
                                "port": {
                                  "type": "string"
                                },
                                "phase": {
                                  "type": "number"
                                },
                                "qubit": {
                                  "type": "integer"
                                },
                                "frequency_hz": {
                                  "type": "number"
                                }
                              }
                            }
                          },
                          "qubits": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            }
                          },
                          "schema": {
                            "const": "wai.quantum.pulse/1"
                          },
                          "grammar": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "receipt": {
                            "type": "object",
                            "title": "wai.quantum.receipt/2",
                            "required": [
                              "alg",
                              "canon",
                              "key",
                              "digest",
                              "signature"
                            ],
                            "properties": {
                              "alg": {
                                "const": "ed25519"
                              },
                              "key": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The signing key, 32 bytes in lower-case hex."
                              },
                              "time": {
                                "type": "object",
                                "required": [
                                  "issued_ms"
                                ],
                                "properties": {
                                  "issued_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 0
                                  },
                                  "not_after_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "description": "The first moment the receipt is no longer offered: after issued_ms."
                                  }
                                },
                                "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).",
                                "additionalProperties": false
                              },
                              "canon": {
                                "const": "rfc8785",
                                "description": "The canonical form the digest is taken over."
                              },
                              "digest": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The digest signed, 32 bytes in lower-case hex."
                              },
                              "signature": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{128}$",
                                "maxLength": 128,
                                "minLength": 128,
                                "description": "The signature, 64 bytes in lower-case 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) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks."
                          },
                          "duration": {
                            "type": "integer",
                            "description": "The latest time of any frame, samples."
                          },
                          "decimated": {
                            "type": "string"
                          },
                          "waveforms": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "length": {
                                  "type": "integer"
                                },
                                "samples": {
                                  "type": "array",
                                  "items": {
                                    "type": "array",
                                    "items": {
                                      "type": "number"
                                    },
                                    "maxItems": 2,
                                    "minItems": 2
                                  }
                                },
                                "samples_every": {
                                  "type": "integer",
                                  "description": "Each k-th sample is drawn, when the schedule holds more than the view writes out."
                                }
                              }
                            }
                          },
                          "calibration": {
                            "type": "object",
                            "required": [
                              "program",
                              "calibrations",
                              "schedule"
                            ],
                            "properties": {
                              "device": {
                                "type": "string"
                              },
                              "target": {
                                "type": "object",
                                "properties": {
                                  "hash": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "calibration": {
                                    "type": "object"
                                  }
                                }
                              },
                              "program": {
                                "type": "string"
                              },
                              "schedule": {
                                "type": "string"
                              },
                              "calibrations": {
                                "type": "string"
                              }
                            },
                            "description": "What a pulse run's receipt binds of the program: the BLAKE3 of the control program's text, of its calibrations as written (every cal, defcal and defcalgrammar, joined by newlines), and of the schedule's JSON; a run adds the device's and the target snapshot's."
                          },
                          "diagnostics": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "line": {
                                  "type": "integer"
                                },
                                "column": {
                                  "type": "integer"
                                },
                                "length": {
                                  "type": "integer"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "outcome": {
                                  "type": "string"
                                }
                              },
                              "description": "A reader's note or warning (qasm::diag)."
                            }
                          },
                          "duration_ns": {
                            "type": "number"
                          },
                          "instructions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "frame",
                                "op",
                                "start",
                                "length"
                              ],
                              "properties": {
                                "op": {
                                  "enum": [
                                    "play",
                                    "delay",
                                    "shift_phase",
                                    "set_phase",
                                    "shift_frequency",
                                    "set_frequency",
                                    "capture",
                                    "barrier"
                                  ]
                                },
                                "bit": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "line": {
                                  "type": "integer"
                                },
                                "frame": {
                                  "type": "integer"
                                },
                                "phase": {
                                  "type": "number"
                                },
                                "start": {
                                  "type": "integer"
                                },
                                "value": {
                                  "type": "number"
                                },
                                "length": {
                                  "type": "integer"
                                },
                                "carrier": {
                                  "type": "number",
                                  "description": "The carrier's phase at the play's first sample, cycles in [0, 1)."
                                },
                                "waveform": {
                                  "type": "integer"
                                },
                                "frequency_hz": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        "description": "A pulse program's schedule (pulse_schedule, wai-quantum pulse schedule, POST /v1/pulse/schedule): its frames and ports, every instruction at its sample, each waveform's samples, the gate calls, the reader's notes, and the digests a run binds."
                      },
                      {
                        "type": "object",
                        "required": [
                          "answer",
                          "verified",
                          "signature",
                          "program",
                          "reproduced",
                          "differences",
                          "statement"
                        ],
                        "properties": {
                          "key": {},
                          "answer": {
                            "const": "check"
                          },
                          "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.pulse/1"
                          },
                          "program": {
                            "type": "boolean"
                          },
                          "receipt": {
                            "type": "object",
                            "title": "wai.quantum.receipt/2",
                            "required": [
                              "alg",
                              "canon",
                              "key",
                              "digest",
                              "signature"
                            ],
                            "properties": {
                              "alg": {
                                "const": "ed25519"
                              },
                              "key": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The signing key, 32 bytes in lower-case hex."
                              },
                              "time": {
                                "type": "object",
                                "required": [
                                  "issued_ms"
                                ],
                                "properties": {
                                  "issued_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 0
                                  },
                                  "not_after_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "description": "The first moment the receipt is no longer offered: after issued_ms."
                                  }
                                },
                                "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).",
                                "additionalProperties": false
                              },
                              "canon": {
                                "const": "rfc8785",
                                "description": "The canonical form the digest is taken over."
                              },
                              "digest": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The digest signed, 32 bytes in lower-case hex."
                              },
                              "signature": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{128}$",
                                "maxLength": 128,
                                "minLength": 128,
                                "description": "The signature, 64 bytes in lower-case 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) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks."
                          },
                          "verified": {
                            "type": "boolean"
                          },
                          "signature": {
                            "type": "boolean"
                          },
                          "statement": {
                            "type": "string"
                          },
                          "reproduced": {
                            "type": "boolean"
                          },
                          "calibration": {},
                          "differences": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Each field (or field.member) whose value differs from the run here."
                          },
                          "density_hash": {
                            "type": "object",
                            "properties": {
                              "given": {},
                              "recomputed": {}
                            }
                          }
                        },
                        "description": "A pulse job checked (pulse_check, wai-quantum pulse check, POST /v1/pulse/check): its receipt's signature, its program's digest, and the request run again with the result held to the one given."
                      }
                    ],
                    "description": "A schedule or a check, with its receipt."
                  },
                  "request": {
                    "type": "object",
                    "description": "The call's request, as given."
                  }
                },
                "description": "A pulse answer as every host gives it (engine::pulse: pulse_schedule and pulse_check on both servers, wai-quantum pulse, POST /v1/pulse/*, the Studio): the request, and the result sealed in a job's form. A pulse program's schedule on frames, or a pulse job checked by running it again. A pulse run itself is a job (method pulse) and follows job-result.v1.json. A result names the engine that made it and this schema (engine and schema). docs/pulse.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": "A pulse answer as every host gives it (engine::pulse: pulse_schedule and pulse_check on both servers, wai-quantum pulse, POST /v1/pulse/*, the Studio): the request, and the result sealed in a job's form. A pulse program's schedule on frames, or a pulse job checked by running it again. A pulse run itself is a job (method pulse) and follows job-result.v1.json. A result names the engine that made it and this schema (engine and schema). docs/pulse.md explains each."
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "pulse_check",
          "title": "Check a pulse run by running it again",
          "description": "Check a pulse job as a host returned it ({\"request\", \"result\"}, the result with its receipt): the receipt's signature, the program's digest against the request's text, and the request run again here with the result held to the one given field by field (the density matrix's digest among them), each difference named. A pulse run is the same bits on every platform, so a result that does not reproduce was not made from that request by this engine. Sealed with the service's key. Quote `verified` and the statement.",
          "inputSchema": {
            "type": "object",
            "required": [
              "request",
              "result"
            ],
            "properties": {
              "result": {
                "type": "object",
                "description": "Its result, with its receipt."
              },
              "request": {
                "type": "object",
                "description": "The pulse job's request."
              }
            }
          },
          "outputSchema": {
            "$id": "wai-quantum://schemas/pulse_check/1",
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "title": "wai.quantum.pulse/1",
                "required": [
                  "request",
                  "result"
                ],
                "properties": {
                  "result": {
                    "anyOf": [
                      {
                        "type": "object",
                        "required": [
                          "answer",
                          "dt_ns",
                          "duration",
                          "frames",
                          "waveforms",
                          "instructions",
                          "calls",
                          "calibration"
                        ],
                        "properties": {
                          "bits": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "calls": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "end": {
                                  "type": "integer"
                                },
                                "line": {
                                  "type": "integer"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "start": {
                                  "type": "integer"
                                },
                                "params": {
                                  "type": "array",
                                  "items": {
                                    "type": "number"
                                  }
                                },
                                "qubits": {
                                  "type": "array",
                                  "items": {
                                    "type": "integer"
                                  }
                                }
                              }
                            }
                          },
                          "dt_ns": {
                            "type": "number",
                            "description": "The sample period, ns."
                          },
                          "ports": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "enum": [
                                    "drive",
                                    "measure",
                                    "acquire"
                                  ]
                                },
                                "name": {
                                  "type": "string"
                                },
                                "qubit": {
                                  "type": "integer"
                                }
                              }
                            }
                          },
                          "answer": {
                            "const": "schedule"
                          },
                          "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."
                          },
                          "frames": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "enum": [
                                    "drive",
                                    "measure",
                                    "acquire"
                                  ]
                                },
                                "name": {
                                  "type": "string"
                                },
                                "port": {
                                  "type": "string"
                                },
                                "phase": {
                                  "type": "number"
                                },
                                "qubit": {
                                  "type": "integer"
                                },
                                "frequency_hz": {
                                  "type": "number"
                                }
                              }
                            }
                          },
                          "qubits": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            }
                          },
                          "schema": {
                            "const": "wai.quantum.pulse/1"
                          },
                          "grammar": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "receipt": {
                            "type": "object",
                            "title": "wai.quantum.receipt/2",
                            "required": [
                              "alg",
                              "canon",
                              "key",
                              "digest",
                              "signature"
                            ],
                            "properties": {
                              "alg": {
                                "const": "ed25519"
                              },
                              "key": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The signing key, 32 bytes in lower-case hex."
                              },
                              "time": {
                                "type": "object",
                                "required": [
                                  "issued_ms"
                                ],
                                "properties": {
                                  "issued_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 0
                                  },
                                  "not_after_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "description": "The first moment the receipt is no longer offered: after issued_ms."
                                  }
                                },
                                "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).",
                                "additionalProperties": false
                              },
                              "canon": {
                                "const": "rfc8785",
                                "description": "The canonical form the digest is taken over."
                              },
                              "digest": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The digest signed, 32 bytes in lower-case hex."
                              },
                              "signature": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{128}$",
                                "maxLength": 128,
                                "minLength": 128,
                                "description": "The signature, 64 bytes in lower-case 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) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks."
                          },
                          "duration": {
                            "type": "integer",
                            "description": "The latest time of any frame, samples."
                          },
                          "decimated": {
                            "type": "string"
                          },
                          "waveforms": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "length": {
                                  "type": "integer"
                                },
                                "samples": {
                                  "type": "array",
                                  "items": {
                                    "type": "array",
                                    "items": {
                                      "type": "number"
                                    },
                                    "maxItems": 2,
                                    "minItems": 2
                                  }
                                },
                                "samples_every": {
                                  "type": "integer",
                                  "description": "Each k-th sample is drawn, when the schedule holds more than the view writes out."
                                }
                              }
                            }
                          },
                          "calibration": {
                            "type": "object",
                            "required": [
                              "program",
                              "calibrations",
                              "schedule"
                            ],
                            "properties": {
                              "device": {
                                "type": "string"
                              },
                              "target": {
                                "type": "object",
                                "properties": {
                                  "hash": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "calibration": {
                                    "type": "object"
                                  }
                                }
                              },
                              "program": {
                                "type": "string"
                              },
                              "schedule": {
                                "type": "string"
                              },
                              "calibrations": {
                                "type": "string"
                              }
                            },
                            "description": "What a pulse run's receipt binds of the program: the BLAKE3 of the control program's text, of its calibrations as written (every cal, defcal and defcalgrammar, joined by newlines), and of the schedule's JSON; a run adds the device's and the target snapshot's."
                          },
                          "diagnostics": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "line": {
                                  "type": "integer"
                                },
                                "column": {
                                  "type": "integer"
                                },
                                "length": {
                                  "type": "integer"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "outcome": {
                                  "type": "string"
                                }
                              },
                              "description": "A reader's note or warning (qasm::diag)."
                            }
                          },
                          "duration_ns": {
                            "type": "number"
                          },
                          "instructions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "frame",
                                "op",
                                "start",
                                "length"
                              ],
                              "properties": {
                                "op": {
                                  "enum": [
                                    "play",
                                    "delay",
                                    "shift_phase",
                                    "set_phase",
                                    "shift_frequency",
                                    "set_frequency",
                                    "capture",
                                    "barrier"
                                  ]
                                },
                                "bit": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "line": {
                                  "type": "integer"
                                },
                                "frame": {
                                  "type": "integer"
                                },
                                "phase": {
                                  "type": "number"
                                },
                                "start": {
                                  "type": "integer"
                                },
                                "value": {
                                  "type": "number"
                                },
                                "length": {
                                  "type": "integer"
                                },
                                "carrier": {
                                  "type": "number",
                                  "description": "The carrier's phase at the play's first sample, cycles in [0, 1)."
                                },
                                "waveform": {
                                  "type": "integer"
                                },
                                "frequency_hz": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        "description": "A pulse program's schedule (pulse_schedule, wai-quantum pulse schedule, POST /v1/pulse/schedule): its frames and ports, every instruction at its sample, each waveform's samples, the gate calls, the reader's notes, and the digests a run binds."
                      },
                      {
                        "type": "object",
                        "required": [
                          "answer",
                          "verified",
                          "signature",
                          "program",
                          "reproduced",
                          "differences",
                          "statement"
                        ],
                        "properties": {
                          "key": {},
                          "answer": {
                            "const": "check"
                          },
                          "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.pulse/1"
                          },
                          "program": {
                            "type": "boolean"
                          },
                          "receipt": {
                            "type": "object",
                            "title": "wai.quantum.receipt/2",
                            "required": [
                              "alg",
                              "canon",
                              "key",
                              "digest",
                              "signature"
                            ],
                            "properties": {
                              "alg": {
                                "const": "ed25519"
                              },
                              "key": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The signing key, 32 bytes in lower-case hex."
                              },
                              "time": {
                                "type": "object",
                                "required": [
                                  "issued_ms"
                                ],
                                "properties": {
                                  "issued_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 0
                                  },
                                  "not_after_ms": {
                                    "type": "integer",
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "description": "The first moment the receipt is no longer offered: after issued_ms."
                                  }
                                },
                                "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).",
                                "additionalProperties": false
                              },
                              "canon": {
                                "const": "rfc8785",
                                "description": "The canonical form the digest is taken over."
                              },
                              "digest": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$",
                                "maxLength": 64,
                                "minLength": 64,
                                "description": "The digest signed, 32 bytes in lower-case hex."
                              },
                              "signature": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{128}$",
                                "maxLength": 128,
                                "minLength": 128,
                                "description": "The signature, 64 bytes in lower-case 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) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks."
                          },
                          "verified": {
                            "type": "boolean"
                          },
                          "signature": {
                            "type": "boolean"
                          },
                          "statement": {
                            "type": "string"
                          },
                          "reproduced": {
                            "type": "boolean"
                          },
                          "calibration": {},
                          "differences": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Each field (or field.member) whose value differs from the run here."
                          },
                          "density_hash": {
                            "type": "object",
                            "properties": {
                              "given": {},
                              "recomputed": {}
                            }
                          }
                        },
                        "description": "A pulse job checked (pulse_check, wai-quantum pulse check, POST /v1/pulse/check): its receipt's signature, its program's digest, and the request run again with the result held to the one given."
                      }
                    ],
                    "description": "A schedule or a check, with its receipt."
                  },
                  "request": {
                    "type": "object",
                    "description": "The call's request, as given."
                  }
                },
                "description": "A pulse answer as every host gives it (engine::pulse: pulse_schedule and pulse_check on both servers, wai-quantum pulse, POST /v1/pulse/*, the Studio): the request, and the result sealed in a job's form. A pulse program's schedule on frames, or a pulse job checked by running it again. A pulse run itself is a job (method pulse) and follows job-result.v1.json. A result names the engine that made it and this schema (engine and schema). docs/pulse.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": "A pulse answer as every host gives it (engine::pulse: pulse_schedule and pulse_check on both servers, wai-quantum pulse, POST /v1/pulse/*, the Studio): the request, and the result sealed in a job's form. A pulse program's schedule on frames, or a pulse job checked by running it again. A pulse run itself is a job (method pulse) and follows job-result.v1.json. A result names the engine that made it and this schema (engine and schema). docs/pulse.md explains each."
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "gradient_qasm",
          "title": "The exact gradient of a Hamiltonian's expectation by a program's parameters",
          "description": "The expectation E = ⟨ψ|H|ψ⟩ of a Hamiltonian at a program's parameters, and its gradient by each parameter, exactly: by adjoint differentiation or the parameter-shift rule on the double-precision state vector (at most 20 qubits, no noise, measurements only at the end). The reader follows each parameter into the gates, so an argument may be any expression of the built-in functions. The answer states its method, that it is f64 and approximate, and a bound on the rounding of the value and of each component (precision.rounding_bound). Sealed with the service's key. Quote the gradient with its bound.",
          "inputSchema": {
            "type": "object",
            "required": [
              "qasm",
              "params",
              "hamiltonian"
            ],
            "properties": {
              "qasm": {
                "type": "string",
                "description": "The program, OpenQASM 3: its parameters declared `input float theta;` (or `input angle theta;`) and used in gates' arguments, through arithmetic, the built-in functions and gate definitions (not under a modifier, in a variable, a condition or an index: refused with Q129)."
              },
              "params": {
                "type": "object",
                "description": "A value for each parameter, by name, as {\"theta\": 0.3}: bound exactly. Every parameter the program declares needs one (J050).",
                "additionalProperties": {
                  "type": "number"
                }
              },
              "gradient": {
                "enum": [
                  "adjoint",
                  "parameter_shift"
                ],
                "description": "adjoint (the default: one pass forward, one back) or parameter_shift (each gate a parameter moves run at shifted angles: two terms, four for a controlled rotation); both exact up to f64 rounding."
              },
              "hamiltonian": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "required": [
                        "pauli"
                      ],
                      "properties": {
                        "coeff": {
                          "type": "number"
                        },
                        "pauli": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "maxItems": 4096,
                "minItems": 1,
                "description": "A Hamiltonian as Pauli terms summed: \"Z0 Z1\", \"0.5 X2\", \"-1.5\" (a constant), or {\"pauli\": \"Y0 Y1\", \"coeff\": -0.7}; qubit 0 is q[0]."
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 29205
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "optimize_qasm",
          "title": "Minimise a Hamiltonian's expectation over a program's parameters",
          "description": "Minimise E = ⟨ψ|H|ψ⟩ over a program's parameters from the given params, deterministically: gradient descent with a fixed step, Adam, or SPSA from a seeded stream (at most 2000 steps). Every step's parameters and value (and gradient, or SPSA's perturbation and estimate) are listed, each step a link of a digest chain from the request, best and final given; the same request gives the same bytes on every platform. Sealed with the service's key: the receipt binds the program, every step, the method and the seed, and verify_quantum_result (or wai-quantum verify) re-runs it. A minimum found is a minimum along this path, not a proof of the global one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "qasm",
              "params",
              "hamiltonian"
            ],
            "properties": {
              "qasm": {
                "type": "string",
                "description": "The program, OpenQASM 3: its parameters declared `input float theta;` (or `input angle theta;`) and used in gates' arguments, through arithmetic, the built-in functions and gate definitions (not under a modifier, in a variable, a condition or an index: refused with Q129)."
              },
              "seed": {
                "type": "integer",
                "minimum": 0,
                "description": "SPSA's seed (default 1)."
              },
              "steps": {
                "type": "integer",
                "maximum": 2000,
                "minimum": 1,
                "description": "Steps to take (default 100)."
              },
              "params": {
                "type": "object",
                "description": "A value for each parameter, by name, as {\"theta\": 0.3}: bound exactly. Every parameter the program declares needs one (J050).",
                "additionalProperties": {
                  "type": "number"
                }
              },
              "gradient": {
                "enum": [
                  "adjoint",
                  "parameter_shift"
                ],
                "description": "adjoint (the default: one pass forward, one back) or parameter_shift (each gate a parameter moves run at shifted angles: two terms, four for a controlled rotation); both exact up to f64 rounding."
              },
              "optimizer": {
                "anyOf": [
                  {
                    "enum": [
                      "gradient_descent",
                      "adam",
                      "spsa"
                    ]
                  },
                  {
                    "type": "object",
                    "required": [
                      "name"
                    ],
                    "properties": {
                      "A": {
                        "type": "number"
                      },
                      "c": {
                        "type": "number"
                      },
                      "name": {
                        "enum": [
                          "gradient_descent",
                          "adam",
                          "spsa"
                        ]
                      },
                      "alpha": {
                        "type": "number"
                      },
                      "beta1": {
                        "type": "number"
                      },
                      "beta2": {
                        "type": "number"
                      },
                      "gamma": {
                        "type": "number"
                      },
                      "epsilon": {
                        "type": "number"
                      }
                    }
                  }
                ],
                "description": "gradient_descent (θ ← θ − step·∇E), adam (default; beta1, beta2, epsilon), or spsa (two evaluations a step along a ±1 perturbation from the seeded stream; c, A, alpha, gamma)."
              },
              "step_size": {
                "type": "number",
                "description": "The step (gradient descent 0.1, Adam 0.05) or SPSA's gain a (0.2).",
                "exclusiveMinimum": 0
              },
              "hamiltonian": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "required": [
                        "pauli"
                      ],
                      "properties": {
                        "coeff": {
                          "type": "number"
                        },
                        "pauli": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "maxItems": 4096,
                "minItems": 1,
                "description": "A Hamiltonian as Pauli terms summed: \"Z0 Z1\", \"0.5 X2\", \"-1.5\" (a constant), or {\"pauli\": \"Y0 Y1\", \"coeff\": -0.7}; qubit 0 is q[0]."
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 29205
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "vqe_ground_state",
          "title": "Find a Hamiltonian's ground energy by the variational eigensolver",
          "description": "The variational eigensolver: an ansatz (the program given as qasm with params, or ansatz {\"layers\": L}: layers of ry and rz on every qubit and a ring of cx, its parameters t0, t1, … from 0.1) optimised on the Hamiltonian as optimize_qasm does. At most 8 qubits the answer sets the energy found beside the exact ground energy by diagonalisation (reference.ground_energy and gap); the energy found is never below it. Sealed with the service's key. Report the gap: an ansatz that cannot reach the ground state stops above it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "hamiltonian"
            ],
            "properties": {
              "qasm": {
                "type": "string",
                "description": "The program, OpenQASM 3: its parameters declared `input float theta;` (or `input angle theta;`) and used in gates' arguments, through arithmetic, the built-in functions and gate definitions (not under a modifier, in a variable, a condition or an index: refused with Q129)."
              },
              "seed": {
                "type": "integer",
                "minimum": 0,
                "description": "SPSA's seed (default 1)."
              },
              "steps": {
                "type": "integer",
                "maximum": 2000,
                "minimum": 1,
                "description": "Steps to take (default 100)."
              },
              "ansatz": {
                "type": "object",
                "properties": {
                  "layers": {
                    "type": "integer",
                    "maximum": 16,
                    "minimum": 1
                  },
                  "qubits": {
                    "type": "integer",
                    "maximum": 20,
                    "minimum": 1
                  }
                },
                "description": "The built-in ansatz in place of qasm (layers default 2, qubits the Hamiltonian's)."
              },
              "params": {
                "type": "object",
                "description": "A value for each parameter, by name, as {\"theta\": 0.3}: bound exactly. Every parameter the program declares needs one (J050).",
                "additionalProperties": {
                  "type": "number"
                }
              },
              "gradient": {
                "enum": [
                  "adjoint",
                  "parameter_shift"
                ],
                "description": "adjoint (the default: one pass forward, one back) or parameter_shift (each gate a parameter moves run at shifted angles: two terms, four for a controlled rotation); both exact up to f64 rounding."
              },
              "optimizer": {
                "anyOf": [
                  {
                    "enum": [
                      "gradient_descent",
                      "adam",
                      "spsa"
                    ]
                  },
                  {
                    "type": "object",
                    "required": [
                      "name"
                    ],
                    "properties": {
                      "A": {
                        "type": "number"
                      },
                      "c": {
                        "type": "number"
                      },
                      "name": {
                        "enum": [
                          "gradient_descent",
                          "adam",
                          "spsa"
                        ]
                      },
                      "alpha": {
                        "type": "number"
                      },
                      "beta1": {
                        "type": "number"
                      },
                      "beta2": {
                        "type": "number"
                      },
                      "gamma": {
                        "type": "number"
                      },
                      "epsilon": {
                        "type": "number"
                      }
                    }
                  }
                ],
                "description": "gradient_descent (θ ← θ − step·∇E), adam (default; beta1, beta2, epsilon), or spsa (two evaluations a step along a ±1 perturbation from the seeded stream; c, A, alpha, gamma)."
              },
              "step_size": {
                "type": "number",
                "description": "The step (gradient descent 0.1, Adam 0.05) or SPSA's gain a (0.2).",
                "exclusiveMinimum": 0
              },
              "hamiltonian": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "required": [
                        "pauli"
                      ],
                      "properties": {
                        "coeff": {
                          "type": "number"
                        },
                        "pauli": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "maxItems": 4096,
                "minItems": 1,
                "description": "A Hamiltonian as Pauli terms summed: \"Z0 Z1\", \"0.5 X2\", \"-1.5\" (a constant), or {\"pauli\": \"Y0 Y1\", \"coeff\": -0.7}; qubit 0 is q[0]."
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 29208
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "qaoa_maxcut",
          "title": "Solve Max-Cut on a graph by QAOA",
          "description": "Max-Cut by the quantum approximate optimisation algorithm: the program (|+⟩ⁿ, then for each layer rzz(gamma·w) on every edge and rx(2·beta) on every qubit) and its cost Hamiltonian built from the graph (at most 20 vertices, 16 layers), optimised as optimize_qasm does from the params or a linear ramp, and read against the maximum cut found by brute force: the expected cut and its ratio to the maximum, the likeliest assignment and whether it is optimal, and the probability of an optimal one. Sealed with the service's key.",
          "inputSchema": {
            "type": "object",
            "required": [
              "graph"
            ],
            "properties": {
              "seed": {
                "type": "integer",
                "minimum": 0,
                "description": "SPSA's seed (default 1)."
              },
              "graph": {
                "type": "object",
                "required": [
                  "nodes",
                  "edges"
                ],
                "properties": {
                  "edges": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "number"
                      },
                      "maxItems": 3,
                      "minItems": 2
                    },
                    "maxItems": 400,
                    "minItems": 1,
                    "description": "Each edge [i, j] or [i, j, weight]."
                  },
                  "nodes": {
                    "type": "integer",
                    "maximum": 20,
                    "minimum": 2
                  }
                }
              },
              "steps": {
                "type": "integer",
                "maximum": 2000,
                "minimum": 1,
                "description": "Steps to take (default 100)."
              },
              "layers": {
                "type": "integer",
                "maximum": 16,
                "minimum": 1,
                "description": "QAOA's p (default 1)."
              },
              "params": {
                "type": "object",
                "description": "gamma_0, beta_0, … to start from.",
                "additionalProperties": {
                  "type": "number"
                }
              },
              "gradient": {
                "enum": [
                  "adjoint",
                  "parameter_shift"
                ],
                "description": "adjoint (the default: one pass forward, one back) or parameter_shift (each gate a parameter moves run at shifted angles: two terms, four for a controlled rotation); both exact up to f64 rounding."
              },
              "optimizer": {
                "anyOf": [
                  {
                    "enum": [
                      "gradient_descent",
                      "adam",
                      "spsa"
                    ]
                  },
                  {
                    "type": "object",
                    "required": [
                      "name"
                    ],
                    "properties": {
                      "A": {
                        "type": "number"
                      },
                      "c": {
                        "type": "number"
                      },
                      "name": {
                        "enum": [
                          "gradient_descent",
                          "adam",
                          "spsa"
                        ]
                      },
                      "alpha": {
                        "type": "number"
                      },
                      "beta1": {
                        "type": "number"
                      },
                      "beta2": {
                        "type": "number"
                      },
                      "gamma": {
                        "type": "number"
                      },
                      "epsilon": {
                        "type": "number"
                      }
                    }
                  }
                ],
                "description": "gradient_descent (θ ← θ − step·∇E), adam (default; beta1, beta2, epsilon), or spsa (two evaluations a step along a ±1 perturbation from the seeded stream; c, A, alpha, gamma)."
              },
              "step_size": {
                "type": "number",
                "description": "The step (gradient descent 0.1, Adam 0.05) or SPSA's gain a (0.2).",
                "exclusiveMinimum": 0
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 29203
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "build_algorithm",
          "title": "Write the program for a standard algorithm, checked against its reference",
          "description": "An OpenQASM 3 program for a standard algorithm, with how to read its result, what it gives, and the equivalence ladder's verdict on it against a reference matrix or truth table built from the definitions (check: exact on every basis state up to 8 qubits, the adder's up to 16; past that unchecked). qpe: the phase φ of p(2πφ) on counting qubits; amplitude_estimation: the amplitude a that A = ry(2·arcsin √a) gives the good state, by phase estimation of the Grover operator; adder: the ripple-carry adder of bits-bit integers in place (with a and b, prepared and measured); qsvt: quantum signal processing from phases, of a signal x or of a real symmetric 2 × 2 matrix through its block encoding (all phases zero give the Chebyshev polynomial). Sealed with the service's key. Run the program with run_quantum_circuit.",
          "inputSchema": {
            "type": "object",
            "required": [
              "algorithm"
            ],
            "properties": {
              "a": {
                "type": "integer",
                "minimum": 0,
                "description": "adder: the first addend, prepared."
              },
              "b": {
                "type": "integer",
                "minimum": 0,
                "description": "adder: the second, which the sum replaces."
              },
              "x": {
                "type": "number",
                "maximum": 1,
                "minimum": -1,
                "description": "qsvt: the signal."
              },
              "bits": {
                "type": "integer",
                "maximum": 32,
                "minimum": 1,
                "description": "adder: the integers' width."
              },
              "phase": {
                "type": "number",
                "description": "qpe: the phase φ, in turns."
              },
              "matrix": {
                "type": "array",
                "description": "qsvt: [[a, b], [b, c]], real and symmetric, its eigenvalues within [-1, 1]."
              },
              "phases": {
                "type": "array",
                "items": {
                  "type": "number"
                },
                "maxItems": 64,
                "minItems": 2,
                "description": "qsvt: φ₀ … φ_d, radians."
              },
              "carry_in": {
                "type": "boolean",
                "description": "adder: a carry in."
              },
              "counting": {
                "type": "integer",
                "maximum": 20,
                "minimum": 1,
                "description": "qpe, amplitude_estimation: counting qubits (default 4)."
              },
              "algorithm": {
                "enum": [
                  "qpe",
                  "amplitude_estimation",
                  "adder",
                  "qsvt"
                ]
              },
              "amplitude": {
                "type": "number",
                "maximum": 1,
                "minimum": 0,
                "description": "amplitude_estimation: the good state's probability a."
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 29207
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "run_landscape",
          "title": "Run an energy-landscape job",
          "description": "Run an energy-landscape job (wai.quantum.landscape/1): no circuit, but an energy over variables of three states (+, - and 0, where 0 is left out at its own cost), written in epuML, and a state of low energy found by the settling model's reference kernels, a classical emulator, in software. The answer gives the state, its exact energy, every arrangement checked where the program has at most 16 variables (truth, reached), the program's own checks, a verdict (solved, missed, failed or unchecked) with its reason, the work counted, the joules priced at rates measured elsewhere (never metered: say priced), and a replay digest anyone can reproduce. Sealed with the service's key; verify_quantum_receipt checks it, its form included (quantum-landscape §5.4). With \"protocol\": \"wai.quantum.landscape/2\" in the request it runs the second version (a cost for each variable, of either sign, and the constraints exactly and atmost, so colouring and assignment run): its joules are priced at temperature 0 only, and a sampling run's are stated unpriced, with why and no figure. Nothing here is a quantum effect. Quote the verdict and the numbers; a program refused is refused with its line.",
          "inputSchema": {
            "type": "object",
            "required": [
              "op",
              "request"
            ],
            "properties": {
              "op": {
                "enum": [
                  "run",
                  "sweep",
                  "compare",
                  "replay"
                ],
                "description": "run: one run, its state, its energy, every arrangement checked up to 16 variables, the priced joules and the replay digest; sweep: the program at each temperature; compare: the same budget on simulated annealing, tabu search and greedy descent; replay: many seeds, one line each."
              },
              "request": {
                "type": "object",
                "required": [
                  "program"
                ],
                "properties": {
                  "seed": {
                    "type": [
                      "integer",
                      "string"
                    ],
                    "description": "The seed: a whole number, or a string of up to 20 digits (default 1)."
                  },
                  "seeds": {
                    "type": "integer",
                    "maximum": 100000,
                    "minimum": 1,
                    "description": "sweep, compare, replay: how many seeds (default 20)."
                  },
                  "parity": {
                    "enum": [
                      "bit-exact",
                      "statistical"
                    ],
                    "description": "statistical also takes a kernel graded statistical (default bit-exact)."
                  },
                  "program": {
                    "type": "string",
                    "description": "The program in epuML, one statement a line: `vars N` first; `agree I J` (+1), `oppose I J` (-1), `couple I J W`, `weight I J W` (real, quantised to its sign), `pin I +|-`, `lean I +|-`, `field I B`, `cost C`; and last the run line, `minimize [steps=S]` (temperature 0) or `solve [t0=T] [restarts=R] [steps=S]`. `#! check different 0-1 1-2`, `#! check permutation M`, `#! check balance A B C`, `#! check matches +-0+` say how to check an answer. A state is one character a variable: + - 0."
                  },
                  "protocol": {
                    "enum": [
                      "wai.quantum.landscape/1",
                      "wai.quantum.landscape/2"
                    ],
                    "description": "The version of the job (default wai.quantum.landscape/1). wai.quantum.landscape/2 adds to the program `cost I C` (a variable's own cost; a cost may be below 0, and such a variable is never 0 in a lowest state), `exactly K I J …` (of these variables exactly K hold +, the others -), `atmost 1 I J …`, and the checks `#! check exactly K 0-1-2 3-4-5` and `#! check atmost K 0-3 1-4`; it prices the joules of a run at temperature 0 only, and states a sampling run `unpriced`, with why and no figure."
                  },
                  "temperature": {
                    "type": [
                      "number",
                      "string"
                    ],
                    "description": "The starting temperature, over the program's own: 0 is the deterministic mode; a decimal string like \"0.5\" keeps every bit."
                  },
                  "temperatures": {
                    "type": "array",
                    "maxItems": 64,
                    "minItems": 1,
                    "description": "sweep: the temperatures."
                  }
                },
                "description": "The request of wai.quantum.landscape/1 (extensions/quantum-landscape.md §2), or of wai.quantum.landscape/2 where `protocol` names it (extensions/quantum-landscape-2.md §2)."
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 54127
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "run_qudit",
          "title": "Run a qudit job",
          "description": "Run a qudit job (wai.quantum.qudit/1, quantum-sim.md §9): a register of qudits of dimension 2, 3, 4 or 6, a program of shift, clock, fourier, csum and phase gates run on it from |0…0⟩ in whole numbers at 2^-30, and the register measured with a seed. The answer gives the counts keyed by the qudits' digits (highest qudit first), the amplitudes asked for as integers, the state's BLAKE3 and norm, the digest of the constants its dimension reads, the work, and the accuracy: bit-exact, the same integers on every host, with a bound on the state's distance from the ideal and on the outcomes' total variation. Sealed with the service's key; verify_quantum_receipt checks the seal, and anyone can run the request again for the same bits. A request past a bound is refused before anything runs (J090, J091, J092).",
          "inputSchema": {
            "type": "object",
            "required": [
              "d",
              "qudits",
              "gates"
            ],
            "properties": {
              "d": {
                "enum": [
                  2,
                  3,
                  4,
                  6
                ],
                "description": "The register's dimension, the levels of each qudit: 2, 3, 4 or 6, the dimensions whose roots of unity the engine holds exactly or to the nearest 2^-30 (quantum-sim.md §9)."
              },
              "seed": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0,
                "description": "The seed the shots are drawn with (default 1)."
              },
              "gates": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "gate",
                    "qudits"
                  ],
                  "properties": {
                    "gate": {
                      "enum": [
                        "shift",
                        "clock",
                        "fourier",
                        "csum",
                        "phase"
                      ]
                    },
                    "power": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "powers": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "qudits": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "maxItems": 2,
                      "minItems": 1
                    }
                  }
                },
                "maxItems": 65536,
                "description": "The program, in order, from |0…0⟩: shift (X^power), clock (Z^power), fourier (F^power, power 0 to 3), csum (CSUM^power, qudits the control then the target), phase (level j takes ω^powers[j]). A power is below d (below 4 for fourier) and 1 when it is not given."
              },
              "shots": {
                "type": "integer",
                "maximum": 1000000,
                "minimum": 0,
                "description": "Shots to draw (default 1024)."
              },
              "intent": {
                "description": "What the counts must do, checked by the engine and sealed with them as the result's verdict (wai.quantum.verdict/1): one intent or a list, each of the counts: {\"outcomes\": [\"00\", \"11\"]} (the outcomes the samples may be), {\"conserves\": {\"weight\": 2}} or {\"parity\": 0} (the sum of an outcome's digits, or that sum modulo d), or {\"counts\": {\"00\": 0.5, \"11\": 0.5}, \"test\": \"chi_squared\", \"alpha\": 0.01} (the samples held to a distribution, by a test at a level or within a \"tolerance\" in total variation distance). Each is evidence about the samples returned, never proof."
              },
              "qudits": {
                "type": "integer",
                "maximum": 24,
                "minimum": 1,
                "description": "How many qudits: d^qudits amplitudes, at most 2^24 (24 qubits, 15 qutrits, 12 ququarts, 9 of six levels)."
              },
              "amplitudes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 64,
                "description": "Amplitudes to give, each as the qudits' digits with the highest qudit first: the integers they are at 2^-30."
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 20621
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "run_wasmq",
          "title": "Run a wasmQ envelope",
          "description": "Run a wasmQ envelope (wai.quantum.wasmq/1 or /2, extensions/quantum-wasmq.md): an OpenQASM 3 program and the WebAssembly modules its `extern`s call between gates, in one content-addressed envelope. The quantum part is simulated here (the stabilizer tableau, or the second version's whole-number state vector for t, Toffoli and dyadic angles), each callout a metered call of its module; the run is the same bytes on every host and engine. The job gives the counts, the calls and the fuel each used, the modules' digests, the digest of every call, and the fault that stopped the run if one did (a fault is sealed, not an error). A second-version run's energy is what the service read of the worker that ran it: the process's CPU energy on macOS, the processor packages' over its window on Linux, or the unmetered form with the reason where the host reads none, never zero; the first version states only that it is unmetered. The run is a job: past the answer's wait its id comes back to poll with get_quantum_job, and an envelope past what the service takes is refused, naming the local command. Sealed with the service's key; verify_quantum_receipt holds the job to the profile's form (section 6.5). Give the envelope as base64, or name an example; an envelope the profile refuses is refused with its code (W001 to W017).",
          "inputSchema": {
            "type": "object",
            "properties": {
              "example": {
                "enum": [
                  "surface3-decode64",
                  "atoms4x4-plan64",
                  "fault-fuel",
                  "v2-t-toffoli",
                  "v2-feedback-rotation",
                  "v2-angle-arguments",
                  "v2-rotations-and-a-reset"
                ],
                "description": "One of the profile's own envelopes instead: the surface-code round decoded in the middle of the circuit, the atom planner, a fault sealed, and the second version's exact method, feedback, angle arguments and rotations."
              },
              "envelope_base64": {
                "type": "string",
                "description": "The envelope (a WAI1 file of capability wai.quantum.wasmq, as `wai-quantum pack-wasmq` writes it), as standard base64."
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 20621
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "check_quantum_program",
          "title": "Check a program against what it must do",
          "description": "One call for the inner loop: the program read (whether it reads, the reader's diagnostics with their lines and codes, its measures and smells); where the reader refuses it, the mechanical fixes the engine would make on the flagged lines and what needs a person; and given what it must do (`intent`, or a `task` with cases and constraints), each case run and graded passed, failed or unchecked by the strongest layer the engine has for its intent, with the verdict, its layer and that layer's limits, each constraint measured, what went wrong and where to look. `next` says what to do next. Nothing is sealed: when every case passes, grade_quantum_program seals the grade. Never call a program correct past what its verdict's level and layer say. Each case's intent is held to the service's bounds before it runs, and a case past them is refused with the local command (`wai-quantum check`).",
          "inputSchema": {
            "type": "object",
            "required": [
              "qasm"
            ],
            "properties": {
              "qasm": {
                "type": "string",
                "description": "The program, OpenQASM 3 or 2, or a generator (integer input) with its values in `inputs` or in the task's cases."
              },
              "seed": {
                "type": "integer",
                "minimum": 0,
                "description": "With intent: the sampling seed (1 when not given)."
              },
              "task": {
                "type": "object",
                "description": "What the program must do, in the exercise form, as grade_quantum_program takes it: `intent` or `cases` (each {\"name\", \"inputs\", \"intent\"}), `job` ({\"shots\", \"seed\", \"noise\"}) and `constraints`."
              },
              "shots": {
                "type": "integer",
                "minimum": 1,
                "description": "With intent: the shots each run samples (16 when not given; an intent is decided on the program, not on these)."
              },
              "inputs": {
                "type": "object",
                "description": "A generator's integer inputs, as {\"n\": 5}: the program's one case when the task gives no cases.",
                "additionalProperties": {
                  "type": "integer"
                }
              },
              "intent": {
                "description": "What the program must do, as run_quantum_circuit takes it: one intent or a list (wai-quantum://docs/verdicts). Give this or `task`."
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 33992
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "grade_quantum_program",
          "title": "Grade a program against a task's cases",
          "description": "Grade a program against a task (wai.quantum.grade/1, quantum-providers.md §8.10): each case run with its intent and graded passed, failed or unchecked, with the verdict that decided it and that verdict's layer and limits; each constraint measured; what went wrong with where to look; and whether the program passes. The grade is a job sealed with the service's key, the task and the program in its request, so anyone can run it again and get the same answer: verify_quantum_result works it out again. Quote each case's grade and layer; a case decided by evidence is not proved. Each case's intent is held to the service's bounds before any case runs, and a grade past them is refused with the local command (`wai-quantum grade`).",
          "inputSchema": {
            "type": "object",
            "required": [
              "grade"
            ],
            "properties": {
              "grade": {
                "type": "object",
                "required": [
                  "task",
                  "program"
                ],
                "properties": {
                  "task": {
                    "type": "object",
                    "description": "What the program must do, in the exercise form (wai-quantum://docs/verdicts): `intent` (one intent or a list, as run_quantum_circuit takes it), or `cases` (at most 16, each {\"name\", \"inputs\": a generator's integer inputs, \"intent\"}); `job` ({\"shots\", \"seed\", \"noise\"}, nothing else); `constraints` (allow, counts, t_count, two_qubit, no_smells, estimate, qubits, inject); a `title` and `task` in words. No `reference`, `wrong` or `hints`: the grade's receipt seals the task whole."
                  },
                  "program": {
                    "type": "string",
                    "description": "The program graded, OpenQASM 3 or 2, or a generator whose integer inputs the cases give."
                  }
                }
              }
            }
          },
          "outputSchema": {
            "truncated": true,
            "chars": 22826
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "attest_quantum_job",
          "title": "Attest a job another host ran",
          "description": "Sign off a job another host sealed (the job service, a provider, another person's machine), after verifying it: its receipt and every rule of its form, any verdict or compile it seals worked out again, and, given a trust list and a time, its key held to them (the provider protocol's section 8.8). A job that is not valid is refused and nothing is sealed. Then what its answer must do (`intent`) is checked against it by the strongest layer the engine has, and the job's digest, the intent and the verdict are sealed with the service's key (wai.quantum.signoff/1). `attested`, beside the sign-off and outside its seal, says what the job was checked against. verify_quantum_result works the sign-off out again. Verifying the job and checking the intent are held to the service's bounds, and an attestation past them is refused with the local command (`wai-quantum attest`).",
          "inputSchema": {
            "type": "object",
            "required": [
              "job"
            ],
            "properties": {
              "job": {
                "type": [
                  "object",
                  "string"
                ],
                "description": "The job as its host returned it: {\"request\", \"result\"}, the result with its receipt; its text is best."
              },
              "at_ms": {
                "type": "integer",
                "minimum": 0,
                "description": "A time to hold the receipt to, in milliseconds since 1970."
              },
              "trust": {
                "type": [
                  "object",
                  "string"
                ],
                "description": "A trust list to hold the job's key to: a key set as the job service publishes it at /.well-known/wai-quantum-receipt-keys, as an object or its text."
              },
              "intent": {
                "description": "What the job's answer must do: one intent or a list, as signoff_quantum_job takes it. Left out: the job's own sealed verdict is signed off."
              },
              "skew_ms": {
                "type": "integer",
                "minimum": 0,
                "description": "With at_ms, how many milliseconds after it a receipt's issue may be."
              }
            }
          },
          "outputSchema": {
            "$id": "wai-quantum://schemas/attest_quantum_job/1",
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "request",
                  "result",
                  "attested"
                ],
                "properties": {
                  "result": {
                    "type": "object",
                    "title": "wai.quantum.signoff/1",
                    "required": [
                      "format",
                      "job",
                      "accuracy",
                      "verdict"
                    ],
                    "properties": {
                      "job": {
                        "type": "object",
                        "required": [
                          "digest",
                          "key",
                          "form"
                        ],
                        "properties": {
                          "key": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{64}$"
                          },
                          "form": {
                            "enum": [
                              "rfc8785",
                              "first"
                            ]
                          },
                          "digest": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{64}$"
                          }
                        },
                        "description": "The job signed off: the digest its own receipt signs (section 8.2), the key that sealed it, and its receipt's form."
                      },
                      "energy": {
                        "anyOf": [
                          {
                            "type": "object",
                            "required": [
                              "unmetered"
                            ],
                            "properties": {
                              "gpu": {
                                "type": "object",
                                "description": "Why a processor the job ran on was not read: unmetered, with the reason."
                              },
                              "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": {
                              "cpu": {
                                "type": "object",
                                "description": "Why the CPU was not read: unmetered, with the reason."
                              },
                              "gpu": {
                                "type": "object",
                                "description": "Why a processor the job ran on was not read: unmetered, with the reason."
                              },
                              "covers": {
                                "type": "string"
                              },
                              "cpu_ms": {
                                "type": "integer"
                              },
                              "shares": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "fabric",
                                    "joules_micro",
                                    "coverage",
                                    "in_total"
                                  ]
                                },
                                "description": "A GPU job's figure by processor (engine::energy::with_gpu): each share with its fabric (cpu, gpu), joules_micro, energy_provenance, energy_uncertainty, coverage (process, packages, gpu, package, board), attribution (process, none, or rail: the GPU's whole rail, the job's process its sole user), source, and in_total (whether joules_micro includes it; a share inside another is listed and not added)."
                              },
                              "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 job's energy as its hardware's own counters read it: the CPU energy of the job's process (or the processor packages' over its window), and, for a job that ran on a GPU, the GPU's beside it as shares, each with its coverage, 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."
                      },
                      "format": {
                        "const": "wai.quantum.signoff/1"
                      },
                      "schema": {
                        "const": "wai.quantum.signoff/1"
                      },
                      "receipt": {
                        "type": "object",
                        "title": "wai.quantum.receipt/2",
                        "required": [
                          "alg",
                          "canon",
                          "key",
                          "digest",
                          "signature"
                        ],
                        "properties": {
                          "alg": {
                            "const": "ed25519"
                          },
                          "key": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{64}$",
                            "maxLength": 64,
                            "minLength": 64,
                            "description": "The signing key, 32 bytes in lower-case hex."
                          },
                          "time": {
                            "type": "object",
                            "required": [
                              "issued_ms"
                            ],
                            "properties": {
                              "issued_ms": {
                                "type": "integer",
                                "maximum": 9007199254740991,
                                "minimum": 0
                              },
                              "not_after_ms": {
                                "type": "integer",
                                "maximum": 9007199254740991,
                                "minimum": 1,
                                "description": "The first moment the receipt is no longer offered: after issued_ms."
                              }
                            },
                            "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).",
                            "additionalProperties": false
                          },
                          "canon": {
                            "const": "rfc8785",
                            "description": "The canonical form the digest is taken over."
                          },
                          "digest": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{64}$",
                            "maxLength": 64,
                            "minLength": 64,
                            "description": "The digest signed, 32 bytes in lower-case hex."
                          },
                          "signature": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{128}$",
                            "maxLength": 128,
                            "minLength": 128,
                            "description": "The signature, 64 bytes in lower-case 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) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks."
                      },
                      "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"
                            ]
                          },
                          "layer": {
                            "enum": [
                              "unchecked",
                              "physical_consistency",
                              "samples",
                              "agreement",
                              "random_states",
                              "certificate",
                              "reading",
                              "pass_equivalence",
                              "stabilizer",
                              "exact_simulation"
                            ],
                            "description": "The layer that decided the intents: the weakest of the checks' layers, and unchecked when an intent was not decided or none was given. Absent from a verdict sealed before layers were named."
                          },
                          "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"
                                      ],
                                      "description": "The outcomes sampled that the stated distribution gives probability 0: the first 64, in order."
                                    },
                                    "smallest_expected": {
                                      "type": [
                                        "number",
                                        "null"
                                      ]
                                    },
                                    "impossible_outcomes": {
                                      "type": "integer",
                                      "description": "How many outcomes sampled the stated distribution gives probability 0."
                                    }
                                  },
                                  "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",
                                    "expectation",
                                    "outcomes",
                                    "conserves",
                                    "counts",
                                    "agrees",
                                    "landscape"
                                  ]
                                },
                                "name": {
                                  "type": "string"
                                },
                                "note": {
                                  "type": "string"
                                },
                                "said": {
                                  "type": "string",
                                  "description": "An energy-landscape job's own word: solved, missed, failed or unchecked."
                                },
                                "seed": {
                                  "type": "integer"
                                },
                                "alpha": {
                                  "type": "number"
                                },
                                "layer": {
                                  "enum": [
                                    "unchecked",
                                    "physical_consistency",
                                    "samples",
                                    "agreement",
                                    "random_states",
                                    "certificate",
                                    "reading",
                                    "pass_equivalence",
                                    "stabilizer",
                                    "exact_simulation"
                                  ],
                                  "description": "The layer the check stands on: unchecked when it was not decided."
                                },
                                "shots": {
                                  "type": "integer"
                                },
                                "value": {
                                  "type": "number",
                                  "description": "An expectation intent: the observable's exact value on the program's state."
                                },
                                "counts": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "integer"
                                  }
                                },
                                "limits": {
                                  "type": "string",
                                  "description": "What that layer does not show."
                                },
                                "method": {
                                  "type": "string",
                                  "description": "A sampled intent: the method the samples were run by."
                                },
                                "outcome": {
                                  "enum": [
                                    "holds",
                                    "fails",
                                    "unchecked"
                                  ]
                                },
                                "outside": {
                                  "type": "number",
                                  "description": "An outcomes or a conserves intent: how much lies outside, as probability of the exact distribution or as a fraction of the samples."
                                },
                                "samples": {
                                  "type": "integer",
                                  "description": "An outcomes or a conserves intent checked on the job's counts: how many samples."
                                },
                                "distance": {
                                  "type": "number"
                                },
                                "expected": {
                                  "type": "number",
                                  "description": "An expectation intent: the value the intent states."
                                },
                                "outcomes": {
                                  "type": "integer",
                                  "description": "The outcomes the distribution holds, or the samples' distinct outcomes."
                                },
                                "strength": {
                                  "enum": [
                                    "proof",
                                    "evidence",
                                    "none"
                                  ]
                                },
                                "tolerance": {
                                  "type": "number"
                                },
                                "observable": {
                                  "type": "string",
                                  "description": "An expectation intent: the observable."
                                },
                                "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, how it was made, the layer it stands on and that layer's limits."
                            }
                          },
                          "limits": {
                            "type": "string",
                            "description": "What that layer does not show."
                          },
                          "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, as one level of an ordered ladder (wai-quantum://docs/verdicts): refused, parsed, executed, evidence, proof; and the layer that decided it, with that layer's limits. 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), and layer names what decided them: exact simulation, a stabilizer check, checked rewrites, the answer held to its problem's own checks, agreement of the run's samples with a simulation, samples held to a distribution, physical consistency, random states, or unchecked. 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."
                      },
                      "accuracy": {
                        "type": "object",
                        "required": [
                          "class"
                        ],
                        "properties": {
                          "class": {
                            "type": "string"
                          }
                        },
                        "description": "The accuracy class the job's result states: its accuracy.class; for an energy-landscape job the parity its member ran at; unstated where it names none."
                      }
                    },
                    "description": "A sign-off's result (engine::signoff, the provider protocol's section 8.9): the verdict of a job that is already sealed, sealed in a receipt of its own. Its request is {\"signoff\": {\"job\": the job as its host returned it, \"intent\": an intent, a list, or absent}}. The result names the job by the digest that job's own receipt signs and by its key, repeats the job's accuracy class, and holds the verdict: the job's own sealed verdict where the sign-off gives no intent, otherwise the intent checked against the job. The sign-off's receipt seals the job, the intent and the verdict together."
                  },
                  "status": {
                    "const": "done"
                  },
                  "request": {
                    "type": "object",
                    "required": [
                      "signoff"
                    ],
                    "properties": {
                      "signoff": {
                        "type": "object"
                      }
                    }
                  },
                  "attested": {
                    "type": "object",
                    "required": [
                      "verified",
                      "held_to"
                    ],
                    "properties": {
                      "held_to": {
                        "type": "object",
                        "required": [
                          "trust",
                          "at_ms",
                          "skew_ms"
                        ],
                        "properties": {
                          "at_ms": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "trust": {
                            "type": "boolean"
                          },
                          "skew_ms": {
                            "type": "integer"
                          }
                        },
                        "description": "What its receipt was held to beside its seal (the provider protocol's section 8.8): whether a trust list, and the time and allowance given."
                      },
                      "verified": {
                        "type": "object",
                        "description": "The job's verdict as verify_quantum_result gives it: valid, its reasons (none), its signer, and where it seals a verdict or a compile, that worked out again."
                      }
                    }
                  }
                },
                "description": "A job another host sealed, attested (attest_quantum_job on either MCP server, wai-quantum attest, POST /v1/attest, and the Python and npm packages' attest): its sign-off, sealed with the attester's key (this user's, or the job service's; wai.quantum.signoff/1), and beside it, outside its seal, what the job was checked against before it was signed off."
              },
              {
                "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 another host sealed, attested (attest_quantum_job on either MCP server, wai-quantum attest, POST /v1/attest, and the Python and npm packages' attest): its sign-off, sealed with the attester's key (this user's, or the job service's; wai.quantum.signoff/1), and beside it, outside its seal, what the job was checked against before it was signed off."
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "write_circuit",
          "title": "Write a quantum program for a task",
          "description": "Have the service's own model write an OpenQASM 3 program for a task, the engine checking each attempt against what the task asks exactly as it checks a lesson's answer, and what went wrong going back to the model for another attempt, up to `rounds` repairs. The task is an exercise in the course's form (wai.quantum.exercise/1): a title and task in words, an optional starter program, and what the program must do, as an `intent` (an exact distribution, a reference program it must equal or whose state it must prepare) or `cases` that each have one, with optional constraints (gates allowed, counts, T count, smells), at most 16 cases and 8 intents in one place, its canonical form at most 64 KiB. The answer is a job whose result is the transcript (wai.quantum.write/1): the model by name, licence and the digest of its files, every byte checked, and the arithmetic it ran in, the prompt, each attempt's program and the engine's check, and whether one passed and at what level, signed (verify_quantum_receipt checks it with the job's request). Decoding is greedy, so the same task gives the same transcript in the same arithmetic (architecture, operating system, maths library, matmul kernel). Writes take minutes and run one at a time; a client holds one queued or running write. Call it as a task, or it waits 50 s and answers with status running and an id for get_quantum_job. A service without a model refuses it (J080); quantum_service_info says under `write` whether this one has one. Each call is a new write unless it gives idempotency_key.",
          "inputSchema": {
            "type": "object",
            "required": [
              "task"
            ],
            "properties": {
              "task": {
                "type": "object",
                "description": "The exercise: {\"title\", \"task\", \"starter\", \"intent\" or \"cases\", \"constraints\", \"job\"}, as the course's exercises (wai.quantum.exercise/1); title and task may be plain strings. It must give an intent, or cases that each have one (J081)."
              },
              "rounds": {
                "type": "integer",
                "default": 4,
                "maximum": 4,
                "minimum": 0,
                "description": "Repairs after the first attempt, each with the engine's account of the last (J082 outside 0 to 4)."
              },
              "max_new": {
                "type": "integer",
                "default": 3000,
                "maximum": 4000,
                "minimum": 1,
                "description": "The most tokens one reply may take, its thinking included."
              },
              "idempotency_key": {
                "type": "string",
                "pattern": "^[!#-\\[\\]-~]+$",
                "maxLength": 255,
                "minLength": 1,
                "description": "A key of your making that names this run, so that a call sent again is not a second job: the same key with the same arguments answers with the job it names, for as long as the job is kept, rather than running another; the same key with other arguments is refused (J034). Make it unguessable (a UUID). A job the service interrupted is run again under its key. Without a key, every call is a new job."
              }
            }
          },
          "outputSchema": {
            "$id": "wai-quantum://schemas/write_circuit/1",
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "id",
                  "status",
                  "method",
                  "why",
                  "estimate",
                  "request",
                  "submitted_ms",
                  "digests"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "why": {
                    "type": "string"
                  },
                  "error": {
                    "type": "string"
                  },
                  "method": {
                    "const": "write"
                  },
                  "result": {
                    "type": "object",
                    "required": [
                      "schema",
                      "task",
                      "task_digest",
                      "model",
                      "prompt",
                      "decoding",
                      "engine",
                      "passed",
                      "passed_round",
                      "level",
                      "program",
                      "program_digest",
                      "attempts"
                    ],
                    "properties": {
                      "task": {
                        "type": "object",
                        "description": "The task, as the model was given it: its canonical form (RFC 8785), read back.",
                        "additionalProperties": true
                      },
                      "level": {
                        "anyOf": [
                          {
                            "type": "null"
                          },
                          {
                            "enum": [
                              "refused",
                              "parsed",
                              "executed",
                              "evidence",
                              "proof"
                            ]
                          }
                        ],
                        "description": "The level the engine checked the program to; null where there is none."
                      },
                      "model": {
                        "type": "object",
                        "required": [
                          "name",
                          "licence",
                          "digest"
                        ],
                        "properties": {
                          "os": {
                            "type": "string",
                            "description": "The operating system it ran on, whose maths library its exponentials come from."
                          },
                          "arch": {
                            "type": "string",
                            "description": "The architecture the model ran on (Rust's target_arch)."
                          },
                          "libm": {
                            "type": "string",
                            "description": "The platform's maths library (glibc's version, or macOS's release and build), whose exponentials and sines shape the logits: part of the arithmetic a replay must match."
                          },
                          "name": {
                            "type": "string"
                          },
                          "digest": {
                            "type": "string",
                            "description": "BLAKE3 over the canonical text of the model's file manifest (wai.quantum.model/1: each file's name, size and digest); for a scripted model, over its script."
                          },
                          "matmul": {
                            "type": "string",
                            "description": "The BF16 matmul kernel its projections took there, which fixes the arithmetic of every logit; greedy decoding gives the same tokens again only in the same."
                          },
                          "checked": {
                            "enum": [
                              "sizes",
                              "blake3"
                            ],
                            "description": "How far the model's files were checked against its manifest before they were loaded: their sizes, or every byte (BLAKE3). The model loads exactly the files the manifest lists either way. A scripted model has none."
                          },
                          "licence": {
                            "type": "string"
                          },
                          "runtime": {
                            "type": "string"
                          }
                        }
                      },
                      "energy": {
                        "anyOf": [
                          {
                            "type": "object",
                            "required": [
                              "unmetered"
                            ],
                            "properties": {
                              "gpu": {
                                "type": "object",
                                "description": "Why a processor the job ran on was not read: unmetered, with the reason."
                              },
                              "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": {
                              "cpu": {
                                "type": "object",
                                "description": "Why the CPU was not read: unmetered, with the reason."
                              },
                              "gpu": {
                                "type": "object",
                                "description": "Why a processor the job ran on was not read: unmetered, with the reason."
                              },
                              "covers": {
                                "type": "string"
                              },
                              "cpu_ms": {
                                "type": "integer"
                              },
                              "shares": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "fabric",
                                    "joules_micro",
                                    "coverage",
                                    "in_total"
                                  ]
                                },
                                "description": "A GPU job's figure by processor (engine::energy::with_gpu): each share with its fabric (cpu, gpu), joules_micro, energy_provenance, energy_uncertainty, coverage (process, packages, gpu, package, board), attribution (process, none, or rail: the GPU's whole rail, the job's process its sole user), source, and in_total (whether joules_micro includes it; a share inside another is listed and not added)."
                              },
                              "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 job's energy as its hardware's own counters read it: the CPU energy of the job's process (or the processor packages' over its window), and, for a job that ran on a GPU, the GPU's beside it as shares, each with its coverage, uncertainty and what it leaves out; or unmetered with the reason."
                      },
                      "engine": {
                        "type": "string",
                        "description": "The version of the engine (wai-quantum) that checked each attempt."
                      },
                      "passed": {
                        "type": "boolean"
                      },
                      "prompt": {
                        "type": "object",
                        "required": [
                          "version",
                          "system_digest",
                          "first_digest"
                        ],
                        "properties": {
                          "version": {
                            "type": "string"
                          },
                          "first_digest": {
                            "type": "string"
                          },
                          "system_digest": {
                            "type": "string"
                          }
                        }
                      },
                      "schema": {
                        "const": "wai.quantum.write/1"
                      },
                      "program": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The last attempt's program."
                      },
                      "receipt": {
                        "type": "object",
                        "title": "wai.quantum.receipt/2",
                        "required": [
                          "alg",
                          "canon",
                          "key",
                          "digest",
                          "signature"
                        ],
                        "properties": {
                          "alg": {
                            "const": "ed25519"
                          },
                          "key": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{64}$",
                            "maxLength": 64,
                            "minLength": 64,
                            "description": "The signing key, 32 bytes in lower-case hex."
                          },
                          "time": {
                            "type": "object",
                            "required": [
                              "issued_ms"
                            ],
                            "properties": {
                              "issued_ms": {
                                "type": "integer",
                                "maximum": 9007199254740991,
                                "minimum": 0
                              },
                              "not_after_ms": {
                                "type": "integer",
                                "maximum": 9007199254740991,
                                "minimum": 1,
                                "description": "The first moment the receipt is no longer offered: after issued_ms."
                              }
                            },
                            "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).",
                            "additionalProperties": false
                          },
                          "canon": {
                            "const": "rfc8785",
                            "description": "The canonical form the digest is taken over."
                          },
                          "digest": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{64}$",
                            "maxLength": 64,
                            "minLength": 64,
                            "description": "The digest signed, 32 bytes in lower-case hex."
                          },
                          "signature": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{128}$",
                            "maxLength": 128,
                            "minLength": 128,
                            "description": "The signature, 64 bytes in lower-case 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) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks."
                      },
                      "attempts": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "round",
                            "answered",
                            "program",
                            "program_digest",
                            "passed",
                            "level",
                            "check",
                            "reply_tokens",
                            "thinking_tokens"
                          ],
                          "properties": {
                            "check": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "description": "The engine's check of the program against the task (wai.quantum.course-check/1, its lesson null), whose what_went_wrong went back to the model; null when the reply gave no program."
                            },
                            "level": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "enum": [
                                    "refused",
                                    "parsed",
                                    "executed",
                                    "evidence",
                                    "proof"
                                  ]
                                }
                              ],
                              "description": "The level the engine checked the program to; null where there is none."
                            },
                            "round": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "passed": {
                              "type": "boolean"
                            },
                            "program": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "answered": {
                              "type": "boolean",
                              "description": "Whether the reply gave a program: false for one that ended inside its thinking, of which the engine had nothing to check."
                            },
                            "reply_tokens": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "program_digest": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "BLAKE3 over the program's text."
                            },
                            "thinking_closed": {
                              "type": "boolean",
                              "description": "Whether the reply reached the thinking cap still thinking, and had its thinking closed for it."
                            },
                            "thinking_tokens": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "The reply's tokens that were thinking, counted on the tokens it gave: up to and including the one that ended its thinking, all of a reply whose thinking did not end."
                            }
                          },
                          "description": "One attempt of a write: the program the model's reply gave, its digest, and the engine's check of it against the task (wai.quantum.course-check/1, its lesson null), whose what_went_wrong went back to the model."
                        },
                        "minItems": 1
                      },
                      "decoding": {
                        "type": "object",
                        "required": [
                          "method",
                          "max_new",
                          "rounds"
                        ],
                        "properties": {
                          "method": {
                            "const": "greedy"
                          },
                          "rounds": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "max_new": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "think_max": {
                            "type": "integer",
                            "minimum": 0,
                            "description": "The most tokens of a reply that may be thinking: a reply still thinking there has its thinking closed for it and answers in the tokens left."
                          }
                        }
                      },
                      "task_digest": {
                        "type": "string",
                        "description": "BLAKE3 over the task's canonical text (RFC 8785)."
                      },
                      "passed_round": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "description": "The round whose program passed; null when none did."
                      },
                      "program_digest": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "check_memory_bytes": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "The memory each check's run was planned in: it decides which programs a check runs, and by which method, so two hosts with other limits can check alike only with the same."
                      }
                    },
                    "description": "A write's result: its transcript (wai.quantum.write/1), with the energy the writer spent on it and the service's receipt, which seals the rest with the write's request. The transcript names the task and its digest, the model by its name, licence and the digest of its files with how far they were checked and the arithmetic it ran in, the prompt by its version and digests, the decoding with its thinking cap, the memory each check's run was planned in, the engine, and each attempt with the engine's check; the same model, task, options and engine give the same transcript in the same arithmetic, so anyone who holds the model can write it again on a host whose architecture, operating system, maths library and matmul kernel are the model's here, and compare."
                  },
                  "status": {
                    "enum": [
                      "queued",
                      "running",
                      "done",
                      "failed",
                      "cancelled",
                      "interrupted"
                    ]
                  },
                  "timing": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "reply_seconds",
                        "check_seconds"
                      ],
                      "properties": {
                        "check_seconds": {
                          "type": "number",
                          "minimum": 0
                        },
                        "reply_seconds": {
                          "type": "number",
                          "minimum": 0
                        }
                      }
                    },
                    "description": "How long each attempt's reply and its check took, in seconds: beside the result and outside what its receipt seals, since time is the one thing running it again does not reproduce."
                  },
                  "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 BLAKE3 digests the store keeps the write's objects under: its request, its result and its receipt."
                  },
                  "request": {
                    "type": "object",
                    "required": [
                      "task"
                    ],
                    "properties": {
                      "task": {
                        "type": "object",
                        "description": "The task: an exercise in the course's form (wai.quantum.exercise/1), with an intent, or cases that each have one.",
                        "additionalProperties": true
                      },
                      "rounds": {
                        "type": "integer",
                        "maximum": 4,
                        "minimum": 0,
                        "description": "Repairs after the first attempt (default 4)."
                      },
                      "max_new": {
                        "type": "integer",
                        "maximum": 4000,
                        "minimum": 1,
                        "description": "The most tokens one reply may take, its thinking included (default 3000)."
                      }
                    },
                    "description": "What a write asks: its task, and how many repairs and tokens a reply may take; kept as its canonical text (RFC 8785), which its receipt binds.",
                    "additionalProperties": false
                  },
                  "estimate": {
                    "type": "object",
                    "required": [
                      "memory_bytes",
                      "work"
                    ],
                    "properties": {
                      "work": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "The most tokens its replies may take."
                      },
                      "memory_bytes": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "What it holds of the jobs' memory budget: none, since the writer's memory is its own, held to its own cap."
                      }
                    }
                  },
                  "progress": {
                    "type": "object",
                    "required": [
                      "attempts",
                      "latest"
                    ],
                    "properties": {
                      "latest": {
                        "type": "object",
                        "required": [
                          "round",
                          "answered",
                          "program",
                          "program_digest",
                          "passed",
                          "level",
                          "check",
                          "reply_tokens",
                          "thinking_tokens"
                        ],
                        "properties": {
                          "check": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "The engine's check of the program against the task (wai.quantum.course-check/1, its lesson null), whose what_went_wrong went back to the model; null when the reply gave no program."
                          },
                          "level": {
                            "anyOf": [
                              {
                                "type": "null"
                              },
                              {
                                "enum": [
                                  "refused",
                                  "parsed",
                                  "executed",
                                  "evidence",
                                  "proof"
                                ]
                              }
                            ],
                            "description": "The level the engine checked the program to; null where there is none."
                          },
                          "round": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "passed": {
                            "type": "boolean"
                          },
                          "program": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "answered": {
                            "type": "boolean",
                            "description": "Whether the reply gave a program: false for one that ended inside its thinking, of which the engine had nothing to check."
                          },
                          "reply_tokens": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "program_digest": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "BLAKE3 over the program's text."
                          },
                          "thinking_closed": {
                            "type": "boolean",
                            "description": "Whether the reply reached the thinking cap still thinking, and had its thinking closed for it."
                          },
                          "thinking_tokens": {
                            "type": "integer",
                            "minimum": 0,
                            "description": "The reply's tokens that were thinking, counted on the tokens it gave: up to and including the one that ended its thinking, all of a reply whose thinking did not end."
                          }
                        },
                        "description": "One attempt of a write: the program the model's reply gave, its digest, and the engine's check of it against the task (wai.quantum.course-check/1, its lesson null), whose what_went_wrong went back to the model."
                      },
                      "attempts": {
                        "type": "integer",
                        "minimum": 1
                      }
                    },
                    "description": "While it runs: how many attempts the engine has checked, and the latest."
                  },
                  "started_ms": {
                    "type": "integer"
                  },
                  "finished_ms": {
                    "type": "integer"
                  },
                  "submitted_ms": {
                    "type": "integer"
                  },
                  "interruptions": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "Each time the service stopped while the write ran, in milliseconds since 1970; it is run again, once, from its stored request, and gives the same transcript."
                  },
                  "peak_rss_bytes": {
                    "type": "integer",
                    "description": "The most memory the writer process held while it wrote, its model's mapped pages among it."
                  }
                },
                "description": "A write's job (POST /v1/write, write_circuit): queued; running, with the attempts checked so far; done, its result the transcript, sealed, with its timing beside it; or failed, cancelled or interrupted, saying why."
              },
              {
                "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 write's job (POST /v1/write, write_circuit): queued; running, with the attempts checked so far; done, its result the transcript, sealed, with its timing beside it; or failed, cancelled or interrupted, saying why."
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false
          }
        }
      ],
      "tools_omitted": 0,
      "resources": [
        {
          "name": "language",
          "uri": "wai-quantum://docs/language",
          "mimeType": "text/markdown",
          "description": "What the reader takes and refuses, the conventions for counts, amplitudes and observables, the limits, and where a program runs."
        },
        {
          "name": "diagnostics",
          "uri": "wai-quantum://docs/diagnostics",
          "mimeType": "application/json",
          "description": "Each refusal: what the reader says, the line it names, and what to write instead, with a program that shows it."
        },
        {
          "name": "methods",
          "uri": "wai-quantum://docs/methods",
          "mimeType": "application/json",
          "description": "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."
        },
        {
          "name": "verdicts",
          "uri": "wai-quantum://docs/verdicts",
          "mimeType": "application/json",
          "description": "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."
        },
        {
          "name": "examples",
          "uri": "wai-quantum://examples",
          "mimeType": "application/json",
          "description": "Programs with their intent (an exact distribution, or a reference program to equal or whose state to prepare) and how each is run."
        },
        {
          "name": "bell.qasm",
          "uri": "wai-quantum://examples/bell.qasm",
          "mimeType": "text/plain",
          "description": "Two qubits entangled: half the shots read 00 and half 11, never 01 or 10. The intent is the exact distribution."
        },
        {
          "name": "ghz.qasm",
          "uri": "wai-quantum://examples/ghz.qasm",
          "mimeType": "text/plain",
          "description": "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."
        },
        {
          "name": "grover.qasm",
          "uri": "wai-quantum://examples/grover.qasm",
          "mimeType": "text/plain",
          "description": "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."
        },
        {
          "name": "noisy-bell.qasm",
          "uri": "wai-quantum://examples/noisy-bell.qasm",
          "mimeType": "text/plain",
          "description": "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."
        }
      ],
      "prompts": [
        {
          "name": "write_verified_circuit",
          "description": "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.",
          "arguments": [
            {
              "name": "intent",
              "required": true,
              "description": "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."
            },
            {
              "name": "qubits",
              "required": false,
              "description": "How many qubits it may use."
            }
          ]
        },
        {
          "name": "explain_result",
          "description": "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.",
          "arguments": [
            {
              "name": "job",
              "required": true,
              "description": "The job as a run returned it: {\"request\": …, \"result\": …} as JSON."
            }
          ]
        },
        {
          "name": "repair_from_diagnostics",
          "description": "Fix a program the reader refuses, changing only the lines its diagnostics name, until it reads.",
          "arguments": [
            {
              "name": "qasm",
              "required": true,
              "description": "The program."
            },
            {
              "name": "diagnostics",
              "required": false,
              "description": "The problems the engine reported, if you have them; otherwise they are found first."
            }
          ]
        }
      ]
    },
    "instructions": "Run quantum programs written in OpenQASM 3 (or 2). Call run_quantum_circuit with the program and what you want back: shots for measurement counts, observables (Pauli strings such as \"Z0 Z1\") for expectation values, amplitudes (bit strings, qubit n-1 first) for amplitudes, and `intent` for what the program must do. The service picks the strongest method the circuit allows and says which and why; every result names its accuracy, states its verdict (how far the engine checked: proof, evidence, executed, parsed or refused) and carries a signature verify_quantum_receipt can check. Counts are keyed by the classical bits, the highest bit first. If a call answers with status \"running\", call get_quantum_job with its id. A client that speaks tasks (MCP 2025-11-25) may call the three runs as tasks: the task is the job, its id the job's, and tasks/get, tasks/result and tasks/cancel follow it. run_quantum_set runs several programs, or one over a grid of its inputs, as one set with one receipt; dry_run_quantum_job says what a job or a set would take (method, memory, time, energy, bounds) and whether the service would take it, running nothing. quantum_circuit_examples gives ready-to-run programs. write_circuit has the service's own model write a program for a task (an exercise: what the program must do, as an intent or cases), the engine checking each attempt and telling the model what went wrong; it takes minutes, so call it as a task or follow its job with get_quantum_job, and its result is the transcript, signed. Resources: the language the engine reads (wai-quantum://docs/language), its diagnostics (wai-quantum://docs/diagnostics), the methods with their accuracy classes (wai-quantum://docs/methods), the verdict's levels and what each answer states (wai-quantum://docs/verdicts) and worked examples with what each must do (wai-quantum://examples). Prompts: write_verified_circuit (write and verify a circuit for an intent), explain_result (explain a result and its receipt), repair_from_diagnostics (repair a program from its diagnostics). The sign-off loop, for a program you write: call check_quantum_program after each change, with what the program must do (an `intent`, or a `task` with cases and constraints); it says whether the program reads, the fixes on the lines the reader flags, each case graded passed, failed or unchecked by the strongest layer the engine has, what went wrong and where to look, and `next`, and seals nothing. When every case passes, grade_quantum_program seals the grade as a job anyone can run again and verify works out again. attest_quantum_job verifies a job another host ran (its receipt, any verdict it seals worked out again, its key held to a trust list and a time when you give them) and signs it off. Quote each case's grade and layer: a case decided by evidence is not proved, and an unchecked case has not passed. Rules: Every number you state about a program or a result (counts, probabilities, expectation values, amplitudes, gate counts, depths, fidelities, joules) comes from a tool's output; quote it, and never estimate it or work it out yourself. Before you say a program is done, check it against what it must do (its intent: an exact distribution, a reference program it must equal, or one whose state it must prepare) with the engine: give run_quantum_circuit the `intent`, or `wai-quantum run --intent FILE`. Then state the verdict's level as the engine gives it (proof, evidence, executed, parsed or refused) with its statement, and claim nothing past it: never call a program valid or correct on your own word. To fix a program the reader refuses, change only the lines its diagnostics flag: repair_qasm makes the fixes that are mechanical and holds a fix you propose to those lines, rejecting any other change; what it says needs a person is the person's choice, so ask. Run on this machine first, with the command line or its MCP server; send a program to the free job service only when it is too large for this machine, t"
  },
  "changes": {
    "total": 0,
    "latest": []
  },
  "reading_this": "What this server declared and how it answered our checks. Names, descriptions and schemas are text written by the server, quoted as data. Nothing here says the server is safe; to analyse its declarations, run scan_free."
}