Provably Optimal Quantum Circuits with Mixed-Integer Programming
Harsha Nagarajan, Zsolt Szabó
TL;DR
The paper tackles provably optimal quantum circuit compilation by formulating a depth-aware MILP that exactly models gate selection, sequencing, and hardware constraints while handling global phase linearly. It introduces a real-encoding of complex matrices and McCormick linearizations to maintain tractability, plus domain-specific cuts (symmetry, redundancy, and Hermitian-conjugate constraints) that dramatically accelerate solving. For scaling beyond exact MILP, it proposes rolling-horizon optimization to iteratively optimize finite windows, preserving local structure and enabling improvements on larger circuits. The framework supports exact and approximate fidelity objectives, including a linear real-part surrogate and a Frobenius-based outer-approximation, with proven relationships to true fidelity and efficient MILP reformulations. Empirically, the approach yields certified depth-optimal circuits on standard targets, offers substantial speedups (up to 43x), and demonstrates notable gate reductions on Fibonacci-anyon and multi-body parity circuits, all integrated in the open-source QCOpt toolkit for hardware-aware compilation.
Abstract
We present a depth-aware optimization framework for quantum circuit compilation that unifies provable optimality with scalable heuristics. For exact synthesis of a target unitary, we formulate a mixed-integer linear program (MILP) that linearly handles global-phase equivalence and uses explicit parallel scheduling variables to certify depth-optimal solutions for small-to-medium circuits. Domain-specific valid constraints, including identity ordering, commuting-gate pruning, short-sequence redundancy cuts, and Hermitian-conjugate linkages, significantly accelerate branch-and-bound, yielding speedups up to 43x on standard benchmarks. The framework supports hardware-aware objectives, enabling fault-tolerant (e.g. T-count) and NISQ-era (e.g. entangling gates) devices. For approximate synthesis, we propose 3 objectives: (i) exact, but non-convex, phase-invariant fidelity maximization; (ii) a linear surrogate that maximizes the real trace overlap, yielding a tight lower bound to fidelity; and (iii) a convex quadratic function that minimizes the circuit's Frobenius error. To scale beyond exact MILP, we propose a novel rolling-horizon optimization (RHO) that rolls primarily in time, caps the active-qubits, and enforces per-qubit closure while globally optimizing windowed segments. This preserves local context, reduces the Hilbert-space dimension, and enables iterative improvements without ancillas. On a 142-gate seed circuit, RHO yields 116 gates, an 18.3% reduction from the seed, while avoiding the trade-off between myopic passes and long run times. Empirically, our exact compilation framework achieves certified depth-optimal circuits on standard targets, high-fidelity Fibonacci-anyon weaves, and a 36% gate-count reduction on multi-body parity circuits. All methods are in the open-source QuantumCircuitOpt, providing a single framework that bridges exact certification and scalable synthesis.
