open-standards/wai/wai-quantum/schemas/target.v1.json
Transaction Science 30f8fd2f8c wai-quantum schemas over the integrated stack: the verdict, the J codes, estimates, targets, the debugger and the repair, and every tool's output held
- verdict.v1.json (wai.quantum.verdict/1), target.v1.json
  (wai.quantum.target/1) and estimate.v1.json (wai.quantum.estimate/1) are
  committed; verdict::json_schema() and targets::schema() are those files.
- tools.v1.json: the job layer's J codes beside the reader's, a refusal as
  data, the repair, debug_step and debug_branches, the target listing and a
  target's summary, and every draw format; the job request's intent,
  verdict, target and repair, the result's verdict, target and repaired, and
  the plan's target.
- Every tool on both servers has its output schema (Registry::tool_output):
  its answer or a refusal as data, the verdict beside either and required for
  a tool that states one, and an $id versioning it
  (wai-quantum://schemas/TOOL/1). The strict every-tool tests call
  repair_qasm, estimate_resources, debug_step, debug_branches, list_targets,
  show_target and run_on_target too, and the refusals.
- An estimate's sealed result names its engine and schema; its re-run
  check leaves both out, so an estimate another version sealed re-runs.
  Pins that moved: wai-web's ESTIMATE_DIGEST (aaa42bc8… to 0cd25cf6…). The
  no-verdict byte pins in engine::job hold the bytes they held, the stamp
  left out of what they hash.
- The tool lists regenerated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 23:44:28 -04:00

177 lines
5 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/target.v1.json",
"title": "wai.quantum.target/1",
"description": "A device target: its qubits, the pairs it couples, its native gates with their errors and durations, and the calibration snapshot they come from. A value not known is left out, never written as zero. Every field but format, name, source, qubits, gates and coupling is optional, and a field the format does not name is refused, so a misspelt one never reads as absent. Its canonical text is its RFC 8785 form, and the BLAKE3 of that text, the target's hash, names the snapshot in a receipt.",
"type": "object",
"required": [
"format",
"name",
"source",
"qubits",
"gates",
"coupling"
],
"additionalProperties": false,
"properties": {
"format": {
"const": "wai.quantum.target/1"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"source": {
"type": "object",
"required": [
"format"
],
"additionalProperties": false,
"properties": {
"format": {
"type": "string",
"description": "The format the target was read from (wai-quantum targets import --help lists them)."
},
"note": {
"type": "string",
"maxLength": 400
}
}
},
"calibration": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"maxLength": 400,
"description": "The calibration snapshot's id, as the source names it, or a content id of the snapshot read."
},
"timestamp": {
"type": "string",
"maxLength": 400,
"description": "When the snapshot was taken, as the source writes it."
}
}
},
"qubits": {
"type": "array",
"minItems": 1,
"maxItems": 2048,
"description": "Every qubit, in order.",
"items": {
"type": "object",
"required": [
"qubit"
],
"additionalProperties": false,
"properties": {
"qubit": {
"type": "integer",
"minimum": 0,
"description": "Its index: its place in the list."
},
"label": {
"type": "string",
"description": "The source's own name for it, when that is not its index."
},
"t1_us": {
"type": "number",
"minimum": 0,
"description": "T1, microseconds."
},
"t2_us": {
"type": "number",
"minimum": 0,
"description": "T2 (the echo or Ramsey time the source reports), microseconds."
},
"frequency_ghz": {
"type": "number",
"minimum": 0,
"description": "Its frequency, gigahertz."
},
"readout": {
"type": "object",
"required": [
"p01",
"p10"
],
"additionalProperties": false,
"properties": {
"p01": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "P(reads 1 | holds 0)."
},
"p10": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "P(reads 0 | holds 1)."
}
}
},
"measure_ns": {
"type": "number",
"minimum": 0,
"description": "The measurement's duration, nanoseconds."
}
}
}
},
"gates": {
"type": "array",
"maxItems": 262144,
"description": "Each native gate where the device runs it, sorted by gate then qubits.",
"items": {
"type": "object",
"required": [
"gate",
"qubits"
],
"additionalProperties": false,
"properties": {
"gate": {
"type": "string",
"pattern": "^[a-z0-9_]{1,40}$"
},
"qubits": {
"type": "array",
"minItems": 1,
"maxItems": 2,
"items": {
"type": "integer",
"minimum": 0
}
},
"error": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "The average gate infidelity."
},
"duration_ns": {
"type": "number",
"minimum": 0,
"description": "Nanoseconds."
}
}
}
},
"coupling": {
"type": "array",
"description": "The pairs a two-qubit gate may act on, each once, the lower qubit first, sorted.",
"items": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": {
"type": "integer",
"minimum": 0
}
}
}
}
}