Some checks failed
WAI operation catalogue / does this change touch it (push) Successful in 13s
wai-quantum contract / does this change touch it (push) Successful in 24s
wai-audit collector and player integration / does this change touch it (push) Successful in 29s
wai-quantum command line / does this change touch it (push) Successful in 26s
wai-quantum resource estimation / does this change touch it (push) Successful in 23s
wai-quantum other formats / does this change touch it (push) Successful in 19s
wai-quantum pulse and dynamics / does this change touch it (push) Successful in 14s
wai-quantum editors / does this change touch it (push) Successful in 42s
wai-quantum error correction and mitigation / does this change touch it (push) Successful in 15s
wai-quantum for JavaScript / does this change touch it (push) Successful in 45s
wai-quantum docs, course and locales / does this change touch it (push) Successful in 58s
wai-quantum OpenQASM reader / does this change touch it (push) Successful in 44s
wai-quantum for Python / does this change touch it (push) Successful in 41s
wai-quantum verdicts and repairs / does this change touch it (push) Successful in 16s
wai-quantum views in agent hosts / does this change touch it (push) Successful in 16s
wai-sink-android native sink library / does this change touch it (push) Successful in 17s
wai-sink-swift native sink package / does this change touch it (push) Successful in 16s
wai-quantum variational and algorithm library / does this change touch it (push) Successful in 43s
WAI Studio / does this change touch it (push) Successful in 38s
wai-quantum studio and desktop / does this change touch it (push) Successful in 1m10s
wai-quantum service / does this change touch it (push) Successful in 1m12s
wai-quantum extension points / does this change touch it (push) Successful in 1m20s
wai-quantum service / service energy · linux packages (push) Successful in 2m14s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux-arm64, release (push) Successful in 2m37s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (push) Successful in 5m11s
wai-quantum pulse and dynamics / the same bits · linux-arm64 (push) Successful in 3m58s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (push) Successful in 5m21s
wai-quantum extension points / the registry and the example · linux-arm64 (push) Successful in 6m18s
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (push) Successful in 13s
wai-quantum contract / the policy is linked, and the deprecations page reads (push) Successful in 14s
wai-quantum wasmQ / does this change touch it (push) Successful in 19s
wai-quantum contract / API compatibility · linux (push) Successful in 5m15s
wai-quantum other formats / the set under wasm32-wasip2 (wasmtime) (push) Successful in 2m56s
wai-quantum pulse and dynamics / reader, simulator and pulse jobs under wasm32-wasip2 (wasmtime) (push) Successful in 1m44s
wai-audit collector and player integration / collector · linux (push) Successful in 5m35s
wai-quantum other formats / readers, writers and the set · linux (push) Successful in 4m39s
wai-quantum docs, course and locales / the Studio's words in every locale · linux (push) Successful in 18s
wai-quantum pulse and dynamics / reader, simulator and pulse jobs · linux, release (push) Successful in 4m5s
wai-quantum editors / editors · linux (push) Successful in 3m23s
WAI operation catalogue / the catalogue and every door · linux (push) Successful in 10m7s
wai-quantum OpenQASM reader / corpus under wasm32-wasip2 (wasmtime) (push) Successful in 1m2s
wai-quantum for JavaScript / javascript · linux (push) Successful in 3m54s
wai-quantum for Python / python · linux (push) Successful in 4m10s
wai-quantum verdicts and repairs / the intent set and the verdict under wasm32-wasip2 (wasmtime) (push) Successful in 1m47s
wai-quantum verdicts and repairs / verdicts, repairs and the intent set · linux (push) Successful in 2m33s
wai-quantum resource estimation / estimation and calibration · linux, release (push) Successful in 11m12s
wai-quantum docs, course and locales / the course and the command line's languages · linux (push) Successful in 6m33s
wai-quantum OpenQASM reader / reader and corpus · linux (push) Successful in 5m0s
wai-quantum error correction and mitigation / codes, decoders, texts and mitigation · linux, release (push) Successful in 7m55s
WAI Studio / the catalogue's actions, the unit tests and the core · linux (push) Successful in 1m1s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux, release (push) Successful in 2m14s
wai-quantum contract / schemas and the committed tool lists · linux (push) Successful in 14m42s
wai-quantum views in agent hosts / views · the page and its engine (push) Successful in 4m29s
wai-quantum extension points / the registry under wasm32-wasip2 (wasmtime) (push) Successful in 2m10s
wai-quantum views in agent hosts / views · a scripted host (push) Successful in 4m21s
wai-quantum extension points / the registry and the example · linux (push) Successful in 6m25s
wai-quantum studio and desktop / studio · browser (push) Successful in 6m12s
wai-quantum service / service · linux (push) Successful in 8m55s
wai-quantum studio and desktop / desktop app · linux (push) Successful in 12m2s
wai-quantum docs, course and locales / every command and snippet in the docs · linux (push) Successful in 24m28s
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (push) Successful in 3m14s
wai-quantum pulse and dynamics / the same bits · macos (push) Successful in 1m28s
wai-quantum command line / command line · macos (push) Successful in 2m16s
wai-quantum editors / editors · macos (push) Successful in 1m54s
wai-quantum for Python / python · macos (push) Successful in 3m12s
WAI Studio / Studio in WebKit · linux (push) Successful in 29m22s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (push) Failing after 1m52s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (push) Successful in 5m17s
wai-quantum studio and desktop / desktop app · windows (push) Successful in 10m14s
wai-quantum wasmQ / the reference modules rebuild to their modules of record · linux (push) Failing after 32s
wai-quantum studio and desktop / desktop app · macos (push) Successful in 5m50s
WAI Studio / Studio in Chromium and Firefox · macos (push) Successful in 8m5s
wai-quantum wasmQ / profile, engines, reference modules, adversarial, vectors · linux (push) Successful in 4m5s
wai-quantum service / service · macos (push) Successful in 6m20s
wai-quantum wasmQ / interpreter and vectors under wasm32-wasip2 (wasmtime) (push) Successful in 5m13s
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (push) Successful in 9m42s
wai-quantum command line / command line · linux (push) Successful in 53m22s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (push) Successful in 17m49s
wai-quantum wasmQ / profile, engines, reference modules, adversarial, vectors · macos (push) Successful in 2m6s
qelib1.inc's gates past the table of standard gates (u0, csx, c3x, c3sqrtx, c4x, rccx, rc3x), which OpenQASM 2 programs call without defining, were refused as unknown (Q103). They are built in as qelib1.inc defines them: u0 an idle; csx, c3x, c3sqrtx and c4x sx and x under that many controls; rccx and rc3x the relative-phase Toffoli gates by their definitions, each u2(0,π) there a Hadamard. A program's own definition of one still runs instead. qasm::spec_tests::qelib1_s_gates_past_the_table_are_its_gates holds each to its gate (rccx entry by entry; rc3x to c3x's moves). quantum-conformance/qasm3/import/: 13 programs written as the common toolkits export them (generated gate definitions, physical qubits, if and switch blocks on measured bits, untyped loop variables, OpenQASM 2 with qelib1.inc) and textbook algorithms (phase estimation through ctrl @ pow(2 ** j) @ and inv @ on the program's own gates, Bernstein-Vazirani through a subroutine, Grover, teleportation, repeat until success, stdgates.inc's definitions written out under ctrl @), each with its outcome probabilities derived by hand in its comments and its bit-exact expectation; and 8 refusal vectors with their codes. The corpus goes from 59 cases to 80. Its runner now holds a program that branches on what it measured to a distribution too, following every branch of every measurement and reset with its probability. Co-Authored-By: Claude Opus 5.5 <[email protected]>
949 lines
16 KiB
JSON
949 lines
16 KiB
JSON
{
|
|
"format": "wai.qasm3-conformance/1",
|
|
"about": "OpenQASM 3 programs, each with what the reader must do with it. spec/ holds the language specification's example programs, unchanged; lang/ holds a program for each construct, and references written without it.",
|
|
"expectations": {
|
|
"refused": "reading refuses the program with this diagnostic code",
|
|
"warns": "reading succeeds, and these are the codes of every warning and note it gives, sorted",
|
|
"deterministic": "every shot of a run gives this outcome (bit n-1 first)",
|
|
"distribution": "the exact probabilities of the outcomes, within 1e-9: of a program whose measurements all come at the end from its state, and of one that measures in the middle, resets or branches on what it measured by following every branch of every measurement with its probability",
|
|
"expectations": "Pauli expectation values of the state before the final measurements, exact, within 1e-9",
|
|
"equivalent": "the program's unitary equals the named reference's, up to a global phase, within 1e-9",
|
|
"exact": "the bit-exact circuit takes the program (ok), or refuses it with this code",
|
|
"outputs": "the run's result lists these outputs",
|
|
"timing": "the run's result labels its durations as not applied",
|
|
"calibrations": "the program keeps this many calibration statements verbatim",
|
|
"inputs": "the generator's inputs"
|
|
},
|
|
"cases": [
|
|
{
|
|
"file": "spec/adder.qasm",
|
|
"covers": [
|
|
"gate definitions",
|
|
"uint indexed as bits",
|
|
"casts",
|
|
"for over a range with a negative step",
|
|
"slices in measurement"
|
|
],
|
|
"expect": {
|
|
"deterministic": "10000"
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/alignment.qasm",
|
|
"covers": [
|
|
"stretch",
|
|
"delay with a stretch expression",
|
|
"barrier"
|
|
],
|
|
"expect": {
|
|
"warns": [
|
|
"Q403"
|
|
],
|
|
"timing": true,
|
|
"distribution": {
|
|
"000": 0.8535533905932737,
|
|
"100": 0.14644660940672624
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/arrays.qasm",
|
|
"covers": [
|
|
"arrays",
|
|
"nested array values",
|
|
"slices",
|
|
"sizeof",
|
|
"an index past the array's end (the example's own: `a - 1` is 4)"
|
|
],
|
|
"expect": {
|
|
"refused": "Q107"
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/cphase.qasm",
|
|
"covers": [
|
|
"a fragment: no qubits declared"
|
|
],
|
|
"expect": {
|
|
"refused": "Q102"
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/dd.qasm",
|
|
"covers": [
|
|
"durationof"
|
|
],
|
|
"expect": {
|
|
"refused": "Q405"
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/defcal.qasm",
|
|
"covers": [
|
|
"defcal",
|
|
"defcalgrammar"
|
|
],
|
|
"expect": {
|
|
"refused": "Q100"
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/gateteleport.qasm",
|
|
"covers": [
|
|
"extern",
|
|
"subroutine bits"
|
|
],
|
|
"expect": {
|
|
"refused": "Q125"
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/inverseqft1.qasm",
|
|
"covers": [
|
|
"conditions on a cast of measured bits"
|
|
],
|
|
"expect": {
|
|
"deterministic": "0000"
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/inverseqft2.qasm",
|
|
"covers": [
|
|
"conditions on single bits",
|
|
"measure ->"
|
|
],
|
|
"expect": {
|
|
"deterministic": "0000"
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/ipe.qasm",
|
|
"covers": [
|
|
"angle arithmetic on measured bits"
|
|
],
|
|
"expect": {
|
|
"refused": "Q128"
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/msd.qasm",
|
|
"covers": [
|
|
"subroutines",
|
|
"an index outside its register"
|
|
],
|
|
"expect": {
|
|
"refused": "Q107"
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/qec.qasm",
|
|
"covers": [
|
|
"a subroutine returning measured bits",
|
|
"conditions on a cast"
|
|
],
|
|
"expect": {
|
|
"deterministic": "01000"
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/qft.qasm",
|
|
"covers": [
|
|
"cphase",
|
|
"reset before the first gate"
|
|
],
|
|
"expect": {
|
|
"distribution": {
|
|
"0000": 0.0625,
|
|
"0001": 0.0625,
|
|
"0010": 0.0625,
|
|
"0011": 0.0625,
|
|
"0100": 0.0625,
|
|
"0101": 0.0625,
|
|
"0110": 0.0625,
|
|
"0111": 0.0625,
|
|
"1000": 0.0625,
|
|
"1001": 0.0625,
|
|
"1010": 0.0625,
|
|
"1011": 0.0625,
|
|
"1100": 0.0625,
|
|
"1101": 0.0625,
|
|
"1110": 0.0625,
|
|
"1111": 0.0625
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/qpt.qasm",
|
|
"covers": [
|
|
"empty gate bodies",
|
|
"barrier"
|
|
],
|
|
"expect": {
|
|
"distribution": {
|
|
"0": 0.5,
|
|
"1": 0.5
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/rb.qasm",
|
|
"covers": [
|
|
"a Clifford sequence"
|
|
],
|
|
"expect": {
|
|
"deterministic": "00"
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/rus.qasm",
|
|
"covers": [
|
|
"while on measured bits with no bound",
|
|
"bits set by a constant"
|
|
],
|
|
"expect": {
|
|
"refused": "Q310"
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/scqec.qasm",
|
|
"covers": [
|
|
"subroutines called as gates",
|
|
"bits known on reading",
|
|
"extern"
|
|
],
|
|
"expect": {
|
|
"refused": "Q125"
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/t1.qasm",
|
|
"covers": [
|
|
"durations",
|
|
"durationof"
|
|
],
|
|
"expect": {
|
|
"refused": "Q405"
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/teleport.qasm",
|
|
"covers": [
|
|
"teleportation",
|
|
"conditions",
|
|
"an empty gate"
|
|
],
|
|
"expect": {
|
|
"expectations": {
|
|
"Z2": 0.955336489125606
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/varteleport.qasm",
|
|
"covers": [
|
|
"let rebinding a name of an enclosing scope"
|
|
],
|
|
"expect": {
|
|
"refused": "Q101"
|
|
}
|
|
},
|
|
{
|
|
"file": "spec/vqe.qasm",
|
|
"covers": [
|
|
"extern"
|
|
],
|
|
"expect": {
|
|
"refused": "Q125"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/def.qasm",
|
|
"covers": [
|
|
"def",
|
|
"return"
|
|
],
|
|
"expect": {
|
|
"equivalent": "lang/def.ref.qasm",
|
|
"exact": "ok"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/def_measure.qasm",
|
|
"covers": [
|
|
"def with bits of its own",
|
|
"a returned measurement"
|
|
],
|
|
"expect": {
|
|
"deterministic": "1"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/inv.qasm",
|
|
"covers": [
|
|
"inv @ on standard and user gates"
|
|
],
|
|
"expect": {
|
|
"equivalent": "lang/inv.ref.qasm"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/pow.qasm",
|
|
"covers": [
|
|
"pow(k) @, k a whole number"
|
|
],
|
|
"expect": {
|
|
"equivalent": "lang/pow.ref.qasm"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/root.qasm",
|
|
"covers": [
|
|
"pow(r) @, r fractional, exact roots"
|
|
],
|
|
"expect": {
|
|
"equivalent": "lang/root.ref.qasm"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/ctrl_any.qasm",
|
|
"covers": [
|
|
"ctrl @ on a rotation",
|
|
"negctrl @"
|
|
],
|
|
"expect": {
|
|
"distribution": {
|
|
"010": 0.75,
|
|
"111": 0.25
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/ctrl_user.qasm",
|
|
"covers": [
|
|
"ctrl @ on a user gate, rz and U"
|
|
],
|
|
"expect": {
|
|
"equivalent": "lang/ctrl_user.ref.qasm"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/types.qasm",
|
|
"covers": [
|
|
"float",
|
|
"angle",
|
|
"complex",
|
|
"uint",
|
|
"bit arrays",
|
|
"arrays",
|
|
"casts",
|
|
"built-in functions"
|
|
],
|
|
"expect": {
|
|
"equivalent": "lang/types.ref.qasm"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/angle_round.qasm",
|
|
"covers": [
|
|
"angle[n] rounding"
|
|
],
|
|
"expect": {
|
|
"warns": [
|
|
"Q121"
|
|
],
|
|
"equivalent": "lang/angle_round.ref.qasm",
|
|
"exact": "ok"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/while_static.qasm",
|
|
"covers": [
|
|
"while known on reading",
|
|
"break"
|
|
],
|
|
"expect": {
|
|
"equivalent": "lang/while_static.ref.qasm"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/while_rus.qasm",
|
|
"covers": [
|
|
"while on measured bits under a declared bound"
|
|
],
|
|
"expect": {
|
|
"warns": [
|
|
"Q311"
|
|
],
|
|
"deterministic": "1"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/while_unbounded.qasm",
|
|
"covers": [
|
|
"while on measured bits"
|
|
],
|
|
"expect": {
|
|
"refused": "Q310"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/switch.qasm",
|
|
"covers": [
|
|
"switch known on reading",
|
|
"switch on measured bits"
|
|
],
|
|
"expect": {
|
|
"deterministic": "101"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/break_continue.qasm",
|
|
"covers": [
|
|
"break",
|
|
"continue"
|
|
],
|
|
"expect": {
|
|
"equivalent": "lang/break_continue.ref.qasm"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/runtime_break.qasm",
|
|
"covers": [
|
|
"break on a measured bit"
|
|
],
|
|
"expect": {
|
|
"deterministic": "0011"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/conditions.qasm",
|
|
"covers": [
|
|
"comparisons, &&, || and ! on measured bits"
|
|
],
|
|
"expect": {
|
|
"deterministic": "101110"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/output.qasm",
|
|
"covers": [
|
|
"output"
|
|
],
|
|
"expect": {
|
|
"deterministic": "10",
|
|
"outputs": [
|
|
{
|
|
"name": "c",
|
|
"type": "bit[2]",
|
|
"bits": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"name": "n",
|
|
"type": "int[32]",
|
|
"value": 3
|
|
},
|
|
{
|
|
"name": "t",
|
|
"type": "float[64]",
|
|
"value": 0.7853981633974483
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/timing.qasm",
|
|
"covers": [
|
|
"delay",
|
|
"box",
|
|
"stretch",
|
|
"barrier",
|
|
"gate durations"
|
|
],
|
|
"expect": {
|
|
"warns": [
|
|
"Q403"
|
|
],
|
|
"timing": true,
|
|
"distribution": {
|
|
"01": 0.5,
|
|
"10": 0.5
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/calibration.qasm",
|
|
"covers": [
|
|
"defcal",
|
|
"cal",
|
|
"defcalgrammar"
|
|
],
|
|
"expect": {
|
|
"warns": [
|
|
"Q450",
|
|
"Q451",
|
|
"Q452"
|
|
],
|
|
"calibrations": 3,
|
|
"distribution": {
|
|
"0": 0.5,
|
|
"1": 0.5
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/stdgates.qasm",
|
|
"covers": [
|
|
"every standard gate, U and CX"
|
|
],
|
|
"expect": {
|
|
"equivalent": "lang/stdgates.ref.qasm"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/aliases.qasm",
|
|
"covers": [
|
|
"let",
|
|
"slices",
|
|
"index sets",
|
|
"negative indices",
|
|
"++"
|
|
],
|
|
"expect": {
|
|
"equivalent": "lang/aliases.ref.qasm"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/physical.qasm",
|
|
"covers": [
|
|
"physical qubits"
|
|
],
|
|
"expect": {
|
|
"equivalent": "lang/physical.ref.qasm"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/gphase.qasm",
|
|
"covers": [
|
|
"gphase",
|
|
"ctrl @ gphase"
|
|
],
|
|
"expect": {
|
|
"equivalent": "lang/gphase.ref.qasm"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/bits_known.qasm",
|
|
"covers": [
|
|
"bits set by a constant"
|
|
],
|
|
"expect": {
|
|
"deterministic": "01"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/generator.qasm",
|
|
"covers": [
|
|
"input"
|
|
],
|
|
"expect": {
|
|
"inputs": {
|
|
"n": 4
|
|
},
|
|
"distribution": {
|
|
"0000": 0.5,
|
|
"1111": 0.5
|
|
},
|
|
"exact": "ok"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/qasm2.qasm",
|
|
"covers": [
|
|
"OpenQASM 2: qreg, creg, u1, u2, u3, CX, measure ->"
|
|
],
|
|
"expect": {
|
|
"distribution": {
|
|
"01": 0.5,
|
|
"11": 0.5
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/qasm2_if.qasm",
|
|
"covers": [
|
|
"OpenQASM 2: if(c==n)"
|
|
],
|
|
"expect": {
|
|
"deterministic": "11"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/exported.qasm",
|
|
"covers": [
|
|
"a program as converters write one: gates with generated names, decimal angles"
|
|
],
|
|
"expect": {
|
|
"distribution": {
|
|
"000": 0.5,
|
|
"111": 0.5
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/refuse_root.qasm",
|
|
"covers": [
|
|
"a fractional power with no exact gate"
|
|
],
|
|
"expect": {
|
|
"refused": "Q205"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/refuse_extern.qasm",
|
|
"covers": [
|
|
"extern"
|
|
],
|
|
"expect": {
|
|
"refused": "Q125"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/refuse_runtime.qasm",
|
|
"covers": [
|
|
"classical arithmetic on measured bits"
|
|
],
|
|
"expect": {
|
|
"refused": "Q306"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/refuse_durationof.qasm",
|
|
"covers": [
|
|
"durationof"
|
|
],
|
|
"expect": {
|
|
"refused": "Q405"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/refuse_opaque.qasm",
|
|
"covers": [
|
|
"opaque"
|
|
],
|
|
"expect": {
|
|
"refused": "Q126"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/refuse_truncating.qasm",
|
|
"covers": [
|
|
"a truncating division as a real"
|
|
],
|
|
"expect": {
|
|
"refused": "Q118"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/refuse_caret.qasm",
|
|
"covers": [
|
|
"^ between integers with no version"
|
|
],
|
|
"expect": {
|
|
"refused": "Q119"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/refuse_unknown_gate.qasm",
|
|
"covers": [
|
|
"an unknown gate"
|
|
],
|
|
"expect": {
|
|
"refused": "Q103"
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/exact_not_dyadic.qasm",
|
|
"covers": [
|
|
"the bit-exact method: an angle that is not dyadic"
|
|
],
|
|
"expect": {
|
|
"exact": "Q500",
|
|
"distribution": {
|
|
"0": 0.5,
|
|
"1": 0.5
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"file": "lang/exact_dynamic.qasm",
|
|
"covers": [
|
|
"the bit-exact method: a dynamic program"
|
|
],
|
|
"expect": {
|
|
"exact": "Q502"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/bell_export.qasm",
|
|
"covers": [
|
|
"an exported program: bits before qubits, one measurement a line"
|
|
],
|
|
"expect": {
|
|
"distribution": {
|
|
"00": 0.5,
|
|
"11": 0.5
|
|
},
|
|
"exact": "ok"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/ghz_physical.qasm",
|
|
"covers": [
|
|
"physical qubits with no declaration",
|
|
"barrier",
|
|
"measurements into a named register"
|
|
],
|
|
"expect": {
|
|
"distribution": {
|
|
"000": 0.5,
|
|
"111": 0.5
|
|
},
|
|
"exact": "ok"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/exported_gates.qasm",
|
|
"covers": [
|
|
"gates an exporter defines, with generated names",
|
|
"a definition of a built-in name that is not the built-in gate exactly"
|
|
],
|
|
"expect": {
|
|
"warns": [
|
|
"Q213"
|
|
],
|
|
"distribution": {
|
|
"000": 0.1875,
|
|
"001": 0.1875,
|
|
"010": 0.0625,
|
|
"011": 0.0625,
|
|
"100": 0.1875,
|
|
"101": 0.1875,
|
|
"110": 0.0625,
|
|
"111": 0.0625
|
|
},
|
|
"exact": "Q500"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/phase_estimation.qasm",
|
|
"covers": [
|
|
"ctrl @ pow(2 ** j) @ on a user gate",
|
|
"inv @ on a user gate",
|
|
"a typed loop variable in a modifier"
|
|
],
|
|
"expect": {
|
|
"deterministic": "011",
|
|
"exact": "ok"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/bernstein_vazirani.qasm",
|
|
"covers": [
|
|
"a subroutine over a qubit register",
|
|
"a const read bit by bit",
|
|
"a condition known on reading in a loop"
|
|
],
|
|
"expect": {
|
|
"deterministic": "1011",
|
|
"exact": "ok"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/grover_two_qubits.qasm",
|
|
"covers": [
|
|
"ctrl @ z",
|
|
"broadcast"
|
|
],
|
|
"expect": {
|
|
"deterministic": "11",
|
|
"exact": "ok"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/teleport_feedforward.qasm",
|
|
"covers": [
|
|
"corrections conditioned on measured bits, in blocks",
|
|
"the outcome's bit order across two registers"
|
|
],
|
|
"expect": {
|
|
"distribution": {
|
|
"000": 0.0625,
|
|
"001": 0.0625,
|
|
"010": 0.0625,
|
|
"011": 0.0625,
|
|
"100": 0.1875,
|
|
"101": 0.1875,
|
|
"110": 0.1875,
|
|
"111": 0.1875
|
|
},
|
|
"exact": "Q502"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/switch_feedforward.qasm",
|
|
"covers": [
|
|
"switch on a measured register",
|
|
"case lists, an empty default"
|
|
],
|
|
"expect": {
|
|
"distribution": {
|
|
"000": 0.25,
|
|
"101": 0.25,
|
|
"110": 0.25,
|
|
"011": 0.25
|
|
},
|
|
"exact": "Q502"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/repeat_until_success.qasm",
|
|
"covers": [
|
|
"a while on a measured bit, bounded",
|
|
"reset inside a loop"
|
|
],
|
|
"expect": {
|
|
"warns": [
|
|
"Q311"
|
|
],
|
|
"distribution": {
|
|
"1": 0.9375,
|
|
"0": 0.0625
|
|
},
|
|
"exact": "Q502"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/loops_export.qasm",
|
|
"covers": [
|
|
"an untyped loop variable",
|
|
"a typed loop variable in an angle"
|
|
],
|
|
"expect": {
|
|
"distribution": {
|
|
"00": 0.375,
|
|
"01": 0.125,
|
|
"10": 0.375,
|
|
"11": 0.125
|
|
},
|
|
"exact": "Q500"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/qasm2_export.qasm",
|
|
"covers": [
|
|
"OpenQASM 2: u2, u1, cu1, measure q -> c on a register"
|
|
],
|
|
"expect": {
|
|
"distribution": {
|
|
"011": 0.75,
|
|
"111": 0.25
|
|
},
|
|
"exact": "Q500"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/qasm2_qelib1_gates.qasm",
|
|
"covers": [
|
|
"OpenQASM 2: qelib1.inc's c3x, c4x, csx, c3sqrtx, rccx and u0, called undefined"
|
|
],
|
|
"expect": {
|
|
"deterministic": "10111",
|
|
"exact": "ok"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/library_written_out.qasm",
|
|
"covers": [
|
|
"stdgates.inc's definitions written out, under ctrl @"
|
|
],
|
|
"expect": {
|
|
"equivalent": "import/library_written_out.ref.qasm"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/refuse_readonly_write.qasm",
|
|
"covers": [
|
|
"a write to a readonly array argument"
|
|
],
|
|
"expect": {
|
|
"refused": "Q131"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/refuse_define_u.qasm",
|
|
"covers": [
|
|
"a definition of U"
|
|
],
|
|
"expect": {
|
|
"refused": "Q106"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/refuse_unbound_parameter.qasm",
|
|
"covers": [
|
|
"an input float with no value"
|
|
],
|
|
"expect": {
|
|
"refused": "Q115"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/refuse_unbounded_while.qasm",
|
|
"covers": [
|
|
"a while on a measured bit with no bound"
|
|
],
|
|
"expect": {
|
|
"refused": "Q310"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/refuse_measured_arithmetic.qasm",
|
|
"covers": [
|
|
"arithmetic on a measured register"
|
|
],
|
|
"expect": {
|
|
"refused": "Q306"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/refuse_angle_from_measurement.qasm",
|
|
"covers": [
|
|
"a gate angle from a measurement"
|
|
],
|
|
"expect": {
|
|
"refused": "Q306"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/refuse_overflow.qasm",
|
|
"covers": [
|
|
"integer overflow"
|
|
],
|
|
"expect": {
|
|
"refused": "Q112"
|
|
}
|
|
},
|
|
{
|
|
"file": "import/refuse_register_condition.qasm",
|
|
"covers": [
|
|
"a register of several bits as a condition"
|
|
],
|
|
"expect": {
|
|
"refused": "Q303"
|
|
}
|
|
}
|
|
]
|
|
}
|