Coder Social home page Coder Social logo

cs269q_radzihovsky_murphy_swofford_qaoa's Introduction

A QAOA Solution to the Traveling Salesman Problem using pyQuil

CS 269Q Final Project

Matt Radzihovsky, Joey Murphy, Mason Swofford

Final Project Repository for CS 269Q, Spring 2019

QAOA TSP solution using mixers is implemented in tsp_qaoa_updated.py, based on work presented in Hadfield et. al 2017 (paper included above).

QAOA constraint hamiltonian TSP solution is implemented in quantum.py.

Classical solution implemented in classical.py. See instructions below for installation.

Installation instructions

After cloning this repository, users who already have a working installation of Anaconda can follow these steps to run the code:

  1. Create a new conda environment conda create -n my_env
  2. Activate the environment source activate my_env
  3. Install pip conda install pip
  4. Install dependencies listed in the requirements.txt file pip install —user —requirement requirements.txt
  5. In another terminal window, activate the same virtual environment source activate my_env
  6. Initiate a QVM connection qvm -S
  7. You’re now ready to run the code in the original window. See files for command line argument documentation. python quantum.py 3 python tsp_qaoa_updated.py 3 0.75 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.