Simulations of photonic quantum programmable gate arrays
This repository contains the gradient-based optimization code for the paper "Universal programmable photonic architecture for quantum information processing". In this paper, we present a photonic integrated circuit architecture for a quantum programmable gate array (QPGA) capable of preparing arbitrary quantum states and operators. The architecture consists of a lattice of phase-modulated Mach-Zehnder interferometers, which perform rotations on path-encoded photonic qubits, and embedded quantum emitters, which use a two-photon scattering process to implement a deterministic controlled-Z operation between adjacent qubits. By appropriately setting phase shifts within the lattice, the device can be programmed to implement any quantum circuit without hardware modifications. We provide algorithms for exactly preparing arbitrary quantum states and operators on the device and we show that gradient-based optimization can train a simulated QPGA to automatically implement highly compact approximations to important quantum circuits with near-unity fidelity.
Python >3.6
TensorFlow 1.14
SQUANCH >1.1
numpy
scipy
matplotlib
The structure of the repository is as follows:
qpga_figures.ipynb
: a notebook containing the code to generate the figures used in the paperqpga
callbacks.py
: provides Keras-style callbacks for recording the logical operators and states implemented by the simulated QPGA over the course of trainingcircuits.py
: collection of quantum circuits simulated in SQUANCH
used in preparing training dataconstants.py
: various constants used in the repositoryfidelity_search.py
: trains QPGAs of increasing depth to match input to output data to a desired fidelitylinalg.py
: linear algebraic helper functionsmodel.py
: contains the main TensorFlow model for simulating a QGPAplotting.py
: helper functions for generating figures used in the paperstate_preparation.py
: helper functions for preparing quantum state vectorstraining.py
: contains a helper function for instantiating and compiling a QGPA to fit to input/output datautils.py
: miscellaneous utilitiesscripts
run_ghz_state_fidelity.py
: script to find a QPGA which prepares GHZ states to a desired fidelityrun_qft_fidelity_search.py
: script to find a QPGA which implements a quantum Fourier transform to within a desired fidelityTraining histories are written to h5py
files which are not included in this repository, but are available upon request from the first author.
Supplementary materials for the arXiv version of the paper are listed below. Click an image to view it in higher resolution, or click the [source] link to download the original file.
This animation depicts the four steps of the two-photon scattering process:
Optimization of a QPGA to prepare a quantum Fourier transform on five input qubits. (Top left) The operator implemented by the QPGA at each point in training. The square array represents the magnitude (relative to the maximum element) and phase of the projection of the operator onto the lexicographically-ordered computational basis states, encoded in the respective size and hue of the squares. (Top right) The target 5-qubit QFT operator. (Bottom) Fidelity between the implemented and target operator over the course of training.
If you found this paper or repository useful, please cite us using:
@article{Bartlett2020Universal,
title = {Universal programmable photonic architecture for quantum information processing},
author = {Bartlett, Ben and Fan, Shanhui},
journal = {Phys. Rev. A},
volume = {101},
issue = {4},
pages = {042319},
numpages = {15},
year = {2020},
month = {Apr},
publisher = {American Physical Society},
doi = {10.1103/PhysRevA.101.042319},
url = {https://link.aps.org/doi/10.1103/PhysRevA.101.042319}
}