{ "$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/job.v1.json", "title": "wai.quantum.job/1", "description": "A job as a host returns it: its status, the method its plan chose and why, the request as submitted, and, once it is done, the result with its receipt: a job's result, or for a set (a request with programs or a sweep, its method set) the set's result. The command line's run --json, the local MCP server's run_quantum_circuit and a run on the person's own provider give a finished job; the job service also gives its id and times, and a job still queued or running, or failed with its error. A job's receipt verifies from this document alone: request and result.", "type": "object", "required": ["status", "request"], "properties": { "id": { "type": "string", "description": "The job service's id for the job." }, "status": { "enum": ["queued", "running", "done", "failed", "cancelled", "interrupted"], "description": "interrupted: the job service stopped while the job ran, after it had run it again once from its request, so it has no result; error says so." }, "method": { "type": "string", "description": "The method the plan chose; set for a set; on the job service, wasmq for a wasmQ envelope's run and qudit for a qudit job." }, "why": { "type": "string", "description": "Why the plan chose the method." }, "estimate": { "type": "object", "description": "What the plan admitted the job with.", "required": ["memory_bytes", "work"], "properties": { "memory_bytes": { "type": "integer", "minimum": 0 }, "work": { "type": "integer", "minimum": 0, "description": "In the method's own unit." } } }, "request": { "description": "The request as submitted; on the job service, a wasmQ envelope's is what its receipt binds (the contract and the envelope's digest), and a qudit job's is its own.", "anyOf": [{ "$ref": "job-request.v1.json" }, { "$ref": "wasmq.v1.json#/$defs/request" }, { "type": "object", "required": ["d", "qudits", "gates"], "description": "A qudit job's request (qudit.v1.json, quantum-sim.md section 9)." }] }, "result": { "description": "A job's result; a set's; on the job service, a wasmQ envelope's run (method wasmq) or a qudit job's (method qudit).", "anyOf": [{ "$ref": "job-result.v1.json" }, { "$ref": "set.v1.json" }, { "$ref": "wasmq.v1.json#/$defs/result" }, { "$ref": "qudit.v1.json#/$defs/run" }] }, "error": { "type": "string", "description": "Why a job failed, or why it was interrupted." }, "interruptions": { "type": "array", "items": { "type": "integer" }, "description": "The job service: each time it stopped while the job ran, in milliseconds since 1970. A job that was running when the service stopped is queued again, once, to run from its stored request." }, "submitted_ms": { "type": "integer", "description": "The job service: when it was submitted, in milliseconds since 1970." }, "started_ms": { "type": "integer" }, "finished_ms": { "type": "integer" }, "peak_rss_bytes": { "type": "integer", "description": "The job service: the most memory the job's process held." }, "digests": { "type": "object", "description": "The job service: the BLAKE3 digests its store keeps the job's objects under (the request, each program, the result and the receipt).", "properties": { "algorithm": { "const": "blake3" }, "request": { "type": ["string", "null"] }, "programs": { "type": "array", "items": { "type": "string" } }, "result": { "type": "string" }, "receipt": { "type": "string" } } } } }