Qubit-efficient Variational Quantum Algorithms for Image Segmentation

Supreeth Mysore Venkatesh, Antonio Macaluso, Marlon Nuske, Matthias Klusch, Andreas Dengel · DOI

Introduction

Image segmentation—the process of partitioning a digital image into multiple semantic regions—is a cornerstone of computer vision. A common mathematical formulation for this task is the "minimum cut" problem, where an image is represented as a graph and the goal is to find a partition that minimizes the weights of edges between sets. However, as a combinatorial optimization problem, finding the global minimum is NP-hard, making it a prime candidate for quantum acceleration.

While the Quantum Approximate Optimization Algorithm (QAOA) is the standard approach for such problems, it faces a significant hardware bottleneck: it typically requires one logical qubit for every pixel. For high-resolution imagery, this linear scaling ($O(n)$) is prohibitive for Noisy Intermediate-Scale Quantum (NISQ) devices. This paper introduces Adaptive Cost Encoding (ACE), a qubit-efficient variational quantum algorithm (VQA) that achieves logarithmic scaling ($O(\log n)$), potentially enabling the segmentation of a 1-megapixel image using only 20 qubits.

Methodology

The researchers reformulate image segmentation as a Quadratic Unconstrained Binary Optimization (QUBO) problem. To solve this on quantum hardware with minimal resources, they evaluate three distinct encoding strategies within a VQA framework.

1. Parametric Gate Encoding (PGE)

PGE encodes the segmentation solution directly into the parameters of the quantum gates. By utilizing a hardware-efficient ansatz, it maps the pixel space to the Hilbert space using $\lceil \log_2(n) \rceil$ qubits for $n$ pixels. While efficient in qubit count, the complexity is shifted to the parameter space.

2. Ancilla Basis Encoding (ABE)

ABE utilizes a register of qubits plus one auxiliary "ancilla" qubit. The segmentation solution is decoded from the probability distribution of the basis states. This method requires $\log_2(n) + 1$ qubits. However, ABE often struggles with optimization because it operates on a continuous probability landscape that can be noisy and non-convex.

3. Adaptive Cost Encoding (ACE)

ACE is the primary contribution of this work. While it shares the circuit architecture of ABE, it fundamentally alters the cost function calculation. Instead of calculating costs based on raw probability distributions, ACE decodes the quantum state into a discrete binary segmentation mask at each iteration. The cost function is then applied directly to this mask. This creates a more structured optimization path, helping classical optimizers navigate the landscape more effectively.

Experimental Setup

The algorithms were tested on synthetic square grid graphs simulating small-scale images (2x2 and 4x4 pixels).

  • Edge Weights: Sampled from a uniform distribution $[-1, 1]$ to represent varying pixel similarities.
  • Optimizers: The study compared several classical optimizers, including COBYLA, SLSQP, Powell, and the metaheuristic Differential Evolution.
  • Baselines: Performance was benchmarked against Gurobi, a state-of-the-art classical solver, to determine the "Relative Error" of the quantum solutions.

Key Insights and Results

Logarithmic Resource Efficiency

The shift from linear to logarithmic scaling is the most impactful result. By moving from $O(n)$ to $O(\log n)$, the researchers demonstrate a path toward processing realistic image sizes on near-term hardware. The jump from a 16-pixel image to a 1-million-pixel image requires an increase of only 15 qubits (from 5 to 20).

Optimization Performance

ACE demonstrated superior performance across several metrics:

  • Convergence: ACE consistently required fewer iterations to reach the optimal solution compared to PGE and ABE.
  • Robustness: The algorithm showed minimal performance variation across different random seeds, suggesting a more stable optimization landscape than previous encoding methods.
  • Global Optima: When paired with metaheuristic optimizers like Differential Evolution, ACE successfully identified the exact global minimum for the test cases, proving that the encoding can represent the optimal solution even with shallow circuit depths.

Limitations and Future Directions

Despite the qubit efficiency, the authors identify a "measurement bottleneck." While the number of qubits is low, the number of measurements (shots) required to accurately reconstruct the probability distribution for decoding scales exponentially with the number of qubits. This could limit the practical speed of the algorithm for very large images.

Furthermore, the optimization landscape remains non-convex, and classical optimizers can still become trapped in local minima. Future research will focus on:

  1. Exploring more complex graph connectivities to better capture spatial relationships in real-world images.
  2. Investigating the impact of "barren plateaus"—regions where the cost function gradient vanishes—on these specific encoding strategies.
  3. Developing hybrid strategies to mitigate the measurement overhead as the qubit count increases.

Summary updated

BibTeX
@inproceedings{venkatesh2024qubit,
  author = {Supreeth Mysore Venkatesh and Antonio Macaluso and Marlon Nuske and Matthias Klusch and Andreas Dengel},
  title = {{Qubit-efficient Variational Quantum Algorithms for Image Segmentation}},
  booktitle = {QCE},
  year = {2024},
  doi = {10.1109/qce60285.2024.00059},
}
Figure