Classical shadow

In quantum computing, classical shadow is a protocol for predicting functions of a quantum state using only a logarithmic number of measurements. Given an unknown state $$ \rho $$, a tomographically complete set of gates $$ U$$ (e.g. Clifford gates), a set of $$M$$ observables $$\{O_{i}\}$$ and a quantum channel $$\mathcal{E}$$ defined by randomly sampling from $$U$$, applying it to $$\rho$$ and measuring the resulting state, predict the expectation values $$\operatorname{tr}(O_{i} \rho)$$. A list of classical shadows $$S$$ is created using $$\rho$$, $$U$$ and $$\mathcal{E}$$ by running a Shadow generation algorithm. When predicting the properties of $$\rho$$, a Median-of-means estimation algorithm is used to deal with the outliers in $$S$$. Classical shadow is useful for direct fidelity estimation, entanglement verification, estimating correlation functions, and predicting entanglement entropy.

Recently, researchers have built on classical shadow to devise provably efficient classical machine learning algorithms for a wide range of quantum many-body problems. For example, machine learning models could learn to solve ground states of quantum many-body systems and classify quantum phases of matter.


 * Inputs $$N$$ copies of an unknown $$n$$-qubit state $$\rho$$

A list of unitaries $$U$$ that is tomographically complete

A classical description of a quantum channel $$\mathcal{E}^{-1}$$
 * 1) For $$i$$ ranging from $$1$$ to $$N$$:
 * 2) Choose a random unitary $$U_{i}$$ from $$U$$
 * 3) Apply $$U_{i}$$ to $$\rho$$ to get a state $$\rho_{i}$$
 * 4) Perform a computational basis measurement on $$\rho_{i}$$ for an outcome $$b_{i} \in \{0, 1\}^{n}$$
 * 5) Classically compute $$\mathcal{E}^{-1}(U_{i}^{\dagger}|b_{i}\rangle\langle b_{i}|U_{i})$$ and add it to a list $$S$$
 * Return $$S$$


 * Inputs A list of observables $$ O_{1}, ...., O_{M} $$

A classical shadow $$S(\rho; N) = [\hat{\rho}_1, \ldots, \hat{\rho}_N]$$

A positive integer $$K$$ that specifies how many linear estimates of $$\rho$$ to calculate.
 * Return A list $$[o_{1}, ..., o_{M}] $$ where $$o_{i} = \mathrm{median}(\mathrm{trace}(O_{1} p_{1}),..., \mathrm{trace}(O_{1} p_{K})) $$
 * where $$p_{k} = \frac{1}{[\frac{N}{K}]} \sum_{i = (k-1)[\frac{N}{K}] + 1}^{k [\frac{N}{K}]} \hat{\rho}_{i}$$ and where $$k = 1, ..., K$$.