Predicting Many Properties of a Quantum System from Very Few Measurements - Paper Implementation Challenge
I will implement the classical shadow algorithm described in this paper. This algorithm enables the recovery of many properties from a quantum system with few measurements. For M observables, the method needs $\sim O(logM)$ measurements, compared to Quantum Tomography, which requires an exponential number of measurements compared to the number of observables.
Algorithm Outline:
-
Data Acquisition: Repeat the following N times. -Select a random unitary transformation from a predefined ensemble (e.g., Clifford group or Pauli measurements). -Apply the transformation to the quantum state of interest: $$\rho \rightarrow U\rho U^{\dagger}$$ -Measure the transformed quantum state in the computational basis $\ket b_i \in \set{0,1}^n$ -Store the snapshot of the state by performing the reverse operation $U^{\dagger}\ket b \bra b U$ and storing it in classical memory. -The average of these snapshots can be viewed as a measurement channel: $$\mathbb{E}[U^{\dagger}\ket b \bra b U] = \mathcal{M}(\rho)$$ -We can reconstruct the state by inverting the above: $$\rho = \mathbb{E}[\mathcal{M}^{-1} (U^{\dagger}\ket b \bra b U)]$$
-
Prediction: -After repeating the above N times, we obtain the classical shadow: $$S(\rho; N) = n, \quad \hat{\rho}_1 = M^{-1} \left( U_1^\dagger \lvert \hat{b}_1 \rangle \langle \hat{b}_1 \rvert U_1 \right), \ldots, \hat{\rho}_N = M^{-1} \left( U_N^\dagger \lvert \hat{b}_N \rangle \langle \hat{b}_N \rvert U_N \right)$$ -We can estimate any observable using its mean:
$$\langle O \rangle = \frac{1}{N} \sum_i \mathrm{Tr} \left( \hat{\rho}_i O \right)$$
- Post-Processing: -Use Median of Means estimation to more accurately predict observables.
Hi @gzemlevskiy17 !
Thanks for your interest in contributing to the library!
You are referring to this paper, correct? Briefly reading, that is a nice and interesting choice! This function might be useful :) Please note that we accept high-quality implementations in our repository and will gladly accept a contribution that meets our standards (see the contribution guidelines).
You are welcome to use our Slack community with any questions!
Hello @NadavClassiq ,
Yes, I am referring to that paper. Sorry I forgot to post a link to it. Thank you for the function reference!
No problem! Good luck :)