Code Monkey home page Code Monkey logo

barren-plateaus's Introduction

Barren plateaus

We explore the problem of barren plateaus [1] in Quantum Neural Networks: a certain large family of random quantum circuits have gradients that vanish almost everywhere.

Also, we explore the identity heuristic [2] initialization strategy as possible solution to overcome this problem.

This project follows the TensorFlow Quantum tutorial Barren plateaus [3].

Requirements

  • tensorflow 2.1.0
  • tensorflow-quantum 0.3.1

Install them with:

$ pip install -r requirements.txt

A quantum hardware is not required. The circuits are simulated using the Cirq library [4].

Experiments

Run the experiments:

$ python3 barren.py

Quantum Information exam

For the oral exam of Quantum Information, I presented the experiments made alongside the theory from the papers using this presentation.

References

[1] J.R. McClean, S. Boixo, V.N. Smelyanskiy et al. Barren plateaus in quantum neural network training landscapes. (2018)

[2] E. Grant, L. Wossnig, M. Ostaszewski and M. Benedetti. An initialization strategy for addressing barren plateaus in parametrized quantum circuits. (2019)

[3] TensorFlow Quantum tutorials. Barren plateaus https://www.tensorflow.org/quantum/tutorials/barren_plateaus?hl=en

[4] Cirq library. https://quantumai.google/cirq

Bonus: Cirq examples

The directory cirq_examples contains some examples about using the Cirq library. They have been useful to understand how the library works.

barren-plateaus's People

Contributors

fedem96 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

algouveia

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.