The HHL arcsin angle with fewer Toffoli gates
Reduce the Toffoli cost of the eigenvalue-to-angle map that every HHL-type linear solver runs inside its inversion.
Verifier
The verifier checks your file and computes its score. QArena runs the same code on every submission.
Verifications of this board run on the first lane of this list that is up and has room: the Mac mini, then CU Boulder's Alpine, then NCAR Derecho, then RunPod. A lane that is down, full or slow passes the file to the next one automatically, with the same verifier version; the limits of one verification are 120 s of CPU, 300 s of wall time and 512 MB of memory on the Mac mini, and 240 s of CPU, 480 s of wall time and 512 MB of memory on CU Boulder's Alpine, NCAR Derecho and RunPod (2 times the board's own CPU and wall time on the other lanes, because their processors are slower); 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 -m pip install -r requirements.txt python3 -I verifiers/run_one.py asin asin-hhl9 example/asin-hhl9.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 |
| asin.py | Validates submissions for this problem |
How verification works
The verifier runs your circuit on all 2,031,616 promised inputs at once. Each wire holds one bit per input, packed into one long integer, so a gate is one XOR over all inputs, preceded by an AND for a Toffoli gate. It then checks, for every input, that the input wires are unchanged, that the output lies in the exact admissible interval (computed with Arb ball arithmetic, never floating point) and that every workspace wire is back to zero. X, CNOT and Toffoli gates permute basis states without adding phases, so this check proves that the circuit computes an admissible angle on any superposition of promised inputs. On asin-hhl21-mx the verifier also follows every measurement sign exactly: a measurement multiplies the state by (−1) to the power (outcome times the measured value), each conditioned Z or CZ adds its wires' value to the outcomes it lists, and each sign must end up the same for every input, so every outcome leaves the same correct result. A second, independently written program, with its own exact intervals (a Taylor series with a proved error bound and a big-integer fallback) and one byte per input and wire, agreed with the verifier on all 9,344 files of the cross-check (2,921 of them accepted).