Constraint-Aware Quantum Optimization via Hamming Weight Operators
Yajie Hao, Qiming Ding, Xiao Yuan, Xiaoting Wang
TL;DR
This work tackles constrained binary optimization under a hard linear constraint $\sum_i \omega_i x_i = b$ by replacing penalty-based constraint handling with a constraint-preserving mixer built from Hamming Weight Operators, thereby confining quantum evolution to the feasible subspace. It introduces Adaptive Hamming Weight Operator QAOA (AHWO-QAOA), which adaptively selects a sparse, problem-tailored set of constraint-preserving mixers from a pool to produce shallow, hardware-efficient circuits. Numerical experiments on portfolio optimization and two-jet clustering up to $n=20$ qubits show that AHWO-QAOA guarantees feasibility, achieves higher Approximation Ratios, and uses roughly half as many gates as penalty-based QAOA. The framework is modular and compatible with other QAOA variants, offering a scalable path toward practical constrained quantum optimization on near-term devices and potential applicability to broader variational algorithms such as VQE.
Abstract
Constrained combinatorial optimization with strict linear constraints underpins applications in drug discovery, power grids, logistics, and finance, yet remains computationally demanding for classical algorithms, especially at large scales. The Quantum Approximate Optimization Algorithm (QAOA) offers a promising quantum framework, but conventional penalty-based formulations distort optimization landscapes and demand deep circuits, undermining scalability on near-term hardware. In this work, we introduce Hamming Weight Operators, a new class of constraint-aware operators that confine quantum evolution strictly within the feasible subspace. Building on this idea, we develop Adaptive Hamming Weight Operator QAOA, which dynamically selects the most effective operators to construct shallow, problem-tailored circuits. We validate our approach on benchmark tasks from both finance and high-energy physics, specifically portfolio optimization and two-jet clustering with energy balance. Across these problems, our method inherently satisfies all constraints by construction, converges faster, and achieves higher Approximation Ratios than penalty-based QAOA, while requiring roughly half as many gates. By embedding constraint-aware operators into an adaptive variational framework, our approach establishes a scalable and hardware-efficient pathway for solving practical constrained optimization problems on near-term quantum devices.
