Quantum Routes: Smarter Encoding for the Traveling Salesman

Author: Denis Avetisyan


Researchers have developed new methods for representing the classic Traveling Salesman Problem on quantum computers, potentially unlocking faster solutions with fewer qubits.

For the 4-city Traveling Salesman Problem, the runtime of the Quantum Approximate Optimization Algorithm (QAOA) scales with the number of layers in its ansatz, and this performance is demonstrably affected by the chosen encoding scheme-whether based on edges or nodes-suggesting a crucial relationship between problem representation and algorithmic efficiency.
For the 4-city Traveling Salesman Problem, the runtime of the Quantum Approximate Optimization Algorithm (QAOA) scales with the number of layers in its ansatz, and this performance is demonstrably affected by the chosen encoding scheme-whether based on edges or nodes-suggesting a crucial relationship between problem representation and algorithmic efficiency.

This review details edge-based and subspace reduction encoding schemes for quantum optimization, demonstrating improvements in qubit efficiency and performance for solving the Traveling Salesman Problem using quantum annealing and QAOA.

Despite the promise of quantum computation, efficiently encoding combinatorial optimization problems like the Traveling Salesman Problem remains a significant challenge. This is addressed in ‘An edge-based and subspace reduction encoding scheme to solve the traveling salesman problem in quantum computers’, which introduces a novel approach utilizing edge-based encoding coupled with subspace reduction to minimize qubit requirements. Results demonstrate that this scheme outperforms conventional node-based methods on smaller instances, achieving optimal solutions for the 4-city TSP on state-of-the-art quantum hardware. Will these encoding strategies pave the way for tackling larger, more complex instances of the TSP, bringing practical quantum solutions closer to reality?


Unraveling Complexity: The Challenge of Combinatorial Exploration

The Traveling Salesman Problem (TSP) serves as a cornerstone example of a broader class of computational challenges known as “NP-hard” problems. This seemingly simple puzzle – finding the shortest possible route that visits each of a given set of cities and returns to the origin – quickly becomes intractable as the number of cities grows. While easily stated, the computational effort required to find an optimal solution scales factorially with the number of cities, meaning even a modest increase in problem size can render exact solutions impossible to obtain within any reasonable timeframe. Beyond its theoretical importance, the TSP has significant practical relevance, underpinning solutions to logistical challenges in areas like delivery route optimization, circuit board design, DNA sequencing, and even astronomy, where telescopes must schedule observations efficiently. The difficulty of solving the TSP isn’t merely academic; it highlights fundamental limitations in current computational approaches and motivates the development of approximation algorithms and heuristics to find near-optimal solutions for real-world applications.

The limitations of classical algorithms become strikingly apparent when confronted with the sheer scale of real-world optimization problems. While solutions may be attainable for relatively small instances, the computational time required often increases exponentially with the number of possibilities – a phenomenon known as combinatorial explosion. For instance, attempting to solve the Traveling Salesman Problem for a large number of cities quickly overwhelms even powerful computers, as the algorithm must evaluate $n!$ possible routes. This lack of scalability restricts the practical application of these algorithms in fields such as logistics, supply chain management, and genomic sequencing, where problem sizes are frequently vast and demand timely solutions. Consequently, researchers are actively exploring alternative approaches, including heuristics and quantum computing, to overcome these inherent limitations and tackle increasingly complex challenges.

A New Computational Paradigm: Harnessing the Power of Quantum States

Quantum computing’s potential for speedup arises from its utilization of quantum phenomena like superposition and entanglement. While classical computers represent information as bits, which are either 0 or 1, quantum computers use quantum bits, or qubits. Qubits can exist in a superposition of both 0 and 1 simultaneously, allowing a quantum computer to explore many possibilities in parallel. This parallelization provides exponential scaling for certain algorithms. Specifically, problems exhibiting inherent parallelism, such as factoring large numbers – the basis for RSA encryption – or simulating quantum systems, demonstrate significant speedups. Problems considered intractable for classical computers – those requiring computational time that grows exponentially with the problem size – may become solvable with quantum algorithms, though not all problems benefit from this approach.

Quantum algorithms provide approaches to complex optimization problems not efficiently solvable by classical methods. Quantum Phase Estimation (QPE) is utilized to determine the eigenvalues of unitary operators, crucial for simulating quantum systems and solving linear systems of equations. Grover’s Adaptive Search algorithm offers a quadratic speedup for unstructured search problems, improving upon the linear time complexity of classical algorithms. Variational Quantum Eigensolver (VQE) is a hybrid quantum-classical algorithm designed to find the ground state energy of a given Hamiltonian, particularly relevant in quantum chemistry and materials science; it leverages a classical optimization loop to minimize the expectation value of a parameterized quantum circuit. These algorithms, while differing in their specific applications and methodologies, all rely on quantum mechanical principles like superposition and entanglement to explore solution spaces more efficiently than classical counterparts.

