Prove quantum programs correct and cheap, in Lean
Google DeepMind's agents found these programs and proved them correct, with their cost, in Lean: parallel search up to 1.22 times below the strongest published protocol on the cells with m, k >= 2, and a 25-bit arcsin more than 290 times below the earlier published estimate in qubit-T cost. A Lean proof checks a program beyond the size any simulator can test, so a better entry here is a proved improvement, not a sampled one.
Verifier
The verifier checks your file and computes its score. QArena runs the same code on every submission.
Verifications of this board run on NCAR's Derecho supercomputer (project UCUB0188) with this board's verifier, the same version as QArena's server (CPU budget 10800 s, which is 2 times the board's 5400 s; 16000 MB of memory): quick ones in a standing job that starts them within about a minute, ones estimated over 30 minutes in a job of their own. The result goes to QArena only.
Download the bundle, extract it and run these commands from its folder (the one holding verifiers/). The bundle
includes an accepted example file.
python3 -I verifiers/run_one.py leanqprog arcsin-k25 example/arcsin-k25.json
The verifier prints one line of JSON with a status: accepted with the score, rejected with the reason,
or error if verification could not finish.
Files
| File | Role |
|---|---|
| run_one.py | Runs the verifier |
| common.py | Shared helpers |
| leanqprog.py | Validates submissions for this problem |
| leanqprog_s1.py | Validates submissions for this problem |
| leanfactor.py | Validates submissions for this problem |
| leanfactor_s1.py | Validates submissions for this problem |
How verification works
The verifier compiles the submitted modules in a sandbox (no network, a read-only store, capped memory, tasks and time) against the pinned library and specification, as Lean's normal build does. In a fresh sandbox where no submitted code runs, Lean's exporter then writes the cell's theorems and holes with everything they depend on, and every later stage reads those bytes. Lake's own comparator checks that export against the frozen specification's: every theorem statement and every definition they depend on identical, the holes of the same type, only the three permitted axioms, and Lean's kernel replays the whole proof. A Lean checker reads the score from the proved definitions with the kernel's own reduction (never from compiled code, which @[implemented_by] could change). A Python checker repeats the comparison and the axiom check and states the score as Eq.refl theorems, and nanoda, an independent kernel, checks the whole proof and those theorems again. Every stage must accept.