Abstract
Traditional methods for handling (inequality) constraints in the Quantum Approximate Optimization Ansatz (QAOA) typically rely on penalty terms and slack variables, which increase problem complexity and expand the search space. More sophisticated mixer-based QAOA variants restrict the search within the feasible assignments but often suffer from prohibitive circuit complexity. This paper presents a low-complexity formalism for incorporating inequality constraints into the cost function of QAOA using an oracle-based subroutine that evaluates constraint satisfaction in an additional register, subsequently called Indicator Function QAOA (IF-QAOA). The IF-QAOA cost function consists of a step-function but does not require a penalty term with additional parameters. Applied to the Knapsack problem, we demonstrate the superior performance of IF-QAOA over conventional penalty-based approaches in simulated experiments. Using advanced QAOA simulation techniques with instances consisting of up to 22 items, we find that IF-QAOA achieves significantly higher solution quality and a faster time-to-solution in 82% of our benchmark cases. Analysis of the scaling behavior shows favorable scaling of IF-QAOA compared to penalty-based methods. Also, benchmarked against the recently developed Quantum Tree Generator QAOA for Knapsack Problems, we demonstrate higher solution quality for circuits of similar complexity. Additionally, the paper introduces a method for approximate indicator function when the number of ancillary qubits is limited. With a specialized simulation algorithm based on projective measurements, we empirically demonstrate that a fixed number of ancillary qubits is sufficient to encode general inequality constraints.
Introduction
Most real-world optimization problems are subject to constraints, such as budget limits or capacity restrictions. In the standard Quantum Approximate Optimization Ansatz (QAOA), these constraints are typically handled by adding penalty terms to the objective function. However, this approach introduces two significant drawbacks: search space bloat due to the need for slack variables to handle inequalities, and landscape distortion where large penalty coefficients obscure the original objective function's features.
While mixer-based approaches can restrict the search to the feasible subspace, they often require complex circuits that are difficult to implement on near-term hardware. IF-QAOA offers a middle ground by using a low-complexity oracle to enforce constraints without the negative side effects of penalty terms.
Methodology
The core innovation of IF-QAOA is the use of an Indicator Function to conditionally apply the cost Hamiltonian. Instead of distorting the energy landscape with penalties, the algorithm employs a quantum subroutine—Quantum Phase Estimation (QPE)—to evaluate constraint satisfaction.
- Oracle Evaluation: The constraint function $g(x)$ is computed into an ancillary register.
- Indicator Qubit: The sign bit of this register serves as an indicator, identifying whether a state $x$ is feasible ($g(x) \geq 0$).
- Conditional Phase Application: The cost Hamiltonian is applied only to feasible states, effectively implementing a modified objective $\tilde{f}(x) = f(x)\Theta[g(x)]$, where $\Theta$ is the Heaviside step function.
- Approximate Implementation: To accommodate hardware with limited ancillary qubits, the authors propose an approximate indicator function using projective measurements, which maintains algorithmic stability even with low-resolution constraint evaluation.
Experimental Evaluation
The performance of IF-QAOA was evaluated using the 0-1 Knapsack Problem, an NP-hard combinatorial problem. Benchmarks included:
- Integer-valued dataset: 128 instances for problem sizes $N$ ranging from 6 to 22 qubits.
- Real-valued dataset: Used to test the robustness of the approximate indicator function.
- Baselines: Standard QUBO with slack variables, "virtual penalty" methods, and the state-of-the-art Quantum Tree Generator (QTG) QAOA.
Results and Discussion
IF-QAOA demonstrated significant improvements over traditional methods:
- Solution Quality: The method maintained a median Random-Adjusted Approximation Ratio (RAAR) above 0.8, whereas penalty-based methods typically fell between 0.4 and 0.6.
- Scaling: The Time-to-Solution (TTS) for IF-QAOA scaled at $1.30^N$, a marked improvement over the $1.63^N$ scaling of optimized penalty methods.
- Efficiency: IF-QAOA outperformed penalty methods in 82% of benchmark cases and provided higher solution quality than QTG-QAOA for equivalent circuit complexity.
The success of IF-QAOA stems from landscape preservation. By zeroing out the phase for infeasible states rather than adding massive penalties, the relative energy levels of feasible solutions remain intact, facilitating easier navigation for classical optimizers. Furthermore, avoiding slack variables reduces the "slack tax" on qubit resources.
Conclusion and Future Work
IF-QAOA provides a robust, penalty-free framework for constrained optimization. While it increases circuit depth due to the QPE subroutine, its superior scaling and solution quality make it a promising candidate for future quantum hardware. Future research will focus on reducing circuit depth through techniques like Quantum Signal Processing (QSP) and extending the framework to handle multiple complex constraints.
Summary updated