A Realizable GAS-based Quantum Algorithm for Traveling Salesman Problem

Jieao Zhu, Yihuai Gao, Hansen Wang, Tiefu Li, Hao Wu · DOI

This paper presents a practical leap forward for solving the Traveling Salesman Problem (TSP) on quantum hardware. By refining the Grover Adaptive Search (GAS) framework, the researchers from Tsinghua University developed a "realizable" algorithm that overcomes two major hurdles: the output of invalid solutions and the prohibitive qubit requirements of current quantum computers.

TL;DR

The authors propose a Grover Adaptive Search (GAS) algorithm for TSP that uses a novel "Hamiltonian Cycle Detection" oracle to automatically filter out illegal tours and an "anchor register" strategy to drastically reduce qubit consumption. They successfully solved a 7-node TSP using only 31 qubits with an 86.71% success rate, outperforming standard Variational Quantum Algorithms (VQA) in both efficiency and accuracy.

What Problem Does This Paper Address?

The Traveling Salesman Problem (TSP)—finding the shortest route that visits a set of cities exactly once and returns to the start—is a cornerstone of combinatorial optimization and is famously NP-hard.

While quantum algorithms like Grover’s Search offer a theoretical quadratic speedup, applying them to TSP in the real world (the "NISQ" era) has been difficult for two reasons:

  1. Feasibility: Quantum searches often return "illegal" paths (e.g., paths that skip cities or visit one twice). Previous implementations often required users to manually "pre-filter" valid paths, which defeats the purpose of the automation.
  2. Qubit Scarcity: Quantum gates are reversible, meaning you can't simply "overwrite" a qubit to reuse it. This usually leads to a massive "qubit tax" for intermediate calculations, limiting most current TSP demos to a trivial 4 cities.

Methods

The researchers built their solution on the Grover Adaptive Search (GAS) framework, introducing two key innovations:

  • Hamiltonian Cycle Detection (HCD) Oracle: Based on a newly proven "Cycle Determination Theorem," this oracle acts as a gatekeeper. It mathematically verifies if a quantum state represents a valid Hamiltonian cycle during the search process. If a path is illegal, the oracle ensures it isn't selected, removing the need for manual pre-filtering.
  • Anchor Register Strategy: To solve the qubit bottleneck, the team designed a strategy to "uncompute" intermediate results. By using a small number of "anchor" registers to store partial states, they can reversibly free up qubits for reuse. This shifts the qubit requirement from a steep $O(nN)$ to a much leaner $O(mN + 2\sqrt{N} \log_2 N)$.
  • Cycle Length Comparing (CLC) Oracle: This component uses Phase Estimation to calculate the total cost of a path and compares it against a threshold to find the shortest route.

Datasets

The authors evaluated their algorithm using synthetic TSP instances:

  • Test Graphs: Cities were generated by uniformly picking $N$ coordinates within a 2D unit square $[0, 1]^2$.
  • Distances: Standard Euclidean distances were used for edge weights.
  • Scale: They tested the algorithm on graphs with $N = 4, 5, 6, \text{ and } 7$ nodes. For $N \ge 6$, they utilized "sparse" graphs (limiting the number of roads per city) to fit within the limits of the quantum simulator.

Key Insights and Ideas

  • Prime Number Paradox: One surprising insight (Remark 1) is that if the number of cities $N$ is a large prime, the HCD oracle actually requires fewer checks and fewer qubits than if $N$ is a composite number like 16.
  • Reversibility as an Asset: Instead of seeing the inability to delete qubits as a flaw, the anchor register strategy treats it as a memory management problem, using "uncomputation" to create a circular buffer-like effect in quantum space.
  • Better Scaling: While popular hybrid algorithms like VQE and QAOA require $O(N^2)$ qubits, this GAS-based approach scales at $O(N \log N)$, making it significantly more viable for larger problems as hardware improves.

Key Results

  • 7-Node Success: The algorithm successfully solved a 7-node TSP—a non-trivial size for current simulators—using only 31 qubits.
  • High Accuracy: The success rate for finding the optimal solution was 86.71%.
  • Efficiency: Compared to VQA and QAOA, the proposed GQ-TSP (Grover Quantum TSP) showed a significantly higher success rate (SR99) and more efficient qubit usage as the number of cities increased.
  • Simulation: The work was validated using IBM’s Qiskit simulator, demonstrating that the circuit depth and qubit count are within the reach of near-term hardware.

Limitations and Future Work

  • Hardware vs. Simulator: While the algorithm is designed for real quantum hardware, the results in this paper were obtained via the Qiskit simulator. Testing on a physical, noisy quantum processor is the logical next step.
  • Circuit Depth: The "qubit-saving" strategy comes at a cost: it increases the circuit depth (the number of sequential operations) by roughly a factor of two. On current noisy hardware (NISQ), longer circuits are more prone to errors.
  • Threshold Selection: The algorithm requires selecting a "threshold" ($C_{th}$) for the shortest path. Finding the optimal threshold efficiently remains an area for further refinement.

Summary updated

Abstract

The paper proposes a quantum algorithm for the traveling salesman problem (TSP) based on the Grover Adaptive Search (GAS), which can be successfully executed on IBM's Qiskit library. Under the GAS framework, there are at least two fundamental difficulties that limit the application of quantum algorithms for combinatorial optimization problems. One difficulty is that the solutions given by the quantum algorithms may not be feasible. The other difficulty is that the number of qubits of current quantum computers is still very limited, and it cannot meet the minimum requirements for the number of qubits required by the algorithm. In response to the above difficulties, we designed and improved the Hamiltonian Cycle Detection (HCD) oracle based on mathematical theorems. It can automatically eliminate infeasible solutions during the execution of the algorithm. On the other hand, we design an anchor register strategy to save the usage of qubits. The strategy fully considers the reversibility requirement of quantum computing, overcoming the difficulty that the used qubits cannot be simply overwritten or released. As a result, we successfully implemented the numerical solution to TSP on IBM's Qiskit. For the seven-node TSP, we only need 31 qubits, and the success rate in obtaining the optimal solution is 86.71%.
BibTeX
@misc{zhu2022realizable,
  author = {Jieao Zhu and Yihuai Gao and Hansen Wang and Tiefu Li and Hao Wu},
  title = {{A Realizable GAS-based Quantum Algorithm for Traveling Salesman Problem}},
  year = {2022},
  eprint = {2212.02735},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.02735},
}
Figure