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.
- Framework
- Qiskit
- Qubits
- 4
- Depth
- 6
- Gate set
- H, RZZ, RX
- Licence
- Apache-2.0
- Version
- v1
- Updated
- 5 hours ago
- Runs
- None completed
Circuit
circuit.py · Qiskit · depth 6Loading circuit diagram…
Runs
No completed runs yet.
Runs are private to the person who ran them.
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.