The debugger's sampled intent (samples of the run held to a stated distribution by a stated test at a stated level) moves into engine::verdict with the other kinds, so the command line, both MCP servers, the service, the page and Python take it: the program run as the job runs it (its method, noise, options and device target) for the intent's shots at its seed, evidence and never proof. wai-quantum test keeps --junit, now read from the engine's verdict. A job on a device target gets its verdict, and its plan admits the check's memory as other jobs do. The intent set gains sampled cases (a fair pair, a biased claim, an outcome ruled out, proof required, under noise, and beside an exact distribution). The CLI's tool list now has repair_qasm beside estimate_resources, the debugger's and the target tools; the agent docs are regenerated. Co-Authored-By: Claude Opus 5.5 <[email protected]>
910 lines
23 KiB
JSON
910 lines
23 KiB
JSON
{
|
|
"format": "wai.quantum-intent-conformance-bundle/1",
|
|
"about": "manifest.json's cases with every program and reference inline, for builds that read no files (the browser, the edge); a test holds it equal to the files",
|
|
"cases": [
|
|
{
|
|
"name": "bell-distribution",
|
|
"covers": [
|
|
"an exact distribution, by the state vector"
|
|
],
|
|
"program": "programs/bell.qasm",
|
|
"run": {
|
|
"shots": 100
|
|
},
|
|
"intent": [
|
|
{
|
|
"distribution": {
|
|
"00": 0.5,
|
|
"11": 0.5
|
|
}
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "proof",
|
|
"holds": true,
|
|
"intents": [
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "proof",
|
|
"how": "statevector",
|
|
"distance": 0.0
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n"
|
|
},
|
|
{
|
|
"name": "bell-wrong-distribution",
|
|
"covers": [
|
|
"a distribution that fails, with its distance"
|
|
],
|
|
"program": "programs/bell.qasm",
|
|
"run": {
|
|
"shots": 100
|
|
},
|
|
"intent": [
|
|
{
|
|
"distribution": {
|
|
"00": 1.0
|
|
}
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "proof",
|
|
"holds": false,
|
|
"intents": [
|
|
{
|
|
"outcome": "fails",
|
|
"strength": "proof",
|
|
"how": "statevector",
|
|
"distance": 0.5
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n"
|
|
},
|
|
{
|
|
"name": "bell-under-readout-noise",
|
|
"covers": [
|
|
"a distribution under noise, by the density matrix, within a tolerance"
|
|
],
|
|
"program": "programs/bell.qasm",
|
|
"run": {
|
|
"shots": 100,
|
|
"noise": {
|
|
"readout": 0.02
|
|
}
|
|
},
|
|
"intent": [
|
|
{
|
|
"distribution": {
|
|
"00": 0.5,
|
|
"11": 0.5
|
|
},
|
|
"tolerance": 0.05
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "proof",
|
|
"holds": true,
|
|
"intents": [
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "proof",
|
|
"how": "density_matrix",
|
|
"distance": 0.0392
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n"
|
|
},
|
|
{
|
|
"name": "bell-under-readout-noise-tight",
|
|
"covers": [
|
|
"the same distance past a tighter tolerance"
|
|
],
|
|
"program": "programs/bell.qasm",
|
|
"run": {
|
|
"shots": 100,
|
|
"noise": {
|
|
"readout": 0.02
|
|
}
|
|
},
|
|
"intent": [
|
|
{
|
|
"distribution": {
|
|
"00": 0.5,
|
|
"11": 0.5
|
|
},
|
|
"tolerance": 0.01
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "proof",
|
|
"holds": false,
|
|
"intents": [
|
|
{
|
|
"outcome": "fails",
|
|
"strength": "proof",
|
|
"how": "density_matrix",
|
|
"distance": 0.0392
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n"
|
|
},
|
|
{
|
|
"name": "ghz-prepares-the-chain-s-state",
|
|
"covers": [
|
|
"the same state from |0…0⟩ as a reference"
|
|
],
|
|
"program": "programs/ghz.qasm",
|
|
"run": {
|
|
"shots": 100
|
|
},
|
|
"intent": [
|
|
{
|
|
"prepares": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[4] q;\nbit[4] c;\nh q[0];\ncx q[0], q[1];\ncx q[1], q[2];\ncx q[2], q[3];\nc = measure q;\n",
|
|
"name": "programs/ghz-chain.qasm"
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "proof",
|
|
"holds": true,
|
|
"intents": [
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "proof",
|
|
"how": "state"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[4] q;\nbit[4] c;\nh q[0];\ncx q[0], q[1];\ncx q[0], q[2];\ncx q[1], q[3];\nc = measure q;\n"
|
|
},
|
|
{
|
|
"name": "ghz-is-not-the-chain-s-circuit",
|
|
"covers": [
|
|
"the same state but not the same circuit: decided by tableau"
|
|
],
|
|
"program": "programs/ghz.qasm",
|
|
"run": {
|
|
"shots": 100
|
|
},
|
|
"intent": [
|
|
{
|
|
"equivalent": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[4] q;\nbit[4] c;\nh q[0];\ncx q[0], q[1];\ncx q[1], q[2];\ncx q[2], q[3];\nc = measure q;\n",
|
|
"name": "programs/ghz-chain.qasm"
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "proof",
|
|
"holds": false,
|
|
"intents": [
|
|
{
|
|
"outcome": "fails",
|
|
"strength": "proof",
|
|
"how": "tableau"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[4] q;\nbit[4] c;\nh q[0];\ncx q[0], q[1];\ncx q[0], q[2];\ncx q[1], q[3];\nc = measure q;\n"
|
|
},
|
|
{
|
|
"name": "grover-two-intents",
|
|
"covers": [
|
|
"two intents, both by proof"
|
|
],
|
|
"program": "programs/grover.qasm",
|
|
"run": {
|
|
"shots": 100
|
|
},
|
|
"intent": [
|
|
{
|
|
"equivalent": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q;\nh q[1];\ncx q[0], q[1];\nh q[1];\nh q;\nx q;\nh q[1];\ncx q[0], q[1];\nh q[1];\nx q;\nh q;\nc = measure q;\n",
|
|
"name": "programs/grover-cx.qasm"
|
|
},
|
|
{
|
|
"distribution": {
|
|
"11": 1.0
|
|
}
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "proof",
|
|
"holds": true,
|
|
"intents": [
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "proof",
|
|
"how": "tableau"
|
|
},
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "proof",
|
|
"how": "statevector",
|
|
"distance": 0.0
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q;\ncz q[0], q[1];\nh q;\nx q;\ncz q[0], q[1];\nx q;\nh q;\nc = measure q;\n"
|
|
},
|
|
{
|
|
"name": "rotations-merge",
|
|
"covers": [
|
|
"off the Clifford angles, on every basis state"
|
|
],
|
|
"program": "programs/rz-pair.qasm",
|
|
"run": {
|
|
"observables": [
|
|
"Z0 Z1"
|
|
]
|
|
},
|
|
"intent": [
|
|
{
|
|
"equivalent": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nh q;\nrz(0.7) q[0];\ncx q[0], q[1];\n",
|
|
"name": "programs/rz-merged.qasm"
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "proof",
|
|
"holds": true,
|
|
"intents": [
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "proof",
|
|
"how": "exact"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nh q;\nrz(0.3) q[0];\nrz(0.4) q[0];\ncx q[0], q[1];\n"
|
|
},
|
|
{
|
|
"name": "rotations-that-differ",
|
|
"covers": [
|
|
"a small difference in an angle, found on every basis state"
|
|
],
|
|
"program": "programs/rz-pair.qasm",
|
|
"run": {
|
|
"observables": [
|
|
"Z0 Z1"
|
|
]
|
|
},
|
|
"intent": [
|
|
{
|
|
"equivalent": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nh q;\nrz(0.71) q[0];\ncx q[0], q[1];\n",
|
|
"name": "programs/rz-near.qasm"
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "proof",
|
|
"holds": false,
|
|
"intents": [
|
|
{
|
|
"outcome": "fails",
|
|
"strength": "proof",
|
|
"how": "exact"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nh q;\nrz(0.3) q[0];\nrz(0.4) q[0];\ncx q[0], q[1];\n"
|
|
},
|
|
{
|
|
"name": "a-relative-phase",
|
|
"covers": [
|
|
"a relative phase is a difference"
|
|
],
|
|
"program": "programs/relative-phase.qasm",
|
|
"run": {
|
|
"amplitudes": [
|
|
"0",
|
|
"1"
|
|
]
|
|
},
|
|
"intent": [
|
|
{
|
|
"equivalent": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[1] q;\nh q[0];\n",
|
|
"name": "programs/plus.qasm"
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "proof",
|
|
"holds": false,
|
|
"intents": [
|
|
{
|
|
"outcome": "fails",
|
|
"strength": "proof",
|
|
"how": "exact"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[1] q;\nh q[0];\nrz(0.2) q[0];\n"
|
|
},
|
|
{
|
|
"name": "wide-by-rewrites",
|
|
"covers": [
|
|
"wider than every basis state, proved by checked rewrites"
|
|
],
|
|
"program": "programs/wide-merge.qasm",
|
|
"run": {
|
|
"observables": [
|
|
"Z3"
|
|
]
|
|
},
|
|
"intent": [
|
|
{
|
|
"equivalent": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[12] q;\nh q;\nrx(0.75) q[3];\ncx q[3], q[9];\nrz(1.1) q[11];\n",
|
|
"name": "programs/wide-merged.qasm"
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "proof",
|
|
"holds": true,
|
|
"intents": [
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "proof",
|
|
"how": "rewrites"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[12] q;\nh q;\nrx(0.25) q[3];\nrx(0.5) q[3];\ncx q[3], q[9];\nrz(1.1) q[11];\n"
|
|
},
|
|
{
|
|
"name": "wide-by-random-inputs",
|
|
"covers": [
|
|
"evidence, not proof: random product states"
|
|
],
|
|
"program": "programs/wide-swap.qasm",
|
|
"run": {
|
|
"observables": [
|
|
"Z3"
|
|
]
|
|
},
|
|
"intent": [
|
|
{
|
|
"equivalent": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[12] q;\nh q;\ncx q[3], q[9];\ncx q[9], q[3];\ncx q[3], q[9];\nrz(1.1) q[11];\n",
|
|
"name": "programs/wide-swap-cx.qasm"
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "evidence",
|
|
"holds": true,
|
|
"intents": [
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "evidence",
|
|
"how": "random"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[12] q;\nh q;\nswap q[3], q[9];\nrz(1.1) q[11];\n"
|
|
},
|
|
{
|
|
"name": "wide-proof-required",
|
|
"covers": [
|
|
"evidence counted as unchecked when proof is required"
|
|
],
|
|
"program": "programs/wide-swap.qasm",
|
|
"run": {
|
|
"observables": [
|
|
"Z3"
|
|
]
|
|
},
|
|
"intent": [
|
|
{
|
|
"equivalent": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[12] q;\nh q;\ncx q[3], q[9];\ncx q[9], q[3];\ncx q[3], q[9];\nrz(1.1) q[11];\n",
|
|
"require": "proof",
|
|
"name": "programs/wide-swap-cx.qasm"
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "executed",
|
|
"holds": null,
|
|
"intents": [
|
|
{
|
|
"outcome": "unchecked",
|
|
"strength": "none",
|
|
"how": "random"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[12] q;\nh q;\nswap q[3], q[9];\nrz(1.1) q[11];\n"
|
|
},
|
|
{
|
|
"name": "evidence-and-proof",
|
|
"covers": [
|
|
"the level is the weakest check"
|
|
],
|
|
"program": "programs/wide-swap.qasm",
|
|
"run": {
|
|
"observables": [
|
|
"Z3"
|
|
]
|
|
},
|
|
"intent": [
|
|
{
|
|
"equivalent": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[12] q;\nh q;\ncx q[3], q[9];\ncx q[9], q[3];\ncx q[3], q[9];\nrz(1.1) q[11];\n",
|
|
"name": "programs/wide-swap-cx.qasm"
|
|
},
|
|
{
|
|
"equivalent": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[12] q;\nh q;\nswap q[3], q[9];\nrz(1.1) q[11];\n",
|
|
"name": "programs/wide-swap.qasm"
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "evidence",
|
|
"holds": true,
|
|
"intents": [
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "evidence",
|
|
"how": "random"
|
|
},
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "proof"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[12] q;\nh q;\nswap q[3], q[9];\nrz(1.1) q[11];\n"
|
|
},
|
|
{
|
|
"name": "clifford-at-forty-qubits",
|
|
"covers": [
|
|
"Clifford circuits at any width, by tableau"
|
|
],
|
|
"program": "programs/clifford40.qasm",
|
|
"run": {
|
|
"shots": 10
|
|
},
|
|
"intent": [
|
|
{
|
|
"equivalent": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[40] q;\nh q;\ns q[7];\ncz q[39], q[0];\n",
|
|
"name": "programs/clifford40-reordered.qasm"
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "proof",
|
|
"holds": true,
|
|
"intents": [
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "proof",
|
|
"how": "tableau"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[40] q;\nh q;\ncz q[0], q[39];\ns q[7];\n"
|
|
},
|
|
{
|
|
"name": "feedback-is-unchecked",
|
|
"covers": [
|
|
"a program that acts on what it measured: its distribution unchecked"
|
|
],
|
|
"program": "programs/feedback.qasm",
|
|
"run": {
|
|
"shots": 100
|
|
},
|
|
"intent": [
|
|
{
|
|
"distribution": {
|
|
"00": 0.5,
|
|
"11": 0.5
|
|
}
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "executed",
|
|
"holds": null,
|
|
"intents": [
|
|
{
|
|
"outcome": "unchecked",
|
|
"strength": "none",
|
|
"how": "none"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\nc[0] = measure q[0];\nif (c[0]) x q[1];\nc[1] = measure q[1];\n"
|
|
},
|
|
{
|
|
"name": "bell-sampled",
|
|
"covers": [
|
|
"samples held to a distribution by Pearson's chi-squared test: evidence, never proof"
|
|
],
|
|
"program": "programs/bell.qasm",
|
|
"run": {
|
|
"shots": 100,
|
|
"seed": 7
|
|
},
|
|
"intent": [
|
|
{
|
|
"sampled": {
|
|
"00": 0.5,
|
|
"11": 0.5
|
|
},
|
|
"test": "chi_squared",
|
|
"alpha": 0.01,
|
|
"shots": 4000
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "evidence",
|
|
"holds": true,
|
|
"intents": [
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "evidence",
|
|
"how": "chi_squared"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n"
|
|
},
|
|
{
|
|
"name": "bell-sampled-biased",
|
|
"covers": [
|
|
"a biased claim rejected by the G-test"
|
|
],
|
|
"program": "programs/bell.qasm",
|
|
"run": {
|
|
"shots": 100,
|
|
"seed": 7
|
|
},
|
|
"intent": [
|
|
{
|
|
"sampled": {
|
|
"00": 0.6,
|
|
"11": 0.4
|
|
},
|
|
"test": "g_test",
|
|
"alpha": 0.01,
|
|
"shots": 4000
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "evidence",
|
|
"holds": false,
|
|
"intents": [
|
|
{
|
|
"outcome": "fails",
|
|
"strength": "evidence",
|
|
"how": "g_test"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n"
|
|
},
|
|
{
|
|
"name": "bell-sampled-ruled-out",
|
|
"covers": [
|
|
"an outcome the claim gives probability 0, sampled: fails outright"
|
|
],
|
|
"program": "programs/bell.qasm",
|
|
"run": {
|
|
"shots": 100
|
|
},
|
|
"intent": [
|
|
{
|
|
"sampled": {
|
|
"00": 1.0
|
|
},
|
|
"test": "chi_squared",
|
|
"alpha": 0.05,
|
|
"shots": 100
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "evidence",
|
|
"holds": false,
|
|
"intents": [
|
|
{
|
|
"outcome": "fails",
|
|
"strength": "evidence",
|
|
"how": "chi_squared"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n"
|
|
},
|
|
{
|
|
"name": "bell-sampled-proof-required",
|
|
"covers": [
|
|
"a statistical test counted as unchecked when proof is required"
|
|
],
|
|
"program": "programs/bell.qasm",
|
|
"run": {
|
|
"shots": 100
|
|
},
|
|
"intent": [
|
|
{
|
|
"sampled": {
|
|
"00": 0.5,
|
|
"11": 0.5
|
|
},
|
|
"test": "chi_squared",
|
|
"alpha": 0.01,
|
|
"shots": 1000,
|
|
"require": "proof"
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "executed",
|
|
"holds": null,
|
|
"intents": [
|
|
{
|
|
"outcome": "unchecked",
|
|
"strength": "none",
|
|
"how": "chi_squared"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n"
|
|
},
|
|
{
|
|
"name": "bell-sampled-under-readout-noise",
|
|
"covers": [
|
|
"samples under the job's noise, held to its exact noisy distribution"
|
|
],
|
|
"program": "programs/bell.qasm",
|
|
"run": {
|
|
"shots": 100,
|
|
"seed": 3,
|
|
"noise": {
|
|
"readout": 0.02
|
|
}
|
|
},
|
|
"intent": [
|
|
{
|
|
"sampled": {
|
|
"00": 0.4804,
|
|
"01": 0.0196,
|
|
"10": 0.0196,
|
|
"11": 0.4804
|
|
},
|
|
"test": "chi_squared",
|
|
"alpha": 0.001,
|
|
"shots": 20000
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "evidence",
|
|
"holds": true,
|
|
"intents": [
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "evidence",
|
|
"how": "chi_squared"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n"
|
|
},
|
|
{
|
|
"name": "proof-and-a-test",
|
|
"covers": [
|
|
"the level is the weakest check: an exact distribution and a test of samples"
|
|
],
|
|
"program": "programs/bell.qasm",
|
|
"run": {
|
|
"shots": 100,
|
|
"seed": 7
|
|
},
|
|
"intent": [
|
|
{
|
|
"distribution": {
|
|
"00": 0.5,
|
|
"11": 0.5
|
|
}
|
|
},
|
|
{
|
|
"sampled": {
|
|
"00": 0.5,
|
|
"11": 0.5
|
|
},
|
|
"test": "g_test",
|
|
"alpha": 0.01,
|
|
"shots": 2000
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "evidence",
|
|
"holds": true,
|
|
"intents": [
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "proof",
|
|
"how": "statevector",
|
|
"distance": 0.0
|
|
},
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "evidence",
|
|
"how": "g_test"
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n"
|
|
},
|
|
{
|
|
"name": "no-intent",
|
|
"covers": [
|
|
"a verdict asked for with no intent"
|
|
],
|
|
"program": "programs/bell.qasm",
|
|
"run": {
|
|
"shots": 100,
|
|
"verdict": true
|
|
},
|
|
"expect": {
|
|
"level": "executed",
|
|
"holds": null,
|
|
"intents": [],
|
|
"method": "stabilizer"
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n"
|
|
},
|
|
{
|
|
"name": "compiled-first",
|
|
"covers": [
|
|
"a run compiled to Clifford+T, its intent checked on the program"
|
|
],
|
|
"program": "programs/rotation.qasm",
|
|
"run": {
|
|
"shots": 100,
|
|
"compile": {
|
|
"epsilon": 0.001
|
|
}
|
|
},
|
|
"intent": [
|
|
{
|
|
"distribution": {
|
|
"0": 0.75,
|
|
"1": 0.25
|
|
}
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "proof",
|
|
"holds": true,
|
|
"method": "exact",
|
|
"intents": [
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "proof",
|
|
"how": "statevector",
|
|
"distance": 0.0
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[1] q;\nbit[1] c;\nrx(pi/3) q[0];\nc = measure q;\n"
|
|
},
|
|
{
|
|
"name": "repaired-first",
|
|
"covers": [
|
|
"a missing `;` and a measurement with no target, repaired before the run"
|
|
],
|
|
"program": "programs/bell-broken.qasm",
|
|
"run": {
|
|
"shots": 100,
|
|
"repair": true
|
|
},
|
|
"intent": [
|
|
{
|
|
"distribution": {
|
|
"00": 0.5,
|
|
"11": 0.5
|
|
}
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "proof",
|
|
"holds": true,
|
|
"repairs": [
|
|
"Q004",
|
|
"Q320"
|
|
],
|
|
"repaired": "bell-repaired",
|
|
"intents": [
|
|
{
|
|
"outcome": "holds",
|
|
"strength": "proof",
|
|
"how": "statevector",
|
|
"distance": 0.0
|
|
}
|
|
]
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nmeasure q;\n",
|
|
"repaired_qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n"
|
|
},
|
|
{
|
|
"name": "a-bound-chosen",
|
|
"covers": [
|
|
"an unbounded while, given the bound the person chose"
|
|
],
|
|
"program": "programs/unbounded.qasm",
|
|
"run": {
|
|
"shots": 100,
|
|
"repair": {
|
|
"max_iterations": 4
|
|
},
|
|
"verdict": true
|
|
},
|
|
"expect": {
|
|
"level": "executed",
|
|
"holds": null,
|
|
"repairs": [
|
|
"Q310"
|
|
],
|
|
"intents": []
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[1] q;\nbit[1] c;\nh q[0];\nc[0] = measure q[0];\nwhile (c[0]) {\n reset q[0];\n h q[0];\n c[0] = measure q[0];\n}\n"
|
|
},
|
|
{
|
|
"name": "a-bound-not-chosen",
|
|
"covers": [
|
|
"an unbounded while with no bound chosen: refused with its code"
|
|
],
|
|
"program": "programs/unbounded.qasm",
|
|
"run": {
|
|
"shots": 100,
|
|
"repair": true
|
|
},
|
|
"intent": [
|
|
{
|
|
"distribution": {
|
|
"0": 1.0
|
|
}
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "refused",
|
|
"code": "Q310"
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[1] q;\nbit[1] c;\nh q[0];\nc[0] = measure q[0];\nwhile (c[0]) {\n reset q[0];\n h q[0];\n c[0] = measure q[0];\n}\n"
|
|
},
|
|
{
|
|
"name": "a-program-that-does-not-read",
|
|
"covers": [
|
|
"refused by the reader: nothing runs"
|
|
],
|
|
"program": "programs/unknown-gate.qasm",
|
|
"run": {
|
|
"shots": 100
|
|
},
|
|
"intent": [
|
|
{
|
|
"distribution": {
|
|
"0": 1.0
|
|
}
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "refused",
|
|
"code": "Q103"
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[1] q;\nfoo q[0];\n"
|
|
},
|
|
{
|
|
"name": "an-intent-that-does-not-read",
|
|
"covers": [
|
|
"an intent whose outcomes are not the program's bits"
|
|
],
|
|
"program": "programs/bell.qasm",
|
|
"run": {
|
|
"shots": 100
|
|
},
|
|
"intent": [
|
|
{
|
|
"distribution": {
|
|
"0": 1.0
|
|
}
|
|
}
|
|
],
|
|
"expect": {
|
|
"level": "parsed",
|
|
"code": "J020"
|
|
},
|
|
"qasm": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nbit[2] c;\nh q[0];\ncx q[0], q[1];\nc = measure q;\n"
|
|
}
|
|
]
|
|
}
|