{ "$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/qec.v1.json", "title": "wai.quantum.qec/1", "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": [ "request", "result" ], "properties": { "request": { "type": "object", "description": "The call's request, as given." }, "result": { "$ref": "#/$defs/result" } }, "$defs": { "result": { "description": "A code, a decode or a threshold, with its receipt.", "anyOf": [ { "$ref": "#/$defs/code" }, { "$ref": "#/$defs/decode" }, { "$ref": "#/$defs/threshold" } ] }, "code": { "type": "object", "description": "A code: its checks and stabilizers, k, its layout, the decoders it takes, and its distance certificate (or a given one's check).", "required": [ "ok", "code" ], "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.qec/1" }, "ok": { "const": true }, "code": { "type": "object", "properties": { "name": { "type": "string" }, "family": { "type": "string" }, "n": { "type": "integer" }, "k": { "type": "integer" }, "nominal_distance": { "type": "integer" }, "checks": { "type": "array" }, "stabs": { "type": "array" }, "sectors": { "type": "string" }, "families_hash": { "type": "string" }, "layout": { "type": "object" }, "decoders": { "type": "array", "items": { "type": "string" } }, "colors": { "type": "array" } } }, "certificate": { "$ref": "distance.v1.json" }, "check": { "type": "object", "description": "A given certificate's check: its witnesses, and the search run again.", "properties": { "verified": { "type": "boolean" }, "witnesses": { "type": "boolean" }, "search_reproduced": { "type": "boolean" }, "why": { "type": "string" } } }, "receipt": { "$ref": "receipt.v2.json" } } }, "decode": { "type": "object", "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.", "required": [ "decoder" ], "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.qec/1" }, "decoder": { "type": "string" }, "code": { "type": "string" }, "syndrome": { "type": "array", "items": { "type": "integer" } }, "correction": { "type": "array", "items": { "type": "integer" } }, "weight": { "type": "integer" }, "explains": { "type": "boolean" }, "error": { "type": "array", "items": { "type": "integer" } }, "residual": { "type": "object", "properties": { "qubits": { "type": "array", "items": { "type": "integer" } }, "logical": { "type": "boolean" }, "reading": { "type": "string" } } }, "detectors": { "type": "integer" }, "observables": { "type": "integer" }, "mechanisms": { "type": "integer" }, "fired": { "type": "array", "items": { "type": "integer" } }, "predicted": { "type": "array", "items": { "type": "integer" } }, "shots": { "type": "integer" }, "seed": { "type": "integer" }, "failures": { "type": "integer" }, "rate": { "type": "number" }, "stderr": { "type": "number" }, "detail": { "type": "object", "description": "The decoder's own: its passes, its convergence, its windows.", "additionalProperties": true }, "receipt": { "$ref": "receipt.v2.json" } } }, "threshold": { "type": "object", "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.", "required": [ "points", "below_threshold" ], "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.qec/1" }, "family": { "type": "string" }, "decoder": { "type": [ "string", "null" ] }, "noise": { "type": [ "string", "object", "null" ] }, "seed": { "type": "integer" }, "points": { "type": "array", "items": { "type": "object", "properties": { "distance": { "type": "integer" }, "p": { "type": "number" }, "rounds": { "type": "integer" }, "shots": { "type": "integer" }, "failures": { "type": "integer" }, "rate": { "type": "number" }, "stderr": { "type": "number" }, "per_round": { "type": [ "number", "null" ] } } } }, "fit": { "type": [ "object", "null" ], "properties": { "model": { "type": "string" }, "prefactor": { "type": "number" }, "threshold": { "type": "number" } } }, "below_threshold": { "type": "array", "items": { "type": "object", "properties": { "p": { "type": "number" }, "distance_helps": { "type": "boolean" } } } }, "reading": { "type": "string" }, "receipt": { "$ref": "receipt.v2.json" } } } } }