open-standards/wai/wai-quantum/schemas/mitigation.v1.json
Transaction Science b9af554c7c wai-quantum contract over error correction and mitigation: their answers' schemas, distinct refusal codes, the basis in the new passes, and the smoke within one window
Error correction and mitigation join the version contract. An error-correction
answer (wai.quantum.qec/1: a code, a decode or a threshold), a code's distance
certificate (wai.quantum.distance/1) and a job's mitigation
(wai.quantum.mitigation/1) are engine schemas; every answer engine::qec::call
gives names the engine and its schema, inside what a host seals. The job
request names mitigate, and a compile's options and certificate twirl and dd.
qec_code, qec_decode and qec_threshold answer to output schemas on both
servers; the strict tests call each, a mitigated run and a compile with both
passes, the engine's test holds every decoder's answer and each mitigation
method to its schema, the contract workflow requires it by name, and
check_schemas.py holds the command line's answers too.

Refusal codes: the set branch and this one had each taken J007. A set that
does not read keeps J007; mitigation's refusals are J008 and error
correction's J009, in the table, its page, the tests, the docs and the
changelog.

The basis rename reaches the new passes: compile::Options carries twirl and
dd beside basis, and the command line's compile, both servers' compile
options and their tests name the gate set basis.

The service smoke test made 32 submissions with both branches' checks, past
the 30 a client may make in a window (it is also run against production after
a deploy). It now makes 28 (29 on a host with a GPU, whose single-precision
run is held to the exact values instead of a second run): the code-capacity
decode against its error, the changed estimate, the counts document and the
classical shortcuts are left to the MCP servers' tests, which hold each.

The agent docs are regenerated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 08:42:54 -04:00

155 lines
4 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/mitigation.v1.json",
"title": "wai.quantum.mitigation/1",
"description": "A job's mitigation (its request's mitigate, engine::mitigate), in its result: the method and the options it ran with, its bias and variance assumptions, each observable raw and mitigated with a standard error each and the ideal value (or, for readout, the counts inverted as a quasi-distribution), the method's own details and what it spent. docs/qec.md describes each method.",
"type": "object",
"required": [
"method",
"options",
"assumptions"
],
"properties": {
"method": {
"enum": [
"zne",
"pea",
"pec",
"cdr",
"vd",
"readout"
]
},
"options": {
"type": "object",
"description": "The options it ran with, the defaults filled in.",
"properties": {
"method": {
"type": "string"
},
"shots": {
"type": "integer"
},
"seed": {
"type": "integer"
},
"factors": {
"type": "array",
"items": {
"type": "number"
}
},
"extrapolation": {
"enum": [
"richardson",
"linear",
"exponential"
]
},
"samples": {
"type": "integer"
},
"training": {
"type": "integer"
},
"keep": {
"type": "integer"
},
"learn_shots": {
"type": "integer"
}
}
},
"assumptions": {
"type": "object",
"properties": {
"bias": {
"type": "string"
},
"variance": {
"type": "string"
}
}
},
"noise": {
"type": "string",
"description": "How the job's noise model is read for the method."
},
"note": {
"type": "string"
},
"observables": {
"type": "array",
"items": {
"type": "object",
"description": "One observable: its raw value and the mitigated one, each with its standard error, and the ideal value a simulation knows.",
"properties": {
"observable": {
"type": "string"
},
"coeff": {
"type": "number"
},
"raw": {
"type": "number"
},
"raw_stderr": {
"type": "number"
},
"mitigated": {
"type": "number"
},
"stderr": {
"type": "number"
},
"ideal": {
"type": "number"
}
}
}
},
"distribution": {
"type": "array",
"description": "readout: each outcome's raw share and its mitigated quasi-probability, with its standard error.",
"items": {
"type": "object",
"properties": {
"bits": {
"type": "string"
},
"raw": {
"type": "number"
},
"mitigated": {
"type": "number"
},
"stderr": {
"type": "number"
}
}
}
},
"details": {
"type": "object",
"description": "The method's own: the folded scales and the folding check (zne), the learned model and the amplified values (pea), the quasi-probability and the value it converges to (pec), the training fits (cdr), the purity (vd), the flip and its amplification (readout).",
"additionalProperties": true
},
"cost": {
"type": "object",
"description": "The circuits and shots it spent beyond the job's own.",
"properties": {
"circuits": {
"type": "integer",
"minimum": 0
},
"shots": {
"type": "integer",
"minimum": 0
},
"note": {
"type": "string"
}
}
}
}
}