This repository contains the solution for the Superquantum iQuHACK 2026 Challenge. The goal of the challenge was to synthesize various quantum unitaries into Clifford+T sequences with high precision.
src/: Core Python scripts for synthesis and verification.solver.py: The main script used to synthesize target unitaries.verify_all.py: Wrapper script to verify all 11 tasks.verify_circuits.py: Core logic for norm distance and T-count calculation.
circuits/: Generated Clifford+T QASM files for all 11 tasks.docs/: Challenge description and PDF documentation..gitignore: Standard git ignore file to keep the repository clean.
- Python 3.8+
- Qiskit
- Scipy
- Numpy
- mpmath
- pygridsynth (for 1-qubit rotation synthesis)
To regenerate the Clifford+T circuits (outputs will be saved in circuits/), run:
python3 src/solver.pyTo verify the generated circuits and see performance statistics, run:
python3 src/verify_all.pyAll tasks were verified using the operator norm distance metric and T-count calculation.
| Task | Description | Norm Distance | T-count |
|---|---|---|---|
| 1 | Controlled-Y | 0.0000e+00 | 4 |
| 2 | Controlled-Ry(π/7) | 6.8145e-13 | 504 |
| 3 | exp(i π/7 ZZ) | 1.1120e-12 | 2956 |
| 4 | exp(i π/7 (XX+YY)) | 8.1579e-13 | 2758 |
| 5 | exp(i π/4 H2) | 2.2204e-16 | 0 |
| 6 | exp(i π/7 H3) | 1.4597e-12 | 2540 |
| 7 | State Preparation | 6.7878e-07 | 2522 |
| 8 | Structured 1 | 1.9131e-12 | 2674 |
| 9 | Structured 2 | 1.6163e-12 | 3332 |
| 10 | Random Unitary | 2.4678e-12 | 5126 |
| 11 | 4-qubit Diagonal | 2.6346e-12 | 3660 |
The bonus challenge involved synthesizing a unitary represented by 255 commuting Pauli strings on 9 qubits, with phase rotation angles quantized to
-
Diagonalization: We implemented a manual Clifford diagonalization algorithm using Gaussian elimination on the symplectic representation of the Pauli subgroup. A Clifford circuit
$C$ was constructed to map the basis of the commuting subgroup to$Z$ -basis parities. -
Phase Synthesis: The diagonal phase rotations
$\prod \exp(-i \frac{k_j \pi}{8} Z^{v_j})$ were implemented using CNOT ladders and Rz gates. Since$k_j \in {1, 7}$ , each term translates to a single$T$ or$T^\dagger$ gate. -
Clifford+T Decomposition: The final circuit
$C^\dagger \text{Diag} C$ was transpiled to the${H, T, T^\dagger, CNOT}$ gate set.
python3 scripts/solve_bonus.py
python3 scripts/verify_bonus.py| Challenge | Desciption | Fidelity | T-count |
|---|---|---|---|
| Bonus | 255 Commuting Paulis | 1.0000 | 255 |
- Decomposition: 2-qubit unitaries are decomposed into CX and 1-qubit U3 gates using Qiskit's transpiler with level 3 optimization.
- Synthesis: 1-qubit U3 gates are further decomposed into Rz-H-Rz-H-Rz sequences. The Rz rotations are synthesized into Clifford+T sequences using
pygridsynthfor near-optimal T-count given a target precision. - Verification: The resulting QASM files are loaded back into Qiskit operators and compared against the target matrices using the operator norm distance, accounting for global phase.