Hybrid quantum-classical algorithms are designed to leverage the strengths of both quantum and classical computing resources. These algorithms partition computational tasks, assigning portions best suited for quantum processing – such as exploring vast solution spaces – to a quantum computer, while retaining classical computation for tasks like data pre- and post-processing, optimization, and control flow. The Quantum Approximation Optimization Algorithm (QAOA) exemplifies this approach, utilizing a classical optimizer to refine parameters for a quantum circuit that approximates solutions to combinatorial optimization problems. By minimizing the reliance on fully fault-tolerant quantum hardware, these hybrid methods enable the execution of quantum algorithms on noisy intermediate-scale quantum (NISQ) devices and offer a pragmatic pathway toward realizing quantum advantage in the near term.

Mapping Reality to Qubits: Quantum Representations of the Traveling Salesman

The Traveling Salesman Problem (TSP), when implemented on a quantum computer, requires a transformation of its classical representation – a set of nodes and edges defining a graph – into a quantum state. This encoding process maps each node and edge to a quantum bit, or qubit. The state of these qubits collectively represents a potential solution to the TSP. Specifically, a qubit’s state, either $|0\rangle$ or $|1\rangle$, can indicate the presence or absence of an edge in a potential tour, or the inclusion of a node in the salesperson’s route. The superposition and entanglement capabilities of qubits then allow the quantum algorithm to explore multiple potential tours simultaneously, a critical step in seeking an optimal or near-optimal solution. The efficiency of the quantum solution is directly tied to how effectively the classical problem is represented within this quantum state.

Several distinct methods exist for representing the Traveling Salesman Problem (TSP) as a quantum state. Node-Based Encoding assigns a quantum bit, or qubit, to each city, representing its presence or absence in the current route. Edge-Based Encoding, conversely, utilizes a qubit for each possible connection between cities; a qubit’s state indicates whether that edge is included in the tour. Subspace Reduction Encoding offers a more complex approach, exploiting symmetries within the problem to reduce the required number of qubits by representing only a relevant subspace of possible solutions. Each method translates the TSP’s constraints – visiting each city once and returning to the origin – into terms within a cost function, typically formulated as a Quadratic Unconstrained Binary Optimization (QUBO) problem or expressed through the Ising Hamiltonian. The choice of encoding significantly affects the quantum circuit complexity and the number of qubits needed for a viable solution.

Translating the Traveling Salesperson Problem (TSP) into a form suitable for quantum computation typically involves reformulation as either a Quadratic Unconstrained Binary Optimization (QUBO) problem or an Ising model. QUBO represents the problem using binary variables and quadratic interactions, expressed as minimizing a function of the form $\sum_{i} q_{i}x_{i} + \sum_{i,j} Q_{ij}x_{i}x_{j}$, where $x_{i}$ are binary variables and $Q_{ij}$ are coefficients defining the cost. Alternatively, the Ising Hamiltonian utilizes spin variables $s_{i} = \pm 1$ and defines the energy function as $E = \sum_{i} h_{i}s_{i} + \sum_{i,j} J_{ij}s_{i}s_{j}$. Both formulations allow the problem’s objective function to be mapped onto the energy landscape of a quantum system, enabling the use of quantum algorithms like Quantum Annealing or Variational Quantum Eigensolver to find approximate solutions.

The efficiency and scalability of quantum Traveling Salesman Problem (TSP) solvers are directly influenced by the chosen encoding scheme. Node-based encoding, while conceptually straightforward, requires a number of qubits proportional to the number of cities, $n$. Edge-based encoding scales with $n^2$. However, Subspace Reduction Encoding offers a significant improvement by leveraging the inherent symmetries and constraints of the TSP to reduce the required qubit count. This technique achieves a logarithmic reduction in qubit requirements – scaling at approximately $O(n \log n)$ – compared to the $O(n)$ or $O(n^2)$ scaling of other methods. This reduction in qubit count is critical for tackling larger TSP instances, as the number of qubits available on current and near-term quantum computers remains a significant limitation.

For the 4-city traveling salesperson problem, the cost of travel increases with the number of QAOA ansatz layers, with edge-based encoding demonstrating a more efficient cost scaling than node-based encoding.
For the 4-city traveling salesperson problem, the cost of travel increases with the number of QAOA ansatz layers, with edge-based encoding demonstrating a more efficient cost scaling than node-based encoding.

Refining the Solution: Achieving Optimal Routes Through Quantum Optimization

The efficacy of quantum algorithms in solving complex logistical problems, such as the Traveling Salesperson Problem, hinges on the strategic implementation of penalty terms. These terms function as corrective forces within the algorithm, actively discouraging the exploration of infeasible or invalid solutions. Without penalties, the quantum system would be free to sample across the entire solution space, including routes that revisit cities or fail to connect all locations – rendering the result meaningless. By assigning a high cost to these undesirable configurations, penalty terms effectively ‘steer’ the quantum annealing process towards feasible routes that adhere to the problem’s constraints. This guidance is critical, ensuring that the algorithm doesn’t merely find a solution, but rather the optimal solution within the set of valid possibilities, dramatically improving the reliability and practicality of quantum route optimization.

