{ "$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" } } } } }