Coder Social home page Coder Social logo

msc-random-natural-gradient's Introduction

Random Natural Gradient

Qiskit implementation of the paper "Random Natural Gradient" (arXiv:2311.04135). Authors: Ioannis Kolotouros and Petros Wallden

Description

This GitHub repository contains a Python implementation of the two main algorithms described in the manuscript. The updated version is now compatible with Qiskit 1.0.0 .

The first algorithm is called "Random Natural Gradient" (RNG) and requires the construction of the random classical Fisher information matrix at every iteration. This matrix then transforms the gradient vector, providing a new direction in the parameterized space that takes information about what is happening locally in the space of quantum states. This method can be considered an approximation to the Quantum Natural Gradient that requires quadratically less quantum resources.

The second algorithm is called "Stochastic-Coordinate Quantum Natural Gradient" (SC-QNG). In this algorithm, at every iteration, only a portion of the total parameters are considered and the reduced quantum Fisher information matrix is constructed for this subset. The main intuition behind this algorithm is that only an (unknown) subset of the total parameters can result in an independent change of the underlying quantum state. As such, using all possible resources results in an extra overhead in the classical optimization.

Installation

pip install -r requirements.txt

Instructions

maxcut_optimization.py -- This is the main file. You can choose the type of graph (e.g. regular) and different optimization algorithms.

optimizers.py -- This file contains the different classical optimization algorithms used in the paper (QNG, SC-QNG, RNG, and GD).

fisher_matrices.py -- This file constructs the different classical Fisher information matrices and the quantum Fisher information matrix.

problems.py -- This file generates a given MaxCut instance.

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.