You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 12, 2026. It is now read-only.
The canonical TSP conversion to QUBO for some $n$ cities results in $n^2$ binary variables, however we can reduce this to $(n-1)^2$ by fixing some starting city vacuously and figuring out the optimal tour ordering for every other node. Since the Tsp class itself only accepts complete graphs, this modification seems to be logically fine and would reduce the overall computational cost of Tsp overall.
My assumption is that we only have to modify the to_quadratic_program function, but please let me know if this is incorrect.
The canonical TSP conversion to QUBO for some$n$ cities results in $n^2$ binary variables, however we can reduce this to $(n-1)^2$ by fixing some starting city vacuously and figuring out the optimal tour ordering for every other node. Since the
Tspclass itself only accepts complete graphs, this modification seems to be logically fine and would reduce the overall computational cost ofTspoverall.My assumption is that we only have to modify the
to_quadratic_programfunction, but please let me know if this is incorrect.