### wai-quantum 0.4.0: circuits carry their gateset

- **`Gateset { V1, V2 }`** names the capability a circuit is reconstructed with, and
  `Circuit` carries one in a new field. `Circuit::new` and `Circuit::qft` build V2
  (`wai.quantum.circuit2`); a circuit read from a container takes the container's, and one
  derived from another keeps it. `PHASE_V1` and `PHASE_V2` are literal constants: no
  recurrence runs at load. `simulate`, `to_wqc`, `circuit_hash`, receipts, the fabric's
  lanes and the toolchain follow the circuit's gateset. `from_wqc` reads both magics,
  checks a circuit/1 contract's values and a circuit2 contract's bytes, reads the contract
  and the measurement as I-JSON with a strict reader of its own that decides every rule
  from the text, the number range on the literal's digits (so neither a build feature nor
  a float parser's limits changes a verdict), refuses repeated sections and
  wrapping bounds, and no longer sizes an allocation from a claimed op count.
  `reject_corpus()` and `accept_corpus()` return the payloads a reader must refuse, each
  with its class, and must accept, each with its reading; the corpus's `reject/` and
  `accept/` trees are written from them.
- **Every circuit built in code changes its `circuit_hash`**, since the contract names the
  capability, and its statevector wherever `H`, `T`, `T†`, `P(3)` or `P(k ≥ 5)` acts on a
  nonzero amplitude (`P(1)`, `P(2)` and `P(4)` are the same in both tables). Every
  circuit/1 artefact reproduces: the four original vectors, the legacy receipt pins, the
  lanes32 certificate corpus and the other pins are unchanged, built in `Gateset::V1`, and
  new V2 pins sit beside them.
- **wai-rs** registers `wai.quantum.circuit2`; `quantum_envelope` tags an envelope with the
  circuit's capability and refuses one whose capability and magic disagree. The
  `wai-quantum` CLI takes `--gateset v1|v2` (default v2) and names the capability in its
  JSON; with `--gateset v1` and a phase of `k ≥ 8` it prints the circuit/1 deviation on
  standard error. `wai_quantum_meter` seals the capability the file names. The browser
  sink reads both magics; the IDE has `set_gateset`, and its `add()` sets the parameter of
  every gate but `P` to 0. The serve component, `wai-quantum-serve` 0.5.0, takes
  `gateset=v1|v2` on `/run`, `/qasm` and `/receipt`.
- **Migration from 0.3** (a breaking release):
  - `Circuit::new` is V2. To reproduce or verify a 0.3 artefact, read its `WQC1` file, or
    set `c.gateset = Gateset::V1` on a circuit built in code; a receipt's `gateset_of`
    says which gateset a circuit's ops match it under.
  - `quantum::phase`, `quantum::inv_sqrt2` and `quantum::CAPABILITY` are removed in favour
    of `Gateset::phase`, `Gateset::inv_sqrt2` and `Gateset::capability`.
  - `to_wqc`, `circuit_hash` and `quantum_toolchain::circuit_id` return a `Result`; they
    fail only on a circuit its gateset does not allow, never on one that has simulated.
  - `Circuit` and `QuantumError` are `#[non_exhaustive]`; `QuantumError` gains `Contract`
    and `kind()`.
  - `quantum_fabric::certify_lanes` and `lanes::random_circuit` take a gateset, with a
    kernel and generator id per gateset; the circuit/1 ids are unchanged.
  - `validate` refuses a gate with more than 255 controls, and in V2 repeated controls and
    a parameter on any gate but `P`. `from_wqc` refuses the payloads quantum-sim §8 lists.

