Table of Contents
Fetching ...

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.

Provably Optimal Quantum Circuits with Mixed-Integer Programming

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.

Paper Structure

This paper contains 27 sections, 5 theorems, 44 equations, 7 figures, 5 tables, 4 algorithms.

Key Result

Proposition 1

$\det \mathcal{R}(A)=|\det A|^2.$

Figures (7)

  • Figure 1: Hardware-efficient brickwork ansatz on $7$ qubits (cf. kandala_hardware-efficient_2017leone_practical_2024), illustrating the identification of optimization blocks in the rolling-horizon optimization (RHO). Single- and two-qubit gates are slightly offset horizontally to indicate that, while typically parallel, any fixed virtual time ordering is admissible; for exposition, we adopt a top-to-bottom order. Green shading denotes the gate insertion order in the first rolling-horizon window (dark$\to$light); blue shading analogously denotes the second window.
  • Figure 2: Parity-ladder compilation of a three-body interaction $R_{ZZZ}(\theta)$ in a quantum circuit.
  • Figure 3: Four-qubit benchmark circuit used to probe RHO parameter sensitivity.
  • Figure : gates_on_qubits_up_to(t, q, i)
  • Figure : recursive_gates_on_qubits_up_to(t, q, i)
  • ...and 2 more figures

Theorems & Definitions (15)

  • Proposition 1
  • proof
  • Proposition 2
  • proof
  • Definition 1: Trivial vs. non-trivial action on qubits
  • Definition 2: Gate extension to $\mathcal{H}$
  • Definition 3: Circuit depth
  • Proposition 3
  • proof
  • Proposition 4
  • ...and 5 more