No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 30fa7e1 Dec 4, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
research Added report QAOA initial city. Jun 19, 2018
src It works with pyQuil 2.0 Nov 8, 2018
.gitignore Initial commit - WiP of basic pyquil version. Mar 23, 2018
LICENSE Initial commit Mar 22, 2018 Fixed broken link Dec 2, 2018

Quantum TSP

This repository contains code for an open source program solving the Travelling Salesman Problem with Quantum Computing.


There are two directories. src contains all the source code necessary to solve TSP. research contains reports and references to research, which lead to improving the code base.

Libraries used

This project makes a use of quantum computing libraries, you can install them with pip:

pip install pyquil
pip install quantum-grove


Pyquil is a library allowing you to create code for quantum computers to be executed using Rigetti Forest platform. It's developed by Rigetti Computing. To run your code on the quantum virtual machine or quantum processor you need to configure file, as described here:


Grove is a collection of quantum algorithms built using the Rigetti Forest platform. I use its implementation of QAOA for pyquil.


DWave is a quantum annealer - another type of quantum computing devices. To use it you need the following library:

pip install dwave-system

and have your own sapi-token. You can obtain it here:, though I am not sure if anyone is eligible to get it.


If you want to use this repository as a subtree follow those instructions. If not - you can skip to the next section.


To add a new remote run the following:

git remote add qtsp_subtree

From now on, instead of writing the whole path, you can use qtsp_subtree. So to add the subtree you can use either:

git subtree add --prefix path/to/your/dir/qtsp_subtree qtsp_subtree master --squash


git subtree add --prefix path/to/your/dir/qtsp_subtree master --squash

path/to/your/dir/qtsp_subtree should be the path from the top directory of the repository you are in. It automatically generates a new commit.


git subtree pull --prefix path/to/your/dir/qtsp_subtree qtsp_subtree master --squash


If you want to commit to this repo with subtree do the following:

  1. Commit changes. AFAIK git deals with changes in other files properly - i.e. when you push to subtree it sees only changes in subtree. Remember that commit name will be transfered too!
  2. Push on new-branch:
git subtree push --prefix path/to/your/dir/qtsp_subtree qtsp_subtree new-branch