engine::pulse makes a pulse program a job of the method pulse, planned and run through catalog::plan and run::run like every job, so every host that runs jobs runs it: the device from a target's calibration snapshot and the request's pulse options over the defaults, each parameter saying where it came from; counts sampled from the captures' joint reading (into the program's bits) or the final state; the accuracy class bounded, with the proved truncation bound and the rounding estimate. The result's pulse.calibration holds the control program's digest, its calibrations', the schedule's and the device's, and the target snapshot's name, hash and calibration id; pulse.integrator the integrator and its step; pulse.density_hash the final state's bits. The job's receipt seals them with the result. engine::pulse::check holds a sealed pulse job to its request: the signature, the program's digest, and the request run again, each differing field named. engine::pulse::schedule draws the schedule for a view; tools() gives the pulse_schedule and pulse_check tools for both servers. J040 and J041 join the job layer's refusals; the verdict of a pulse run is its own (executed, bounded). schemas/pulse.v1.json is new (FILES grows from 22 to 23); the job request and result schemas gain the pulse options and the pulse result, and the accuracy its bound. Co-Authored-By: Claude Opus 5.5 <[email protected]>
413 lines
11 KiB
JSON
413 lines
11 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/pulse.v1.json",
|
|
"title": "wai.quantum.pulse/1",
|
|
"description": "A pulse answer as every host gives it (engine::pulse: pulse_schedule and pulse_check on both servers, wai-quantum pulse, POST /v1/pulse/*, the Studio): the request, and the result sealed in a job's form. A pulse program's schedule on frames, or a pulse job checked by running it again. A pulse run itself is a job (method pulse) and follows job-result.v1.json. A result names the engine that made it and this schema (engine and schema). docs/pulse.md explains each.",
|
|
"type": "object",
|
|
"required": [
|
|
"request",
|
|
"result"
|
|
],
|
|
"properties": {
|
|
"request": {
|
|
"type": "object",
|
|
"description": "The call's request, as given."
|
|
},
|
|
"result": {
|
|
"$ref": "#/$defs/result"
|
|
}
|
|
},
|
|
"$defs": {
|
|
"result": {
|
|
"description": "A schedule or a check, with its receipt.",
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/schedule"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/check"
|
|
}
|
|
]
|
|
},
|
|
"schedule": {
|
|
"type": "object",
|
|
"description": "A pulse program's schedule (pulse_schedule, wai-quantum pulse schedule, POST /v1/pulse/schedule): its frames and ports, every instruction at its sample, each waveform's samples, the gate calls, the reader's notes, and the digests a run binds.",
|
|
"required": [
|
|
"answer",
|
|
"dt_ns",
|
|
"duration",
|
|
"frames",
|
|
"waveforms",
|
|
"instructions",
|
|
"calls",
|
|
"calibration"
|
|
],
|
|
"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.pulse/1"
|
|
},
|
|
"answer": {
|
|
"const": "schedule"
|
|
},
|
|
"dt_ns": {
|
|
"type": "number",
|
|
"description": "The sample period, ns."
|
|
},
|
|
"duration": {
|
|
"type": "integer",
|
|
"description": "The latest time of any frame, samples."
|
|
},
|
|
"duration_ns": {
|
|
"type": "number"
|
|
},
|
|
"grammar": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"ports": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"enum": [
|
|
"drive",
|
|
"measure",
|
|
"acquire"
|
|
]
|
|
},
|
|
"qubit": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"frames": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"port": {
|
|
"type": "string"
|
|
},
|
|
"qubit": {
|
|
"type": "integer"
|
|
},
|
|
"kind": {
|
|
"enum": [
|
|
"drive",
|
|
"measure",
|
|
"acquire"
|
|
]
|
|
},
|
|
"frequency_hz": {
|
|
"type": "number"
|
|
},
|
|
"phase": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"waveforms": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"length": {
|
|
"type": "integer"
|
|
},
|
|
"samples": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "number"
|
|
},
|
|
"minItems": 2,
|
|
"maxItems": 2
|
|
}
|
|
},
|
|
"samples_every": {
|
|
"type": "integer",
|
|
"description": "Each k-th sample is drawn, when the schedule holds more than the view writes out."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"instructions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"frame",
|
|
"op",
|
|
"start",
|
|
"length"
|
|
],
|
|
"properties": {
|
|
"frame": {
|
|
"type": "integer"
|
|
},
|
|
"op": {
|
|
"enum": [
|
|
"play",
|
|
"delay",
|
|
"shift_phase",
|
|
"set_phase",
|
|
"shift_frequency",
|
|
"set_frequency",
|
|
"capture",
|
|
"barrier"
|
|
]
|
|
},
|
|
"start": {
|
|
"type": "integer"
|
|
},
|
|
"length": {
|
|
"type": "integer"
|
|
},
|
|
"line": {
|
|
"type": "integer"
|
|
},
|
|
"waveform": {
|
|
"type": "integer"
|
|
},
|
|
"phase": {
|
|
"type": "number"
|
|
},
|
|
"frequency_hz": {
|
|
"type": "number"
|
|
},
|
|
"carrier": {
|
|
"type": "number",
|
|
"description": "The carrier's phase at the play's first sample, cycles in [0, 1)."
|
|
},
|
|
"value": {
|
|
"type": "number"
|
|
},
|
|
"bit": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"calls": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"qubits": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"params": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"start": {
|
|
"type": "integer"
|
|
},
|
|
"end": {
|
|
"type": "integer"
|
|
},
|
|
"line": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"bits": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"qubits": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"decimated": {
|
|
"type": "string"
|
|
},
|
|
"diagnostics": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"description": "A reader's note or warning (qasm::diag).",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"outcome": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"line": {
|
|
"type": "integer"
|
|
},
|
|
"column": {
|
|
"type": "integer"
|
|
},
|
|
"length": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"calibration": {
|
|
"type": "object",
|
|
"description": "What a pulse run's receipt binds of the program: the BLAKE3 of the control program's text, of its calibrations as written (every cal, defcal and defcalgrammar, joined by newlines), and of the schedule's JSON; a run adds the device's and the target snapshot's.",
|
|
"required": [
|
|
"program",
|
|
"calibrations",
|
|
"schedule"
|
|
],
|
|
"properties": {
|
|
"program": {
|
|
"type": "string"
|
|
},
|
|
"calibrations": {
|
|
"type": "string"
|
|
},
|
|
"schedule": {
|
|
"type": "string"
|
|
},
|
|
"device": {
|
|
"type": "string"
|
|
},
|
|
"target": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"hash": {
|
|
"type": "string"
|
|
},
|
|
"calibration": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"receipt": {
|
|
"$ref": "receipt.v2.json"
|
|
}
|
|
}
|
|
},
|
|
"check": {
|
|
"type": "object",
|
|
"description": "A pulse job checked (pulse_check, wai-quantum pulse check, POST /v1/pulse/check): its receipt's signature, its program's digest, and the request run again with the result held to the one given.",
|
|
"required": [
|
|
"answer",
|
|
"verified",
|
|
"signature",
|
|
"program",
|
|
"reproduced",
|
|
"differences",
|
|
"statement"
|
|
],
|
|
"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.pulse/1"
|
|
},
|
|
"answer": {
|
|
"const": "check"
|
|
},
|
|
"verified": {
|
|
"type": "boolean"
|
|
},
|
|
"signature": {
|
|
"type": "boolean"
|
|
},
|
|
"key": {},
|
|
"program": {
|
|
"type": "boolean"
|
|
},
|
|
"reproduced": {
|
|
"type": "boolean"
|
|
},
|
|
"differences": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Each field (or field.member) whose value differs from the run here."
|
|
},
|
|
"density_hash": {
|
|
"type": "object",
|
|
"properties": {
|
|
"given": {},
|
|
"recomputed": {}
|
|
}
|
|
},
|
|
"calibration": {},
|
|
"statement": {
|
|
"type": "string"
|
|
},
|
|
"receipt": {
|
|
"$ref": "receipt.v2.json"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|