Some checks failed
wai-quantum editors / does this change touch it (push) Successful in 38s
WAI operation catalogue / does this change touch it (push) Successful in 52s
wai-quantum clippy / does this change touch it (push) Successful in 46s
wai-quantum contract / does this change touch it (push) Successful in 46s
wai-quantum pulse and dynamics / does this change touch it (push) Successful in 47s
wai-quantum for JavaScript / does this change touch it (push) Successful in 49s
wai-quantum OpenQASM reader / does this change touch it (push) Successful in 48s
wai-quantum other formats / does this change touch it (push) Successful in 50s
wai-quantum extension points / does this change touch it (push) Successful in 38s
wai-quantum error correction and mitigation / does this change touch it (push) Successful in 40s
wai-quantum for Python / does this change touch it (push) Successful in 41s
wai-quantum service / does this change touch it (push) Successful in 39s
wai-quantum service / service energy · linux packages (push) Failing after 34s
wai-quantum studio and desktop / does this change touch it (push) Successful in 41s
wai-quantum views in agent hosts / does this change touch it (push) Successful in 41s
wai-quantum variational and algorithm library / does this change touch it (push) Successful in 42s
wai-quantum verdicts and repairs / does this change touch it (push) Successful in 42s
wai-sink-android native sink library / does this change touch it (push) Successful in 19s
wai-sink-swift native sink package / does this change touch it (push) Successful in 44s
WAI Studio / does this change touch it (push) Successful in 45s
wai-quantum command line / does this change touch it (push) Successful in 9m2s
wai-quantum docs, course and locales / does this change touch it (push) Successful in 8m59s
wai-quantum resource estimation / does this change touch it (push) Successful in 9m0s
wai-audit collector and player integration / does this change touch it (push) Successful in 9m18s
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (push) Successful in 25s
WAI examples / WAI examples · does this change touch them (push) Successful in 25s
wai-quantum wasmQ / does this change touch it (push) Successful in 13s
wai-quantum contract / the policy is linked, and the deprecations page reads (push) Successful in 11s
wai-quantum editors / editors · linux (push) Successful in 3m52s
wai-quantum OpenQASM reader / corpus under wasm32-wasip2 (wasmtime) (push) Successful in 1m46s
wai-quantum clippy / clippy, warnings denied, every feature set · linux (push) Successful in 6m35s
wai-quantum OpenQASM reader / reader and corpus · linux (push) Successful in 2m37s
wai-quantum pulse and dynamics / reader, simulator and pulse jobs under wasm32-wasip2 (wasmtime) (push) Successful in 2m42s
wai-quantum pulse and dynamics / reader, simulator and pulse jobs · linux, release (push) Successful in 3m43s
wai-quantum other formats / the set under wasm32-wasip2 (wasmtime) (push) Successful in 4m7s
wai-quantum contract / API compatibility · linux (push) Successful in 11m14s
wai-quantum extension points / the registry under wasm32-wasip2 (wasmtime) (push) Successful in 2m57s
wai-quantum for JavaScript / javascript · linux (push) Successful in 10m33s
wai-quantum other formats / readers, writers and the set · linux (push) Successful in 8m43s
WAI operation catalogue / the catalogue and every door · linux (push) Successful in 17m31s
wai-quantum views in agent hosts / views · the page and its engine (push) Successful in 4m32s
WAI Studio / the catalogue's actions, the unit tests and the core · linux (push) Successful in 2m20s
wai-quantum verdicts and repairs / the intent set and the verdict under wasm32-wasip2 (wasmtime) (push) Successful in 2m51s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux, release (push) Successful in 5m19s
wai-quantum verdicts and repairs / verdicts, repairs and the intent set · linux (push) Successful in 4m4s
wai-quantum for Python / python · linux (push) Successful in 8m23s
wai-quantum contract / schemas and the committed tool lists · linux (push) Successful in 18m12s
wai-quantum error correction and mitigation / codes, decoders, texts and mitigation · linux, release (push) Successful in 8m35s
wai-quantum studio and desktop / studio · browser (push) Successful in 7m41s
wai-quantum extension points / the registry and the example · linux (push) Successful in 11m7s
wai-quantum studio and desktop / desktop app · linux (push) Successful in 12m12s
wai-quantum views in agent hosts / views · a scripted host (push) Successful in 11m13s
wai-quantum service / service · linux (push) Successful in 14m53s
wai-quantum docs, course and locales / the Studio's words in every locale · linux (push) Successful in 13s
wai-quantum docs, course and locales / the course and the command line's languages · linux (push) Successful in 5m53s
wai-quantum resource estimation / estimation and calibration · linux, release (push) Successful in 7m21s
WAI Studio / Studio in WebKit · linux (push) Successful in 22m10s
wai-audit collector and player integration / collector · linux (push) Successful in 4m55s
wai-quantum wasmQ / the reference modules rebuild to their modules of record · linux (push) Successful in 1m26s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (push) Successful in 4m59s
wai-quantum wasmQ / profile, engines, reference modules, adversarial, vectors · linux (push) Successful in 5m40s
wai-quantum wasmQ / interpreter and vectors under wasm32-wasip2 (wasmtime) (push) Successful in 6m31s
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (push) Successful in 15m4s
wai-quantum command line / command line · linux (push) Successful in 39m2s
WAI examples / WAI examples · portable · linux (push) Failing after 29m19s
wai-quantum docs, course and locales / every command and snippet in the docs · linux (push) Successful in 46m17s
wai-quantum pulse and dynamics / the same bits · macos (push) Successful in 1m25s
wai-quantum editors / editors · macos (push) Successful in 2m59s
wai-quantum for Python / python · macos (push) Successful in 3m33s
wai-quantum pulse and dynamics / the same bits · linux-arm64 (push) Successful in 3m17s
wai-quantum studio and desktop / desktop app · macos (push) Successful in 4m17s
wai-quantum service / service · macos (push) Successful in 8m29s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux-arm64, release (push) Successful in 3m28s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (push) Successful in 11m6s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (push) Successful in 8m1s
wai-quantum extension points / the registry and the example · linux-arm64 (push) Successful in 8m26s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (push) Successful in 7m43s
WAI Studio / Studio in Chromium and Firefox · macos (push) Successful in 14m42s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (push) Successful in 15m21s
wai-quantum command line / command line · macos (push) Successful in 2m29s
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (push) Successful in 2m6s
WAI examples / WAI examples · android-app · linux-arm64 (push) Successful in 11m41s
wai-quantum wasmQ / profile, engines, reference modules, adversarial, vectors · macos (push) Successful in 2m5s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (push) Successful in 30m40s
wai-quantum studio and desktop / desktop app · windows (push) Has been cancelled
The native-turns client read only a backend's qubits, sent zz to noise models
whose devices run only an MS gate, sent no noise seed, rebuilt counts from
probabilities where the service gives shot records, and could neither cancel
nor estimate. Each is fixed and tested against a fake built from the
service's published OpenAPI document (version 0.4), corrected where a
read-only positive control of the service (2026-11-12) answered otherwise
(tests/fake_turns/): it refuses every member and value the API does not
allow, answers the paths as the service did, runs the gates by the service's
own printed matrices, and answers in each published result format and bit
order.
- The backend from GET /backends/{backend}, which the service answers for
simulator and for qpu.-prefixed processors (bare names are not found, the
published enum notwithstanding): status available or refused, degraded
stated, the simulator's noise models bounding the one sent,
characterization_id as the calibration, a processor's pairs from its
characterization; the list only for a noise model's device.
- Placement: device_target from a processor's characterization through the
engine's backend-characterization import; an ms backend now reads as gpims
exactly there.
- Gates: zz only where the backend lists it, else ms; under a noise model the
modelled device's gates and qubits (the list's entry, else the published
models). A program in another gate set, or a noise model on a processor, is
refused before anything is sent.
- Basis::GpiMs (gpims): gpi, gpi2 and ms(phi0, phi1, theta), the first phase
the first qubit's, theta 0 to 1/4 turn; each cz ms(0, 0, 1/4) between gpi2(1/4)
and gpi2(3/4), every program the prx rz xx program gate for gate. Proved by
the engine's equivalence check (the cz, frames into ms's phases, the phase
order, whole programs); seven native vectors pinned and proved, gpizz among
them for the first time. In the open protocol within version 1: schema,
reference --basis gpims, an ms-past-a-quarter-turn refusal vector.
- The published matrices pinned: gpi2(0) is Rx(pi/2) and gpi2(1/2) Rx(-pi/2),
as the matrix says and the prose does not.
- noise.seed from the job's seed (1 when none), sealed as /noise/seed in the
receipt's execution and held to the seed the service says it ran.
- Results from shot records, else the service's counts, else probabilities,
qubit 0 first in v2 bitstrings and bit arrays; records and counts must agree.
Leaked shots are counted as read and sealed in a new optional member,
leakage (quantum-providers 8.1, 8.4, both verifiers).
- Cancel (PUT /jobs/{id}/status/cancel, canceled read as cancelled); GET
/jobs/{id}/cost after a run.
- Estimate: a gate-priced job is the rate card's figure for exactly its gates
and shots, its minimum included, rounded up to the cent, admitted by a cost
ceiling only where the service's own estimate is no higher; compute-time
prices (the service's own: credits by the compute-second), estimates above
the card, amounts in no currency or another currency meet no ceiling. The
simulator is free and not asked (the service estimates processors only).
- Spec 4, 5.1, 8.1, 8.3, 8.4, 10; receipt corpus: five new made receipts and
twelve crafted ones; crafted-kind-turns-shots is now valid.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
327 lines
20 KiB
JSON
327 lines
20 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-qpu/schemas/provider.v1.json",
|
||
"title": "wai.quantum.provider/1",
|
||
"description": "The open provider protocol's messages as JSON Schema (wai/extensions/quantum-providers.md): a client's message to a provider (#/$defs/message), the program it carries (#/$defs/program), and the provider's answer to each operation (#/$defs/answer). Fields marked optional may be added to answers without a new protocol version, and a client ignores fields it does not know.",
|
||
"$defs": {
|
||
"message": {
|
||
"description": "A message: the protocol, the operation, the person's settings, and the operation's fields.",
|
||
"oneOf": [
|
||
{ "$ref": "#/$defs/describe" },
|
||
{ "$ref": "#/$defs/estimate" },
|
||
{ "$ref": "#/$defs/submit" },
|
||
{ "$ref": "#/$defs/status" },
|
||
{ "$ref": "#/$defs/result" },
|
||
{ "$ref": "#/$defs/cancel" }
|
||
]
|
||
},
|
||
"settings": { "type": "object", "description": "The person's non-secret settings for this provider, passed as they are." },
|
||
"describe": {
|
||
"type": "object",
|
||
"required": ["protocol", "op"],
|
||
"properties": { "protocol": { "const": "wai.quantum.provider/1" }, "op": { "const": "describe" }, "settings": { "$ref": "#/$defs/settings" } }
|
||
},
|
||
"estimate": {
|
||
"type": "object",
|
||
"required": ["protocol", "op"],
|
||
"properties": { "protocol": { "const": "wai.quantum.provider/1" }, "op": { "const": "estimate" }, "settings": { "$ref": "#/$defs/settings" }, "program": { "$ref": "#/$defs/program" }, "shots": { "type": "integer", "minimum": 1 }, "landscape": { "$ref": "#/$defs/landscape_job" } },
|
||
"oneOf": [
|
||
{ "description": "A circuit: its program in the device's gates, and its shots.", "required": ["program", "shots"] },
|
||
{ "description": "An energy-landscape job (section 11), in place of a program and its shots.", "required": ["landscape"] }
|
||
]
|
||
},
|
||
"submit": {
|
||
"type": "object",
|
||
"required": ["protocol", "op"],
|
||
"properties": { "protocol": { "const": "wai.quantum.provider/1" }, "op": { "const": "submit" }, "settings": { "$ref": "#/$defs/settings" }, "program": { "$ref": "#/$defs/program" }, "shots": { "type": "integer", "minimum": 1 }, "seed": { "type": "integer", "minimum": 0, "description": "A seeded simulator uses it; a device ignores it." }, "landscape": { "$ref": "#/$defs/landscape_job" } },
|
||
"oneOf": [
|
||
{ "description": "A circuit: its program in the device's gates, and its shots.", "required": ["program", "shots"] },
|
||
{ "description": "An energy-landscape job (section 11), in place of a program, its shots and its seed.", "required": ["landscape"] }
|
||
]
|
||
},
|
||
"landscape_job": {
|
||
"type": "object",
|
||
"description": "An energy-landscape job (section 11.2): an operation of wai.quantum.landscape/1 or wai.quantum.landscape/2 and its request, in that extension's own form. The request's `protocol` names the version, the first where it names none.",
|
||
"required": ["op", "request"],
|
||
"properties": {
|
||
"op": { "enum": ["run", "sweep", "compare", "replay"] },
|
||
"request": { "type": "object", "description": "The request of wai/extensions/quantum-landscape.md section 2 (or of quantum-landscape-2.md section 2, with `protocol`): its program, and its seed, temperatures and parity where it gives them." }
|
||
}
|
||
},
|
||
"status": {
|
||
"type": "object",
|
||
"required": ["protocol", "op", "job"],
|
||
"properties": { "protocol": { "const": "wai.quantum.provider/1" }, "op": { "const": "status" }, "settings": { "$ref": "#/$defs/settings" }, "job": { "type": "string" } }
|
||
},
|
||
"result": {
|
||
"type": "object",
|
||
"required": ["protocol", "op", "job"],
|
||
"properties": { "protocol": { "const": "wai.quantum.provider/1" }, "op": { "const": "result" }, "settings": { "$ref": "#/$defs/settings" }, "job": { "type": "string" } }
|
||
},
|
||
"cancel": {
|
||
"type": "object",
|
||
"required": ["protocol", "op", "job"],
|
||
"properties": { "protocol": { "const": "wai.quantum.provider/1" }, "op": { "const": "cancel" }, "settings": { "$ref": "#/$defs/settings" }, "job": { "type": "string" } }
|
||
},
|
||
"turns": {
|
||
"type": "array",
|
||
"description": "An angle as a fraction of a full turn, [m, k] meaning m/2^k of 2π, 0 ≤ m < 2^k, k ≤ 32.",
|
||
"items": { "type": "integer", "minimum": 0 },
|
||
"minItems": 2,
|
||
"maxItems": 2
|
||
},
|
||
"program": {
|
||
"type": "object",
|
||
"description": "A program in the device's own gates on its physical qubits, every angle an exact fraction of a turn, with the same program as OpenQASM 3 beside it (informative: where they differ, the gates are the program).",
|
||
"required": ["format", "basis", "bits", "gates", "measure"],
|
||
"properties": {
|
||
"format": { "const": "wai.native/1" },
|
||
"basis": { "enum": ["rzsxxcz", "prxcz", "gpizz", "prxrzxx", "gpims"] },
|
||
"bits": { "type": "integer", "minimum": 0 },
|
||
"gates": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"required": ["gate", "qubits"],
|
||
"properties": {
|
||
"gate": { "enum": ["rz", "sx", "x", "cz", "prx", "gpi", "gpi2", "zz", "xx", "ms", "move"] },
|
||
"qubits": { "type": "array", "items": { "type": "integer", "minimum": 0 }, "minItems": 1, "maxItems": 2 },
|
||
"turns": { "type": "array", "items": { "$ref": "#/$defs/turns" }, "description": "rz(t), zz(t), xx(t), gpi(p), gpi2(p): one; prx(t, p): two; ms(p0, p1, t), the first qubit's phase, the second's, and the angle: three; move (a qubit, then a resonator): none." }
|
||
}
|
||
}
|
||
},
|
||
"measure": {
|
||
"type": "array",
|
||
"description": "For each classical bit, the physical qubit it reads at the end.",
|
||
"items": { "type": "object", "required": ["qubit", "bit"], "properties": { "qubit": { "type": "integer", "minimum": 0 }, "bit": { "type": "integer", "minimum": 0 } } }
|
||
},
|
||
"qasm3": { "type": "string" }
|
||
}
|
||
},
|
||
"error": {
|
||
"type": "object",
|
||
"description": "An answer that is not ok: a code, and a message for a person that never quotes a credential.",
|
||
"required": ["ok", "error"],
|
||
"properties": {
|
||
"ok": { "const": false },
|
||
"error": {
|
||
"type": "object",
|
||
"required": ["code", "message"],
|
||
"properties": {
|
||
"code": { "enum": ["invalid", "unsupported", "unsupported_version", "unauthorized", "not_found", "refused", "quota", "unavailable", "internal"] },
|
||
"message": { "type": "string" },
|
||
"line": { "type": "integer", "minimum": 1, "description": "For an energy-landscape request a reader refuses (section 11.2): the line of the program its sentence names, where it names one." }
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"answer": {
|
||
"description": "An answer: ok with the operation's fields, or an error.",
|
||
"anyOf": [
|
||
{ "$ref": "#/$defs/describe_answer" },
|
||
{ "$ref": "#/$defs/estimate_answer" },
|
||
{ "$ref": "#/$defs/submit_answer" },
|
||
{ "$ref": "#/$defs/status_answer" },
|
||
{ "$ref": "#/$defs/result_answer" },
|
||
{ "$ref": "#/$defs/error" }
|
||
]
|
||
},
|
||
"describe_answer": {
|
||
"type": "object",
|
||
"required": ["ok", "protocol", "provider", "device", "provenance", "qubits", "native_gates", "connectivity", "calibration", "billing"],
|
||
"properties": {
|
||
"ok": { "const": true },
|
||
"protocol": { "const": "wai.quantum.provider/1" },
|
||
"provider": { "type": "string" },
|
||
"device": { "type": "string" },
|
||
"provenance": { "enum": ["silicon", "emulator", "simulator"] },
|
||
"simulator": { "type": "string", "description": "What the simulator is, in a sentence." },
|
||
"emulator": { "type": "string", "description": "What the emulator is, in a sentence." },
|
||
"qubits": { "type": "integer", "minimum": 0, "description": "The device's qubit count: 0 for a device that takes energy-landscape jobs and no circuits (section 11.1)." },
|
||
"native_gates": { "type": "array", "items": { "type": "string" } },
|
||
"connectivity": {
|
||
"anyOf": [
|
||
{ "const": "all" },
|
||
{ "type": "array", "items": { "type": "array", "items": { "type": "integer", "minimum": 0 }, "minItems": 2, "maxItems": 2 } }
|
||
]
|
||
},
|
||
"resonators": { "type": "array", "items": { "type": "integer", "minimum": 0 }, "description": "Optional (section 5.1): the places among 0 to qubits − 1 that are computational resonators, each reached by cz from the qubits connectivity pairs with it." },
|
||
"moves": { "type": "array", "items": { "type": "array", "items": { "type": "integer", "minimum": 0 }, "minItems": 2, "maxItems": 2 }, "description": "Optional, with resonators: each [qubit, resonator] on which move runs." },
|
||
"durations": { "type": "object", "description": "Gate and measurement durations, with their unit." },
|
||
"calibration": {
|
||
"type": "object",
|
||
"required": ["id"],
|
||
"properties": {
|
||
"id": { "type": "string" },
|
||
"qubits": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"required": ["qubit"],
|
||
"properties": {
|
||
"qubit": { "type": "integer", "minimum": 0 },
|
||
"readout_error": { "type": "number", "minimum": 0, "maximum": 1 },
|
||
"error_1q": { "type": "number", "minimum": 0, "maximum": 1 },
|
||
"t1_us": { "type": "number", "minimum": 0 },
|
||
"t2_us": { "type": "number", "minimum": 0 }
|
||
}
|
||
}
|
||
},
|
||
"edges": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"required": ["qubits"],
|
||
"properties": {
|
||
"qubits": { "type": "array", "items": { "type": "integer", "minimum": 0 }, "minItems": 2, "maxItems": 2 },
|
||
"error": { "type": "number", "minimum": 0, "maximum": 1 }
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"billing": {
|
||
"anyOf": [
|
||
{
|
||
"type": "object",
|
||
"required": ["free"],
|
||
"properties": { "free": { "const": true }, "free_tier": { "description": "The free use offered, and its limits, as the provider states them." } }
|
||
},
|
||
{
|
||
"type": "object",
|
||
"required": ["unit", "price", "currency"],
|
||
"properties": {
|
||
"free": { "const": false },
|
||
"unit": { "type": "string", "description": "shot, job, second, …" },
|
||
"price": { "type": "string", "description": "The price of one unit, as a decimal string." },
|
||
"currency": { "type": "string" },
|
||
"free_tier": { "description": "The free use offered, and its limits, as the provider states them." }
|
||
}
|
||
},
|
||
{
|
||
"type": "object",
|
||
"required": ["free", "priced"],
|
||
"description": "The device is not free, and the provider sets no price (section 5.1): a job no estimate prices has an unknown cost, which a client shows as unknown and submits only on the person's confirmation (section 7). It holds no unit, price or currency, and priced is in this form only.",
|
||
"properties": {
|
||
"free": { "const": false },
|
||
"priced": { "const": false },
|
||
"free_tier": { "description": "The free use offered, and its limits, as the provider states them." }
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"max_shots": { "type": "integer", "minimum": 1 },
|
||
"seeded": { "type": "boolean" },
|
||
"approximate": { "type": "boolean", "description": "Optional, with provenance simulator or emulator: true when the simulator's results are approximate (a truncated tensor network, a sampled Pauli path); a result is then labelled approximate (section 5.1)." },
|
||
"landscape": {
|
||
"type": "object",
|
||
"description": "Optional (section 11.1): the energy-landscape jobs the device takes.",
|
||
"required": ["protocol", "ops"],
|
||
"properties": {
|
||
"protocol": { "enum": ["wai.quantum.landscape/1", "wai.quantum.landscape/2"], "description": "The earliest version of the landscape protocol it takes: wai.quantum.landscape/1 for a device that takes the first, as every device of the earlier text states." },
|
||
"protocols": { "type": "array", "minItems": 1, "maxItems": 2, "items": { "enum": ["wai.quantum.landscape/1", "wai.quantum.landscape/2"] }, "description": "Optional: every version it takes, none twice, `protocol` the earliest of them. Where it is absent the device takes `protocol` alone." },
|
||
"ops": { "type": "array", "minItems": 1, "maxItems": 4, "items": { "enum": ["run", "sweep", "compare", "replay"] }, "description": "The operations it takes, none twice." },
|
||
"members": { "type": "array", "description": "What it places jobs on, in the order it offers them.", "items": { "type": "object", "required": ["id", "class"], "properties": { "id": { "type": "string" }, "class": { "enum": ["cpu", "gpu", "fpga"] } } } },
|
||
"max_bytes": { "type": "integer", "minimum": 1, "description": "The most memory a job may hold on it, as wai.quantum.landscape/1 section 2.0 counts it (the second version counts the same), where that is less than 268,435,456." }
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"estimate_answer": {
|
||
"type": "object",
|
||
"description": "Section 5.2: free; priced, an amount and its currency; or unpriced, not free and no price set for the job, its cost unknown (a client shows it as unknown and submits the job only on the person's confirmation for that run). priced is in the unpriced form only.",
|
||
"required": ["ok", "free"],
|
||
"properties": {
|
||
"ok": { "const": true },
|
||
"free": { "type": "boolean" },
|
||
"amount": { "type": "string", "description": "When it is priced: the cost, as a decimal string." },
|
||
"currency": { "type": "string" },
|
||
"unit": { "type": "string", "description": "Optional, when it is priced: the billing unit the cost counts." },
|
||
"at_least": { "type": "boolean", "description": "Optional, when it is priced: true when the amount is only the least the job can come to." },
|
||
"priced": { "const": false, "description": "The unpriced form only: the job is not free, and the provider sets no price for it." },
|
||
"seconds": { "type": "number", "minimum": 0 },
|
||
"note": { "type": "string" },
|
||
"operations": { "type": "integer", "minimum": 0, "description": "For an energy-landscape job (section 11.2): its operations, as wai.quantum.landscape/1 section 2.0 counts them before anything runs." },
|
||
"bytes": { "type": "integer", "minimum": 0, "description": "For an energy-landscape job: the memory it can hold, counted the same way." }
|
||
},
|
||
"oneOf": [
|
||
{
|
||
"description": "Free.",
|
||
"properties": {
|
||
"ok": { "const": true }, "free": { "const": true },
|
||
"seconds": { "type": "number", "minimum": 0 }, "note": { "type": "string" },
|
||
"operations": { "type": "integer", "minimum": 0 }, "bytes": { "type": "integer", "minimum": 0 }
|
||
}
|
||
},
|
||
{
|
||
"description": "Priced: an amount and its currency.",
|
||
"required": ["amount", "currency"],
|
||
"properties": {
|
||
"ok": { "const": true }, "free": { "const": false },
|
||
"amount": { "type": "string" }, "currency": { "type": "string" }, "unit": { "type": "string" }, "at_least": { "type": "boolean" },
|
||
"seconds": { "type": "number", "minimum": 0 }, "note": { "type": "string" },
|
||
"operations": { "type": "integer", "minimum": 0 }, "bytes": { "type": "integer", "minimum": 0 }
|
||
}
|
||
},
|
||
{
|
||
"description": "Unpriced: not free, no price set for the job, and no amount, currency, unit or at_least.",
|
||
"required": ["priced"],
|
||
"properties": {
|
||
"ok": { "const": true }, "free": { "const": false }, "priced": { "const": false },
|
||
"seconds": { "type": "number", "minimum": 0 }, "note": { "type": "string" },
|
||
"operations": { "type": "integer", "minimum": 0 }, "bytes": { "type": "integer", "minimum": 0 }
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"submit_answer": {
|
||
"type": "object",
|
||
"required": ["ok", "job"],
|
||
"properties": { "ok": { "const": true }, "job": { "type": "string" } }
|
||
},
|
||
"status_answer": {
|
||
"type": "object",
|
||
"description": "status, and cancel's answer: to a cancel, cancelled; or, for a job that had already ended, how it ended: done, or failed with its reason (section 5.6).",
|
||
"required": ["ok", "status"],
|
||
"properties": {
|
||
"ok": { "const": true },
|
||
"status": { "enum": ["queued", "running", "done", "failed", "cancelled"] },
|
||
"reason": { "type": "string" }
|
||
}
|
||
},
|
||
"result_answer": {
|
||
"type": "object",
|
||
"required": ["ok"],
|
||
"oneOf": [
|
||
{ "description": "A circuit's counts.", "required": ["counts", "shots"] },
|
||
{ "description": "An energy-landscape job's answer (section 11.2).", "required": ["landscape"] }
|
||
],
|
||
"properties": {
|
||
"ok": { "const": true },
|
||
"landscape": { "type": "object", "description": "For an energy-landscape job (section 11.2): the answer of wai.quantum.landscape/1 section 3 to its operation, or of wai.quantum.landscape/2 section 3 for a job of that version." },
|
||
"counts": { "type": "object", "description": "Outcomes to counts, the highest bit first, summing to the shots, or to accepted_shots where it is given.", "additionalProperties": { "type": "integer", "minimum": 0 } },
|
||
"shots": { "type": "integer", "minimum": 1 },
|
||
"accepted_shots": { "type": "integer", "minimum": 1, "description": "Optional (section 5.5): the shots the device kept, where it kept another number than asked (a post-selected or heralded readout, or a device that runs more than asked). The counts are of these shots, and sum to it." },
|
||
"calibration": { "type": "string" },
|
||
"charged": { "type": "object", "required": ["amount", "currency"], "properties": { "amount": { "type": "string" }, "currency": { "type": "string" } } },
|
||
"energy": { "type": "object", "properties": { "kwh": { "type": "number", "minimum": 0 } } },
|
||
"counts_source": { "enum": ["shots", "vendor_counts", "probabilities"], "description": "Optional (section 5.5): one record a shot, tallied (shots); the provider's own counts (vendor_counts, how an answer that does not say is read); or counts rebuilt from probabilities, derived and not shot records (probabilities)." },
|
||
"execution": {
|
||
"type": "object",
|
||
"description": "Optional (section 5.5): how the device ran the program. Each of the five steps is off, on, none (the device has no such step), or unknown (a step the provider cannot vouch for); verbatim says whether the gates ran as written. A provider that relays a job to another service states it.",
|
||
"required": ["mitigation", "twirling", "decoupling", "remapping", "optimisation", "verbatim"],
|
||
"properties": {
|
||
"mitigation": { "enum": ["off", "on", "none", "unknown"] },
|
||
"twirling": { "enum": ["off", "on", "none", "unknown"] },
|
||
"decoupling": { "enum": ["off", "on", "none", "unknown"] },
|
||
"remapping": { "enum": ["off", "on", "none", "unknown"] },
|
||
"optimisation": { "enum": ["off", "on", "none", "unknown"] },
|
||
"verbatim": { "type": "boolean" },
|
||
"note": { "type": "string" }
|
||
},
|
||
"additionalProperties": false
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|