-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Source: TravelingSalesman
Target: QUBO
Motivation: Enables solving TSP on quantum annealers and Ising machines, one of the most studied quantum computing applications.
Reference: Lucas, A. (2014). "Ising formulations of many NP problems." Frontiers in Physics, 2, 5.
Reduction Algorithm
Given a TravelingSalesman instance on graph
Notation:
-
$n$ = number of vertices (cities),$m = |E|$ -
$w_{uv}$ = weight of edge$(u, v)$ -
$A$ = penalty coefficient, chosen as$A > \sum w_{uv}$ (ensures constraint violations dominate)
Variable mapping:
Introduce
QUBO variable index: variable
Constraint/objective transformation:
The QUBO matrix
- Diagonal:
$Q[v \cdot n + p,; v \cdot n + p] \mathrel{+}= -A$ - Off-diagonal:
$Q[v \cdot n + p,; v \cdot n + p'] \mathrel{+}= 2A$ for$p < p'$
- Diagonal:
$Q[v \cdot n + p,; v \cdot n + p] \mathrel{+}= -A$ - Off-diagonal:
$Q[v \cdot n + p,; v' \cdot n + p] \mathrel{+}= 2A$ for$v < v'$
Solution extraction: From QUBO solution $x^$, read the permutation: for each position $p$, find the unique $v$ with $x^_{v \cdot n + p} = 1$. Map the tour back to the TSP solution.
Size Overhead
| Target metric (code name) | Polynomial (using symbols above) |
|---|---|
num_vars |
The
Validation Method
- Create small TravelingSalesman instances (complete graphs,
$n=3,4$ ), encode as QUBO, solve both with BruteForce, verify that the QUBO ground state corresponds to the optimal tour. - Check that invalid permutations (violating row/column constraints) have higher QUBO energy than any valid tour.
- Cross-check with the existing TravelingSalesman → ILP reduction for consistency of optimal values.
Example
Source: TravelingSalesman on
Reduction:
Variables:
-
$H_A$ penalizes rows: e.g.,$x_{0,0} + x_{0,1} + x_{0,2} \neq 1$ . -
$H_B$ penalizes columns: e.g.,$x_{0,0} + x_{1,0} + x_{2,0} \neq 1$ . -
$H_C$ adds distance: e.g.,$w_{01}(x_{0,p} \cdot x_{1,p+1} + x_{1,p} \cdot x_{0,p+1})$ for each$p$ .
Target:
Solution: Optimal tour is