Skip to content

Falak-Parmar/Superquantum-iQuHACK-2026

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Superquantum iQuHACK 2026 Challenge

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.

Repository Structure

  • 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.

Getting Started

Prerequisites

  • Python 3.8+
  • Qiskit
  • Scipy
  • Numpy
  • mpmath
  • pygridsynth (for 1-qubit rotation synthesis)

Running the Solver

To regenerate the Clifford+T circuits (outputs will be saved in circuits/), run:

python3 src/solver.py

Verification

To verify the generated circuits and see performance statistics, run:

python3 src/verify_all.py

Performance Results

All 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

Bonus Challenge: Commuting Pauli Phase Program

The bonus challenge involved synthesizing a unitary represented by 255 commuting Pauli strings on 9 qubits, with phase rotation angles quantized to $\pi/8$.

Solution Overview

  1. 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.
  2. 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.
  3. Clifford+T Decomposition: The final circuit $C^\dagger \text{Diag} C$ was transpiled to the ${H, T, T^\dagger, CNOT}$ gate set.

Running the Bonus Solver

python3 scripts/solve_bonus.py
python3 scripts/verify_bonus.py
Challenge Desciption Fidelity T-count
Bonus 255 Commuting Paulis 1.0000 255

Methodology

  1. Decomposition: 2-qubit unitaries are decomposed into CX and 1-qubit U3 gates using Qiskit's transpiler with level 3 optimization.
  2. 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 pygridsynth for near-optimal T-count given a target precision.
  3. 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors