Inspiration
Quantum circuit compilation is not only about making a circuit smaller. A circuit must still perform the exact required computation under strict verification. We were inspired by the challenge of finding lower-resource representations while preserving mathematical correctness across three very different benchmarks: invsqrt, dqi, and dfthcsos.
Our goal was to make every optimization measurable, reproducible, and verifiable.
What We Built
We built a verification-first workflow for quantum circuit optimization.
The project includes:
- Official verifier and metric setup using Docker and Python 3.13.
- Candidate circuit discovery and provenance tracking.
- Full-shot verification for all three competition tasks.
- Correctness tests for arbitrary outputs, phases, XOR behavior, and workspace cleanup.
- Deterministic packaging with SHA-256 hashes and CRC validation.
- Separate tracking for local verifier results, parser results, and hosted Kaggle scores.
The competition score is based on the geometric mean:
[ S = \left( \frac{C_{\text{ref,invsqrt}}}{C_{\text{candidate,invsqrt}}} \cdot \frac{C_{\text{ref,dqi}}}{C_{\text{candidate,dqi}}} \cdot \frac{C_{\text{ref,dfthcsos}}}{C_{\text{candidate,dfthcsos}}} \right)^{1/3} ]
where each (C) is the official resource cost.
How We Built It
We first reproduced the official environment and pinned the verifier sources. We then evaluated public circuit candidates under the unchanged official verification rules.
For chemistry, we found that several public loaders appeared efficient but failed arbitrary-target XOR and phase checks. We therefore retained the verified V4 loaders and tested new public weights with them. This preserved correctness while still reducing the measured cost.
Every promoted candidate had to pass:
- The complete official shot count.
- Accuracy and phase constraints.
- Resource-cost comparison against the previous checkpoint.
- Exact artifact identity checks.
- Deterministic ZIP packaging.
- Official parser validation.
What We Learned
The biggest lesson was that a lower gate count does not automatically mean a lower competition cost. Sampling cost, qubit count, synthesis overhead, numerical error, and verifier behavior all matter.
We also learned that subset tests are not enough. Chemistry candidates that passed limited examples failed when tested with arbitrary target words. Full verifier runs exposed these issues before submission.
Another important lesson was reproducibility. We preserved source hashes, candidate hashes, verifier receipts, licenses, and dated checkpoints so every result could be inspected independently.
Challenges
The main challenges were:
- Running the official verifier with the correct Python and native-library versions.
- Completing large full-shot simulations within memory limits.
- Detecting hidden phase and measurement-kickback errors.
- Comparing public circuits fairly under the official metric.
- Preserving attribution and upstream licensing.
- Separating locally derived scores from actual hosted Kaggle scores.
Results
Our V5 candidates passed all three full local verifiers:
invsqrt: 1.62% lower cost than V4.dqi: 2.23% lower cost than V4.dfthcsos: 0.10% lower cost than V4.
The resulting local combined factor is:
[ 23.129118204048737 ]
This is a local verified result; the hosted Kaggle score is evaluated separately. Our accepted V4 submission achieved a hosted score of 22.78895.
The project continues with one principle: optimize aggressively, but accept an improvement only when the official verifier confirms that it is correct.
Built With
- benchmarking`
- circuit
- circuit-compilation`
- circuit-optimization`
- docker`
- formal-verification`
- high-performance-computing`
- kaggle`
- linear-algebra`
- numerical-optimization`
- numpy`
- quantum-circuits`
- quantum-computing`
- quantum-simulation`
- reproducible-research`
- resource-optimization`
- scientific-computing`
- scipy`
- suggested-**built-with**-tags:-`python`
- toffoli-gates`
Log in or sign up for Devpost to join the conversation.