Git Product home page Git Product logo

beyond-barren-plateaus's Introduction

Beyond Barren Plateaus

In this repo, we are sharing code for replicating experiments in our paper Beyond Barren Plateaus: Quantum Variational Algorithms are Swamped with Traps (arXiv link to be added soon).

Files

The main python files are listed below:

  • state_simulator.py: this file contains classes that can implement quantum circuits either as pure states or density matrices.
  • checkerboard_ansatz.py: used to run a circuit implementing a checkerboard ansatz and run optimization in a teacher-student setup
  • QCNN.py: used to implement a QCNN ansatz and run optimization in a teacher-student setup
  • local_VQE_fast.py: implements VQE experiments that runs relatively fast even up to 25 qubits (assuming high memory GPU is available)
  • adapt_VQE.py: perform adaptive layer-wise optimization in a VQE setting

Also included are files to create plots and bash scripts to automate running the code. First run scripts to output data as csv files into the \.data\ folder before making plots. Please also update the bash scripts if you decide to use them to account for the proper number of GPUs that you have.

Dependencies

All code is written in Python. The following packages are needed to run the code (version we used in parentheses):

  • Pytorch (1.11.0)
  • Numpy (1.22.3)
  • Pandas (1.1.3)- for loading and saving data
  • Matplotlib (3.5.1) - for making plots
  • Seaborn (0.11.2) - for making plots

We ran all simulations on an NVIDIA RTX A6000 GPU which has 48 GB of memory. For GPUs with less memory, consider reducing the number of qubits when out of memory errors arise.

Authors

beyond-barren-plateaus's People

Contributors

bkiani 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.