Check a program against what it must do
check_quantum_programOne call for the inner loop: the program read (whether it reads, the reader's diagnostics with their lines and codes, its measures and smells); where the reader refuses it, the mechanical fixes the engine would make on the flagged lines and what needs a person; and given what it must do (intent, or a task with cases and constraints), each case run and graded passed, failed or unchecked by the strongest layer the engine has for its intent, with the verdict, its layer and that layer's limits, each constraint measured, what went wrong and where to look. next says what to do next. Nothing is sealed: when every case passes, grade_quantum_program seals the grade. Never call a program correct past what its verdict's level and layer say. Each case's intent is held to the service's bounds before it runs, and a case past them is refused with the local command (wai-quantum check).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"qasm": "<qasm>"
},
"name": "check_quantum_program"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qasm | Yes | The program, OpenQASM 3 or 2, or a generator (integer input) with its values in `inputs` or in the task's cases. | |
| seed | No | With intent: the sampling seed (1 when not given). | |
| task | No | What the program must do, in the exercise form, as grade_quantum_program takes it: `intent` or `cases` (each {"name", "inputs", "intent"}), `job` ({"shots", "seed", "noise"}) and `constraints`. | |
| shots | No | With intent: the shots each run samples (16 when not given; an intent is decided on the program, not on these). | |
| inputs | No | A generator's integer inputs, as {"n": 5}: the program's one case when the task gives no cases. | |
| intent | No | What the program must do, as run_quantum_circuit takes it: one intent or a list (wai-quantum://docs/verdicts). Give this or `task`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||