open-standards/wai/wai-quantum/schemas/compile-result.v1.json
Transaction Science 8617d9d024
Some checks failed
wai-audit collector and player integration / does this change touch it (push) Successful in 1m35s
wai-quantum contract / does this change touch it (push) Successful in 24s
wai-quantum clippy / does this change touch it (push) Successful in 25s
wai-quantum docs, course and locales / does this change touch it (push) Successful in 23s
wai-quantum editors / does this change touch it (push) Successful in 23s
wai-quantum other formats / does this change touch it (push) Successful in 25s
wai-quantum-landscape-fpga reference design / does this change touch it (push) Successful in 18s
wai-quantum resource estimation / does this change touch it (push) Successful in 27s
wai-quantum OpenQASM reader / does this change touch it (push) Successful in 41s
wai-quantum error correction and mitigation / does this change touch it (push) Successful in 20s
wai-quantum for Python / does this change touch it (push) Successful in 23s
wai-quantum pulse and dynamics / does this change touch it (push) Successful in 28s
wai-quantum qudit jobs / does this change touch it (push) Successful in 30s
wai-quantum command line / does this change touch it (push) Successful in 3m3s
wai-quantum verdicts and repairs / does this change touch it (push) Successful in 26s
wai-quantum on Windows / does this change touch it (push) Successful in 40s
wai-sink-android native sink library / does this change touch it (push) Successful in 35s
wai-sink-swift native sink package / does this change touch it (push) Successful in 33s
wai-quantum studio and desktop / does this change touch it (push) Successful in 5m3s
wai-quantum views in agent hosts / does this change touch it (push) Successful in 4m53s
wai-quantum for JavaScript / does this change touch it (push) Successful in 6m31s
wai-quantum extension points / does this change touch it (push) Successful in 5m7s
wai-quantum variational and algorithm library / does this change touch it (push) Successful in 5m2s
wai-quantum service / does this change touch it (push) Successful in 5m5s
WAI operation catalogue / does this change touch it (push) Successful in 8m4s
WAI Studio / does this change touch it (push) Successful in 5m4s
wai-quantum service / service energy · linux packages (push) Failing after 45s
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (push) Successful in 11s
WAI examples / WAI examples · does this change touch them (push) Successful in 12s
wai-quantum landscape energy to solution / does this change touch it (push) Successful in 12s
wai-quantum landscape stage 0, the sampler against the exact law / does this change touch it (push) Successful in 12s
wai-quantum energy-landscape jobs / does this change touch it (push) Successful in 11s
wai-quantum wasmQ / does this change touch it (push) Successful in 13s
wai-quantum contract / the policy is linked, and the deprecations page reads (push) Successful in 7s
wai-quantum docs, course and locales / the Studio's words in every locale · linux (push) Successful in 19s
wai-audit collector and player integration / collector · linux (push) Successful in 4m31s
wai-quantum clippy / clippy, warnings denied, every feature set · linux (push) Successful in 4m14s
wai-quantum other formats / the set under wasm32-wasip2 (wasmtime) (push) Successful in 2m28s
wai-quantum editors / editors · linux (push) Successful in 6m59s
wai-quantum docs, course and locales / the course and the command line's languages · linux (push) Successful in 6m21s
wai-quantum OpenQASM reader / corpus under wasm32-wasip2 (wasmtime) (push) Successful in 1m42s
wai-quantum contract / schemas and the committed tool lists · linux (push) Successful in 10m31s
wai-quantum contract / API compatibility · linux (push) Successful in 10m50s
wai-quantum other formats / readers, writers and the set · linux (push) Successful in 7m33s
wai-quantum OpenQASM reader / reader and corpus · linux (push) Successful in 4m30s
wai-quantum pulse and dynamics / reader, simulator and pulse jobs · linux, release (push) Successful in 2m45s
wai-quantum qudit jobs / the module and the conformance set under wasm32-wasip2 (wasmtime) (push) Successful in 2m10s
wai-quantum pulse and dynamics / reader, simulator and pulse jobs under wasm32-wasip2 (wasmtime) (push) Successful in 2m40s
wai-quantum for Python / python · linux (push) Successful in 5m52s
wai-quantum verdicts and repairs / the intent set and the verdict under wasm32-wasip2 (wasmtime) (push) Successful in 2m39s
wai-quantum verdicts and repairs / verdicts, repairs and the intent set · linux (push) Successful in 3m15s
wai-quantum error correction and mitigation / codes, decoders, texts and mitigation · linux, release (push) Successful in 7m35s
wai-quantum resource estimation / estimation and calibration · linux, release (push) Successful in 14m38s
wai-quantum qudit jobs / the module, the job, the conformance set, the referee and the verb · linux (push) Successful in 10m42s
wai-quantum for JavaScript / javascript · linux (push) Successful in 5m13s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux, release (push) Successful in 4m41s
wai-quantum views in agent hosts / views · the page and its engine (push) Successful in 8m55s
wai-quantum views in agent hosts / views · a scripted host (push) Successful in 9m23s
WAI Studio / the catalogue's actions, the unit tests and the core · linux (push) Successful in 1m30s
wai-quantum studio and desktop / studio · browser (push) Successful in 8m17s
wai-quantum extension points / the registry under wasm32-wasip2 (wasmtime) (push) Successful in 4m51s
wai-quantum studio and desktop / desktop app · linux (push) Successful in 7m46s
wai-quantum extension points / the registry and the example · linux (push) Successful in 8m36s
wai-quantum service / service · linux (push) Successful in 11m32s
WAI operation catalogue / the catalogue and every door · linux (push) Successful in 14m55s
wai-quantum docs, course and locales / every command and snippet in the docs · linux (push) Successful in 37m4s
wai-quantum-landscape-fpga reference design / the member against the model of the logic, and the logic against the model · linux, release (push) Successful in 39m11s
wai-quantum command line / command line · linux (push) Successful in 31m15s
wai-quantum landscape stage 0, the sampler against the exact law / the small tier, to the byte · linux (push) Successful in 40s
wai-quantum landscape energy to solution / the small tier, to the byte · linux (push) Successful in 2m14s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (push) Successful in 3m58s
wai-quantum wasmQ / the reference modules rebuild to their modules of record · linux (push) Successful in 49s
WAI Studio / Studio in WebKit · linux (push) Successful in 27m40s
wai-quantum wasmQ / interpreter and vectors under wasm32-wasip2 (wasmtime) (push) Successful in 3m43s
wai-quantum energy-landscape jobs / native against WebAssembly, over many seeds (push) Successful in 8m44s
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (push) Successful in 13m26s
wai-quantum wasmQ / profile, engines, reference modules, adversarial, vectors · linux (push) Successful in 11m6s
wai-quantum energy-landscape jobs / the module under wasm32-wasip2 (wasmtime) (push) Successful in 13m27s
wai-quantum energy-landscape jobs / reader, kernels, answers and the stated result · linux, release (push) Successful in 24m58s
WAI examples / WAI examples · portable · linux (push) Successful in 31m52s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (push) Successful in 14m51s
wai-quantum-landscape-fpga reference design / the board's code on the board's processor's architecture · linux-arm64, release (push) Successful in 2m35s
wai-quantum pulse and dynamics / the same bits · linux-arm64 (push) Successful in 3m25s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux-arm64, release (push) Successful in 10m16s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (push) Successful in 19m14s
wai-quantum extension points / the registry and the example · linux-arm64 (push) Successful in 12m45s
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (push) Successful in 1m41s
wai-quantum editors / editors · macos (push) Successful in 1m43s
wai-quantum pulse and dynamics / the same bits · macos (push) Successful in 2m3s
wai-quantum for Python / python · macos (push) Successful in 3m38s
wai-quantum qudit jobs / the same bits · macos (push) Successful in 2m28s
wai-quantum command line / command line · macos (push) Successful in 2m38s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (push) Successful in 8m17s
wai-quantum studio and desktop / desktop app · macos (push) Successful in 5m52s
wai-quantum service / service · macos (push) Successful in 9m50s
WAI Studio / Studio in Chromium and Firefox · macos (push) Successful in 9m23s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (push) Successful in 30m38s
WAI examples / WAI examples · android-app · linux-arm64 (push) Successful in 11m20s
wai-quantum landscape stage 0, the sampler against the exact law / the small tier, to the byte · macos (push) Successful in 22s
wai-quantum landscape energy to solution / the small tier, to the byte · macos (push) Successful in 2m5s
wai-quantum energy-landscape jobs / the same bits · linux-arm64 (push) Successful in 13m57s
wai-quantum wasmQ / profile, engines, reference modules, adversarial, vectors · macos (push) Successful in 3m30s
wai-quantum energy-landscape jobs / the same bits · macos (push) Successful in 6m57s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (push) Successful in 32m46s
wai-quantum on Windows / engine · windows (push) Failing after 20m19s
wai-quantum on Windows / command line · windows (push) Failing after 6m4s
wai-quantum on Windows / job service · windows (push) Failing after 3m59s
wai-quantum on Windows / python · windows (push) Failing after 9m56s
wai-quantum studio and desktop / desktop app · windows (push) Successful in 14m29s
wai-quantum: a compiled program proved equal to its source, refuted with a counterexample, or undecided within a budget
engine::miter joins a compiled program and its source's inverse into one miter on the wires
both use, taking in what compilers do: the initial layout, the final layout routing leaves,
physical qubits borrowed as ancillas (start |0>, must end |0>), gates written up to a global
phase, and measurements at the end. Three routes, written here from the published methods:

