Skip to content

Code for the paper "learning quantum states and unitaries of bounded gate complexity"

Notifications You must be signed in to change notification settings

haimengzhao/bounded-gate-tomography

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning quantum states and unitaries of bounded gate complexity

This repo contains the code for the paper Learning quantum states and unitaries of bounded gate complexity.

The code implements the state learning algorithm detailed in the paper and study how its sample complexity $N$ scales with the gate size $G$.

Thanks to the features of TensorCircuit and JAX, our implementation support automatic vectorization and just-in-time (JIT) compilation. It can be executed on CPU, GPU, or TPU.

Requirements

The code is written in Python3 and built upon TensorCircuit and JAX. To execute it, we need to first install numpy, jax, tensorcircuit, qiskit, tqdm. To plot figures, we also need matplotlib and SciencePlots. They can all be installed using PyPI.

File Structure

circuit.py contains elementary circuit functions including generating random circuit architectures and gate sequences, simulate circuits, computing fidelity, and junta learning.

shadow.py implements Clifford classical shadow using JAX and TensorCircuit. One can choose to replace Clifford gates with Haar random unitaries to reduce statistical fluctuation. We also implement "shallow shadows" where global Clifford rotations are replaced by brickwork Clifford circuits with depth $\Theta(\log n)$. See shallow shadows paper and shallow pseudorandom unitary paper for details.

learn.py implements the learning algorithm.

test.py contains the pipeline for mass production that reproduces the data in the paper.

plot.py plots the figures.

About

Code for the paper "learning quantum states and unitaries of bounded gate complexity"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages