The apps branch's documents join the version contract. The answer layer's documents (wai.quantum.answer/1: an answer read, carried out, a seal's request and result, a stored answer checked), described as a draft whose form may change before the extension settles; a correctness record and its corpus (wai.quantum.telemetry/1); the views page's manifest (wai.quantum.views-bundle/1); and the command line's harness report, corpus and token counts (wai.quantum.eval-report/1, eval-answers/1, token-cost/1). The engine's test holds every answer of the layer's conformance set (read, carried out, half arrived, and stored and verified), records, the corpus and the committed manifest to them; the eval tests hold a scripted run's report, a model server's, the corpus and the committed token counts; check_schemas.py holds the committed documents too. The tool and diagnostic schemas take the answer layer's outcomes, dropped and defaulted. The result view's own tool, poll_quantum_job, listed only to a host that draws views, answers to the job's schema, and the strict test holds it. The basis rename reaches the views: a compile's words and its view name the gate set by its basis (both read the certificate's old target), and a test in each holds it. The service's job summary now lives in engine::views (the apps branch moved it there); it carries the durable branch's set summary and the processor packages' energy wording with it. The answer set's stored seal was made at 0.6.16; the values it seals name their engine, so it is written again at 0.7.0 (WAI_ANSWER_BUNDLE_WRITE=1). The views crate's lock moves to wai-quantum 0.7.0. Co-Authored-By: Claude Opus 5.5 <[email protected]>
320 lines
7.7 KiB
JSON
320 lines
7.7 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/answer.v1.json",
|
||
"title": "wai.quantum.answer/1",
|
||
"description": "The answer view layer (engine::answer, wai/extensions/quantum-answers.md), a draft extension and not the agent path: a model's answer as a few view statements over OpenQASM 3, each view's numbers bound to an engine call written with @. This is the answer as the engine reads it (its statements, its root and the order its views are drawn in, its diagnostics, its digest and the receipt its marker carries), what carrying out its calls gives (evaluation), and what a seal over its statements signs (seal_request, seal_result). Its form may change before the extension is settled; DEPRECATIONS.md does not list a change to it.",
|
||
"type": "object",
|
||
"required": [
|
||
"format",
|
||
"complete",
|
||
"statements",
|
||
"diagnostics",
|
||
"errors",
|
||
"warnings",
|
||
"digest"
|
||
],
|
||
"properties": {
|
||
"format": {
|
||
"const": "wai.quantum.answer/1"
|
||
},
|
||
"complete": {
|
||
"type": "boolean",
|
||
"description": "Whether the text has ended; a snapshot of a stream has not."
|
||
},
|
||
"root": {
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"order": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"statements": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/$defs/statement"
|
||
}
|
||
},
|
||
"diagnostics": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/$defs/diagnostic"
|
||
}
|
||
},
|
||
"errors": {
|
||
"type": "integer",
|
||
"minimum": 0
|
||
},
|
||
"warnings": {
|
||
"type": "integer",
|
||
"minimum": 0
|
||
},
|
||
"digest": {
|
||
"type": "string",
|
||
"description": "BLAKE3 of the answer's text before its first marker, in hex: what a seal binds."
|
||
},
|
||
"receipt": {
|
||
"type": [
|
||
"object",
|
||
"null"
|
||
],
|
||
"description": "The receipt the answer's marker line carries."
|
||
}
|
||
},
|
||
"$defs": {
|
||
"statement": {
|
||
"type": "object",
|
||
"description": "A statement that stands: its name and line, what it is (a program, a view, an engine call or a value), whether it is ready, the names it depends on, and its program (the fenced qasm block, its lines, whether it reads, its qubits and bits) or its expression.",
|
||
"required": [
|
||
"name",
|
||
"line",
|
||
"kind",
|
||
"status"
|
||
],
|
||
"properties": {
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"line": {
|
||
"type": "integer"
|
||
},
|
||
"kind": {
|
||
"enum": [
|
||
"program",
|
||
"view",
|
||
"call",
|
||
"value"
|
||
]
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"deps": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"view": {
|
||
"type": "string"
|
||
},
|
||
"call": {
|
||
"type": "string"
|
||
},
|
||
"qasm": {
|
||
"type": "string"
|
||
},
|
||
"lines": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"reads": {
|
||
"type": "boolean"
|
||
},
|
||
"qubits": {
|
||
"type": "integer"
|
||
},
|
||
"bits": {
|
||
"type": "integer"
|
||
},
|
||
"expr": {
|
||
"type": "object",
|
||
"description": "The expression as read: a view or an engine call with its arguments, a name, a list, an object or a literal.",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
},
|
||
"diagnostic": {
|
||
"type": "object",
|
||
"description": "A problem with a line: its code (the reader's Q… for a program, J100–J112 for a statement), what it does to the statement, its line and column, and the statement it names.",
|
||
"required": [
|
||
"code",
|
||
"outcome",
|
||
"line",
|
||
"message"
|
||
],
|
||
"properties": {
|
||
"code": {
|
||
"type": "string"
|
||
},
|
||
"outcome": {
|
||
"enum": [
|
||
"dropped",
|
||
"defaulted",
|
||
"warned",
|
||
"refused",
|
||
"lowered",
|
||
"carried",
|
||
"preserved",
|
||
"failed",
|
||
"retry"
|
||
]
|
||
},
|
||
"severity": {
|
||
"enum": [
|
||
"error",
|
||
"warning"
|
||
]
|
||
},
|
||
"line": {
|
||
"type": "integer",
|
||
"minimum": 0
|
||
},
|
||
"column": {
|
||
"type": "integer",
|
||
"minimum": 0
|
||
},
|
||
"message": {
|
||
"type": "string"
|
||
},
|
||
"statement": {
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"evaluation": {
|
||
"type": "object",
|
||
"description": "Every statement that is ready, carried out on the engine, by name: its value, or why the engine refused it.",
|
||
"required": [
|
||
"format",
|
||
"digest",
|
||
"results"
|
||
],
|
||
"properties": {
|
||
"format": {
|
||
"const": "wai.quantum.answer/1"
|
||
},
|
||
"digest": {
|
||
"type": "string"
|
||
},
|
||
"results": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"$ref": "#/$defs/outcome"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"seal_request": {
|
||
"type": "object",
|
||
"description": "What a seal's receipt seals as its request: the answer's digest and the statements it names.",
|
||
"required": [
|
||
"format",
|
||
"answer",
|
||
"sealed"
|
||
],
|
||
"properties": {
|
||
"format": {
|
||
"const": "wai.quantum.answer/1"
|
||
},
|
||
"answer": {
|
||
"type": "string"
|
||
},
|
||
"sealed": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"seal_result": {
|
||
"type": "object",
|
||
"description": "What a seal's receipt seals as its result: each named statement's value.",
|
||
"required": [
|
||
"statements"
|
||
],
|
||
"properties": {
|
||
"statements": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
},
|
||
"receipt": {
|
||
"$ref": "receipt.v2.json"
|
||
}
|
||
}
|
||
},
|
||
"outcome": {
|
||
"type": "object",
|
||
"description": "One statement's value, or its refusal as data (its message, codes, outcome and meaning).",
|
||
"required": [
|
||
"ok"
|
||
],
|
||
"properties": {
|
||
"ok": {
|
||
"type": "boolean"
|
||
},
|
||
"value": {},
|
||
"error": {
|
||
"type": "string"
|
||
},
|
||
"message": {
|
||
"type": "string"
|
||
},
|
||
"code": {
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"codes": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"outcome": {
|
||
"type": "string"
|
||
},
|
||
"meaning": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"verify": {
|
||
"type": "object",
|
||
"description": "A stored answer's receipt checked by running the answer again: whether it seals what its statements give now, its key and signer, the seal's statement and what it seals.",
|
||
"required": [
|
||
"valid"
|
||
],
|
||
"properties": {
|
||
"valid": {
|
||
"type": "boolean"
|
||
},
|
||
"key": {
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"signer": {
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"statement": {
|
||
"type": "string"
|
||
},
|
||
"sealed": {
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|