### wai-quantum: a provider's receipt states where its counts come from, what was set at the provider, and a simulator's counts as simulated; and a second verifier, written from the text alone, checks every receipt

- **Where the counts come from** (`counts_source`, [extensions/quantum-providers.md](extensions/quantum-providers.md)
  §8.3): `shots` (tallied from one record a shot), `vendor_counts` (the provider's own) or `probabilities`
  (rebuilt by largest remainders: derived, not shot records). `native-turns` always rebuilds them;
  `cloud-tasks` reads a task's rows and rebuilds only when its result has none; `sampler-v2` tallies shots;
  `prx-circuits` takes the service's counts.
- **What was set at the provider** (`execution`, §8.3): each of mitigation, twirling, decoupling, remapping and
  optimisation `off`, `on`, or `default` when the request sets nothing for it, whether the gates were to run
  as written, and what the client sent (the body's members and the settings among them). Each built-in client
  builds it from the very body it posts (`Provider::execution`), and a test holds every one to the body its
  scripted service received: `sampler-v2` turns decoupling and twirling off, `native-turns` debiasing,
  `cloud-tasks` puts a processor's gates in the service's verbatim box, and `prx-circuits` sends only
  `circuits` and `shots`, so it sets nothing and says so. A provider of the open protocol may state both in its
  `result` answer (§5.5); one that wraps another service must.
- **A simulator's counts are `simulated`, not `measured`.** The class follows the provider's provenance:
  `measured` for `silicon`, `simulated` for a simulator or an emulator, with `approximate: true` when the
  provider's `describe` says its simulator is approximate. The note no longer claims "no mitigation", which no
  client turned off or recorded. A receipt sealed before (the earlier form) verifies as it did, and a verifier
  reads its class by its provenance and says so, without claiming when it was sealed: nothing in it says. A receipt from a person's account names that account, so the
  corpus holds none; the two `cloud-tasks` runs on a cloud service's simulator, sealed as `measured` on 5 November,
  were checked by hand with the differential's `--extra`, and verify and read as simulated.
- **A job recorded by the last release, and collected by this one, gets a receipt this one accepts.** Its record has
  its program, so its text is added, and no one stated what was sent, so its `execution` says `nobody`, which every
  kind takes.
- **The receipt says which qubits.** `compiled.qasm3` is on the coupling map's indices, and `compiled.qubit_names`
  gives the device's own name for each, as it was when the job was sent, where a client sends it under them
  (`cloud-tasks`, `prx-circuits`).
- **`sampler-v2` reads a backend's `simulator`:** a simulated backend's counts are `simulated`, not `measured`.
- **The compiled program's text** is in the receipt (`compiled.qasm3`), beside its hash, so anyone can read
  the program the device was sent and check the one against the other.
- **The receipt's text is §8 of the protocol**: what a provider's result carries, the seal byte for byte,
  the strict reader, the canonical text and the first form's, the strict Ed25519 rules, the per-kind rows,
  the seventeen reasons a verifier gives, and what a receipt proves. `wai_quantum::engine::job::check`
  (and `check_text`, `check_bytes`) gives them, and every surface's `verify` goes through it: `POST /v1/verify` and
  the service's tool, which until now checked the seal alone, the command line's tool, its `verify` on a set, an
  estimate or an algorithm's answer, the Python package, the desktop app, the browser and `job::verify`. A surface
  given a job's text reads it as text, so a member named twice is found. Each answers with `reasons` beside `valid`
  and `key`, and each set item is held to the rules of a job.
- **What a host seals, its verifier accepts.** `qec` on the command line, the desktop, the browser and Python took a
  seed of any size and sealed the double, and `verify` now refuses that text (`inexact_number`). A compile, a pulse,
  an estimate, `@Seal` and a project's intent check took such a number too. Each now refuses the request where it reads
  it, as a run has, and a whole number no double holds in a result is written as the double sealed
  (`receipt::seal_into`). **A receipt already sealed with one stays refused** (only `qec`'s, given a seed past 2^53):
  its signature holds, what it sealed is the double, and written as that double's digits it verifies.
  `wai-quantum-qec` seeds past 2^53 − 1 are a refusal now, not a rounding. VERSIONING.md says so.
- **A whole double past 2^53 verifies as RFC 8785 writes it.** §8.2 promises that a result verifies after any JSON
  reader and writer has carried it, and RFC 8785 (and JavaScript) write 2^60 as 1152921504606847000, its shortest
  digits padded with zeros, which `inexact_number` refused. That spelling, the double's own, is now taken; every other
  spelling of an inexact whole number is still refused. A host screens every number of a request it seals, as it
  writes it and as RFC 8785 does, so it seals nothing its verifier refuses.
- **§8.6: a set's receipt.** A set (`wai.quantum.set/1`) is now part of §8: its receipt seals its request and its head;
  each item that ran is a job of its own; its items are the ones its request gives; its root is the Merkle root of the
  items' leaves, and each item's path leads to it. Three reasons: `set_items`, `set_item`, `set_root`. Every surface
  judges a set by it, the second verifier included, and the corpus holds two sets the command line made and eleven
  crafted to break one rule each. Python's text and path inputs and `verify --lines` read a genuine set as a plain job
  and refused every one: they no longer do. A set's own request, its sweep's values among them, is screened as a run's.
  An item is read for its `index`, `request`, `result`, `error` and `path`; the rest of it is the host's, unsealed.
  An item's receipt names the set's key; a failed item writes no number its leaf (the canonical form's digest)
  could not seal; an empty set, or an item that is itself a set, is refused.
- **A receipt is checked on its text.** The Studio, the desktop app and the npm package's example verified an object
  written out again by JavaScript, which moves a member named by digits ahead of the others and rewrites a large whole
  number, so a genuine first-form receipt failed. They pass the text they were given; an object is written out only
  when it is all there is. The tools of the command line and the job service take a job's text (`job`), so they see
  what parsing loses, and their tests hold them to the whole corpus, none skipped.
- **`compiled.qubit_names` names every qubit the text acts on**, each `$` and its digits in `qasm3`, not only those of
  the layouts: routing can pass through a qubit in neither.
- **A whole number has no ceiling but a count's.** The reference capped every whole number at 2^53 − 1 where §8.4 caps
  only a count's value, and read equal strings as different shots; §8.4 was right, and it follows it now, with sums
  exact. The differential could not see this, since it changed a number only by adding to it: it now tries values past
  a double's whole numbers, and shots in both request and result, and a plant that restores the ceiling proves it can.
- **`verify --json --history` checks the history**, as the text does, and `verify --json` on a set, an estimate or an
  algorithm's answer gives JSON. `--history` on one of those is refused, rather than ignored.
- **The reference was too lenient, and is not now.** It accepted, as valid: a receipt under the identity as
  its key, for any content (a library's default Ed25519 check takes a small-order key); `alg` other than
  `ed25519`; `canon: null`, read as the first form; hex in upper case or with `+` (a second spelling of an
  unsealed receipt); and a member named twice. A key with a two-byte character among its hex digits made
  `wai-quantum verify` panic. It now refuses each, decodes keys and `R` canonically, refuses `S ≥ ℓ` itself
  whatever the library's features, and keeps a first-form result's member order when it removes the receipt.
- **`wai-quantum verify --json`** gives a job's verdict as data (valid, the reasons, the key, the form, and
  what a provider's result says of itself), and **`--lines`** judges one job a line. Its text names the
  rules a receipt breaks and, for a provider's result, its class, its counts' source and its `execution`.
- **A second verifier** (`quantum-conformance/tools/receipt_verify.py`), written in Python from §8 alone by a
  reader who had not seen the reference, standard library only (its BLAKE3, Ed25519, RFC 8785 text and strict
  reader its own). Its readings of the text, gap by gap, became §8's sentences. A corpus
  (`quantum-conformance/receipts/`): receipts made by the command line, the job service and every built-in
  kind through a scripted service, the engine's fixtures, and receipts crafted to break one rule each, every
  expectation written by hand. `receipt_differential.py` holds the two verifiers and the manifest to each
  other on every receipt and on every one-member change of each valid one, and each defect planted in the
  second verifier must be caught; CI runs it beside the build of the command line, and the second verifier
  against the manifest among the independent verifiers.