- seeded inputs (|0..0>, random products of the six one-qubit stabiliser states, random
  stabiliser states, random basis states): a difference is a counterexample, and final;
- a decision diagram built from the middle out, the compiled gates on the left and the
  source's inverted gates on the right in proportion; exact in Q(e^(2 pi i/2^K)) with checked
  127-bit coefficients where every angle is a dyadic fraction of a turn of at most K bits (6),
  doubles within 1e-13 otherwise, said in the verdict; a refutation names an entry;
- ZX-calculus rewriting to bare wires: identity removal, fusion, local complementation,
  pivots in the interior and at the boundary, phase gadgets, exact phases.

The verdict is proved, refuted (with a counterexample) or undecided (each route's reason),
never proved by default; routes that disagree make it undecided. Budgets are counts, so a
verdict is the same bytes on every host.

Wired in:
- every provider plan checks its compile before anything is sent; a refuted one is not
  sent; the plan and the receipt carry compiled.equivalence (with the residual Z rotations a
  phased-X program leaves), and `wai-quantum lab equiv --receipt` decides it again from the
  receipt's own texts;
- a compile request's "equivalence": true (`wai-quantum compile --equivalence`) puts the
  verdict in the certificate, which a verifier's compile again reproduces; without it the
  certificate is unchanged;
- `wai-quantum lab equiv`: two programs, a physical program with its layouts, a native
  compile made here, or a receipt.

Tests: every gate's primitives against the reader's matrices; our compiles to all six native
gate sets, routed with ancillas on a line and a grid, proved by both routes in exact
arithmetic, and each broken one way refuted (an angle moved, a two-qubit gate dropped, the
final layout crossed, the residual left off); the circuits of our two runs on a 156-qubit
processor proved; a rotation off by 2 pi/2^20, which no input shows above rounding, refuted
by the diagram's entries; an ancilla left dirty refuted; a spent budget undecided.

Found on the way: a controlled rotation is not periodic in 2 pi (crz(t + 2 pi) is crz(t) with a
Z on the control), so its half angle is taken from the angle as written, never from its
representative modulo a turn.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-12 11:14:50 -05:00

689 lines
23 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.transaction.science/Transaction-Science/open-standards/raw/branch/main/wai/wai-quantum/schemas/compile-result.v1.json",
"title": "wai.quantum.compile-result/1",
"description": "A compile as a host returns it (the command line's compile --json, both servers' compile_qasm, the job service's POST /v1/compile): the request as given, and the result, which its receipt seals in the form every job's receipt takes. The result holds the compiled program and its certificate (wai.quantum.compile/1): each pass's counts before and after, the digests of the circuit it was given and the circuit it gave, the layer its check stands on and the distance it adds, its check and verdict, the budget and the bound the passes' distances add to (wai/extensions/quantum-compile.md). A result names the engine that made it and this schema (engine and schema); results made before results carried them have neither.",
"type": "object",
"required": [
"request",
"result"
],
"properties": {
"request": {
"type": "object",
"description": "The program and the compile's options, as given.",
"required": [
"qasm"
],
"properties": {
"qasm": {
"type": "string"
},
"epsilon": {
"type": "number"
},
"level": {
"type": "integer"
},
"basis": {
"type": "string"
},
"equivalence": {
"type": "boolean",
"description": "true: the certificate also holds the equivalence checker's verdict on the whole output against the program."
},
"stages": {
"type": "boolean"
},
"twirl": {
"description": "Twirl each two-qubit Clifford gate with Paulis drawn from a seeded stream: true (seed 1), or {\"seed\": N}. One seed is one instance, checked to be the same circuit.",
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [
"seed"
],
"properties": {
"seed": {
"type": "integer",
"minimum": 0
}
}
}
]
},
"dd": {
"description": "Dynamical decoupling in each window where a qubit idles long enough: xx or xy4 (or {\"sequence\": …}), checked to change nothing without noise.",
"anyOf": [
{
"enum": [
"xx",
"xy4"
]
},
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sequence": {
"enum": [
"xx",
"xy4"
]
}
}
}
]
}
}
},
"result": {
"$ref": "#/$defs/result"
}
},
"$defs": {
"options": {
"type": "object",
"description": "What a compile is asked for, each optional: the most the output may differ from the program (epsilon, in the operator norm up to a global phase), the level (0 lowers and approximates; 1 also rewrites and folds phases; 2 also resynthesises), the basis, the gate set it writes the program in (clifford_t: every rotation off the multiples of π/4 a Clifford+T word; standard: nothing approximated; 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), whether to give the circuit after each pass (stages), and the twirl and dd passes, last (twirl, with its seed; dd, with its sequence).",
"properties": {
"epsilon": {
"type": "number",
"exclusiveMinimum": 0
},
"level": {
"type": "integer",
"minimum": 0,
"maximum": 2
},
"basis": {
"enum": [
"clifford_t",
"standard",
"cz",
"zz",
"xx"
]
},
"stages": {
"type": "boolean"
},
"twirl": {
"description": "Twirl each two-qubit Clifford gate with Paulis drawn from a seeded stream: true (seed 1), or {\"seed\": N}. One seed is one instance, checked to be the same circuit.",
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [
"seed"
],
"properties": {
"seed": {
"type": "integer",
"minimum": 0
}
}
}
]
},
"dd": {
"description": "Dynamical decoupling in each window where a qubit idles long enough: xx or xy4 (or {\"sequence\": …}), checked to change nothing without noise.",
"anyOf": [
{
"enum": [
"xx",
"xy4"
]
},
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"sequence": {
"enum": [
"xx",
"xy4"
]
}
}
}
]
}
}
},
"counts": {
"type": "object",
"description": "A circuit's counts, as the compiler counts them.",
"properties": {
"gates": {
"type": "integer",
"minimum": 0
},
"one_qubit": {
"type": "integer",
"minimum": 0
},
"two_qubit": {
"type": "integer",
"minimum": 0
},
"three_qubit": {
"type": "integer",
"minimum": 0
},
"cnots": {
"type": "integer",
"minimum": 0
},
"t_count": {
"type": "integer",
"minimum": 0
},
"rotations": {
"type": "integer",
"minimum": 0
},
"depth": {
"type": "integer",
"minimum": 0
}
}
},
"result": {
"type": "object",
"required": [
"ok",
"options",
"qasm",
"certificate"
],
"properties": {
"engine": {
"type": "object",
"description": "The engine that made the result: the wai-quantum crate's name and version.",
"required": [
"name",
"version"
],
"properties": {
"name": {
"const": "wai-quantum"
},
"version": {
"type": "string"
}
}
},
"schema": {
"const": "wai.quantum.compile-result/1"
},
"ok": {
"const": true
},
"options": {
"type": "object",
"description": "The options the compile ran with, the defaults filled in.",
"required": [
"epsilon",
"level",
"basis"
],
"properties": {
"epsilon": {
"type": "number"
},
"level": {
"type": "integer"
},
"basis": {
"enum": [
"clifford_t",
"standard"
]
},
"twirl": {
"type": "object",
"properties": {
"seed": {
"type": "integer",
"minimum": 0
}
},
"description": "The twirl pass's seed."
},
"dd": {
"enum": [
"xx",
"xy4"
],
"description": "The decoupling pass's sequence."
}
}
},
"qasm": {
"type": "string",
"description": "The compiled program, as OpenQASM 3."
},
"certificate": {
"$ref": "#/$defs/certificate"
},
"stages": {
"type": "array",
"description": "With stages: the circuit after each pass.",
"items": {
"type": "object",
"required": [
"pass",
"qasm"
],
"properties": {
"pass": {
"type": "string"
},
"qasm": {
"type": "string"
}
}
}
},
"receipt": {
"$ref": "receipt.v2.json"
},
"components": {
"type": "array",
"description": "The identity of every component that made the compile, when a registered pass took part (engine::registry): the program's format and each pass, each registered one marked so.",
"items": {
"$ref": "#/$defs/component"
}
}
}
},
"certificate": {
"type": "object",
"description": "What the compile did and how each step was checked. Hashes are BLAKE3, in hex, of the program as read (written out as OpenQASM 3) and of the output text.",
"required": [
"format",
"basis",
"level",
"source",
"output",
"epsilon",
"passes",
"verdict"
],
"properties": {
"format": {
"const": "wai.quantum.compile/1"
},
"basis": {
"enum": [
"clifford_t",
"standard",
"cz",
"zz",
"xx"
]
},
"level": {
"type": "integer"
},
"source": {
"type": "object",
"properties": {
"hash": {
"type": "string"
},
"qubits": {
"type": "integer"
},
"counts": {
"$ref": "#/$defs/counts"
}
}
},
"output": {
"type": "object",
"properties": {
"hash": {
"type": "string"
},
"counts": {
"$ref": "#/$defs/counts"
}
}
},
"epsilon": {
"type": "object",
"description": "The budget, the bound the passes' distances add to, and how the budget was shared among the rotations.",
"properties": {
"budget": {
"type": "number"
},
"bound": {
"type": "number"
},
"rotations": {
"type": "integer"
},
"each": {
"type": "number"
}
}
},
"passes": {
"type": "array",
"description": "Each pass: its name, the digests of the circuit it was given (input) and the circuit it gave (output), the layer its check stands on, the distance it adds (bound), the counts before and after, and its check (how, the verdict, and its distance where it has one). One pass's output is the next one's input: the first input is source.hash and the last output is output.hash. A certificate sealed before certificates carried them has no input, output, layer or bound.",
"items": {
"type": "object",
"required": [
"pass",
"check"
],
"properties": {
"pass": {
"type": "string"
},
"input": {
"type": "string",
"pattern": "^[0-9a-f]{64}$",
"description": "The BLAKE3 of the circuit the pass was given, written out as OpenQASM 3."
},
"output": {
"type": "string",
"pattern": "^[0-9a-f]{64}$",
"description": "The BLAKE3 of the circuit the pass gave: its input when the pass was not applied."
},
"layer": {
"enum": [
"unchecked",
"bounded",
"exact_simulation",
"exact_arithmetic",
"stabilizer"
],
"description": "The layer the pass's check stands on: unchecked (skipped, or its check did not hold and it was left out), bounded (within the distance bound), exact_simulation (compared in double precision), exact_arithmetic (an identity in integers) or stabilizer (equal tableaus)."
},
"bound": {
"type": "number",
"minimum": 0,
"description": "The distance the pass adds to epsilon.bound: 0 for a pass checked by exact_arithmetic or stabilizer, or not applied."
},
"before": {
"$ref": "#/$defs/counts"
},
"after": {
"$ref": "#/$defs/counts"
},
"check": {
"type": "object"
},
"component": {
"$ref": "#/$defs/component",
"description": "Beside a registered pass's record: its identity. Its check is the engine's, on the whole circuit (by: engine)."
}
}
}
},
"rotations": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each rotation written as a Clifford+T word: its angle, its T count, its distance."
},
"whole": {
"type": "object",
"description": "The check of the whole output against the whole program: how, its verdict, its layer (the certificate's layer), and the distance where it measures one."
},
"verdict": {
"type": "string",
"description": "proof, exact or approximate."
},
"layer": {
"enum": [
"pass_equivalence",
"exact_simulation",
"exact_arithmetic",
"stabilizer"
],
"description": "The strongest check the whole output passed against the whole program: stabilizer (equal tableaus), exact_arithmetic (proportional over Z[ω]/√2ᵏ), exact_simulation (their dense unitaries, up to 8 qubits) or pass_equivalence (the passes' own checks, composed)."
},
"weakest": {
"enum": [
"unchecked",
"bounded",
"exact_simulation",
"exact_arithmetic",
"stabilizer",
null
],
"description": "The weakest layer among the passes that were applied; null when none was."
},
"reading": {
"type": "string",
"description": "What the certificate says of the output, in words."
},
"equivalence": {
"type": "object",
"description": "When the request asks for it: the equivalence checker's verdict on the whole output against the whole program (verdict proved, refuted with a counterexample, or undecided within its stated budget; the notion, the statement, each route's finding, the wires and the budget). A compile that approximates claims its bound, not equality, and its verdict is undecided, saying so.",
"required": ["verdict", "notion", "statement", "why"],
"properties": {
"version": {
"type": "integer",
"description": "The verdict's form: 1."
},
"notion": {
"enum": [
"unitary",
"measured"
],
"description": "unitary: one unitary up to a global phase; measured: up to phases on the computational basis just before the final measurements."
},
"statement": {
"type": "string",
"description": "The statement decided, in words."
},
"verdict": {
"enum": [
"proved",
"refuted",
"undecided"
]
},
"why": {
"type": "string",
"description": "How it was decided, or why no route decided it."
},
"proved_by": {
"type": "array",
"items": {
"type": "string"
},
"description": "The routes that proved it: decision_diagram, zx."
},
"refuted_by": {
"type": "array",
"items": {
"type": "string"
},
"description": "The routes that refuted it: stimuli, decision_diagram, zx, shape."
},
"arithmetic": {
"enum": [
"exact",
"tolerance"
],
"description": "Of a proof: exact (integers in a cyclotomic field, or exact phases), or doubles within tolerance."
},
"tolerance": {
"type": "number",
"description": "With arithmetic tolerance: within what two doubles were taken equal."
},
"global_phase": {
"type": "array",
"items": {
"type": "number"
},
"description": "The phase the decision diagram found, as [re, im]."
},
"counterexample": {
"type": "object",
"description": "Of a refutation: what shows it (found_by: stimuli, decision_diagram, zx or shape), with an input and the outcomes that differ, entries of the miter's matrix, or wires that cross."
},
"routes": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each route's finding: stimuli, decision_diagram, zx, with its outcome and its counts."
},
"wires": {
"type": "object",
"description": "The miter's wires: the logical qubits, the physical qubits used, the layout, the ancillas and the closing exchanges."
},
"gates": {
"type": "object",
"description": "Primitive gates of the source and of the compiled program."
},
"budget": {
"type": "object",
"description": "The counts each route might spend (no clock): stimuli, state_vector_qubits, diagram_nodes, diagram_steps, zx_rewrites, exact_bits, seed."
},
"residual": {
"type": "array",
"items": {
"type": "object"
},
"description": "The Z rotations the compiled program leaves unapplied before its measurements, each a physical qubit and m/2^k of a turn, which the statement takes in."
},
"residual_is": {
"type": "string"
},
"final_layout_from": {
"type": "string",
"description": "Where each logical qubit's end was read from, when it was read from the measurements."
},
"final_layout": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"guard": {
"type": "object",
"description": "At a level above 0: the program compiled at this level and at each level below it under the same options, and the output kept, the one with the fewest of the objective's counts compared in order (the highest level's of those that tie), so a level never gives a worse output than a lower one. The passes, the bound and the whole check are the kept compile's. Certificates sealed before the guard have none.",
"required": [
"objective",
"candidates",
"kept"
],
"properties": {
"how": {
"type": "string"
},
"objective": {
"type": "array",
"items": {
"enum": [
"t_count",
"cnots",
"two_qubit",
"gates"
]
},
"description": "The counts compared, in order, fewer first: t_count, cnots, gates for clifford_t; cnots, gates for standard; two_qubit, gates for cz, zz and xx."
},
"candidates": {
"type": "array",
"description": "The certificate's level and each level below it, highest first: the output's digest and its counts on the objective, or why that level refused the program.",
"items": {
"type": "object",
"required": [
"level"
],
"properties": {
"level": {
"type": "integer",
"minimum": 0
},
"output": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"counts": {
"type": "object",
"additionalProperties": {
"type": "integer",
"minimum": 0
}
},
"refused": {
"type": "string"
}
}
}
},
"kept": {
"type": "integer",
"minimum": 0,
"description": "The level whose output this is."
}
}
}
}
},
"component": {
"type": "object",
"description": "One component that made the result (engine::registry): its kind, name and version, the BLAKE3 digest of its descriptor, and whether it is built in. A result carries these only when a registered component took part; one made by built-ins alone names them as it always has (its method, its compile's passes, its noise's channels and the engine's version), the digests of that version listed by the components list.",
"required": [
"kind",
"name",
"version",
"digest",
"origin"
],
"properties": {
"kind": {
"enum": [
"method",
"pass",
"channel",
"front_end"
]
},
"name": {
"type": "string"
},
"version": {
"type": "string"
},
"digest": {
"type": "string",
"pattern": "^[0-9a-f]{64}$",
"description": "BLAKE3 of the component's descriptor in its canonical JSON (engine::registry::digest_of)."
},
"origin": {
"enum": [
"built-in",
"registered"
],
"description": "built-in: the engine's own; registered: a host's own, added in its process, not part of the engine."
},
"certified": {
"const": false,
"description": "Beside a registered component: the engine does not certify it."
}
}
}
}
}