Gradient based training of Quantum Circuit Born Machine (QCBM)
This project contains
notebooks/qcbm_gaussian.ipynb
(or online), basic tutorial of training 6 bit Gaussian distribution using QCBM,notebooks/qcbm_advanced.ipynb
(or online), an advanced tutorial,qcbm
folder, a simple python project for productivity purpose.
Set up your python environment
- python 3.6
- install python libraries
If you want to read notebooks only and do not want to use features like projectq
, having numpy
, scipy
and matplotlib
is enough.
To access advanced features, you should install fire
, projectq
and climin
.
$ conda install -c conda-forge pybind11
$ pip install -r requirements.txt
Clone this repository https://github.com/GiggleLiu/QuantumCircuitBornMachine.git to your local host.
- Sign up and sign in Google drive
- Connect Google drive with Google Colaboratory
- right click on google drive page
- More
- Connect more apps
- search "Colaboratory" and "CONNECT"
- You can make a copy of notebook to your google drive (File Menu) to save your edits.
Also, we have provided a Julia code here.
$ ./program.py checkgrad # check the correctness of gradient
$ ./program.py statgrad # check gradient will not vanish as layer index increase.
$ ./program.py vcircuit # visualize circuit using ProjectQ
$ ./program.py train # train and save data.
$ ./program.py vpdf # see bar stripe dataset PDF
$ ./program.py generate # generate bar and stripes using trainned circuit.
- paper: Differentiable Learning of Quantum Circuit Born Machine (pdf), arXiv:1804.04168, Jin-Guo Liu, Lei Wang
- slides: online
If you use this code for your research, please cite our paper:
@article{Liu2018,
author = {Jin-Guo Liu and Lei Wang},
title = {Differentiable Learning of Quantum Circuit Born Machine},
year = {2018},
eprint = {arXiv:1804.04168},
url = {https://arxiv.org/abs/1804.04168}
}
- Jin-Guo Liu cacate0129@iphy.ac.cn
- Lei Wang wanglei@iphy.ac.cn