Git Product home page Git Product logo

quant-geom-machine-learning's Introduction

Quantum Geometric Machine Learning for Quantum Circuits and Control

This repository contains the code base for implementation of the quantum geometric machine learning (QGML) methods for and simulations of time-optimal quantum circuit synthesis using discretised approximations to geodesics on certain SU($2^n$) Lie group manifolds of relevance to mult-quibit systems as set-out in the paper Quantum Geometric Machine Learning for Quantum Circuits and Control by Perrier et al. of the Centre for Quantum Software and Information at the University of Technology, Sydney, available at https://doi.org/10.1088/1367-2630/abbf6b.

The code is implemented in Python, primarily drawing upon TensorFlow >= 2.2 and Python > 3.7 along with a range of other standard packages, including Qutip >= 4.0.

The repository is structured as follows:

  • simulation.py: this files contains Python code written for generating sequences of unitary propagators along with a range of other supplementary hyperparameters and datasets used as inputs in to the machine learning models detailed in the paper. It represents a Python adaptation of Mathematica code from [1]. The Python code is based on a class construction that outputs a range of such sequences and unitary propagators for use as training, validation and test data with respect to the machine learning models in the paper. It can be called via example Jupyter Notebooks. The code is the means by which to generate training and validation datasets used as the basis for the results in the paper.

  • QGML.ipynb: a Jupyter Notebook containing the QGML class which in turn contains each of the greybox models discussed in the paper;

  • QGML - original model.ipynb: a Jupyter Notebook containing the an adapted implementation of the original model from [1];

  • customlayers.py: a file containing customised layers called by the QGML class;

  • holonomy.py: implementation in Python code of results from [2] regarding analytic expressions for holonomic (geodesic) paths on SU(2);

  • dataprocess.py: datapreprocessing to convert and reshape generated unitary inputs (the target U_T) and the label data (the sequence (U_j)) for input into the main code; and

  • flattenunitary.py: datapreprocessing to flatten tensors for input into the main code.

Each file contains commentary to assist researchers in understanding the architecture and how various coding modules fit together.

Datasets

A number of datasets (generated using simulation.py called in a Jupyter notebook) are include in compressed .tar format. They are provided for the benefit of researchers and for any attempts at replication of the results of the paper and in the interests of promoting open research and collaboration. The naming convention of these files indicates their hyperparameters (see paper for details), for example the file:

su2_ntrain1000_nseg10_hscale0.1_su2gen1.pickle

indicates a data structure (a Python class structure saved via pickle format) with:

  • Lie group SU(2) and Lie algebra su(2);
  • ntrain1000: 1000 training examples;
  • nseg10: 10 segements in the discretised approximation of the geodesic quantum circuit;
  • hscale: the time-step h for which subunitaries are evolved.

All code files should be placed in the same folder. Each file will need to be extracted into the same folder as the code.

[1] M. Swaddle, L. Noakes, H. Smallbone, L. Salter, and J. Wang,Generating three-qubit quantum circuits with neural networks,Physics Letters A381, 3391โ€“3395 (2017).

[2] A. D. Boozer, Time-optimal synthesis of su(2) transformationsfor a spin-1/2 system, Physical Review A85, 012317 (2012).

quant-geom-machine-learning's People

Contributors

eperrier avatar morazotti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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