Compiler benchmark

Every pair of twelve circuits (four QEC memory experiments, six Clifford circuits, two small non-Clifford ones) and the nine reference devices. A compiler is ranked by how much faster its programs run than the reference compiler's, over the pairs both compile; a single wrong program makes an entry ineligible.

The reference compiler, pair by pair

Each cell is one pair: the round time in milliseconds (T_jones) where qccdc's program is valid; wrong where it breaks one of the device's rules (hover for which); refused where it cannot compile the pair. Every one of these is a place another compiler can do better.

circuitchaincyclone_basecyclone_dual_loopdeck_unit_cellgrid9x9h2_racetrackladder_2x72ring144_24vstationary_chain
rep3_r3_z memory, 5 qubits4.184.434.605.865.864.095.1119.594.89
rep5_r5_z memory, 9 qubits6.918.667.5013.3013.306.6510.8296.6714.85
surface3_r3_z memory, 17 qubitsrefused41.33refused39.0639.0669.3979.28117.3132.41
steane_r3_z memory, 16 qubitsrefused62.98refused57.4457.4489.17100.14106.8340.45
bell2 clifford, 2 qubits0.870.870.870.990.990.870.871.330.87
ghz8 clifford, 8 qubits4.654.394.655.455.454.654.857.421.48
ghz16 clifford, 16 qubits9.699.219.6911.4511.459.699.9915.543.73
ghz32 clifford, 32 qubits19.7719.6719.7723.4123.4119.7720.3750.51refused
bv6 clifford, 7 qubits2.822.652.813.253.252.812.924.362.92
clifford12 clifford, 12 qubitsrefused58.09refused60.1660.1661.4973.7890.2340.13
qft6 general, 6 qubitsrefused15.0217.2317.8217.8217.0719.1125.0410.94
adder3 general, 10 qubits20.4818.8230.8228.8028.8019.5323.9340.2316.76

The contract

A compiler is a directory with qccd-compiler.json. The grader runs it once per pair, with no network, a time and memory limit, and nothing it can reach but the pair's files:

<entry> --circuit circuit.qasm --device device.arch.json --expanded device.expanded.json --out DIR
DIR/program.tsir.jsonrequired on exit 0: native gates R, VZ, MS; meta.qubit_map
DIR/certificate.qcert.jsonoptional; reported, never required
exit 0compiled
exit 4refused (costs coverage, not eligibility)
exit othercrash
{
 "kind": "qccd.compiler",
 "version": 1,
 "name": "my-compiler",
 "about": "starts as the reference compiler (qccdc + cooling): make it your own",
 "runtime": "python3",
 "entry": [
  "python3",
  "<your script>"
 ],
 "build": null
}

Runtimes: python3, native. Cooling is the compiler's decision; the heating budget (rule R7) is checked like every other rule.

Submit a compiler

qccd bench init-compiler my-compiler      # a working one to start from: the reference
qccd bench run --compiler my-compiler       # grade it on the public pairs, on your machine
qccd bench publish my-compiler --server https://qccd.academy/official

The run grades every pair locally, exactly as the server will (the hidden pairs aside), and your agent can read the report (qccd_get_bench). Running a compiler runs your code, so it happens in your shell, never through the agent's tools. Publishing needs you at the terminal: it shows the compiler's digest and asks you to type it back. On the server the compiler runs in a separate sandbox container with no network and no secrets.