Coder Social home page Coder Social logo

animeshnanda1 / exploiting_symmetry_reduces_the_cost_of_training_qaoa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rsln-s/exploiting_symmetry_reduces_the_cost_of_training_qaoa

0.0 0.0 0.0 65.25 MB

Code and data for the paper "Exploiting Symmetry Reduces the Cost of Training QAOA"

Python 20.73% Jupyter Notebook 79.27%

exploiting_symmetry_reduces_the_cost_of_training_qaoa's Introduction

Code and data for the paper "Exploiting Symmetry Reduces the Cost of Training QAOA"

Dependencies

  • NetworkX
  • numpy
  • sympy 1.7.1
  • QTensor (tested as of commit 7a934d7)
  • dreadnaut (nauty 2.7, can be downloaded here)

Running

Computing the symmetries of a graph

To compute the symmetries of a graph, use compute_orbits.py. compute_orbits.py runs dreadnaut internally. Set environment variable $DREADNAUT_PATH to be the path to dreadnaut installation, e.g. export DREADNAUT_PATH=~/soft/nauty27r1/dreadnaut

Example:

python compute_orbits.py --graph graphs/small_search_tree/latin-30 --outpath data/test

Computing the QAOA energy in serial

python compute_energy_serial.py --graph graphs/large_search_tree/mz-aug2-22 --outpath data/test -p 1 --seed 1

Computing the QAOA energy faster by exploiting symmetry

Replies on precomputed orbits (produced by compute_orbits.py)

python compute_energy_accelerated.py --graph graphs/large_search_tree/mz-aug2-22 --outpath data/test -p 1

Reproducing the figures and tables from the paper

See jupyter/generate_tables.ipynb. Additional dependencies: pandas, seaborn

exploiting_symmetry_reduces_the_cost_of_training_qaoa's People

Contributors

rsln-s avatar

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.