engine::answer reads wai.quantum.answer/1: view statements over an OpenQASM 3 program (Histogram, Verdict, Equivalence, Bloch, Estimate, Receipt and the rest, fourteen in all), each view's numbers bound to an engine call written with @ (@Sample, @Check, @Seal, eleven in all), so a model's answer shows numbers the engine computed. One statement a line, the program in a named qasm fence, root first, forward references, and a later declaration standing as the edit. The reader streams: a snapshot says what is ready, pending or dropped, and the finished answer is the whole text's at every split (tested at every split point). Every problem has a stable code: a program's keep the reader's Q codes, a statement's are the new J100 to J112, each dropped, defaulted or warned, and only the dropped ones are errors a model is sent back. eval carries the calls out on the engine (a run's time left out), seals what @Seal names in a job's form, and checks a stored answer's receipt marker by running it again. The conformance set (quantum-conformance/answers/, 20 cases, every code) passes natively, under wasm32-wasip2 and in the browser, where the stored case written natively verifies to the same bytes. wai-web gains AnswerStream and the answer and telemetry calls (pins 24 native, 16 wasm32). engine::telemetry defines the correctness record (codes, verdict level, repairs, the person's accept or reject, the receipt) and turns the failures among records into an eval corpus in the conformance format. The specification (extensions/quantum-answers.md) is a draft whose token comparison is still to come. Co-Authored-By: Claude Opus 5.5 <[email protected]>
8 lines
143 B
Text
8 lines
143 B
Text
root = Answer([counts, circ])
|
|
```qasm bad
|
|
OPENQASM 3.0;
|
|
qubit[1] q;
|
|
foo q[0];
|
|
```
|
|
counts = Histogram(@Sample(bad, 10))
|
|
circ = Circuit(nowhere)
|