Skip to content

About

Implements classical shadow tomography protocol based on locally scrambled unitary ensembles

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

LSShadows

Stable Dev Build Status Coverage

Locally Scrambled shadow tomography

Code implements the locally scrambled shadow tomography protocol introduced in this reference.

This a work in progress!!

Usage

using LSShadows
using BitBasis
using Yao
using Random
using Statistics



seed = 123

rng = MersenneTwister(seed);

N = 8
samp = 6000 # number of samples
p = 4
u = UnitaryCircuit(N, p);
idx = rand(rng, 0:2^N-1, samp);

stateEnsemble = generate_prior_povm(u, idx, rng);

computationalBasis = map(x->bitarray(x, N ÷ 2), qbasis(N ÷ 2))
oddRegSet = map(x->findall(y->y==1, bit_change_basis(x, "odd")), computationalBasis);

mean_entanglement_feature = mean(map(x->entanglement_feature_vector(x, oddRegSet), stateEnsemble));

rA = reconstruction_coefficient(mean_entanglement_feature); # get reconstruction coefficient
ψunknown = rand_state(N)


stateEnsembleMeasurement = generate_posterior_povm(Val(:RandomParams), u, ψunknown , samp, rng); #Generates the posterior POVM

estimate_fidelity(ψunknown, rA, stateEnsembleMeasurement)

About

Implements classical shadow tomography protocol based on locally scrambled unitary ensembles

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages