Overview
quantum-circuit-optimizer is the gate-level compiler in my quantum software stack. It parses OpenQASM 3, builds a DAG-based intermediate representation, applies a small set of circuit simplification passes, and routes the result onto hardware topologies with SABRE.
I use it both as a standalone compiler project and as an upstream component for qco-integration, where gate-level changes are pushed through pulse compilation and noise simulation.
Core Pieces
| Component | Purpose |
|---|---|
| Parser | OpenQASM 3.0 parsing with error recovery |
| IR | DAG representation for dependency-aware optimization |
| Passes | Cancellation, commutation, rotation merging, identity elimination |
| Routing | SABRE-based qubit mapping for hardware connectivity constraints |
| Tests | 340 unit tests across parsing, IR, optimization, and routing |
What It Does
- Parses standard-format quantum circuits into an internal DAG representation
- Runs lightweight optimization passes to reduce redundant gates and expose simplifications
- Supports multiple target topologies, including linear, ring, grid, and heavy-hex layouts
- Produces routed circuits suitable for downstream analysis and hardware-aware workflows
Why It Matters
This project is the compiler foundation for the rest of the pulse-level work on this site.
- qco-integration uses it to compare gate-level reductions against pulse-level fidelity outcomes
- QubitPulseOpt sits downstream at the control layer
- qubit-os extends the stack toward runtime control and hardware abstraction
The point is not just circuit reduction in isolation. It is understanding how compiler decisions propagate into duration, control cost, and fidelity.
Technical Stack
| Category | Technology |
|---|---|
| Language | C++17 |
| Build | CMake |
| Testing | GoogleTest |
| Input format | OpenQASM 3.0 |
| Routing | SABRE |