Skip to content
Build a QAOA module in Project Q language, including a VQE for internal use.
Jupyter Notebook Python
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
GraphToHamiltonian.py
QAOA for MaxCut Example.ipynb
QAOA.py
README.md
VQE.py

README.md

projectq_qaoa

Build a QAOA module in Project Q language, including a VQE for internal use.

Files

QAOA.py is the main file here. This contains a class for the Quantum Approximate Optimization Algorithm (QAOA). The user inputs a cost and mixer hamiltonian, an initial quantum state, a number of Trotterization steps, and the number of draws one wants to perform

VQE.py contains a Variational Quantum Eigensolver (VQE) class. The user inputs an initial quantum state, a hamiltonian whose lowest eigensate's eigenvalue we want to approximate, and the number of draws one wants to perform

GraphToHamiltonian.py contains a bunch of functions for converting user-inputted graphs into hamiltonians for use in QAOA, VQE, etc. Right now the graphs must be networkx graphs, but we will add functionality for inputting lists of tuples defining the edges and nodes of a graph

QAOA for MaxCut Example.ipynb contains an example implementation of using our QAOA to solve a MaxCut problem on a graph generated using functions from the GraphToHamiltonian.py file

You can’t perform that action at this time.