The core of solving the Traveling Salesperson Problem (TSP) with quantum computing lies in the construction of a cost Hamiltonian, which mathematically embodies the objective of finding the shortest possible route. This Hamiltonian doesn’t simply calculate distances; it assigns a cost to every potential route, creating a complex energy landscape. Lower energy states correspond to shorter, more efficient routes, while longer, less desirable routes are penalized with higher costs. The Hamiltonian is formulated to consider not only the distance between cities but also constraints – ensuring each city is visited exactly once and that the route returns to the starting point. By minimizing the energy of this Hamiltonian – effectively finding its lowest energy state – the quantum algorithm identifies the route with the minimum cost, thus solving the TSP. The precise mathematical form of the Hamiltonian often involves summing weighted terms representing distances and penalties for violating the problem’s constraints, providing a quantifiable measure of a solution’s quality.

Quantum annealing represents a unique computational approach to optimization problems by harnessing the principles of quantum mechanics. Unlike classical algorithms that can get trapped in local minima, quantum annealing leverages quantum fluctuations – inherent uncertainties at the quantum level – to explore the solution space more effectively. The algorithm begins in a superposition of all possible states and then gradually reduces these fluctuations, allowing the system to “tunnel” through barriers and settle into the state with the lowest energy – which corresponds to the minimum of the defined cost function. This process is akin to a physical system seeking its ground state, and it offers a potential advantage for solving complex problems where classical methods struggle to find optimal solutions efficiently. The effectiveness of quantum annealing is deeply tied to the precise formulation of the cost function and the careful control of the quantum fluctuations during the annealing process.

The convergence of sophisticated encoding techniques, strategically implemented penalty terms, and advanced optimization algorithms unlocks the potential of quantum computing for addressing intricate logistical problems. Recent studies demonstrate this capability through successful applications to the Traveling Salesperson Problem (TSP); specifically, a 100% success rate was achieved in identifying the optimal solution for a 4-city instance utilizing the Subspace Reduction Encoding (SRE) scheme on actual quantum hardware. Furthermore, an edge-based encoding scheme yielded a 90% Feasibility Percentage, indicating a high degree of reliable solution finding. These results suggest that quantum approaches, when carefully constructed with appropriate cost functions and constraints, are not merely theoretical possibilities, but viable tools for real-world optimization challenges, promising significant advancements in fields like supply chain management and route planning.

Simulations of the Traveling Salesperson Problem reveal that node-based encoding consistently outperforms edge-based encoding in both finding optimal routes (Success Rate) and generating valid solutions (Feasibility) across 4- and 5-city instances.
Simulations of the Traveling Salesperson Problem reveal that node-based encoding consistently outperforms edge-based encoding in both finding optimal routes (Success Rate) and generating valid solutions (Feasibility) across 4- and 5-city instances.

The pursuit of efficient encoding schemes, as detailed in this work concerning the Traveling Salesman Problem, echoes a fundamental principle of scientific inquiry. It’s not simply about finding a solution, but about understanding the limitations and biases inherent in how problems are represented. The researchers’ focus on reducing qubit requirements and improving performance through edge-based and subspace reduction techniques highlights this. As Richard Feynman aptly stated, “The first principle is that you must not fool yourself – and you are the easiest person to fool.” This resonates deeply with the need to critically evaluate encoding methods, acknowledging potential distortions or oversimplifications that might obscure the true complexity of the problem and affect the reliability of results. The exploration of these boundaries – what is included and excluded in the encoding – is paramount to rigorous analysis.

Beyond the Itinerary

The pursuit of efficient encoding schemes for the Traveling Salesman Problem on quantum computers resembles, in a curious way, the biological imperative to optimize foraging routes. Each reduction in qubit requirements, each refinement of the Hamiltonian, represents a lessening of metabolic cost in the quantum “organism.” However, current approaches still grapple with the curse of dimensionality-a limitation echoing the scaling challenges faced by even the most elegantly evolved nervous systems. Future work must confront not merely the number of cities, but the structure of the problem space itself.

The presented edge-based and subspace reduction methods offer incremental progress, but a truly disruptive leap may require abandoning the notion of a fixed, all-encompassing Hamiltonian. Perhaps a dynamic encoding-one that adapts its representation of the problem during the quantum annealing process-could circumvent the limitations of static mappings. This mirrors the plasticity of neural networks, which continually reshape their connections to better represent a changing world.

Ultimately, the question isn’t simply whether a quantum computer can solve the Traveling Salesman Problem, but whether it can do so with an elegance that reveals deeper principles about optimization itself. The current landscape suggests that the most fruitful avenues lie not in brute-force scaling, but in uncovering the underlying symmetries and redundancies inherent in complex combinatorial problems.


Original article: https://arxiv.org/pdf/2512.17291.pdf

Contact the author: https://www.linkedin.com/in/avetisyan/

See also:

2025-12-22 21:34