{ "$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/course-check.v1.json", "title": "wai.quantum.course-check/1", "description": "A program checked against a lesson's exercise (engine::course::check, wai-quantum learn check, the Studio's course): whether it passes, the weakest verdict level among its cases, each case run with its intent, each constraint measured, what went wrong in the locale with where to look, the program's measures, and for an exercise that bounds them its resource estimate. Never the exercise's solution. A check names the engine that made it and this schema. The lesson as served, and a hint, are in $defs.", "type": "object", "required": [ "schema", "lesson", "locale", "passed", "level", "statement", "cases", "constraints", "what_went_wrong", "pointer" ], "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.course-check/1" }, "lesson": { "type": ["string", "null"], "description": "The lesson's id; null for an exercise that is no lesson's, checked by engine::course::check_exercise (a task the job service writes a program for)." }, "locale": { "type": "string" }, "passed": { "type": "boolean" }, "level": { "enum": [ "refused", "parsed", "executed", "evidence", "proof" ] }, "statement": { "type": "string" }, "cases": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": [ "string", "null" ] }, "inputs": { "type": [ "object", "null" ] }, "passed": { "type": "boolean" }, "level": { "type": [ "string", "null" ] }, "holds": { "type": [ "boolean", "null" ] }, "statement": { "type": [ "string", "null" ] }, "verdict": { "$ref": "verdict.v1.json" } }, "additionalProperties": true } }, "constraints": { "type": "array", "items": { "type": "object", "properties": { "rule": { "type": "string" }, "subject": { "type": [ "string", "null" ] }, "text": { "type": "string" }, "holds": { "type": [ "boolean", "null" ] }, "found": {} } } }, "what_went_wrong": { "type": "array", "items": { "type": "object", "required": [ "kind", "text" ], "properties": { "kind": { "type": "string" }, "text": { "type": "string" }, "engine": { "type": "string" }, "lines": { "type": "array", "items": { "type": "integer" } }, "case": { "type": "integer" } } } }, "pointer": { "type": "string" }, "measures": { "type": "object", "additionalProperties": true }, "estimate": { "type": "object", "properties": { "counts": { "type": "object", "additionalProperties": { "type": [ "integer", "number", "null" ] } }, "physical_qubits": {}, "runtime_s": {}, "distance": {}, "figures": { "type": "string" }, "error": { "type": "string" }, "codes": { "type": "array", "items": { "type": "string" } } } } }, "$defs": { "lesson": { "type": "object", "description": "One lesson as a surface serves it in a locale (engine::course::lesson): its text, task, starter program, hints, what the program must do in words and as the check states it (a distribution shown, a program it is compared with never), its cases and constraints, and its neighbours.", "required": [ "id", "number", "of", "locale", "title", "task", "text", "starter", "hints" ], "properties": { "id": { "type": "string" }, "number": { "type": "integer" }, "of": { "type": "integer" }, "unit": { "type": "string" }, "unit_title": { "type": "string" }, "locale": { "type": "string" }, "title": { "type": "string" }, "task": { "type": "string" }, "text": { "type": "string" }, "starter": { "type": "string" }, "hints": { "type": "array", "items": { "type": "string" } }, "intent": {}, "cases": { "type": "array", "items": { "type": "object" } }, "job": { "type": "object" }, "constraints": { "type": "object" }, "requirements": { "type": "array", "items": { "type": "string" } }, "previous": { "type": [ "string", "null" ] }, "next": { "type": [ "string", "null" ] }, "translation": {} } }, "hint": { "type": "object", "description": "One of a lesson's hints, with the check's pointer for the program given, and whether more follow.", "required": [ "lesson", "locale", "level", "of", "hint", "more" ], "properties": { "lesson": { "type": "string" }, "locale": { "type": "string" }, "level": { "type": "integer", "minimum": 1 }, "of": { "type": "integer" }, "label": { "type": "string" }, "hint": { "type": "string" }, "more": { "type": "boolean" }, "pointer": { "type": [ "string", "null" ] }, "passed": { "type": [ "boolean", "null" ] } } } } }