From 0d90beb694857a6dfa181f3302238a2fe4424554 Mon Sep 17 00:00:00 2001 From: Jake Muff <67475147+JMuff22@users.noreply.github.com> Date: Thu, 14 Nov 2024 19:18:27 +0200 Subject: [PATCH 1/3] Fix spelling channal > channel --- docs/source/guide/shadows-5-theory.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/guide/shadows-5-theory.md b/docs/source/guide/shadows-5-theory.md index 54297006a6..e4e598963f 100644 --- a/docs/source/guide/shadows-5-theory.md +++ b/docs/source/guide/shadows-5-theory.md @@ -151,7 +151,7 @@ calculate $K$ estimators each of which is the average of $N$ single-round estima & \hat{f} = \mathrm{median}\{\bar{f}^{(1)},\cdots\bar{f}^{(K)}\}_{1\leq k\leq K} \end{eqnarray} The number of $\{f_m\}$ is related to the number of irreducible representations in the PTM[^1] representation of the twirling group. When the twirling group is the local Clifford group, the number of irreducible representations is $2^n$. -### 2.2 Noiseless Pauli Fidelity --- Ideal Inverse channal vs Estimate Noisy Inverse channel +### 2.2 Noiseless Pauli Fidelity --- Ideal Inverse channel vs Estimate Noisy Inverse channel One could check that in the absence of noise in the quantum gates ($\Lambda\equiv\mathbb{I}$), the value of the Pauli fidelity $\hat{f}_{b}^{\mathrm{ideal}}\equiv \mathrm{Tr}(\mathcal{M}_z \Pi_b)/\mathrm{Tr}\Pi_b = 3^{-|{b}|}$, where $|b|$ is the count of $|1\rangle$ found in z-eigenstates $|b\rangle:=|b_i\rangle^{\otimes n}$. When the noisy channel $\widehat{\mathcal{M}}$ is considered, the inverse of the noise channel $\widehat{\mathcal{M}}^{-1}$ can be obtained by: From c84c913bb7fe952c199785d3d4615ff3ff61c690 Mon Sep 17 00:00:00 2001 From: Jake Muff <67475147+JMuff22@users.noreply.github.com> Date: Thu, 14 Nov 2024 19:20:36 +0200 Subject: [PATCH 2/3] Fix heading in shadows tutorial --- docs/source/examples/shadows_tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/examples/shadows_tutorial.md b/docs/source/examples/shadows_tutorial.md index 42038321db..7be5ded2b3 100644 --- a/docs/source/examples/shadows_tutorial.md +++ b/docs/source/examples/shadows_tutorial.md @@ -426,7 +426,7 @@ When we realize this code, it's important to consider that we record the equival Consequently, computing the mean estimator involves counting the number of exact matches between the observable and the classical shadow, and then multiplying the result by the appropriate sign. In the following, we present the function `expectation_estimation_shadow`, which allows for estimating any observable based on a classical shadow. This is realised by the main function `execute_with_shadows` when *state_reconstruction =* **False**. -###4.3 Shadow Estimation Bound on Estimation of Expectation Values of Observables +### 4.3 Shadow Estimation Bound on Estimation of Expectation Values of Observables The shadow estimation bound of operator expectation values is given by the following theorem: _________________________________________________________________________ From 80067a29e77d1652521147e3080165c7254bc790 Mon Sep 17 00:00:00 2001 From: JMuff22 Date: Tue, 19 Nov 2024 10:24:04 +0200 Subject: [PATCH 3/3] Add note about equation 10 numerical constants --- docs/source/examples/shadows_tutorial.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/source/examples/shadows_tutorial.md b/docs/source/examples/shadows_tutorial.md index 7be5ded2b3..15df315e1f 100644 --- a/docs/source/examples/shadows_tutorial.md +++ b/docs/source/examples/shadows_tutorial.md @@ -159,11 +159,15 @@ Based on the theorem, if the error rate of fidelity is $\epsilon$, i.e. |F(\rho,\sigma)-1|\leq\epsilon, \end{equation} then the minimum number of measurements $N$ (number of snapshots) should be: -\begin{equation} +```{math} +:label: eq-label N = \frac{34}{\epsilon^2}\left\|\rho-\mathrm{Tr}(\rho)/{2^n}\mathbb{I}\right\|_{\mathrm{shadow}}^2 -\end{equation} +``` with the shadow norm upper bound of the random Pauli measurement $\left\|\cdot\right\|_{\mathrm{shadow}}\leq 2^k\|\cdot\|_\infty$ when the operator acting on $k$ qubits, we have $N\leq 34\epsilon^{-2}2^{2n}+\mathcal{O}(e^{-n})$. Based on Fuchs–van de Graaf inequalities and properties of $L_p$ norm, $\|\rho-\sigma\|_2\leq \|\rho-\sigma\|_1 \leq (1-F(\rho,\sigma))^{1/2}$, the $L_2$ norm distance between the state reconstructed through classical shadow estimation and the state prepared by the circuit is upperbound by the fidelity error rate $\epsilon$. The dependency of the bound number of measurements $N$ to achieve the error rate $\epsilon$ is depicted in function `n_measurements_tomography_bound`. +```{note} +Equation {eq}`eq-label` comes from equation S13 in the paper {cite}`huang2020predicting`. It contains some numerical constants and as noted by Remark 1 these constants result from a worst case argument. You may see values much smaller in practice. +``` ```{code-cell} ipython3 # error rate of state reconstruction epsilon < 1.