GithubHelp home page GithubHelp logo

druidowm / qst-cgan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from quantshah/qst-cgan

0.0 0.0 0.0 67.93 MB

Quantum state tomography with conditional generative adversarial networks

License: MIT License

Python 0.16% Jupyter Notebook 99.84%

qst-cgan's Introduction

qst-cgan

Quantum state tomography with conditional generative adversarial networks

This repository contains the full code to reproduce https://arxiv.org/abs/2008.03240 (accepted in PRL on June 10, 2021). Some parts of the figures in the paper are generated here with the implementation of the CGAN in TensorFlow. In addition, check out the implementation of accelerated-project-gradient based maximum likelihood estimation (APG-MLE) from qMLE https://arxiv.org/abs/1609.07881 to have a fast MATLAB code that reconstructs density matrices from noisy data.

Fig 1: Illustration of the CGAN architecture for QST. Data $\mathbf d$ sampled from measurements of a set of measurement operators $A$ on a quantum state is fed into both the generator $G$ and the discriminator $D$. The other input to $D$ is the generated statistics from $G$. The next to last layer of $G$ outputs a physical density matrix and the last layer computes measurement statistics using this density matrix. The discriminator compares the measurement data and the generated data for each measurement operator and outputs a probability that they match.

Installation

To run the code:

- clone this directory
- cd to the current folder `cd qst-cgan`
- make a local installation with `pip install -e .` which installs the necessary libraries such as tensorflow-cpu and qutip to run the code.
- cd to the folder paper-figures `cd paper-figures` and run the notebooks

Note

  1. Please note that the code requires TensorFlow which might give you an error due to the pinned numpy version. If you face such an issue, upgrade your numpy after installing TensorFlow

pip install -U numpy

  1. The Hilbert size for the output density matrices are set to 32 for now to follow the results of the paper. The last layer of the neural network needs to be edited to allow for other Hilbert space sizes. I will be putting an update on adapting this code to qubit tomography with a flexible Hilbert space size soon.

Contact

Please send me an email if you face any trouble running the code at "[email protected]".

qst-cgan's People

Contributors

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