Enhanced estimation of quantum properties with common randomized measurements

We present a technique for enhancing the estimation of quantum state properties by incorporating approximate prior knowledge about the quantum state of interest. This method involves performing randomized measurements on a quantum processor and comparing the results with those obtained from a classical computer that stores an approximation of the quantum state. We provide unbiased estimators for expectation values of multi-copy observables and present performance guarantees in terms of variance bounds which depend on the prior knowledge accuracy. We demonstrate the effectiveness of our approach through numerical experiments estimating polynomial approximations of the von Neumann entropy and quantum state fidelities.

Introduction-Classical shadows [1] have recently emerged as a key element in the randomized measurement (RM) toolbox [2].Previous RM protocols [3][4][5][6] focused on estimating quantum state properties expressible as polynomial functions of a density matrix ρ.Classical shadows enable efficient access to the expectation values Tr(Oρ) of few-body observables O.This is particularly important in the context of the variational quantum eigensolver algorithm, which typically requires the measurement of a local Hamiltonian [7,8].More generally, classical shadows provide access to multi-copy observables (MCO) Tr(Oρ ⊗n ) (n ≥ 1).Many physical properties, such as Rényi entropies and partial-transpose moments related to mixed-state entanglement, can be represented as MCOs [9][10][11][12].MCOs also yield bounds on the quantum Fisher information [13][14][15] and other entanglement detection quantities [16][17][18] and naturally appear in the context of error mitigation [19,20].
A central question for the classical shadow technique, and RMs in general, concerns minimizing the number of measurements required to maintain statistical errors at a certain level.While numerous works have addressed statistical error reduction in classical shadows for singlecopy observables [21][22][23][24][25], optimized methods for reducing statistical errors are especially vital for MCOs, where the required number of measurements typically scales exponentially with (sub-)system size [2].In this work, we propose a framework for enhancing estimations, i.e., reducing statistical errors, for general MCOs by incorporating approximate knowledge of the quantum state of interest.This is relevant for estimating linear (n = 1) and non-linear (n > 1) observables with reduced statistical errors.
Our approach is based on the technique of common random numbers [26].Suppose we aim to estimate the expectation value E[X] of a random variable X.If we estimate E[X] by averaging over multiple samples X i , the statistical error is quantified by the variance V[X].Now, assume we have access to a random variable Y , strongly correlated with X [27] whose average value E[Y ] is known.We can estimate E[X] with reduced variance V[X − Y ] < V[X] by averaging the random variable X − Y + E[Y ] over commonly sampled variables X i , Y i .
In this work, we employ the idea of common random numbers to introduce common randomized measurements (CRM).Our starting point are (standard) RMs that have been experimentally performed on a quantum state ρ [2].To enhance the estimation of (multi-copy) observables, we utilize (approximate) knowledge of the experimental state ρ, provided in the form of a classically representable approximation σ, during the classical postprocessing stage.Here, σ can be derived from approximate theoretical modeling of the experiment or from data obtained in companion experiments.CRMs are realized by simulating classically RMs on σ using the same random unitaries as applied in the experiment.If ρ and σ are sufficiently close, the results of experimentally realized (on ρ) and simulated (on σ) RMs will be strongly correlated.Then, we can construct powerful CRM estimators for MCOs with reduced statistical error compared to the 'standard' classical shadow approach.To demonstrate this, we present analytical variance bounds based on combining results on MCO [15,17] and multishot [20,28,29] shadow estimations, as well as two numerical examples.
Randomized measurements & classical shadows-Classical shadows [1] are classical snapshots of a quan-tum state that can be constructed efficiently from the experimental data acquired through RMs [2].For concreteness, we consider here quantum systems consisting of N qubits and described by a density matrix ρ.RMs are generated by applying a random unitary U on ρ, sampled from a suitable ensemble (specified below).After applying the unitary U , a projective measurement on the rotated state U ρU † is performed in the computational basis |s = |s 1 , . . ., s N with s i ∈ 0, 1.We assume that a total of N U N M such RMs are performed, with N U denoting the number of sampled random unitaries U (r) and N M representing the number of projective measurements per random unitary.The measurement data thus consists of N U N M bitstrings, which we label as s (r,b) = (s From the measured data, one can construct N U 'standard' classical shadows with r = 1, . . ., N U , and P ρ (s|U (r) ) = b δ s,s (r,b) /N M denoting the experimentally estimated outcome probabilities of computational basis measurements performed on U (r) ρU (r) † .The inverse shadow channel M −1 is constructed such that, given the distribution of the random unitaries U , ρ(r) is an unbiased estimator of ρ, i.e., E[ρ (r) Here, E U denotes the average over the random unitary ensembles and E QM the quantum mechanical expectation value (for a given U ).While our construction of CRM shadows applies to any type of RM settings, we will consider for concreteness in the following examples Pauli measurements using random unitaries , so that , respectively (with Z, X, Y being the Pauli matrices).The corresponding inverse shadow channel is such that Common randomized measurements-The central idea of this work is to construct classical shadows which incorporate (approximate) knowledge of the state ρ in the form of some classically representable approximation σ.We assume that σ is hermitian but not necessarily positive semi-definite or trace one and call it a pseudostate for this reason.We propose building CRM shadows as where the term σ (r) is constructed from σ as with P σ (s|U (r) ) = s|U (r) σU (r) † |s being the exact theoretical outcome probabilities of (fictious) computational basis measurements on the pseudo-state U (r) σU (r) †i.e., after σ is rotated by the same unitary U (r) that has been applied in the experiment.Utilizing the definition of the inverse shadow channel [1], we find σ is an unbiased estimator of ρ, as E[ρ (r) σ ] = ρ − σ + σ = ρ, irrespective of the choice of σ.Crucially, the data acquisition is independent of σ, which enters only during post-processing.In particular, an optimal σ can be chosen after the experiment, for instance, if a new or more accurate theoretical modeling of the experiment becomes available.
The power of CRM shadows can be intuitively understood in the limit of large numbers of measurements r) and σ (r) are strongly positively correlated since they share a common source of randomness (the matrix elements of the random unitary U (r) ).Consequently, the variances of the matrix elements of ρ(r) − σ (r) are smaller than those of ρ(r) .Below, we turn this intuition into rigorous performance guarantees.
We note that constructing σ (r) incurs overhead in terms of post-processing compared to standard shadow estimations.However, as we will show below, this step can be efficiently executed (both in terms of time and memory) using suitable representations, such as tensor networks [30].Moreover, we remark that instead of utilizing a theoretical state σ, one can build σ from classical shadows obtained from a companion experiment that produces a state σ close to ρ.This is particularly important in scenarios where a large set of RMs on a state σ has already been acquired in such a companion experiment.This idea is presented in the supplemental material (SM, App.D) [31], where we present expressions of CRM shadows that are built from the data associated with both ρ and σ and that allow for unbiased MCO estimations for ρ.
Estimation of Pauli observables-We first consider estimators Ô = 1 As shown in the SM [31], App.B, we find for the variance of Ô, where N A denotes the size of the support of O (i.e. of the set A of qubits i where O i = 1 2 ).With standard shadows, the same expression applies after replacing σ by 0, and our bound is consistent with Theorem 2 in Ref. [28].This result demonstrates the power of CRMs: statistical errors in estimations with classical shadows originate both from the finite number of measurement settings N U and from the finite number of experimental runs per setting N M .With CRMs, we can significantly decrease the former such that, for any value of N M , the variance given by CRM shadows is smaller than the one of standard shadows if |Tr[O(ρ−σ)]| ≤ |Tr(Oρ)|.The fact that CRM shadows are useful to reduce the variance associated with finite N U is highly relevant in experiments with significant calibration times like trapped ions [32] or superconducting qubits [33].Here, the number of settings N U is limited, while the value of N M can typically be taken to be large N M 1. Estimation of MCOs with CRM shadows-Expectation values Tr(Oρ ⊗n ) of n-copy observables O can be estimated with (CRM) shadows employing U-statistics [1,9].Here, we use the method of 'batch shadows' [17] which reduces the data processing time: For an integer m ≥ n, m batch shadows ρ[t] σ , t = 1, . . ., m, are formed by averaging m distinct groups of N U /m shadows ρ(r) σ (c.f., SM [31], App.A).We then define an estimator Ô of Tr(Oρ ⊗n ) as Since the batch shadows ρ[ti] σ are statistically independent, and E[ρ A is an operator that acts on (n copies of) A while depending on O and in general on ρ.This represents a key result of our work: Provided that , the required number of unitaries N U is significantly reduced compared to standard shadows [Eq.( 6) with σ → 0].Finally, we note that Eq. ( 6) is independent of m and hence also applies to the case of the 'original' multi-copy estimators [1,9], obtained with m = N U [31], App. A.
Example 1: Polynomial approximations of the von Neumann entropy-As a first example, we consider the estimation of polynomial approximations of the von Neumann (vN) entropy S = −Tr(ρ A log ρ A ) of a subsystem A of N A qubits, using trace moments p n = Tr[ρ n A ].The vN entropy is an entanglement measure [34] and can be used to distinguish quantum phases and transitions [35].To obtain a polynomial approximation of S, we rewrite S = − λ λ log λ expressed by the eigenvalues λ of ρ A and perform a least-square function approximation of f (x) = −x log(x) on in the interval x ∈ (0, 1) using polynomials of the type f nmax (x) = nmax n=1 a n x n .For n max = 3, we obtain for instance, f 3 (x) = 137x/60 − 4x 2 + 7x 3 /4.Once we have obtained f nmax (x), we build In the SM [31], App.E, we present the analytical expressions of f nmax that show the convergence of least-square errors as n max is increased and present an upper bound for the error |S nmax − S|.We note that, for the quantum states considered below as an illustration, our fitting procedure provides more accurate approximations S nmax compared to other polynomial interpolations of the same order [36].
To estimate S nmax , we rewrite each p n as an expectation value of a n-copy observable [37], namely p n = Tr(τ , with the n-copy circular permutation operator acting as τ , and use the batch shadow estimator [Eq.(5)] with m = n max batches.As shown in the SM [31], App.C, the variance bound Eq. ( 6) for estimating p n evaluates to O (1) A .As an illustration, we consider the ground state |G of the critical Ising chain H = − N i=1 Z i Z i+1 + X i of length N (Z i , X i are Pauli matrices at sites i = 1, . . ., N , and Z N +1 = 0).Since we consider the model at a critical point, the entanglement entropy S of the reduced density matrix ρ A = Tr N/2+1,...,N (|G G|) of the half partition (with N A = N/2 qubits) grows as S = c/6 log(N A ) + const, where the central charge c = 1/2 characterizes the transition's universality class [38].In Fig. 1a), we represent S nmax as a function of N A = N/2 for different values of n max .Here, |G is calculated from the density matrix renormalization group algorithm [39].Already for n max = 3, we observe the characteristic logarithmic scaling with N A [38], while n max = 5, 7 provide more quantitative agreements with S.
We now numerically simulate a measurement of S nmax with 'standard' classical and CRM shadows.In our simulations, the N -qubit ground state |G is expressed with a Matrix-Product-State (MPS) [39] of large bond dimension χ G ∼ 40.We then obtain MPS approximations |ψ χ by truncating |G to much smaller bond dimensions χ = 1, 2, 3.The corresponding reduced state σ of the first N qubits is a Matrix-Product-Operator (MPO) of bond dimension χ 2 [39].As χ increases, σ converges to ρ, where we expect the optimal performances for CRM shadows.
In Fig. 1b)-c) we show the relative statistical error E( Ŝnmax ) = E[| Ŝnmax − S nmax |]/S nmax as a function of N U N M for various n max = 3, 5, 7. We chose N A = N/2 = 8, use N M = 1000, and vary N U .In panel b), we first study the behavior of E( Ŝ3 ) for χ = 1, 2, 3.For χ = 1, the approximation σ corresponds to a product state, which is too inaccurate to obtain any improvement with CRM shadows over standard shadows.For χ = 2, 3 instead, the approximation σ χ is sufficiently accurate to significantly decrease the statistical errors.In panel c), we study the total relative error E tot ( Ŝnmax ) = E[| Ŝnmax − S|]/S.This error includes statistical errors in estimating S nmax , but also the systematic error |S nmax − S|.For small values of N U N M , where statistical errors dominate, the error increases with increasing n max [which we attribute to the prefactor n 2 in the variance bound Eq. ( 6)].At large numbers of measurements, the error saturates to the systematic error |S nmax − S|/S (only visualized here for n max = 3, black line), and it becomes more advantageous to use larger values of n max .
Our motivation for enhanced CRM fidelity estimates is two-fold: Firstly, fidelity estimation allows us to certify the preparation of a quantum state within a quantum device.However, while F ψ can be efficiently estimated with (standard) classical shadows constructed from global Clifford measurements [1], fidelity estimation can be challenging with (standard) local RMs due to a potential exponential scaling of the required number of measurements [1].Secondly, fidelity estimation can also be used to identify suitable CRM priors σ for estimating FIG. 2. Fidelity estimation in (noisy) random quantum circuits -Panel a) shows the estimated fidelities F φ of the prepared state ρ and the theoretical prior states σ = |φ φ| as a function of their bond dimension χ.Here, ρ is a N = 30qubit pure state generated from an ideal noiseless (p = 0) random quantum circuit of depth d = 6 and |φ are obtained by truncating ρ to bond dimension χ.In panel b), each gate in the circuit is perturbed by local depolarization noise with strength p resulting in a mixed state ρ.The prior state σ is the same as in a).For both panels, we compare CRM estimation (orange dots) with standard shadow estimation (blue dots).We fix NU = 15 and NM = 10 5 .The error-bars are evaluated as standard errors of the mean over random unitaries.The black solid lines denote the exact fidelity F φ .The black dashed lines are guides to the eye for 0.5 and 1 respectively.
other MCOs: Direct inspection of Eq. ( 6) indeed reveals that CRM shadows provide lower variance compared to standard shadows when F φ ≥ 1/2 (considering for simplicity an MCO O with full support (N A = N ) and a pure state prior σ = |φ φ|).
We propose an iterative procedure to find useful priors for CRM shadows as follows: (i) Starting with a prior σ = |φ φ|, we estimate F φ using either CRM shadows ρ(r) σ or standard shadows ρ(r) .The choice can be made during post-processing by comparing empirical variances, as illustrated in the numerical example below.(ii) If F φ ≤ F falls below a specific threshold F ≥ 1/2, we define a new prior, which may involve more classical computation.We then repeat step (i).Once we have found a prior σ = |φ φ| characterized by a sufficiently high fidelity F φ , we can perform enhanced estimations on arbitrary MCOs O.This includes fidelities F ψ to any other quantum state |ψ .Performance guarantees are provided by Eq. ( 6) with the measured value of F φ .Importantly, the entire iterative procedure can be conducted on a single RM dataset, as the choice of the prior σ is only incorporated during the post-processing stage.This is in contrast with importance sampling methods [40,41], where the choice of measurement settings for data acquisition depends on the prior.
As a numerical example, let us consider a state ρ, which is prepared with a uni-dimensional random circuit composed of d alternating layers of single and neighboring two-qubit Haar-random gates.Each gate is subject to local depolarization noise with probability p [43].We then numerically simulate the RMs occurring in the experiment.In our numerical experiment, CRM priors σ = |φ φ| correspond to MPSs |φ with bond dimensions χ obtained from truncating the exact output state of the noiseless quantum circuit.Note that with these priors, CRM estimations can be computed in poly(χ) time in the MPS formalism [39].As χ increases, the fidelity F φ increases, but the computational cost in estimating F φ with CRM shadows also grows.Fig. 2 shows the estimations F φ for a N = 30-qubit noiseless [p = 0, panel a)] and noisy state [p = 10 −3 , 10 −4 , panel b)], with error bars calculated as the standard error of the mean over random unitaries.When χ increases, the estimated fidelity F φ increases, and the error bars of the CRM estimations decrease as the CRM shadows become more accurate.At small χ instead, the CRM shadows fail to provide improved estimations and have larger error bars compared to (standard) classical shadows as seen in Fig. 2a).These features are similarly observed in the case of the noisy experimental state in Fig. 2b), where the pure state |φ remains always different from the mixed state ρ.
Conclusion and outlook-CRM shadows provide a readily applicable tool to significantly enhance the estimation of linear and multi-copy observables by incorporating approximate knowledge of the quantum state of interest in the post-processing of RM experiments.Besides the presented examples, we envision a wide range of applications, from gradient estimation in variational quantum algorithms [44] to the probing of quantum phases of matter [45][46][47].For future work, it would be interesting to study the potential benefit of using, in addition to our method, importance sampling or adaptive techniques such as the one developed to access the purity p 2 with RM [48], or improved post-processing methods from measurements obtained using auxiliary systems [49].

