wai/quantum-conformance/formats/ holds a module for each construct, each with the program it must read to (a reference held by the equivalence ladder), the outcomes it gives, a round trip back to its format, the formats it writes to, and every refusal with its code and its place: the QIR specification's two example programs, every intrinsic, a QIR 1 module with typed pointers, the profiles' refusals; jeff modules built field by field from the schema; the jeff project's own structured benchmarks and examples, unchanged; and OpenQASM sources written to each format, the QIR written pinned by its BLAKE3. CI runs it in wai-quantum-formats.yml, with the readers' and writers' unit tests. The jeff reader now converts integers to floats and floats to integers, and a QIR conversion is checked against the type it gives. Co-Authored-By: Claude Opus 5.5 <[email protected]>
10 lines
432 B
Text
10 lines
432 B
Text
OPENQASM 3.0;
|
|
include "stdgates.inc";
|
|
qubit[3] q;
|
|
bit[3] c;
|
|
h q[0]; h q[1]; h q[2];
|
|
x q[0]; y q[1]; z q[2]; s q[0]; sdg q[1]; t q[2]; tdg q[0]; sx q[1];
|
|
rx(0.3) q[0]; ry(-1.1) q[1]; rz(2.5) q[2]; rz(-0.7) q[0]; p(0.9) q[1];
|
|
cx q[0], q[1]; cx q[1], q[2]; cy q[2], q[0]; cz q[0], q[2]; swap q[1], q[2]; ccx q[0], q[1], q[2]; ctrl(2) @ z q[2], q[1], q[0];
|
|
rxx(0.4) q[0], q[1]; ryy(-0.6) q[1], q[2]; rzz(1.3) q[2], q[0];
|
|
c = measure q;
|