RFC 8785's spelling of a large whole double is taken; a set's receipt is section 8.6, with three reasons, and every surface judges a set by it; a receipt is checked on its text in the Studio, the desktop app and the npm example; set requests are screened; the tools take a job's text; qubit_names covers every qubit qasm3 acts on; the service's verify schema describes signer. Corpus: two sets made by the command line, fourteen set vectors, five number vectors, one names vector; three more plants. Work in progress: its battery is running. Co-Authored-By: Claude Opus 5.5 <[email protected]>
184 lines
4.7 KiB
JSON
184 lines
4.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/set.v1.json",
|
|
"title": "wai.quantum.set/1",
|
|
"description": "A set's result: many programs, or one program over a grid of its inputs, run as one job (engine::sets). Its head holds the count, how many items finished and failed, the Merkle root over the items' leaves, the set's energy and time; the set's receipt seals the set's request and its head. Each item is a plain job with its own receipt, its index, its point in a sweep, and its path to the root, so it is shown sealed by the set alone. A result names the engine that made it and this schema (engine and schema).",
|
|
"type": "object",
|
|
"required": [
|
|
"format",
|
|
"count",
|
|
"done",
|
|
"failed",
|
|
"root",
|
|
"items"
|
|
],
|
|
"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.set/1"
|
|
},
|
|
"format": {
|
|
"const": "wai.quantum.set/1"
|
|
},
|
|
"count": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"done": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"failed": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"root": {
|
|
"type": "string",
|
|
"description": "The Merkle root of the items' leaves, in hex (domains moq-jwp:merkle-leaf and moq-jwp:merkle-node, version 1)."
|
|
},
|
|
"energy": {
|
|
"$ref": "job-result.v1.json#/$defs/energy"
|
|
},
|
|
"elapsed_ms": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"receipt": {
|
|
"$ref": "receipt.v2.json"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/item"
|
|
}
|
|
}
|
|
},
|
|
"$defs": {
|
|
"item": {
|
|
"type": "object",
|
|
"description": "One item: its index, its point in a sweep, its request (a plain job, complete in itself), and its result with its own receipt, or why it failed; and its path to the set's root.",
|
|
"required": [
|
|
"index",
|
|
"request",
|
|
"status",
|
|
"path"
|
|
],
|
|
"properties": {
|
|
"index": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"point": {
|
|
"type": "object",
|
|
"description": "A sweep's item: the value of each input it was run at."
|
|
},
|
|
"status": {
|
|
"enum": [
|
|
"done",
|
|
"failed"
|
|
]
|
|
},
|
|
"method": {
|
|
"type": "string"
|
|
},
|
|
"why": {
|
|
"type": "string"
|
|
},
|
|
"request": {
|
|
"$ref": "job-request.v1.json"
|
|
},
|
|
"result": {
|
|
"$ref": "job-result.v1.json"
|
|
},
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"code": {
|
|
"type": "string",
|
|
"description": "A failed item's refusal code (engine::refusal)."
|
|
},
|
|
"path": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "The item's leaf's sibling digests up to the root, in hex."
|
|
}
|
|
}
|
|
},
|
|
"verify": {
|
|
"type": "object",
|
|
"description": "A set's check: the set's receipt over its request and head, the items the request gives at their indices, every item's own receipt, the root over the leaves and each item's path.",
|
|
"required": [
|
|
"valid",
|
|
"signed",
|
|
"derived",
|
|
"items",
|
|
"items_sealed",
|
|
"root"
|
|
],
|
|
"properties": {
|
|
"valid": {
|
|
"type": "boolean"
|
|
},
|
|
"signed": {
|
|
"type": "boolean"
|
|
},
|
|
"derived": {
|
|
"type": "boolean"
|
|
},
|
|
"items": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"items_sealed": {
|
|
"type": "boolean"
|
|
},
|
|
"root": {
|
|
"type": "boolean"
|
|
},
|
|
"key": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"signer": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "That key as a did:key, where a surface gives it."
|
|
},
|
|
"reasons": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Each rule the set's receipt breaks (the provider protocol's sections 8.4 and 8.6): none when it is valid."
|
|
},
|
|
"form": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|