qubithubtsp

Solves the Traveling Salesman Problem using QAOA with constraint penalties. Uses city-timestep encoding (n^2 qubits for n cities): qubit (c, t) = 1 means city c is visited at timestep t. Default: 2 cities with distance 5, 4 qubits. Cost Hamiltonian encodes distance terms plus row and column constraint penalties enforced via RZZ interactions.

RunCite

No licence specified, so all rights are reserved by default — forking copies this circuit but grants you no rights to reuse it.

Framework
Qiskit
Qubits
4
Depth
10
Gate set
H, RZZ, RX
Licence
Not specified
Version
v1
Updated
3 days ago
Last run
3 months ago

Circuit

circuit.py · Qiskit · depth 10
Loading circuit diagram…

Lineage

Not a fork.

No forks yet.

Suggested citation

@software{qubithub_tsp_2026,
  author = {QubitHub Circuits},
  title = {QAOA for TSP},
  year = {2026},
  version = {v1},
  url = {https://qubithub.co/qubithub/tsp},
}

Generated from this circuit's metadata. QubitHub does not mint DOIs, so this is not a registered identifier — check it against your venue's requirements before publishing.