Estimating general MCOs
We now bound the variance Eq. (A11) for a general multi-copy observable O with corresponding Hermitian operator O (1) defined below in Eq. (A4).We denote the support of O with A = supp(O) ⊇ supp(O (1) ), such that, up to relabeling of the qubits, we can write, O (1) = O A γ A )γ A (where the Pauli strings are orthogonal: Tr(γ A γ A ) = 2 N A δ γ A ,γ A ), and first note that with Γ = supp(γ A ) ⊆ A denoting the support of γ A consisting of N Γ qubits.This implies that f ρ,σ (U ) depends only on reduced quantites acting on A only: with the reduced density matrices ρ A = Tr Ā(ρ), σ A = Tr Ā(σ).We now use the Cauchy-Schwartz inequality The first factor can be bounded as where we have used that ρ A − σ A is Hermitian.As before, we denote by V γ = i∈Γ V i , V i ∈ U, the unitary that maps γ i to Z i for all i ∈ Γ.Further, we define Z Γ = i∈A (Zδ i∈Γ + 1 2 δ i / ∈Γ ), such that γ(U A , s A ) = s A |Z Γ |s A δ UΓ,Vγ ; and analogously for γ A , V γ and Z Γ .We then have where we have used in the last equality that two Pauli strings that have the same support Γ = Γ and that are mapped to Z Γ = Z Γ via the same transformation U A are necessarily equal.Hence we get Reordering all the terms (with the index i going down from j − 1 to 1, and then from n to j + 1), we get where we used the sum rules si |s i s i | = 1 2 N (recalling that s 0 ≡ s n ).Hence, after (trivially) averaging over π, In this appendix, we explain how to construct the polynomial approximations S nmax introduced in the main text.Our aim is to derive the coefficients a n , n = 1, . . ., n max that minimize the least square error where f (x) = −x log(x) and f nmax (x) = nmax n=1 a n x n a polynomial of degree n max .We find (E5) Having derived explicit expressions for coefficient a n that determine f nmax (x), we can quantify convergence aspects via the least-square error I nmax , which we plot in Fig. 4. where we have used in the second line that f (0) = f nmax (0).
where ||•|| 2 = Tr[(•) 2 ] is the Hilbert-Schmidt norm and the support A = supp(O) of O denotes a subset of N A qubits on which the MCO O acts non-trivially in at least one of the copies.Also,ρ A = Tr Ā(ρ) [σ A = Tr Ā(σ)],where Ā is the complementary subset to A, are reduced density matrices and O(1)

A
in the basis of the 4 N A Pauli strings γ A , O

FIG. 3 .
FIG. 3. Estimation of the von Neumann entropy in the critical Ising chain, (as in Fig 2 of the MT), but using CRM shadows built from a companion experiment-Relative error E( Ŝ3), where the CRM shadow is formed from a companion experiment using N U additional unitaries (NM = 1000), as in Eq. (D1).Here we use NA = 6 (N = 12).

)
FIG. 4. Least square error In max as a function of nmax.thescenario in which the ground state |G of a Hamiltonian H implemented in the companion experiment slightly differs from |G by choosing H = H + i i Z i , with i sampled independently in [0, 0.02].For N U = 4000 (orange circles), we obtain significant error reduction, but we also observe a plateau effect which comes from the finite value of N U .When increasing N U (orange squares), the plateau's height is reduced, and we obtain excellent CRM estimations compared to standard shadow estimations for all presented values of N U N M .
Appendix E: Polynomial approximations of the von Neumann entropy via least-square minimization