Introduction
Classical simulation is both a competitor to and an enabler of quantum computing. It provides a baseline for benchmarking devices and determining when quantum hardware offers genuine advantages [1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 ] . It also allows algorithms to be developed without spending every iteration on scarce hardware, and contributes directly to compilation [29 , 30 , 31 , 32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41 ] , error-mitigation [42 , 43 , 44 , 45 , 46 ] and error-correction [47 , 48 , 49 , 50 ] pipelines. Performant simulators are thus part of the machinery needed to make quantum hardware useful.
Classical resources, however, are not equally negotiable. A calculation that needs another day, another thousand node-hours, or another line on the computing bill may be painful but remains possible. A calculation that needs twice the RAM of the largest available node simply does not fit. Continually increasing the memory of each simulation introduces communication overheads that may eat up a significant amount of the hoped benefits [51 ] . This distinction is particularly sharp for modern GPUs, whose prodigious throughput is often paired with substantially less memory than a large CPU node. Time and money are (potentially) negotiable. Memory is not.
Pauli propagation [8 , 10 , 12 , 51 , 52 , 53 , 54 , 55 , 56 , 57 , 58 , 59 , 60 , 61 , 62 , 63 , 64 ] encounters this wall particularly sharply. The method typically evolves the Pauli basis expansion of observables by applying a circuit gate by gate. Non-Clifford gates often cause individual Pauli strings to branch, while truncation and merging of duplicate Pauli strings attempt to keep their number manageable [38 , 53 , 54 , 55 , 57 , 58 , 59 , 61 , 65 , 66 , 67 ] . Once the Pauli sum exhausts the available RAM, faster code often means only that the calculation reaches the same limit sooner.
In this work, we present a framework that uses memory as a hyperparameter rather than a barrier. Given a hard cap on the number of stored Pauli strings, our proposal is to perform state-of-the-art deterministic propagation while the evolving Pauli sum fits, resample stochastically whenever the next update would exceed the cap, and
continue propagating. This turns the Pauli sum into an estimator that can continually remain within the chosen memory budget. The predicted expectation value can be an average over independent repetitions, which can be distributed across an arbitrary number of CPUs and GPUs. Additional compute thus buys statistical precision without requiring larger per-simulation memory. Furthermore, accelerating Pauli propagation now has a legitimate purpose for simulating challenging circuits because it allows collecting more outcomes in the same time.
Figure 1 illustrates the practical advantage of our approach. In this case, every randomized simulation is limited to 10 5 10^5 1 0 5 stored Pauli strings, and with a carefully chosen truncation threshold, it is able to approach deterministic propagation results whose final Pauli sums contain tens to hundreds of times more Pauli strings. Fully unbiased propagation would respect the same memory limits, but has drastically higher variance and would thus require vastly more repetitions to reach comparable errors.
Figure 1. Randomized propagation reproduces deterministic calculations that use up to two orders of magnitude more memory. The horizontal dashed lines show deterministic calculations and report their final memory usage relative to the memory used in our randomized simulation. A carefully chosen bias allows the randomized calculation to reach the accuracy of deterministic calculations requiring one or two orders of magnitude more memory.
Realizing this improvement over deterministic propagation is not a matter of “just sampling”. Naive sampling strategies merely exchange a memory problem for a (potentially worse) variance problem. For example, randomly sampling individual Pauli paths uses constant memory, but the variance grows catastrophically with circuit depth. Beyond this, there are numerous different sampling strategies one might be tempted to apply, each with several key hyperparameters. We put forward our efforts to disentangle their effects and arrive at an optimized scheme. Crucially, we numerically observe that if any one of our components is dropped, the resulting scheme deteriorates substantially, and we provide phenomenological theoretical explanations for this. Our protocol is implemented in the open-source package PauliPropagation.jl [53 ] (version 0.9 or higher), and is capable of gate application and resampling applied to 10 9 10^9 1 0 9 Pauli strings in approximately one second (see Figure 4 ).
Figure 4. Performance of Monte Carlo Pauli propagation on a CPU node. For a Pauli-Z Z Z observable evolved under a Trotterized 6 × 6 6 \times6 6 × 6 TFIM Hamiltonian, we observe that our implementation in PauliPropagation.jl can apply a Pauli rotation and resample 10 9 10^9 1 0 9 Pauli strings in approximately 1 second using 64 threads. We achieve a speedup of approximately 20 × 20 \times 20 × from 1 to 64 threads as we approach the limit set by the memory bandwidth of the node.
Beyond the exactly verifiable testbed, we showcase the capabilities and freedom of imagination in the randomized Pauli propagation framework by simulating the recent quantum experiments in Ref. [25 ] . Our simulations estimating marginal collision entropies in an 8 × 8 8 \times8 8 × 8 disordered Heisenberg model hint at the true solution in the ergodic regime sitting in-between results generated by the 1D and 2D tensor network variants. We thus add further evidence that the error mitigation of the quantum results over-corrected for errors.
Pauli propagation. Most Pauli-propagation implementations work in the Heisenberg picture, evolving an observable represented by a Pauli sum
O = ∑ i = 1 N O c i P i , (1) O = \sum_{i=1}^{N_O} c_i P_i, \tag*{(1)} O = i = 1 ∑ N O c i P i , (1)
where N O N_O N O is the number of nonzero-coefficient Pauli strings in O O O . A Pauli rotation generated by an n n n -qubit Pauli string G G G acts on a Pauli string P P P as
R G ( θ ) [ P ] ≔ e i θ G / 2 P e − i θ G / 2 = { P , [ P , G ] = 0 , cos ( θ ) P + sin ( θ ) P ′ , [ P , G ] ≠ 0 , (2) R_G(\theta)[P] \coloneqq e^{i\theta G/2} P e^{-i\theta G/2}
= \begin{cases}
P, & [P,G] = 0,\\
\cos(\theta)P + \sin(\theta)P^\prime, & [P,G] \ne0,
\end{cases} \tag*{(2)} R G ( θ ) [ P ] : = e i θ G /2 P e − i θ G /2 = { P , cos ( θ ) P + sin ( θ ) P ′ , [ P , G ] = 0 , [ P , G ] = 0 , (2)
where P ′ = i 2 [ G , P ] P^\prime= \frac{i}{2}[G,P] P ′ = 2 i [ G , P ] . The second case maps one incoming Pauli string to two outgoing Pauli strings. Repeated branching can therefore require exponential (in the number of Pauli rotations) classical resources to store the resulting Pauli strings and coefficients. While we focus on Pauli propagation, much of the framework below requires only a sparse expansion in any given basis with efficiently computable branching rules. It therefore carries over directly to Majorana propagation [38 , 68 ] , has close analogues in stabilizer-propagation methods [69 , 70 ] , and should extend to future propagation algorithms formulated in other bases.
Propagation algorithms can be viewed as tree-search problems and are naturally organized along two independent axes: depth-first vs breadth-first and deterministic vs randomized. Deterministic depth-first propagation independently visits every Pauli path in the propagation tree, which uses arbitrarily little memory but visits nodes redundantly and thus exhibits an undiminished exponential scaling. This has been explored in Refs. [10 , 55 ] . Early variants of Pauli propagation [52 ] and the related extended stabilizer simulation [71 ] instead occupy the randomized depth-first quadrant, sampling the pseudo-probability distributions of gate transfer matrices. The resulting unbiased estimators use little memory and are embarrassingly parallel (and so can be efficiently accelerated on GPUs). Their variance, however, grows rapidly with circuit depth and limits their practical reach.
The current state-of-the-art largely occupies the deterministic breadth-first quadrant, gate-by-gate evolution with merging of identical Pauli strings, together with controlled truncation [53 , 59 ] . This approach has outgrown the capabilities of depth-first traversal due to the significantly slowed-down exponential scaling in the runtime. However, it moved the bottleneck to memory. Even one CPU thread can fill a cluster node in minutes or hours, rendering acceleration borderline useless for large-scale simulations due to all but the highest-end GPUs having substantially less memory than large CPU nodes.
This work establishes the remaining quadrant: randomized breadth-first propagation. We inherit the speed-ups and memory compaction of merging Pauli paths, while using stochastic resampling to keep the number of stored Pauli strings within a fixed memory limit. Independent runs can then be averaged with little communication beyond their final outputs, allowing for fast parallelisation.
Monte Carlo Pauli propagation. The central challenge for randomized propagation algorithms is to introduce sampling without merely replacing the memory barrier with prohibitive variance. There are several randomized strategies that one could employ to this end. These broadly fall into two categories: path sampling strategies which start sampling paths according to the randomized depth-first sampling strategy outlined above and breadth first resampling strategies whereby sampling is applied to reduce the number of terms in a stored Pauli sum (see Methods Sec. B for more details). Our numerical benchmarking and the theoretical analysis show that successful randomized propagation requires more than just picking a sampling rule. The sampling strategy, the strength of the compression (in the case of resampling strategies), merging, and coefficient truncation are strongly coupled, and apparently natural choices can produce excessive estimator variance and consequently large statistical errors at fixed memory and compute. Disentangling these effects leads us to the following guiding principle:
Continually make the most of the available memory.
Concretely, we propose the following protocol.
Protocol 1 (Monte Carlo Pauli propagation). Once close to the memory limit, perform the following steps for every subsequent gate:
Apply the gate deterministically.
Merge duplicate Pauli strings.
Truncate according to the chosen coefficient thresholds (introducing a controlled bias).
If the Pauli sum exceeds the memory limit M M M , resample to the largest number of unique Pauli strings that leaves sufficient room to apply the next gate. There are several resampling schemes that we could use [72 ] , but we find calibrated or semi-deterministic variants of comb resampling [73 , 74 ] the most effective.
Independent passes, starting from the very beginning or the first randomized event, can then be averaged until the remaining statistical error is sufficiently small.
In Figure 2 we provide a schematic depiction of resampling to a low (m = 1 m = 1 m = 1 ) or high (m = M / 2 m = M/2 m = M /2 ) target number of unique Pauli strings in step (iv), and how the number of Pauli strings in one pass through a circuit may look accordingly.
Figure 2. Schematic depiction of comb resampling and Monte Carlo Pauli propagation. Given a Pauli sum O = ∑ i = 1 N O c i P i O = \sum_{i=1}^{N_O} c_i P_i O = ∑ i = 1 N O c i P i with arbitrary coefficients c i c_i c i , their magnitudes ∣ c i ∣ \lvert c_i\rvert ∣ c i ∣ divided by the coefficient 1-norm W = ∑ i = 1 N O ∣ c i ∣ W = \sum_{i=1}^{N_O} \lvert c_i\rvert W = ∑ i = 1 N O ∣ c i ∣ define a distribution that can be sampled to reduce the number of Pauli strings that are stored in memory from N O N_O N O to approximately m m m . Comb resampling distributes W / Δ W/\Delta W /Δ teeth with spacing Δ \Delta Δ over the distribution with a random offset in [ 0 , Δ ) [0,\Delta) [ 0 , Δ ) , and the number of teeth landing within each coefficient’s magnitude interval determines the number of times it is drawn with coefficient sign ( c i ) Δ \operatorname{sign}(c_i)\Delta sign ( c i ) Δ . During propagation, once we surpass M M M strings, we can resample to small or large sizes m m m , which results in resampling more rarely or more often, respectively. We show that resampling to large m m m performs best.
accordingly. Importantly, the addition of the randomized step (iv) naturally extends steps (i) to (iii) on which propagation algorithms are currently built. It can therefore be combined with any existing (or future) truncation rule and merging scheme, and implemented on top of current Pauli [53 , 59 , 75 , 76 ] or Majorana [68 , 77 ] propagation packages.
We next give a compact account of the numerical benchmarks and engineering choices that led to Protocol 1. Our testbed is the expectation value computation Tr [ ρ U † O U ] \operatorname{Tr}[\rho U^\dagger O U] Tr [ ρ U † O U ] , where U U U represents the Trotterization of dynamics generated by the 6 × 5 6 \times5 6 × 5 transverse-field Ising Hamiltonian
H = J ∑ ⟨ i , j ⟩ Z i Z j + h ∑ i X i . (3) H = J \sum_{\langle i,j\rangle} Z_i Z_j + h \sum_i X_i . \tag*{(3)} H = J ⟨ i , j ⟩ ∑ Z i Z j + h i ∑ X i . (3)
Here we choose J = 1 J = 1 J = 1 , h = 1.5 h = 1.5 h = 1.5 and a Trotter time step d t = 0.1 dt = 0.1 d t = 0.1 . We propagate the single-qubit Z Z Z observable in the middle of the lattice and use the all-zero state. At this size, we can compare to exact state vector simulation and distinguish errors induced by variance or bias.
In Figure 3 , we compare path sampling with several unbiased resampling strategies, both with and without merging. What we call 1-norm resampling is to draw m m m independent samples with replacement from the pseudo-distribution defined by the Pauli coefficients. This is perhaps the most natural attempt at resampling from M M M Pauli strings to m m m ; however, it does not yield m m m unique Pauli strings. Comb resampling , on the other hand, attempts precisely that with dependent yet unbiased sampling. We estimate the statistical uncertainties of the resulting estimators at different numbers of Trotter steps L L L .
Figure 3. Estimator standard deviation as a function of the memory budget M M M after L = 3 L = 3 L = 3 , 5 5 5 , and 7 7 7 circuit layers. At L = 3 L = 3 L = 3 and L = 5 L = 5 L = 5 , comb resampling with merging shows an apparent O ( M − 1 ) O(M^{-1}) O ( M − 1 ) scaling, while path sampling, one-norm resampling, and comb resampling without merging remain closer to the usual O ( M − 1 / 2 ) O(M^{-1/2}) O ( M − 1/2 ) behaviour. By L = 7 L = 7 L = 7 the engineered method still performs best, but its scaling advantage has begun to narrow as the coefficient distribution becomes more scrambled.
Figure 3 shows that comb resampling and merging can convert additional memory into a much larger reduction in statistical error than the other methods. The dashed O ( M − 1 / 2 ) O(M^{-1/2}) O ( M − 1/2 ) line gives the usual Monte Carlo scaling expected when a memory budget M M M supports only O ( M ) O(M) O ( M ) effectively independent samples. Path sampling, ordinary one-norm resampling, and comb resampling without merging remain close to this behaviour. At L = 3 L = 3 L = 3 and L = 5 L = 5 L = 5 , however, comb resampling with merging performs substantially better, with an apparent O ( M − 1 ) O(M^{-1}) O ( M − 1 ) decrease in estimator standard deviation over the range shown.
This improvement can be understood by distinguishing between the number of samples drawn, m s m_s m s , and the number of unique Pauli strings stored, m p m_p m p . Ordinary one-norm sampling, in which each Pauli string is drawn with probability p i = ∣ c i ∣ / ∥ c ∥ 1 p_i = |c_i|/\lVert c\rVert_1 p i = ∣ c i ∣/ ∥ c ∥ 1 , draws m s m_s m s samples. In the absence of merging, these are drawn until the memory is filled and so m s ∼ M m_s \sim M m s ∼ M , giving a statistical error that decreases as 1 / m s ∼ 1 / M 1/\sqrt{m_s} \sim1/\sqrt{M} 1/ m s ∼ 1/ M . However, duplicates mean that the resulting Pauli sum generally contains fewer than m s m_s m s unique strings. As a simple model of comb sampling with merging (and other related resampling schemes [72 ] ), suppose instead that we continue sampling until the memory is filled with exactly m p ∼ M m_p \sim M m p ∼ M unique strings. The required number of samples, m s m_s m s , is then a random variable. For a peaked distribution such as p i ∝ i − 2 p_i \propto i^{-2} p i ∝ i − 2 , many samples contribute to strings already in memory, and we instead find that a typical m s m_s m s will give m s ∝ M 2 m_s \propto M^2 m s ∝ M 2 (the derivation is given in Appendix § 2.1.2 § 3.2.4 ). Since statistical error ordinarily decreases as 1 / m s 1/\sqrt{m_s} 1/ m s , a memory budget of M M M unique Pauli strings can then support an apparent 1 / M 1/M 1/ M standard-deviation scaling. As the circuit becomes deeper and the coefficient distribution flattens, duplicates become rare. Thus in this deep regime typically m s m_s m s draws will give M M M unique strings, and the usual 1 / M 1/\sqrt{M} 1/ M scaling reappears.
Figure 3 and the above discussion concern the unbiased case. That is, one idea would be to continue with unbiased randomized propagation once conventional propagation hits the memory limit. However, we have found that injecting a controlled bias into the randomized propagation is absolutely central for achieving practical improvements over state-of-the-art deterministic propagation. In particular, if we do not truncate in-between the unbiased resampling events, the algorithm quickly accumulates a prohibitive variance. On the other hand, a carefully chosen threshold just below the target accuracy can delay this onset substantially. Interestingly, truncating small coefficients mirrors the initiator approximation in full configuration interaction quantum Monte Carlo (FCIQMC) [78 ] , where only “walkers” with large weights may spawn new walkers onto unoccupied basis states.
This truncation removes the small coefficients to suppress variance from the tail and then comb sampling efficiently handles the dominant peaks. As circuit depth L L L increases, operator spreading flattens the Pauli spectrum, causing the mean-squared error (MSE) to transition from polynomial to exponential growth in L L L . Increasing the relative truncation threshold ϵ r e l \epsilon_{\mathrm{rel}} ϵ rel introduces a controlled bias that effectively preserves the semi-peaked distribution longer and delays the exponential blowup of the square root of the MSE (RMSE) to deeper circuits. This is captured by Result 2 in Methods where we see that, for a relative truncation threshold ϵ r e l \epsilon_{\mathrm{rel}} ϵ rel , the MSE contains a bias term that scales as O ( ϵ r e l 2 L 2 ) O(\epsilon_{\mathrm{rel}}^2L^2) O ( ϵ rel 2 L 2 ) and an exponentially growing variance term, with a prefactor that decreases with ϵ r e l \epsilon_{\mathrm{rel}} ϵ rel , that scales as O ( γ 2 L / m s ) O(\gamma^{2L}/m_s) O ( γ 2 L / m s ) and where γ ≫ 1 \gamma\gg1 γ ≫ 1 characterizes the growth of the untruncated one-norm. The delayed polynomial to exponential transition can be seen in Figure 7 in Methods (with the corresponding phenomenological analysis presented in detail in Appendix § 2.1.2 § 3.2.2 ).
Figure 7. Error scaling of resampling Pauli propagation with varying amounts of bias. In contrast to the previous unbiased results, we now constantly apply a relative coefficient truncation with threshold ϵ r e l = 10 − 2 , … , 0 \epsilon_{\mathrm{rel}}=10^{-2},\ldots,0 ϵ rel = 1 0 − 2 , … , 0 , where ϵ r e l = 0 \epsilon_{\mathrm{rel}}=0 ϵ rel = 0 represents the unbiased benchmark. The maximum number of Paulis is M = 10 5 M=10^{5} M = 1 0 5 . We observe that bias can delay the exponential onset of statistical uncertainty for several Trotter layers at the cost of not being able to achieve an error lower than the bias floor. For a bias that is just low enough for a target accuracy, the STD of the biased estimator can be multiple orders of magnitude lower than for the unbiased estimator.
The final calibrated method is shown in Figure 1 . Every randomized propagation stores at most $M = 10^5 Pauli strings. With a minimum relative coefficient threshold of ϵ r e l = 3 × 10 − 4 \epsilon_{\mathrm{rel}} = 3 \times10^{-4} ϵ rel = 3 × 1 0 − 4 , the bootstrapped absolute error converges to close to the 1.8 × 10 − 2 1.8 \times10^{-2} 1.8 × 1 0 − 2 error of the deterministic propagation whose final Pauli sum contains 42 M = 4.2 × 10 6 42\mathrm{M} = 4.2 \times10^6 42 M = 4.2 × 1 0 6 Pauli strings. Reducing the threshold to ϵ r e l = 10 − 4 \epsilon_{\mathrm{rel}} = 10^{-4} ϵ rel = 1 0 − 4 brings the error below 7 × 10 − 3 7 \times10^{-3} 7 × 1 0 − 3 , outperforming a deterministic calculation storing 96 M = 9.6 × 10 6 96\mathrm{M} = 9.6 \times10^6 96 M = 9.6 × 1 0 6 Pauli strings. Thus, with sufficient averaging, a calculation that fits in memory can reproduce results that require almost approximately orders of magnitude more deterministic memory. Thus rather than storing one impossible Pauli sum, we have replaced it with many independent jobs that fit in memory. Note, of course, that higher quality results are attainable via even lower bias at the cost of more averaging.
Performance. There is the danger that a randomized propagation framework relies too much on the in-principle ability to average results until they converge to the desired accuracy. Realistically, one will be restricted to a finite number of repetitions decided by the time one is willing to wait or by financial resources. It is thus important, now more than ever, that propagation algorithms are implemented to be fast.
Figure 4 depicts the typical phenomenology and performance of our randomized Pauli propagation implementation using the open-source library PauliPropagation.jl [53 ] (version 0.9 or higher), run with up to 64 threads on a CPU node with two Xeon Platinum 8360Y processors. We consider the Trotterized evolution of a Pauli-Z Z Z observable in the middle of a 6 × 6 6 \times6 6 × 6 lattice under a TFIM Hamiltonian with J = 1 J = 1 J = 1 , h = 0.5 h = 0.5 h = 0.5 , a time step d t = 0.1 dt = 0.1 d t = 0.1 , and with an absolute coefficient cutoff of 10 − 7 10^{-7} 1 0 − 7 . The top panel shows the simulation time per gate and the number of stored Pauli strings as a function of the number of applied Trotter steps. At a cap of M = 10 9 M = 10^9 M = 1 0 9 , we start resampling, exchanging the exponential growth in the number of terms for (likely exponentially) accumulating statistical uncertainty.
The bottom panel of Figure 4 shows the average time per Pauli string it takes to apply a Pauli rotation and resample at the cap of M = 10 9 M = 10^9 M = 1 0 9 as a function of the number of threads. Going from 1 to 64 threads, we achieve a speedup of approximately 20 × 20 \times 20 × using a multi-Pauli sum approach inspired by Ref. [51 ] , which is similarly implemented in the open-source library monopro [77 ] . This allows us to apply a Pauli rotation and resample 10 9 10^9 1 0 9 Pauli strings in approximately one second, i.e., 1ns per Pauli string. For comparison, merely copying the Pauli strings and their coefficients from one array to another takes 0.15ns per Pauli string on the same node, a bound set by its memory bandwidth.
Large-scale implementation. We showcase the flexibility and performance of our method at scale by simulating the Floquet dynamics of an 8 × 8 8 \times8 8 × 8 disordered Heisenberg model previously studied on quantum hardware in Ref. [25 ] . The initial state ρ \rho ρ is a 2D Néel state and it is evolved under a Floquet circuit generated by a disordered, Heisenberg-like Hamiltonian
H i j = − J ( X i X j + Y i Y j + Z i Z j ) − h i Z i − h j Z j , (4) H_{ij} = -J \left( X_i X_j + Y_i Y_j + Z_i Z_j \right) - h_i Z_i - h_j Z_j, \tag*{(4)} H ij = − J ( X i X j + Y i Y j + Z i Z j ) − h i Z i − h j Z j , (4)
where the h i h_i h i are random longitudinal fields and J J J is a fixed interaction strength. We apply four repetitions of the Floquet layer following the conventions outlined in Ref. [25 ] . We study the cross-over from the localized to the ergodic regime as J J J is increased. In the localized regime, the system retains substantial memory of the initial state, while in the ergodic regime reduced subsystems approach Haar-random character.
This crossover can be probed using the marginal collision entropy on a patch of qubits A A A . Let p A ( a ) p_A(a) p A ( a ) be the probability of observing bit string a a a on the patch. Its inverse participation ratio (IPR) and the corresponding collision entropy can be written as
IPR A : = ∑ a p A ( a ) 2 = 1 2 ∣ A ∣ ∑ β ∈ { I , Z } ⊗ ∣ A ∣ ⟨ P β ⟩ 2 , \operatorname{IPR}_A := \sum_a p_A(a)^2 = \frac{1}{2^{|A|}} \sum_{\beta\in\{I,Z\}^{\otimes|A|}} \langle P_\beta\rangle^2, IPR A := a ∑ p A ( a ) 2 = 2 ∣ A ∣ 1 β ∈ { I , Z } ⊗ ∣ A ∣ ∑ ⟨ P β ⟩ 2 ,
S A : = − log 2 IPR A . (5) S_A := -\log_2 \operatorname{IPR}_A . \tag*{(5)} S A := − log 2 IPR A . (5)
The IPR measures how concentrated the marginal distribution is. We find that S A = 0 S_A = 0 S A = 0 for a distribution concentrated on one bit string, while a uniform distribution gives the maximal value S A = ∣ A ∣ = 9 S_A = |A| = 9 S A = ∣ A ∣ = 9 .
We consider a 3 × 3 3 \times3 3 × 3 patch of qubits in the middle of the lattice. Thus, the IPR requires the squared expectation values of 511 non-identity Pauli strings. It might be tempting to perform randomized Pauli propagation to estimate the expectation values ⟨ P ⟩ \langle P\rangle ⟨ P ⟩ and then square them. However, the square will be biased by the magnitude of the variance (see more details in App. § 2.1.3 3). Instead, we can use the so-called replica trick [79 ] . In this approach, we perform two randomized propagations and take the expectation value of their product, allowing us to estimate second-order quantities without additional bias, which would be catastrophic given the several hundred Pauli expectation values we want to sum over.
Furthermore, instead of individually estimating the expectation values of all 511 non-identity Pauli strings P i P_i P i , we allocate compute time proportional to 10 − γ ∣ P i ∣ 10^{-\gamma|P_i|} 1 0 − γ ∣ P i ∣ with γ = 0.3 \gamma= 0.3 γ = 0.3 , which approximately balances against the binomial distribution of weights until weight k = 5 k = 5 k = 5 , meaning that we have an allocation that nearly uniformly selects the first 5 Pauli weights with an emphasis on weights 2, 3, and 4. Low-weight Pauli strings, i.e., the ones that tend to have the largest expectation values, will have the lowest statistical error of the mean and the lowest relative error.
We round out our approach by clipping replica squared expectation values to zero when, after averaging, they remain outside the physical range of 0 ≤ ⟨ P ^ ⟩ 2 ≤ 1 0 \le\langle\hat{P} \rangle^2 \le1 0 ≤ ⟨ P ^ ⟩ 2 ≤ 1 . Unphysical expectation values (including negative squares) are a signature of high variance which we expect for the highest Pauli weights and thus the lowest expectation values. For further details and a discussion on the incurred biases, see Methods D. Here it suffices to say that biases can drastically reduce statistical uncertainty in randomized experiments, but they need to be enjoyed with caution and results must be converged with respect to them.
experiments, but they need to be enjoyed with caution and results must be converged with respect to them.
Figure 5 shows our estimates at J / π = 0.015 , 0.03 , 0.05 , J/\pi= 0.015, 0.03, 0.05, J / π = 0.015 , 0.03 , 0.05 , and 0.07 0.07 0.07 using only M = 10 7 M = 10^7 M = 1 0 7 , semi-deterministic comb resampling, and relative coefficient threshold ϵ r e l \epsilon_{\rm rel} ϵ rel during propagation, which we continually lower to observe convergence. We compare with results obtained via belief propagation PEPS [7 , 17 , 80 ] , MPS [81 , 82 ] , and the error-mitigated quantum results in Ref. [25 ] . Our estimates are respectively 2.53 ± 0.01 2.53 \pm0.01 2.53 ± 0.01 , 6.2 3 − 0.30 + 0.40 6.23^{+0.40}_{-0.30} 6.2 3 − 0.30 + 0.40 , 8.0 4 − 0.05 + 0.13 8.04^{+0.13}_{-0.05} 8.0 4 − 0.05 + 0.13 , and 8.89 ± 0.00 8.89 \pm0.00 8.89 ± 0.00 . They broadly match the tensor network results in the localized regime, where both the PEPS and the MPS can be trusted. In the ergodic regime, where the MPS is not converged in bond dimension (but moving upward) and the PEPS experiences bias from belief propagation and cumulant expansion of high-weight Pauli strings, our Pauli propagation results fall in between. As such, it appears sensible to conclude that the error mitigation efforts in Ref. [25 ] over-corrected hardware outcomes, resulting in collision entropies that are mostly too low. That being said, at the intermediate point at J / π = 0.03 J/\pi= 0.03 J / π = 0.03 our approach using only M = 10 7 M = 10^7 M = 1 0 7 Pauli strings exhibits its largest statistical uncertainty and the biases cannot be argued to be negligible (see Figure 8 ). This is (not coincidentally) the regime where conventional Pauli propagation is the most challenging, and our results should not be seen as fully converged.
Figure 8. Analysis of the randomized Pauli propagation result for estimating ergodicity. Our approach for estimating marginal collision entropy suffers from two competing biases. Truncating small coefficients below ε r e l \varepsilon_{\mathrm{rel}} ε rel pulls down the estimate, and the clipping of unphysical, high-variance results pulls it up. Left: As we lower ε r e l \varepsilon_{\mathrm{rel}} ε rel , we observe the collision entropy estimates grow and partly stabilize, until the clipping bias takes over. Right: Fraction of expectation values for which we have non-zero estimates. Zero estimates are a sign of high variance and clipping. As that fraction changes from 100% to 0%, our simulation transitions from mostly deterministic to fully corrupted by statistical noise. We highlight the data points shown in Figure 5 . For J / π = 0.03 J/\pi= 0.03 J / π = 0.03 , we cannot confidently point to a statistically converged simulation, which would exhibit a plateau on the left panel.
Discussion
In this work, we have developed a randomized propagation framework that naturally recovers and extends the state-of-the-art for propagation algorithms. The overarching goal has been to continually restrict the maximum number of Pauli strings to some threshold M M M , beyond which we turned the estimation of expectation values into a trivially parallelizable averaging problem. We do so by use of sophisticated resampling strategies that allow full control over the current number of Pauli strings while introducing (relatively) low variance. At the same time, we highlight that increasing the memory of a single simulation is still very important. Increasing it can reduce the error asymptotically faster than averaging over more repetitions. Similarly, truncating the propagation remains crucial, as it can remove orders of magnitude of variance at the cost of potentially acceptable bias.
Our proposal gives GPU acceleration of propagation algorithms a legitimate purpose for simulating challenging circuits. Until now, their lower memory capabilities have implied that simulations simply ran out of memory more quickly while yielding worse results. Individual or distributed GPU codes could now perform more independent repetitions in the same time and thus accelerate the estimation of quantities. That being said, given that increasing memory is disproportionately more important than reducing runtime, and Figure 4 demonstrates throughput of approximately 10 9 10^9 1 0 9 Pauli strings per second, it appears that the bar for effective GPU acceleration is non-trivially high. Beyond our concrete proposal, we describe a randomized propagation toolbox, including importance sampling and estimators for higher-order quantities (see Appendix § 2.1.3 ) that may inspire practitioners to develop efficient propagation variants that target specific problems or exploit particular structure in the circuit. For example, a second-order variant of our MC propagation scheme was developed in coordination with and used in Ref. [26 ] , where it was used to estimate expectation values in out-of-time-ordered correlators (OTOCs) in scrambling systems. We are confident that imaginative use of our and other randomized tools extends the domain of what is simulable via propagation algorithms.
Methods
In this section, we describe the methodology used to develop Monte Carlo Pauli propagation. We begin by setting out the design criteria for the sampling scheme, before detailing the different families of sampling schemes that could be employed. We then identify the coupled engineering choices and hyperparameters that must be tuned, and disentangle their effects through careful numerical case studies and analytical arguments. Finally, we provide additional details on the replica trick used to compute nonlinear observables in the ergodicity study.
Design criteria
A randomized propagation algorithm must first and foremost satisfy the hard memory constraint. Given the various spurious processes taking up memory within a simulation, and importantly our auxiliary data structures for efficient propagation, we define a proxy limit of M M M stored Pauli strings. If that is ever crossed, we must immediately drop below it again.
Subject to this constraint, the relevant figure of merit is the lowest possible error within a fixed compute time. For example, we might be able to design an intricate scheme that has very low error, but if it runs very slowly it likely will not be worth it. Let f f f denote the exact quantity of interest and let f ^ r \hat{f}_r f ^ r be the estimator produced by the r r r th independent randomized pass. We write b = E [ f ^ r ] − f b = \mathbb{E}[\hat{f}_r]-f b = E [ f ^ r ] − f for its bias and σ 2 = Var ( f ^ r ) \sigma^2 = \operatorname{Var}(\hat{f}_r) σ 2 = Var ( f ^ r ) for its variance. The single-pass mean-squared error decomposes as
E [ ( f ^ r − f ) 2 ] = σ 2 ⏟ variance + b 2 ⏟ bias 2 . (6) \mathbb{E}\left[(\hat{f}_r-f)^2\right] = \underbrace{\sigma^2}_{\text{variance}} + \underbrace{b^2}_{\text{bias}^2}. \tag*{(6)} E [ ( f ^ r − f ) 2 ] = variance σ 2 + bias 2 b 2 . (6)
If t r u n t_{\rm run} t run is the runtime of one pass and T T T the total compute budget, we can fit
R T = ⌊ T t r u n ⌋ (7) R_T = \left\lfloor\frac{T}{t_{\rm run}} \right\rfloor \tag*{(7)} R T = ⌊ t run T ⌋ (7)
independent repetitions into our budget and the estimator for the function f f f reads
f ˉ R T = 1 R T ∑ r = 1 R T f ^ r . (8) \bar{f}_{R_T} = \frac{1}{R_T}\sum_{r=1}^{R_T}\hat{f}_r. \tag*{(8)} f ˉ R T = R T 1 r = 1 ∑ R T f ^ r . (8)
The error of the R T R_T R T -repetition estimator becomes
E [ ( f ˉ R T − f ) 2 ] = σ 2 R T + b 2 , (9) \mathbb{E}\left[(\bar{f}_{R_T}-f)^2\right] = \frac{\sigma^2}{R_T}+b^2, \tag*{(9)} E [ ( f ˉ R T − f ) 2 ] = R T σ 2 + b 2 , (9)
implying that independent averaging reduces the statistical uncertainty but not the inherent bias. This allows us to define the fixed-compute standard error as
S E T : = Var [ f ˉ R T ] = σ R T ≃ σ t r u n T . (10) \begin{aligned}
\mathrm{SE}_T &:= \sqrt{\operatorname{Var}\left[\bar{f}_{R_T}\right]} = \frac{\sigma}{\sqrt{R_T}} \\
&\simeq\sigma\sqrt{\frac{t_{\rm run}}{T}}. \tag*{(10)}
\end{aligned} SE T := Var [ f ˉ R T ] = R T σ ≃ σ T t run . (10)
For an unbiased estimator, b = 0 b=0 b = 0 , this is also the root-mean-squared error of the averaged estimate. For a biased estimator, further averaging reduces the standard error but cannot remove the b 2 b^2 b 2 contribution in Eq. (9) . Fully unbiased sampling removes this bias, but its variance can grow rapidly with circuit depth. This is a phenomenon commonly associated with the sign problem [83 , 84 , 85 , 86 ] . Once truncation is combined with randomized propagation, the simulation generally has both types of error. Our aim is to suppress both for the deepest circuits possible while respecting fixed memory and compute budgets.
Sampling strategies
Consider the Pauli sum in Eq. (1) . When N O N_O N O approaches the limit M M M , we introduce stochastic elements that either replace deterministic ones or are added on top. In the following we unpack our randomized toolbox in hopes that practitioners compose and improve on them.
Path Sampling
Path sampling substitutes the deterministic application of branching gates with a stochastic choice of which branch to apply. Consider an operation E l \mathcal{E}_l E l that maps an incoming Pauli string P i P_i P i to a weighted sum of Pauli strings,
E l [ P i ] = ∑ j = 1 N E l , P i a i → j P j . (11) \mathcal{E}_l[P_i] = \sum_{j=1}^{N_{\mathcal{E}_l,P_i}} a_{i\to j}P_j. \tag*{(11)} E l [ P i ] = j = 1 ∑ N E l , P i a i → j P j . (11)
The path sampling algorithm chooses one outgoing branch with probability
p ( j ∣ i ) = ∣ a i → j ∣ A i , A i = ∑ j = 1 N E l , P i ∣ a i → j ∣ . (12) p(j\mid i)=\frac{|a_{i\to j}|}{A_i}, \qquad A_i=\sum_{j=1}^{N_{\mathcal{E}_l,P_i}}|a_{i\to j}|. \tag*{(12)} p ( j ∣ i ) = A i ∣ a i → j ∣ , A i = j = 1 ∑ N E l , P i ∣ a i → j ∣. (12)
where A i A_i A i is the 1-norm of the transition amplitudes a i → j a_{i\to j} a i → j . The outgoing coefficient of the sampled branch is set to
c j ′ = c i sgn ( a i → j ) A i , (13) c'_j = c_i\,\operatorname{sgn}(a_{i\to j})A_i, \tag*{(13)} c j ′ = c i sgn ( a i → j ) A i , (13)
where c i c_i c i is the path coefficient before sampling. For a common Pauli rotation in Eq. (2) , the local one-norm is
A P = ∣ cos ( θ ) ∣ + ∣ sin ( θ ) ∣ , (14) A_P = |\cos(\theta)| + |\sin(\theta)|, \tag*{(14)} A P = ∣ cos ( θ ) ∣ + ∣ sin ( θ ) ∣ , (14)
with the two branches sampled in proportion to ∣ cos ( θ ) ∣ |\cos(\theta)| ∣ cos ( θ ) ∣ and ∣ sin ( θ ) ∣ |\sin(\theta)| ∣ sin ( θ ) ∣ . More details can be found in Appendix A1.
This gives an unbiased estimator that always uses the same constant memory. The sampled paths are fully independent, which can be parallelized at will. Unfortunately, it loses the main advantage of breadth-first propagation as paths that arrive at the same Pauli string do not merge, and so the coefficients strictly carry the product of the local one-norms. For most branching gates, including Pauli rotations, we find that A P > 1 A_P > 1 A P > 1 , so this product can grow exponentially with the number of branching gates. This makes path sampling a very fast but particularly high-variance algorithm. An illustration of such high variance can be found in Appendix B2.
Resampling Strategies
Pauli sum resampling strategies are breadth-first sampling schemes that can be applied to any given Pauli sum O = ∑ i = 1 N O c i P i O = \sum_{i=1}^{N_O} c_iP_i O = ∑ i = 1 N O c i P i to reduce the stored number of Pauli strings in an unbiased fashion. Here we detail several variants. Throughout, we will use m m m as the resampling target, i.e., the targeted number of unique Pauli strings after resampling. m p m_p m p is the de-facto number of unique Pauli strings that our resampling strategy produces, and m s m_s m s is the number of effective samples from the coefficient distribution this corresponds to.
One-norm resampling. Ordinary one-norm resampling draws m = m s m = m_s m = m s indices independently and with replacement, with probabilities p i = ∣ c i ∣ / W p_i = |c_i|/W p i = ∣ c i ∣/ W , where
W = ∑ i = 1 N O ∣ c i ∣ (15) W = \sum_{i=1}^{N_O} |c_i| \tag*{(15)} W = i = 1 ∑ N O ∣ c i ∣ (15)
is the one-norm of the Pauli sum to be resampled. Each draw contributes a coefficient sgn ( c i ) W / m s \operatorname{sgn}(c_i)W/m_s sgn ( c i ) W / m s . If index j j j is drawn N j N_j N j times, the resampled Pauli sum after merging is
O ^ = ∑ j = 1 N O c ^ j P j , c ^ j = sgn ( c j ) N j W m s . (16) \widehat{O} = \sum_{j=1}^{N_O} \widehat{c}_jP_j,\qquad\widehat{c}_j = \operatorname{sgn}(c_j)\frac{N_jW}{m_s}. \tag*{(16)} O = j = 1 ∑ N O c j P j , c j = sgn ( c j ) m s N j W . (16)
The counts ( N j ) j = 1 N O (N_j)_{j=1}^{N_O} ( N j ) j = 1 N O follow a multinomial distribution with m s m_s m s trials and probabilities ( p j ) j = 1 N O (p_j)_{j=1}^{N_O} ( p j ) j = 1 N O . Consequently, E [ c ^ i ] = c i \mathbb{E}[\widehat{c}_i] = c_i E [ c i ] = c i , and the resampling is unbiased. Notice how one-norm resampling conserves the one-norm of the resampled Pauli sum exactly:
∑ j ∣ c ^ j ∣ = W m s ∑ j N j = W . (17) \sum_j |\widehat{c}_j| = \frac{W}{m_s}\sum_j N_j = W. \tag*{(17)} j ∑ ∣ c j ∣ = m s W j ∑ N j = W . (17)
When resampling reduces the support, the same one-norm is distributed over fewer coefficients, increasing their average magnitude. Further details are given in Appendix A2a, with the corresponding statistical error analysis in Appendix B4.
Comb sampling. The one-norm sampling strategy described above is sub-optimal for several reasons. First, it requires explicit merging of the samples, which already dominates the runtime of deterministic propagation. Second, it can yield significantly fewer unique Pauli strings than the target m m m . And third, the near-random memory access to array entries due to the required sorted search can significantly hinder GPU acceleration [72 ] .
Comb sampling, also called systematic resampling [74 ] , gets around these issues. Instead of drawing m s m_s m s independent samples from this distribution, comb sampling places a regular grid (a comb) with spacing Δ \Delta Δ and a single random offset r ∼ Uniform [ 0 , Δ ) r \sim\operatorname{Uniform}[0,\Delta) r ∼ Uniform [ 0 , Δ ) over the cumulative weights, and counts the number of comb teeth that land in any w i = ∑ j = 1 i ∣ c j ∣ w_i = \sum_{j=1}^{i}|c_j| w i = ∑ j = 1 i ∣ c j ∣ . That number can be computed for any index i i i via
N i = ⌊ w i − r Δ ⌋ − ⌊ w i − 1 − r Δ ⌋ . (18) N_i = \left\lfloor\frac{w_i-r}{\Delta} \right\rfloor- \left\lfloor\frac{w_{i-1}-r}{\Delta} \right\rfloor. \tag*{(18)} N i = ⌊ Δ w i − r ⌋ − ⌊ Δ w i − 1 − r ⌋ . (18)
The resampled coefficient is then
c ^ i = sgn ( c i ) N i Δ . (19) \widehat{c}_i = \operatorname{sgn}(c_i)N_i\Delta. \tag*{(19)} c i = sgn ( c i ) N i Δ. (19)
The coefficients are already merged. The estimator remains unbiased, while each N i N_i N i is always the expected number of draws appropriately rounded up or down to the next integer value. The shared offset therefore produces much smaller allocation fluctuations than independent one-norm draws. Concretely, the following theorem helps to explain the biggest difference:
Result 1 (Upper-bounds on the 1-norm and comb variances, Informal). The estimators f ^ 1 n o r m \hat{f}_{\mathrm{1norm}} f ^ 1norm and f ^ c o m b \hat{f}_{\mathrm{comb}} f ^ comb have variances:
Var [ f ^ 1 n o r m ] ∝ W 2 m s , (20) \operatorname{Var}[\hat{f}_{\mathrm{1norm}}] \propto\frac{W^2}{m_s}, \tag*{(20)} Var [ f ^ 1norm ] ∝ m s W 2 , (20)
Var [ f ^ c o m b ] ∝ W 2 m s 2 ∑ i f i , (21) \operatorname{Var}[\hat{f}_{\mathrm{comb}}] \propto\frac{W^2}{m_s^2}\sum_i f_i, \tag*{(21)} Var [ f ^ comb ] ∝ m s 2 W 2 i ∑ f i , (21)
where ∣ W ∣ |W| ∣ W ∣ is the total 1-norm weight and f i f_i f i is the fractional remainder of Pauli i i i that does not completely fill a comb tooth. In general, if the distribution is sufficiently peaked, we have that ∑ i f i / m s < 1 \sum_i f_i/m_s < 1 ∑ i f i / m s < 1 and hence Var [ f ^ c o m b ] < Var [ f ^ 1 n o r m ] \operatorname{Var}[\hat{f}_{\mathrm{comb}}] < \operatorname{Var}[\hat{f}_{\mathrm{1norm}}] Var [ f ^ comb ] < Var [ f ^ 1norm ] . If ∑ i f i \sum_i f_i ∑ i f i is a small constant (for example, in the case of the strongly peaked distribution discussed in the main text) then Var [ f ^ c o m b ] ∝ 1 m s 2 \operatorname{Var}[\hat{f}_{\mathrm{comb}}] \propto\frac{1}{m_s^2} Var [ f ^ comb ] ∝ m s 2 1 . A schematic and fuller derivation are given in Appendix § 2.1.1 2 c, and the corresponding error analysis is detailed in Appendix § 2.1.2 § 3.2.3 , as well as the additional technical assumptions that are used.
Comb sampling leaves one further parameter to determine, the tooth spacing Δ \Delta Δ . The most direct choice of Δ \Delta Δ is Δ = W / m \Delta= W/m Δ = W / m , which lays exactly m m m teeth across the distribution. However, this does not generally produce m m m unique Pauli strings because a coefficient larger than Δ \Delta Δ catches several teeth and so repeated outcomes are merged leaving part of the available memory unused. An alternative approach is to calibrate comb resampling to a smaller Δ \Delta Δ so that the expected number of unique Pauli strings m p m_p m p is closer to the desired number m m m . We do so by computing the expected number of unique Pauli strings F ( Δ ) = ∑ i min ( 1 , ∣ c i ∣ Δ ) F(\Delta) = \sum_i \min\left(1,\frac{|c_i|}{\Delta}\right) F ( Δ ) = ∑ i min ( 1 , Δ ∣ c i ∣ ) , and updating Δ \Delta Δ as
Δ k F ( Δ k ) m → Δ k + 1 . (22) \Delta_k \frac{F(\Delta_k)}{m} \to\Delta_{k+1}. \tag*{(22)} Δ k m F ( Δ k ) → Δ k + 1 . (22)
In Appendix § 2.1.1 2 c we expand on why the method works and how it usually converges within a handful of passes over the coefficient array.
Semi-deterministic resampling. One main bottleneck of the sampling schemes described above is that they do not have an intrinsic mechanism for dealing with repeated draws stemming from large coefficients c i c_i c i that have N i ≥ 2 N_i \ge2 N i ≥ 2 . One pragmatic solution to this problem is to use a semi-deterministic variant, where large coefficients are not resampled but kept deterministically. We therefore divide the Pauli sum into a deterministic head D D D , usually containing the largest coefficients, and a stochastic tail T = D c T = D^c T = D c . The coefficients indexed by D D D are kept exactly and the tail is resampled so that the total Pauli sum contains at most m m m Pauli strings. Thus m s t o c h = m − ∣ D ∣ m_{\mathrm{stoch}} = m - |D| m stoch = m − ∣ D ∣ Pauli strings are allocated to the tail, which can be covered by any resampling scheme. In practice, we use comb resampling for the stochastic part. With W s t o c h = ∑ i ∈ T ∣ c i ∣ W_{\mathrm{stoch}} = \sum_{i \in T} |c_i| W stoch = ∑ i ∈ T ∣ c i ∣ the one-norm of the stochastic tail, this gives
c ^ i = { c i , i ∈ D , sgn ( c i ) N i W s t o c h / m s t o c h , i ∈ T . (23) \hat{c}_i =
\begin{cases}
c_i, & i \in D,\\
\operatorname{sgn}(c_i)\,N_i W_{\mathrm{stoch}}/m_{\mathrm{stoch}}, & i \in T.
\end{cases} \tag*{(23)} c ^ i = { c i , sgn ( c i ) N i W stoch / m stoch , i ∈ D , i ∈ T . (23)
The largest coefficients are retained exactly and do not participate in the resampling at all. A notable connection is that the same construction underlies the fast randomized iteration framework for stochastic linear algebra and projector quantum Monte Carlo [87 ] .
Removing the head from the sampling normalization replaces W W W by the smaller W s t o c h W_{\mathrm{stoch}} W stoch , which substantially reduces the noise placed on the tail. It also makes N i ≥ 2 N_i \ge2 N i ≥ 2 much less common, so the uncalibrated tail spacing Δ = W s t o c h / m s t o c h \Delta= W_{\mathrm{stoch}}/m_{\mathrm{stoch}} Δ = W stoch / m stoch already comes close to storing m s t o c h m_{\mathrm{stoch}} m stoch unique Pauli strings.
Semi-deterministic resampling is unbiased provided that the tail is resampled in an unbiased fashion. The calibrated and semi-deterministic variants of comb resampling, together with their local variances and implementation costs, are described in detail in Appendix § 2.1.1 2 d.
Alternative tools. There are more randomized tools that one could apply to Pauli propagation. One is stochastic pruning . It probabilistically removes small coefficients below a threshold with a probability connected to their magnitude but scales up surviving coefficients to remain unbiased. In special cases, it is equivalent to semi-deterministic resampling, but, without calibration of the threshold, it does not have a mechanism to limit the number of surviving Pauli strings to m m m .
It is also possible to apply gates semi-deterministically. Pauli strings with large coefficients could be allowed to branch deterministically, whereas gate application to small coefficients could be performed via randomized path sampling. Yet again, it is not straightforward to precisely control the number of stored Pauli strings; the main advantage of resampling.
Finally, there is importance sampling [88 ] , which entails re-weighting probabilities to favor Pauli strings expected to contribute strongly to the final observable. Importance sampling can be employed within any randomized routine, but requires specific domain knowledge. If one knows which propagating Pauli strings end up being more relevant for an expectation value, re-weighting probabilities (while adequately re-normalizing coefficients) can lower the variance of the estimator. If one was mistaken about which strings are important, the variance does not decrease or could even increase. Sampling by 1-norm can already be viewed as a form of importance sampling, and we have not found other strategies, e.g., favoring low Pauli weight [57 ] , to significantly improve on that.
A more detailed description of the alternative tools, including their estimators, biased variants, and implementation details is deferred to Appendix § 2.1.3 .
Calibrating the randomized protocol
Having introduced the candidate randomized strategies, we now examine the quantitative choices that govern the practical performance of Protocol 1. This protocol uses variants of comb resampling combined with coefficient truncation, which we have found to perform best in the main-text benchmarks. We focus on two parameters, the resampling target m m m (i.e., the number of unique Pauli strings we aim to sample) and the relative truncation threshold ϵ r e l \epsilon_{\mathrm{rel}} ϵ rel . The resampling target controls how strongly the Pauli sum is compressed and hence how soon another resampling event is required. The truncation threshold determines how much sampling variance is suppressed in exchange for introducing bias. Together, these parameters determine the runtime of each pass and the accuracy attainable within fixed memory and compute budgets. We analyze their effects using analytical variance estimates and the 6 × 5 transverse-field Ising testbed described in the main text, Eq. (3) .
How many Pauli strings should be retained after resampling? A small m p m_p m p (i.e., a small number of unique Pauli strings drawn) leaves more room for subsequent deterministic propagation, while a large m p m_p m p preserves more of the current Pauli sum but reaches the memory limit again sooner.
The statistical case for targeting large m p m_p m p is straightforward.
Let K r e s \mathcal{K}_{\mathrm{res}} K res denote the set of gate indices at which resampling occurs, and let S T D m p 2 ( f ^ k ) \mathrm{STD}_{m_p}^{2}(\hat{f}_k) STD m p 2 ( f ^ k ) denote the contribution to the final estimator variance from the stochastic error introduced at event k k k . For unbiased resampling, a convenient worst-case bound takes the form
S T D m p 2 ( f ^ ) ≤ ∑ k ∈ K r e s ( m p ) S T D m p 2 ( f ^ k ) . (24) \mathrm{STD}_{m_p}^{2}(\hat{f}) \le\sum_{k \in\mathcal{K}_{\mathrm{res}}(m_p)} \mathrm{STD}_{m_p}^{2}(\hat{f}_k). \tag*{(24)} STD m p 2 ( f ^ ) ≤ k ∈ K res ( m p ) ∑ STD m p 2 ( f ^ k ) . (24)
The sampler-specific bounds on S T D m p 2 ( f ^ k ) \mathrm{STD}_{m_p}^{2}(\hat{f}_k) STD m p 2 ( f ^ k ) are given in Result 1. The derivation of this result is detailed in Appendices B4a and B5a along with the additional technical assumptions that are used. For both one-norm and comb resampling, the variance introduced by an individual event decreases as the sampling effort m s m_s m s is increased, although the two methods exhibit different dependences on m s m_s m s and on the coefficient distribution.
Intuitively, a large m p m_p m p reduces the statistical noise of a single pass, while a small m p m_p m p will be quicker and so will permit more independent passes within the same compute budget. We can weigh up these effects and determine the best targeted m p m_p m p by studying the fixed-compute standard error S T D m p ( f ^ ) t r u n ( m p ) \mathrm{STD}_{m_p}(\hat{f})\sqrt{t_{\mathrm{run}}(m_p)} STD m p ( f ^ ) t run ( m p ) introduced in Eq. (10) . Here S T D m p ( f ^ ) \mathrm{STD}_{m_p}(\hat{f}) STD m p ( f ^ ) includes the STD accumulated over the full schedule K r e s ( m p ) \mathcal{K}_{\mathrm{res}}(m_p) K res ( m p ) .
The runtime advantage of small m p m_p m p is weaker than one might expect. Between resampling events, the number of stored Pauli strings grows approximately exponentially from m p m_p m p back to M M M . Most of the work is therefore concentrated in the final few gates, when the Pauli sum is already close to the memory limit. A much stronger compression can consequently discard far more information while saving comparatively little time. Whether the reduction in t r u n ( m p ) t_{\mathrm{run}}(m_p) t run ( m p ) compensates for the increase in S T D m p ( f ^ ) \mathrm{STD}_{m_p}(\hat{f}) STD m p ( f ^ ) must therefore be determined empirically.
Figure 6 measures both the constituent quantities, STD and t r u n t_{\mathrm{run}} t run , as a function of the number of circuit layers. We fix M = 2 × 10 7 M = 2 \times10^{7} M = 2 × 1 0 7 and vary the resampling target m m m from 1 to m = 10 7 = M / 2 m = 10^{7} = M/2 m = 1 0 7 = M /2 . The top panel shows that the largest m m m gives the smallest single-pass standard deviation at every displayed layer, with an improvement of several orders of magnitude over m = 1 m = 1 m = 1 . The bottom panel shows that the runtime difference between the two extremes is only around a factor of twenty. One may wonder why the runtime is not more drastically different, which can be explained largely by the exponential growth of the Pauli sum with the number of gates causing the average number of Pauli strings to be only approximately that factor of twenty smaller.
Figure 6. The choice of resampling target m m m at a fixed limit of M = 2 × 10 7 M = 2 \times10^{7} M = 2 × 1 0 7 stored Pauli strings, shown for unbiased propagation of a 30-qubit, two-dimensional transverse-field Ising circuit. Top, the standard deviation of a single pass decreases consistently as m m m is increased from 1 to 10 7 = M / 2 10^{7} = M/2 1 0 7 = M /2 . Bottom, the runtime varies by only around a factor of twenty across the same range, far too little to offset the orders-of-magnitude improvement in statistical error.
The optimal time vs variance tradeoff is therefore given for the largest target that leaves just enough memory to apply the next gate. If one Pauli string can branch into at most b max b_{\max} b m a x strings, a conservative choice is
m = ⌊ M b max ⌋ . (25) m = \left\lfloor\frac{M}{b_{\max}} \right\rfloor. \tag*{(25)} m = ⌊ b m a x M ⌋ . (25)
For example, for Pauli rotations b max = 2 b_{\max} = 2 b m a x = 2 and hence m = M / 2 m = M/2 m = M /2 if M M M should not be significantly surpassed.
How much controlled bias should be introduced? In practice, we introduce controlled bias by discarding the smallest coefficients after deterministic gate application and merging. For the purposes of our phenomenological calculation, assume that between layers k k k we truncate all coefficients satisfying ∣ c i ( k ) ∣ < b k |c_i^{(k)}| < b_k ∣ c i ( k ) ∣ < b k , where b k > 0 b_k > 0 b k > 0 is a chosen threshold. The one-norm of the retained Pauli sum is therefore
W ~ k = ∑ i = 1 N Q ∣ c i ( k ) ∣ 1 ( ∣ c i ( k ) ∣ > b k ) . (26) \widetilde{W}_k = \sum_{i=1}^{N_Q} |c_i^{(k)}| \mathbf{1}\left(|c_i^{(k)}| > b_k\right). \tag*{(26)} W k = i = 1 ∑ N Q ∣ c i ( k ) ∣ 1 ( ∣ c i ( k ) ∣ > b k ) . (26)
If resampling is required at that layer, it is applied to this truncated sum. For ordinary one-norm resampling, the retained indices are drawn with probabilities
p i ( k ) = ∣ c i ( k ) ∣ 1 ( ∣ c i ( k ) ∣ > b k ) W ~ k . (27) p_i^{(k)}=\frac{\lvert c_i^{(k)}\rvert\mathbf{1}\left(\lvert c_i^{(k)}\rvert>b_k\right)}{\widetilde{W}_k}. \tag*{(27)} p i ( k ) = W k ∣ c i ( k ) ∣ 1 ( ∣ c i ( k ) ∣ > b k ) . (27)
If index j j j is drawn N j N_j N j times, the resampled Pauli sum after merging is
O ^ = ∑ j = 1 N σ c ^ j P j , c ^ j = sgn ( c j ( k ) ) N j W ~ k m s . (28) \widehat{O}=\sum_{j=1}^{N_\sigma}\widehat{c}_jP_j,\qquad\widehat{c}_j=\operatorname{sgn}\left(c_j^{(k)}\right)\frac{N_j\widetilde{W}_k}{m_s}. \tag*{(28)} O = j = 1 ∑ N σ c j P j , c j = sgn ( c j ( k ) ) m s N j W k . (28)
The same truncation step can be combined with any of the resampling schemes introduced above. We write the ordinary one-norm case explicitly because it makes the resulting bias–variance trade-off particularly transparent. The threshold may be fixed throughout the propagation or recomputed relative to the largest coefficient at each layer,
b k = ϵ r e l max i ∣ c i ( k ) ∣ , ϵ r e l > 0. (29) b_k=\epsilon_{\mathrm{rel}}\max_i\lvert c_i^{(k)}\rvert,\qquad\epsilon_{\mathrm{rel}}>0. \tag*{(29)} b k = ϵ rel i max ∣ c i ( k ) ∣ , ϵ rel > 0. (29)
Resampling remains unbiased with respect to the truncated Pauli sum, but the combined truncation-and-resampling procedure is biased with respect to the original sum. Discarding small coefficients reduces the retained one-norm and therefore the variance introduced by subsequent resampling. This competition is captured by the following phenomenological model.
Result 2 (Phenomenological model for the MSE of truncated one-norm resampling). Assume that relative truncation is applied at each layer with b k = ϵ r e l max j ∣ c j ( k ) ∣ b_k=\epsilon_{\mathrm{rel}}\max_j\lvert c_j^{(k)}\rvert b k = ϵ rel max j ∣ c j ( k ) ∣ , that the accumulated bias per layer is proportional to ϵ r e l \epsilon_{\mathrm{rel}} ϵ rel , and that the untruncated one-norm grows as W k ∼ γ k W_k\sim\gamma^k W k ∼ γ k . Then
MSE ( f ^ ) ≲ ( C 1 ϵ r e l L ) 2 + C 2 ( 1 − C 3 ϵ r e l ) 2 γ 2 L m s , (30) \operatorname{MSE}(\widehat{f})\lesssim(C_1\epsilon_{\mathrm{rel}}L)^2+C_2\frac{(1-C_3\epsilon_{\mathrm{rel}})^2\gamma^{2L}}{m_s}, \tag*{(30)} MSE ( f ) ≲ ( C 1 ϵ rel L ) 2 + C 2 m s ( 1 − C 3 ϵ rel ) 2 γ 2 L , (30) where C 1 , C 2 , C 3 > 0 C_1,C_2,C_3>0 C 1 , C 2 , C 3 > 0 are problem-dependent constants.
The first term describes the truncation-induced bias floor, while the second describes the sampling variance. Although derived for truncated one-norm resampling, the model captures the same qualitative competition encountered when truncation is combined with comb resampling. A fuller derivation is given in Appendices B4b and B5b along with the additional technical assumptions that are used.
Figure 7 tests this trade-off at fixed M = 10 5 M=10^{5} M = 1 0 5 . Increasing ϵ r e l \epsilon_{\mathrm{rel}} ϵ rel delays the rapid growth of the RMSE, but eventually produces a larger bias floor. The useful choice is therefore the largest threshold whose bias remains below the target accuracy. We use a relative rather than an absolute threshold because resampling changes the characteristic coefficient scale, causing a fixed absolute threshold to become progressively less effective.
In practice, we begin with relatively aggressive truncation and repeat the calculation with successively smaller values of ϵ r e l \epsilon_{\mathrm{rel}} ϵ rel . This allows the estimates to be converged successively, ending with the least biased estimate that can still be resolved within the available compute budget.
Numerical details for estimating ergodicity
Squaring a one-norm resampled estimator O ^ \widehat{O} O would add its variance as a bias, which over a sum of 511 propagations would dominate the error. Instead, we propagate two independent replica for each Pauli string and form
q ^ P = ⟨ P ⟩ ‾ ( 1 ) ⟨ P ⟩ ‾ ( 2 ) , such that E [ q ^ P ] = ⟨ P ⟩ 2 . (31) \widehat{q}_P=\overline{\langle P\rangle}^{(1)}\overline{\langle P\rangle}^{(2)},\qquad\text{such that }\mathbb{E}[\widehat{q}_P]=\langle P\rangle^2. \tag*{(31)} q P = ⟨ P ⟩ ( 1 ) ⟨ P ⟩ ( 2 ) , such that E [ q P ] = ⟨ P ⟩ 2 . (31)
This so-called replica trick [79 ] produces an unbiased estimator for the squared expectation value (assuming the one-norm estimator is unbiased), and we can sum up all squared expectation values to attain an estimator for the IPR that is only biased by deterministic truncation applied throughout propagation. Appendix C3 gives the full construction.
To produce the data in Figure 8 , each replica is propagated with a limit of M = 10 7 M=10^{7} M = 1 0 7 stored Pauli strings using semi-deterministic comb resampling and the relative coefficient truncation threshold ϵ r e l \epsilon_{\mathrm{rel}} ϵ rel as indicated. We lower this threshold to observe convergence of the estimator.
A uniform allocation of compute time over the 511 Pauli strings would devote most time to weight 3 3 3 –$6 Pauli strings, of which there are most in a patch of size 9. These strings incur higher variance than low-weight strings but typically contribute very little in the scrambling regime. We instead allocate repetitions approximately as R ( P ) ∝ 10 − 0.3 ∣ P ∣ R(P) \propto10^{-0.3\lvert P\rvert} R ( P ) ∝ 1 0 − 0.3 ∣ P ∣ , concentrating effort on the lower-weight observables that carry most of the signal.
We further apply a physicality-motivated zero-clipping scheme to the estimates. After the two independent estimates have been averaged over repetitions, their product ⟨ P ^ ⟩ ‾ \overline{\langle\hat{P}\rangle} ⟨ P ^ ⟩ can remain negative or exceed one, even though the exact quantity lies in [ 0 , 1 ] [0,1] [ 0 , 1 ] . Such unphysical values signal that the estimate is dominated by high variance, most commonly for high-weight Pauli strings whose true expectation values are expected to be small. We clip these estimates to zero before forming the IPR. This stabilizes the estimator, but introduces a new bias. In fact, this bias competes with the bias introduced by truncating small coefficients. We find that the latter tends to decrease the collision entropy, while clipping unphysical expectations pulls the entropy up. This complicates the convergence, and Figure 8 outlines our best-faith attempt to find the least biased estimate for the collision entropy.
Acknowledgments
The authors would like to thank Faisal Alam and Ashley Montanaro for providing and discussing the data for Figure 5 . MSR acknowledges funding from the 2024 Google PhD Fellowship and the Swiss National Science Foundation [grant number 200021-219329]. R.P. acknowledges the support of the SNF Quantum Flagship Replacement Scheme (Grant No. 215933). ZH acknowledges support from the Sandoz Family Foundation-Monique de Meuron program for Academic Promotion. We acknowledge support of the NCCR MARVEL, a National Centre of Competence in Research, funded by the Swiss National Science Foundation (grant number 205602).
Figure 5. Marginal collision entropy on a 3 × 3 patch after Floquet evolution of the 8 × 8 disordered Heisenberg model. Randomized Pauli propagation (MC PP) is compared with error-mitigated quantum hardware, PEPS, and MPS results. The dashed line marks the maximal value S A = 9 S_A = 9 S A = 9 . The MC PP error bars show bootstrapped 16th to 84th percentiles and do not include the residual truncation and zero-clipping biases.
AI Usage Statement
The authors acknowledge the use of generative AI tools (Claude, ChatGPT, Gemini), in particular thanks to the ChatGPT for Academic Researchers program, for the purposes of literature search, combining drafts, editing text, deriving and formatting equations, and implementing high-performance code. All AI-assisted content was reviewed, verified, and revised by the authors, who take full responsibility for the content of this work.
References
Sampling schemes in detail
The Methods section introduces the sampling schemes in the order in which they are used. Here we give the full definitions and collect their local statistical properties. As before, we use m m m to denote the target number of unique Pauli strings retained after each resampling event, m p m_p m p for the de-facto number of unique Pauli strings retained by any resampling method, and m s m_s m s for the number of effective raw draws. These numbers need not agree. If several draws select the same Pauli string, merging stores their aggregate coefficient only once, so m p < m s m_p < m_s m p < m s is possible and often desirable.
Throughout this appendix, the object to be compressed is a Pauli sum
O = ∑ i = 1 N O c i P i , W = ∑ i = 1 N O ∣ c i ∣ . (32) O = \sum_{i=1}^{N_O} c_i P_i,\qquad W = \sum_{i=1}^{N_O} \lvert c_i\rvert. \tag*{(32)} O = i = 1 ∑ N O c i P i , W = i = 1 ∑ N O ∣ c i ∣ . (32)
For real coefficients, sgn ( c i ) \operatorname{sgn}(c_i) sgn ( c i ) denotes the usual sign. For a complex coefficient it should be read as the phase c i / ∣ c i ∣ c_i/\lvert c_i\rvert c i / ∣ c i ∣ . A compression is unbiased if every coefficient, and hence the full Pauli sum, is recovered in expectation.
Path sampling
Path sampling is the simplest randomized propagation algorithm and the baseline that any method using more memory should beat. Consider a circuit channel E = E ( L ) ∘ ⋯ ∘ E ( 1 ) \mathcal{E} = \mathcal{E}^{(L)} \circ\cdots\circ\mathcal{E}^{(1)} E = E ( L ) ∘ ⋯ ∘ E ( 1 ) acting on an initial Pauli string P 0 P_0 P 0 with coefficient c P 0 = 1 c_{P_0}=1 c P 0 = 1 . At step k k k , an incoming Pauli string is mapped to
E ( k ) [ P k − 1 ] = ∑ P k a P k − 1 → P k P k . (33) \mathcal{E}^{(k)}[P_{k-1}] = \sum_{P_k} a_{P_{k-1}\to P_k}P_k. \tag*{(33)} E ( k ) [ P k − 1 ] = P k ∑ a P k − 1 → P k P k . (33)
Define the column one-norm as the sum of the absolute values of the different transition amplitudes
A k ( P k − 1 ) = ∑ P k ∣ a P k − 1 → P k ∣ . (34) A_k(P_{k-1}) = \sum_{P_k} \lvert a_{P_{k-1}\to P_k}\rvert. \tag*{(34)} A k ( P k − 1 ) = P k ∑ ∣ a P k − 1 → P k ∣ . (34)
Path sampling selects one outgoing Pauli string with probability proportional to the magnitude of the transition amplitude
p ( P k ∣ P k − 1 ) = ∣ a P k − 1 → P k ∣ A k ( P k − 1 ) , (35) p(P_k\mid P_{k-1}) = \frac{\lvert a_{P_{k-1}\to P_k}\rvert}{A_k(P_{k-1})}, \tag*{(35)} p ( P k ∣ P k − 1 ) = A k ( P k − 1 ) ∣ a P k − 1 → P k ∣ , (35)
and updates the running coefficient according to
c P k = c P k − 1 sgn ( a P k − 1 → P k ) A k ( P k − 1 ) . (36) c_{P_k} = c_{P_{k-1}}\operatorname{sgn}(a_{P_{k-1}\to P_k})A_k(P_{k-1}). \tag*{(36)} c P k = c P k − 1 sgn ( a P k − 1 → P k ) A k ( P k − 1 ) . (36)
The compensation by the local one-norm makes the step unbiased. Indeed, if we compute the expectation value of the Pauli string and its coefficient from the step k − 1 k-1 k − 1 to k k k we find that
E P k ∼ p ( ⋅ ∣ P k − 1 ) [ c P k P k ] = ∑ P k ∣ a P k − 1 → P k ∣ A k ( P k − 1 ) c P k − 1 sgn ( a P k − 1 → P k ) A k ( P k − 1 ) P k = c P k − 1 ∑ P k a P k − 1 → P k P k = c P k − 1 E ( k ) [ P k − 1 ] , (37) \begin{aligned}
\mathbb{E}_{P_k\sim p(\cdot\mid P_{k-1})}[c_{P_k}P_k]
&= \sum_{P_k}\frac{\lvert a_{P_{k-1}\to P_k}\rvert}{A_k(P_{k-1})}c_{P_{k-1}}\operatorname{sgn}(a_{P_{k-1}\to P_k})A_k(P_{k-1})P_k \\
&= c_{P_{k-1}}\sum_{P_k}a_{P_{k-1}\to P_k}P_k
= c_{P_{k-1}}\mathcal{E}^{(k)}[P_{k-1}], \tag*{(37)}
\end{aligned} E P k ∼ p ( ⋅ ∣ P k − 1 ) [ c P k P k ] = P k ∑ A k ( P k − 1 ) ∣ a P k − 1 → P k ∣ c P k − 1 sgn ( a P k − 1 → P k ) A k ( P k − 1 ) P k = c P k − 1 P k ∑ a P k − 1 → P k P k = c P k − 1 E ( k ) [ P k − 1 ] , (37)
where in the first equality we substituted the probability defined in Eq. (35) , and in the second equality we substituted the expression for E ( k ) [ ⋅ ] \mathcal{E}^{(k)}[\cdot] E ( k ) [ ⋅ ] in Eq. (33) . Iterating the construction produces a path ( P 0 , P 1 , … , P L ) (P_0,P_1,\ldots,P_L) ( P 0 , P 1 , … , P L ) and the exact identity
E [ P 0 ] = E [ c P L P L ] , c P L = ∏ k = 1 L sgn ( a P k − 1 → P k ) A k ( P k − 1 ) . (38) \mathcal{E}[P_0] = \mathbb{E}[c_{P_L}P_L],\qquad c_{P_L}=\prod_{k=1}^{L}\operatorname{sgn}(a_{P_{k-1}\to P_k})A_k(P_{k-1}). \tag*{(38)} E [ P 0 ] = E [ c P L P L ] , c P L = k = 1 ∏ L sgn ( a P k − 1 → P k ) A k ( P k − 1 ) . (38)
By linearity, the same sampled path gives an unbiased estimator of Tr [ ρ E [ P 0 ] ] \operatorname{Tr}[\rho\mathcal{E}[P_0]] Tr [ ρ E [ P 0 ]] .
This method needs only constant memory per path and is embarrassingly parallel (i.e., it can be divided into many independent tasks requiring little or no communication between them). It also prevents paths from meeting before the final average is taken. Duplicate Pauli strings cannot merge, and cancellations that a breadth-first calculation would perform internally must instead be resolved statistically across independent trajectories.
Path sampling can still benefit from filling a CPU or GPU with many independent paths at once. Large batches amortize kernel launches and per-gate overheads. This changes the runtime, but not the 1 / R 1/\sqrt{R} 1/ R convergence with the total number R R R of independent paths.
Resampling the full Pauli sum is more ambitious. Using memory we can alter the statistical error itself by allowing deterministic evolution and interference between stochastic events, as we explore in the next section.
Resampling strategies
Independent one-norm resampling
Rather than make a random decision at each gate, one-norm resampling first lets the full Pauli sum evolve until the memory barrier is hit. When it contains too many Pauli strings, it defines a probability distribution based on the one norm of each coefficient
p i = ∣ c i ∣ W , (39) p_i = \frac{\lvert c_i\rvert}{W}, \tag*{(39)} p i = W ∣ c i ∣ , (39)
where we recall that W = ∑ i ∣ c i ∣ W = \sum_i \lvert c_i\rvert W = ∑ i ∣ c i ∣ is the one norm of the Pauli coefficients over the support in memory.
After sampling from this distribution m s m_s m s times, and obtaining N i N_i N i times each Pauli P i P_i P i , the estimator of the Pauli coefficient c ^ i \hat{c}_i c ^ i can be written as
c ^ i = N i sgn ( c i ) W m s (40) \hat{c}_i = N_i \operatorname{sgn}(c_i) \frac{W}{m_s} \tag*{(40)} c ^ i = N i sgn ( c i ) m s W (40)
where the vector of the repetitions N i N_i N i follows a multinomial distribution ( N 1 , N 2 , … ) ∼ Multinomial ( m s , { p i } ) (N_1,N_2,\ldots) \sim\operatorname{Multinomial}(m_s,\{p_i\}) ( N 1 , N 2 , … ) ∼ Multinomial ( m s , { p i }) . With this we can easily see that the expectation value of N i N_i N i is E [ N i ] = m s p i \mathbb{E}[N_i] = m_s p_i E [ N i ] = m s p i , which means that the expectation value of the estimator c ^ i \hat{c}_i c ^ i of the P i P_i P i coefficient is unbiased
E [ c ^ i ] = sgn ( c i ) W m s m s ∣ c i ∣ W = c i . (41) \mathbb{E}[\hat{c}_i] = \operatorname{sgn}(c_i)\frac{W}{m_s}m_s\frac{\lvert c_i\rvert}{W} = c_i. \tag*{(41)} E [ c ^ i ] = sgn ( c i ) m s W m s W ∣ c i ∣ = c i . (41)
Similarly, we use the fact that Var [ N i ] = m s p i ( 1 − p i ) \operatorname{Var}[N_i] = m_s p_i(1-p_i) Var [ N i ] = m s p i ( 1 − p i ) and we can compute
Var [ c ^ i ] = sgn ( c i ) 2 W 2 m s 2 m s ∣ c i ∣ W ( 1 − ∣ c i ∣ W ) = W m s ∣ c i ∣ ( 1 − ∣ c i ∣ W ) . (42) \operatorname{Var}[\hat{c}_i] = \operatorname{sgn}(c_i)^2\frac{W^2}{m_s^2}m_s\frac{\lvert c_i\rvert}{W}\left(1-\frac{\lvert c_i\rvert}{W}\right) = \frac{W}{m_s}\lvert c_i\rvert\left(1-\frac{\lvert c_i\rvert}{W}\right). \tag*{(42)} Var [ c ^ i ] = sgn ( c i ) 2 m s 2 W 2 m s W ∣ c i ∣ ( 1 − W ∣ c i ∣ ) = m s W ∣ c i ∣ ( 1 − W ∣ c i ∣ ) . (42)
The method is simple and exactly unbiased, but it does not generally produce m s m_s m s unique Pauli strings. A large coefficient may be drawn many times. Merging all of those copies saves memory, although it also means that a nominal request for m s m_s m s samples can leave far fewer than m s m_s m s stored Pauli strings. This distinction is minor for a flat coefficient distribution (most samples will be of new strings) but can be substantial for a peaked one (some strings will be sampled many times).
A tempting modification is to draw repeatedly until exactly m p m_p m p distinct Pauli strings have appeared. This fixes the number of stored Pauli strings, but adds a huge time overhead when the number of distinct draws to obtain m p m_p m p distinct Paulis is significantly larger than m p m_p m p itself. Moreover, a naive normalization introduces a small bias. Indeed, if we draw m s m_s m s times from this distribution1 until we fill up m p m_p m p different Paulis and assign the estimator naively as
c ^ i = N i sgn ( c i ) W m s , (43) \hat{c}_i = N_i \operatorname{sgn}(c_i) \frac{W}{m_s}, \tag*{(43)} c ^ i = N i sgn ( c i ) m s W , (43)
then N i N_i N i and m s m_s m s are correlated. We can see that this estimator is biased by a simple second-order expansion of the expectation value of the ratio E [ N i / m s ] \mathbb{E}[N_i/m_s] E [ N i / m s ]
E [ c ^ i ] = sgn ( c i ) W E [ N i m s ] (44) \mathbb{E}[\hat{c}_i] = \operatorname{sgn}(c_i) W \mathbb{E}\left[\frac{N_i}{m_s}\right] \tag*{(44)} E [ c ^ i ] = sgn ( c i ) W E [ m s N i ] (44)
≈ sgn ( c i ) W ( E [ N i ] E [ m s ] − Covar [ N i , m s ] E [ m s ] 2 + E [ N i ] Var [ m s ] E [ m s ] 3 ) (45) \approx\operatorname{sgn}(c_i) W \left(\frac{\mathbb{E}[N_i]}{\mathbb{E}[m_s]}-\frac{\operatorname{Covar}[N_i,m_s]}{\mathbb{E}[m_s]^2}+\frac{\mathbb{E}[N_i]\operatorname{Var}[m_s]}{\mathbb{E}[m_s]^3}\right) \tag*{(45)} ≈ sgn ( c i ) W ( E [ m s ] E [ N i ] − E [ m s ] 2 Covar [ N i , m s ] + E [ m s ] 3 E [ N i ] Var [ m s ] ) (45)
= sgn ( c i ) W ( p i − Covar [ N i , m s ] E [ m s ] 2 + p i Var [ m s ] E [ m s ] 2 ) (46) = \operatorname{sgn}(c_i) W \left(p_i-\frac{\operatorname{Covar}[N_i,m_s]}{\mathbb{E}[m_s]^2}+p_i\frac{\operatorname{Var}[m_s]}{\mathbb{E}[m_s]^2}\right) \tag*{(46)} = sgn ( c i ) W ( p i − E [ m s ] 2 Covar [ N i , m s ] + p i E [ m s ] 2 Var [ m s ] ) (46)
where in the second line we used that the expectation value of a ratio of two different random variables can be approximated as (see [89 ] which is Theorem 2 of [90 ] applied to g ( x , y ) = x / y g(x,y)=x/y g ( x , y ) = x / y )
E [ x ( t ) y ( t ) ] ≈ E [ x ( t ) ] E [ y ( t ) ] − Covar [ x ( t ) , y ( t ) ] E [ y ( t ) ] 2 + E [ x ( t ) ] Var [ y ( t ) ] E [ y ( t ) ] 3 , (47) \mathbb{E}\left[\frac{x(t)}{y(t)}\right]\approx\frac{\mathbb{E}[x(t)]}{\mathbb{E}[y(t)]}-\frac{\operatorname{Covar}[x(t),y(t)]}{\mathbb{E}[y(t)]^2}+\frac{\mathbb{E}[x(t)]\operatorname{Var}[y(t)]}{\mathbb{E}[y(t)]^3}, \tag*{(47)} E [ y ( t ) x ( t ) ] ≈ E [ y ( t )] E [ x ( t )] − E [ y ( t ) ] 2 Covar [ x ( t ) , y ( t )] + E [ y ( t ) ] 3 E [ x ( t )] Var [ y ( t )] , (47)
and in Eq. (46) we used Wald’s identity, which states that if w 1 , w 2 , … w_1,w_2,\ldots w 1 , w 2 , … are i.i.d. with E [ ∣ w ∣ ] < ∞ \mathbb{E}[|w|]<\infty E [ ∣ w ∣ ] < ∞ and N N N is a stopping time for the sequence of draws with E [ N ] < ∞ \mathbb{E}[N]<\infty E [ N ] < ∞ , then E [ ∑ k = 1 N w k ] = E [ w ] E [ N ] \mathbb{E}[\sum_{k=1}^{N}w_k]=\mathbb{E}[w]\mathbb{E}[N] E [ ∑ k = 1 N w k ] = E [ w ] E [ N ] . Here m s m_s m s is the first draw at which m p m_p m p distinct Pauli strings have appeared, which is such a stopping time. We use it to write E [ N i ] = E [ ∑ j = 1 m s I j ( i ) ] = E [ m s ] E [ I i ] \mathbb{E}[N_i]=\mathbb{E}[\sum_{j=1}^{m_s}I_j(i)]=\mathbb{E}[m_s]\mathbb{E}[I_i] E [ N i ] = E [ ∑ j = 1 m s I j ( i )] = E [ m s ] E [ I i ] , where I j ( i ) I_j(i) I j ( i ) is an indicator function that is equal to 1 when the Pauli P i P_i P i is sampled at the j j j -th sample and 0 otherwise, with E [ I j ( i ) ] = p i \mathbb{E}[I_j(i)]=p_i E [ I j ( i )] = p i .
We thus conclude from Eq. (46) that the average of the estimator is biased by
sgn ( c i ) W ( − Covar [ N i , m s ] E [ m s ] 2 + p i Var [ m s ] E [ m s ] 2 ) . (48) \operatorname{sgn}(c_i) W \left(-\frac{\operatorname{Covar}[N_i,m_s]}{\mathbb{E}[m_s]^2}+p_i\frac{\operatorname{Var}[m_s]}{\mathbb{E}[m_s]^2}\right). \tag*{(48)} sgn ( c i ) W ( − E [ m s ] 2 Covar [ N i , m s ] + p i E [ m s ] 2 Var [ m s ] ) . (48)
The random stopping time therefore trades exact unbiasedness for an exact number of distinct Pauli strings. We do not use it for the unbiased benchmarks. In the following section we introduce comb resampling and semi-deterministic resampling, two methods that come close to achieving the desired number of stored Paulis when resampling without inducing bias or requiring an exceedingly long time to sample.
One-norm resampling with bias
Before turning to the comb schemes, we describe a modification of the resampling step of Appendix § 2.1.1 2 a that trades exact unbiasedness for a reduction in variance. If a propagated Pauli sum is peaked a modest number of coefficients stand out, while the bulk of the one-norm is spread over very many small ones. Each of those small coefficients contributes little to the expectation value on its own, and its own sampling variance Var [ c ^ i ] = ∣ c i ∣ ( W − ∣ c i ∣ ) / m s \operatorname{Var}[\hat{c}_i]=|c_i|(W-|c_i|)/m_s Var [ c ^ i ] = ∣ c i ∣ ( W − ∣ c i ∣ ) / m s is correspondingly small, but together they carry most of the one norm and therefore dominate the variance of the protocol. It is therefore often useful to discard the smallest coefficients before resampling. The one-norm resampling with bias method can be decomposed into two steps:
Discard all coefficients satisfying ∣ c i ∣ ≤ b |c_i|\le b ∣ c i ∣ ≤ b , for a chosen threshold b > 0 b>0 b > 0 .
Perform one-norm resampling on the remaining coefficients.
The first step is deterministic, so it is convenient to absorb it into the coefficients themselves. Let
c ~ i = c i 1 ( ∣ c i ∣ > b ) (49) \widetilde{c}_i=c_i\mathbf{1}(|c_i|>b) \tag*{(49)} c i = c i 1 ( ∣ c i ∣ > b ) (49)
be the truncated coefficients. Then one-norm resampling with bias can be considered as one-norm resampling on the modified coefficients c ~ i \widetilde{c}_i c i , that is, on the modified Pauli sum O ~ = ∑ i c ~ i P i \widetilde{O}=\sum_i\widetilde{c}_iP_i O = ∑ i c i P i .
We can similarly define the modified one-norm and the modified probabilities
W ~ = ∑ i ∣ c ~ i ∣ = ∑ i ∣ c i ∣ 1 ( ∣ c i ∣ > b ) (50) \widetilde{W}=\sum_i|\widetilde{c}_i|=\sum_i|c_i|\mathbf{1}(|c_i|>b) \tag*{(50)} W = i ∑ ∣ c i ∣ = i ∑ ∣ c i ∣ 1 ( ∣ c i ∣ > b ) (50)
p ~ i = ∣ c ~ i ∣ W ~ = ∣ c i ∣ W ~ 1 ( ∣ c i ∣ > b ) , (51) \widetilde{p}_i=\frac{|\widetilde{c}_i|}{\widetilde{W}}=\frac{|c_i|}{\widetilde{W}}\mathbf{1}(|c_i|>b), \tag*{(51)} p i = W ∣ c i ∣ = W ∣ c i ∣ 1 ( ∣ c i ∣ > b ) , (51)
which replace Eq. (39) . Every statement of Appendix § 2.1.1 2 a then carries over under the substitutions c i → c ~ i c_i \to\tilde{c}_i c i → c ~ i , W → W ~ W \to\widetilde{W} W → W and p i → p ~ i p_i \to\tilde{p}_i p i → p ~ i , the only structural difference being that the discarded Pauli strings have p ~ i = 0 \tilde{p}_i = 0 p ~ i = 0 and can never be drawn. In particular, the estimator can be written similarly as
c ^ i = N i sgn ( c i ) W ~ m s , (52) \hat{c}_i = N_i \operatorname{sgn}(c_i) \frac{\widetilde{W}}{m_s}, \tag*{(52)} c ^ i = N i sgn ( c i ) m s W , (52)
where ( N 1 , N 2 , … ) ∼ Multinomial ( m s , { p ~ i } ) (N_1, N_2, \ldots) \sim\operatorname{Multinomial}(m_s, \{\tilde{p}_i\}) ( N 1 , N 2 , … ) ∼ Multinomial ( m s , { p ~ i }) . Contrary to the one-norm resampling, this estimator is biased with respect to O O O , because small coefficients will be deterministically discarded, but is unbiased with respect to the truncated sum O ~ \tilde{O} O ~ . Concretely, using E [ N i ] = m s p ~ i \mathbb{E}[N_i] = m_s\tilde{p}_i E [ N i ] = m s p ~ i we find
E [ c ^ i ] = sgn ( c i ) W ~ m s m s p ~ i = sgn ( c i ) W ~ ∣ c i ∣ W ~ 1 ( ∣ c i ∣ > b ) = sgn ( c i ) ∣ c i ∣ 1 ( ∣ c i ∣ > b ) = c i 1 ( ∣ c i ∣ > b ) = c ~ i . (53) \begin{aligned}
\mathbb{E}[\hat{c}_i] &= \operatorname{sgn}(c_i)\frac{\widetilde{W}}{m_s}m_s\tilde{p}_i = \operatorname{sgn}(c_i)\widetilde{W}\frac{|c_i|}{\widetilde{W}}1(|c_i| > b) = \operatorname{sgn}(c_i)|c_i|1(|c_i| > b) \\
&= c_i1(|c_i| > b) = \tilde{c}_i. \tag*{(53)}
\end{aligned} E [ c ^ i ] = sgn ( c i ) m s W m s p ~ i = sgn ( c i ) W W ∣ c i ∣ 1 ( ∣ c i ∣ > b ) = sgn ( c i ) ∣ c i ∣1 ( ∣ c i ∣ > b ) = c i 1 ( ∣ c i ∣ > b ) = c ~ i . (53)
Subtracting c i c_i c i from Eq. (53) , the error made on each coefficient is
E [ c ^ i ] − c i = − c i 1 ( ∣ c i ∣ ≤ b ) , (54) \mathbb{E}[\hat{c}_i] - c_i = -c_i1(|c_i| \le b), \tag*{(54)} E [ c ^ i ] − c i = − c i 1 ( ∣ c i ∣ ≤ b ) , (54)
that is, exactly the coefficient that was thrown away.
Similarly, if ∣ c i ∣ > b |c_i| > b ∣ c i ∣ > b , c ^ i \hat{c}_i c ^ i has the same variance as the unbiased case with W W W replaced by W ~ \widetilde{W} W , and if ∣ c i ∣ ≤ b |c_i| \le b ∣ c i ∣ ≤ b , c ^ i = 0 \hat{c}_i = 0 c ^ i = 0 is constant, therefore
Var [ c ^ i ] = W ~ m s ∣ c i ∣ ( 1 − ∣ c i ∣ W ~ ) 1 ( ∣ c i ∣ > b ) (55) \operatorname{Var}[\hat{c}_i] = \frac{\widetilde{W}}{m_s}|c_i|\left(1 - \frac{|c_i|}{\widetilde{W}}\right)1(|c_i| > b) \tag*{(55)} Var [ c ^ i ] = m s W ∣ c i ∣ ( 1 − W ∣ c i ∣ ) 1 ( ∣ c i ∣ > b ) (55)
Choosing the threshold. An absolute threshold held fixed throughout the propagation does not adapt to the scale of the coefficients, which changes by orders of magnitude as the Pauli sum grows. A threshold relative to the one-norm, b = ϵ W b = \epsilon W b = ϵ W , does adapt, but discards too much once the distribution flattens out and the individual coefficients become small compared to W W W . We therefore take the threshold relative to the largest coefficient,
b = ϵ r e l max i ∣ c i ∣ , ϵ r e l > 0 , (56) b = \epsilon_{\mathrm{rel}}\max_i |c_i|,\qquad\epsilon_{\mathrm{rel}} > 0, \tag*{(56)} b = ϵ rel i max ∣ c i ∣ , ϵ rel > 0 , (56)
which follows the scale of the distribution at every step, keeping the coefficients that carry its meaningful part and throwing away the rest.
Systematic or comb resampling
To circumvent the issues created by independent one-norm sampling we use systematic resampling [74 ] , which we call comb sampling. This method replaces m s m_s m s independent random numbers with a more efficient method. Recall the Pauli sum O = ∑ i = 1 N O c i P i O = \sum_{i=1}^{N_O} c_iP_i O = ∑ i = 1 N O c i P i , with one-norm W = ∑ i = 1 N O ∣ c i ∣ W = \sum_{i=1}^{N_O}|c_i| W = ∑ i = 1 N O ∣ c i ∣ . We can define the cumulative weights belonging to the coefficient distributions as
w i = ∑ j = 1 i ∣ c j ∣ , w 0 = 0 , w N O = W . (57) w_i = \sum_{j=1}^{i}|c_j|,\qquad w_0 = 0,\qquad w_{N_O} = W. \tag*{(57)} w i = j = 1 ∑ i ∣ c j ∣ , w 0 = 0 , w N O = W . (57)
Instead of drawing m s m_s m s independent samples from this distribution, comb sampling places a regular grid (a comb) with spacing Δ \Delta Δ and a single random offset r ∼ Uniform [ 0 , Δ ) r \sim\operatorname{Uniform}[0,\Delta) r ∼ Uniform [ 0 , Δ ) over the cumulative weights, and counts the number of comb teeth that land in each interval [ w i − 1 , w i ) [w_{i-1}, w_i) [ w i − 1 , w i ) . This is illustrated in Figure 9 (top). That number can be computed for any index i i i via
Figure 9. (Top) Illustration of the comb resampling principle. Given absolute value coefficients ∣ c i ∣ |c_i| ∣ c i ∣ with cumulative one norms w i = ∑ j = 1 i ∣ c j ∣ w_i = \sum_{j=1}^{i}|c_j| w i = ∑ j = 1 i ∣ c j ∣ and a number of samples m s m_s m s , one superposes a grid of width Δ = w N 0 / m s \Delta= w_{N_0}/m_s Δ = w N 0 / m s . The sampling procedure consists first of shifting the grid by a random offset r r r uniform in [ 0 , Δ ) [0,\Delta) [ 0 , Δ ) and then assigning the number N i N_i N i associated to the coefficient c i c_i c i by counting the number of teeth falling in the interval [ w i − 1 , w i ) [w_{i-1},w_i) [ w i − 1 , w i ) . (Bottom) Illustration of the calibration process. Δ \Delta Δ is updated and decreases until one gets the desired expected number of Pauli strings.
N i = ⌊ w i − r Δ ⌋ − ⌊ w i − 1 − r Δ ⌋ , (58) N_i = \left\lfloor\frac{w_i-r}{\Delta}\right\rfloor- \left\lfloor\frac{w_{i-1}-r}{\Delta}\right\rfloor, \tag*{(58)} N i = ⌊ Δ w i − r ⌋ − ⌊ Δ w i − 1 − r ⌋ , (58)
where the random variable r r r determines N i N_i N i . Note that different N i N_i N i are not independent. The resampled coefficient is then
c ^ i = sgn ( c i ) N i Δ . (59) \hat{c}_i = \operatorname{sgn}(c_i)N_i\Delta. \tag*{(59)} c ^ i = sgn ( c i ) N i Δ. (59)
The coefficients are already merged, only zero-valued coefficients need to be truncated, i.e. Pauli strings with N i = 0 N_i = 0 N i = 0 are removed from the resampled sum.
We can see that this estimator is unbiased by understanding how N i N_i N i behaves as a random variable. While N i N_i N i is computed directly from Eq. (58) , its behaviour is easier to read off after massaging that expression. Let us start with the first term of Eq. (58) ,
⌊ w i − r Δ ⌋ = ⌊ ∣ c i ∣ Δ + w i − 1 − r Δ ⌋ (60) \left\lfloor\frac{w_i-r}{\Delta} \right\rfloor= \left\lfloor\frac{|c_i|}{\Delta}+\frac{w_{i-1}-r}{\Delta} \right\rfloor \tag*{(60)} ⌊ Δ w i − r ⌋ = ⌊ Δ ∣ c i ∣ + Δ w i − 1 − r ⌋ (60)
= ⌊ w i − 1 − r Δ ⌋ + ⌊ ∣ c i ∣ Δ ⌋ + ⌊ { ∣ c i ∣ Δ } + { w i − 1 − r Δ } ⌋ (61) = \left\lfloor\frac{w_{i-1}-r}{\Delta} \right\rfloor+ \left\lfloor\frac{|c_i|}{\Delta} \right\rfloor+ \left\lfloor\left\{\frac{|c_i|}{\Delta}\right\}+\left\{\frac{w_{i-1}-r}{\Delta}\right\}\right\rfloor \tag*{(61)} = ⌊ Δ w i − 1 − r ⌋ + ⌊ Δ ∣ c i ∣ ⌋ + ⌊ { Δ ∣ c i ∣ } + { Δ w i − 1 − r } ⌋ (61)
where in the first equality we used that w i = ∣ c i ∣ + w i − 1 w_i = |c_i| + w_{i-1} w i = ∣ c i ∣ + w i − 1 by Eq. (57) , and that x = ⌊ x ⌋ + { x } x = \lfloor x \rfloor+ \{x\} x = ⌊ x ⌋ + { x } , i.e. { x } \{x\} { x } denotes the non-integer part of x x x . We can rearrange Eq. (60) to find
⌊ w i − r Δ ⌋ − ⌊ w i − 1 − r Δ ⌋ = ⌊ ∣ c i ∣ Δ ⌋ + ⌊ { ∣ c i ∣ Δ } + { w i − 1 − r Δ } ⌋ (62) \left\lfloor\frac{w_i-r}{\Delta} \right\rfloor-\left\lfloor\frac{w_{i-1}-r}{\Delta} \right\rfloor= \left\lfloor\frac{|c_i|}{\Delta} \right\rfloor+ \left\lfloor\left\{\frac{|c_i|}{\Delta}\right\}+\left\{\frac{w_{i-1}-r}{\Delta}\right\}\right\rfloor \tag*{(62)} ⌊ Δ w i − r ⌋ − ⌊ Δ w i − 1 − r ⌋ = ⌊ Δ ∣ c i ∣ ⌋ + ⌊ { Δ ∣ c i ∣ } + { Δ w i − 1 − r } ⌋ (62)
which means that, recalling Eq. (58) , we can write
N i = ⌊ ∣ c i ∣ Δ ⌋ + I i , I i = ⌊ { ∣ c i ∣ Δ } + { w i − 1 − r Δ } ⌋ (63) N_i = \left\lfloor\frac{\lvert c_i\rvert}{\Delta} \right\rfloor+ I_i,\qquad I_i = \left\lfloor\left\{ \frac{\lvert c_i\rvert}{\Delta} \right\} + \left\{ \frac{w_{i-1}-r}{\Delta} \right\} \right\rfloor \tag*{(63)} N i = ⌊ Δ ∣ c i ∣ ⌋ + I i , I i = ⌊ { Δ ∣ c i ∣ } + { Δ w i − 1 − r } ⌋ (63)
where the I i I_i I i are random variables taking the value 0 or 1, which are, crucially, not independent of each other, since they are all driven by the single random offset r r r .
Before analysing the unbiasedness of our estimator c ^ i \hat{c}_i c ^ i we need the expectation value of I i I_i I i . We can compute it by noting that u = r / Δ u = r/\Delta u = r /Δ is a uniform random variable, u ∼ Uniform [ 0 , 1 ) u \sim\operatorname{Uniform}[0,1) u ∼ Uniform [ 0 , 1 ) , and writing ϕ i − 1 = { w i − 1 / Δ } \phi_{i-1} = \{w_{i-1}/\Delta\} ϕ i − 1 = { w i − 1 /Δ } for the non-integer part of the cumulative weight, so that { w i − 1 / Δ − u } = { ϕ i − 1 − u } \{w_{i-1}/\Delta-u\} = \{\phi_{i-1}-u\} { w i − 1 /Δ − u } = { ϕ i − 1 − u } ,
E [ I i ] = ∫ 0 1 ⌊ { ∣ c i ∣ Δ } + { ϕ i − 1 − u } ⌋ d u (64) \mathbb{E}[I_i] = \int_0^1 \left\lfloor\left\{ \frac{\lvert c_i\rvert}{\Delta} \right\} + \{\phi_{i-1}-u\} \right\rfloor\,\mathrm{d}u \tag*{(64)} E [ I i ] = ∫ 0 1 ⌊ { Δ ∣ c i ∣ } + { ϕ i − 1 − u } ⌋ d u (64)
= ∫ 0 ϕ i − 1 ⌊ { ∣ c i ∣ Δ } + ϕ i − 1 − u ⌋ d u + ∫ ϕ i − 1 1 ⌊ { ∣ c i ∣ Δ } + 1 + ϕ i − 1 − u ⌋ d u (65) = \int_0^{\phi_{i-1}} \left\lfloor\left\{ \frac{\lvert c_i\rvert}{\Delta} \right\} + \phi_{i-1}-u \right\rfloor\,\mathrm{d}u + \int_{\phi_{i-1}}^1 \left\lfloor\left\{ \frac{\lvert c_i\rvert}{\Delta} \right\} + 1+\phi_{i-1}-u \right\rfloor\,\mathrm{d}u \tag*{(65)} = ∫ 0 ϕ i − 1 ⌊ { Δ ∣ c i ∣ } + ϕ i − 1 − u ⌋ d u + ∫ ϕ i − 1 1 ⌊ { Δ ∣ c i ∣ } + 1 + ϕ i − 1 − u ⌋ d u (65)
= ∫ 0 ϕ i − 1 ⌊ { ∣ c i ∣ Δ } + x ⌋ d x + ∫ ϕ i − 1 1 ⌊ { ∣ c i ∣ Δ } + x ⌋ d x (66) = \int_0^{\phi_{i-1}} \left\lfloor\left\{ \frac{\lvert c_i\rvert}{\Delta} \right\} + x \right\rfloor\,\mathrm{d}x + \int_{\phi_{i-1}}^1 \left\lfloor\left\{ \frac{\lvert c_i\rvert}{\Delta} \right\} + x \right\rfloor\,\mathrm{d}x \tag*{(66)} = ∫ 0 ϕ i − 1 ⌊ { Δ ∣ c i ∣ } + x ⌋ d x + ∫ ϕ i − 1 1 ⌊ { Δ ∣ c i ∣ } + x ⌋ d x (66)
= ∫ 0 1 ⌊ { ∣ c i ∣ Δ } + x ⌋ d x = ∫ 1 − { ∣ c i ∣ / Δ } 1 d x = { ∣ c i ∣ Δ } (67) = \int_0^1 \left\lfloor\left\{ \frac{\lvert c_i\rvert}{\Delta} \right\} + x \right\rfloor\,\mathrm{d}x = \int_{1-\{\lvert c_i\rvert/\Delta\}}^1 \mathrm{d}x = \left\{ \frac{\lvert c_i\rvert}{\Delta} \right\} \tag*{(67)} = ∫ 0 1 ⌊ { Δ ∣ c i ∣ } + x ⌋ d x = ∫ 1 − {∣ c i ∣ /Δ } 1 d x = { Δ ∣ c i ∣ } (67)
where in the second equality we used that { ϕ i − 1 − u } = ϕ i − 1 − u \{\phi_{i-1}-u\}=\phi_{i-1}-u { ϕ i − 1 − u } = ϕ i − 1 − u for u < ϕ i − 1 u<\phi_{i-1} u < ϕ i − 1 and { ϕ i − 1 − u } = 1 + ϕ i − 1 − u \{\phi_{i-1}-u\}=1+\phi_{i-1}-u { ϕ i − 1 − u } = 1 + ϕ i − 1 − u for u > ϕ i − 1 u>\phi_{i-1} u > ϕ i − 1 , since ϕ i − 1 ∈ [ 0 , 1 ) \phi_{i-1}\in[0,1) ϕ i − 1 ∈ [ 0 , 1 ) and u ∈ [ 0 , 1 ) u\in[0,1) u ∈ [ 0 , 1 ) . In the third equality we used the changes of variables x = ϕ i − 1 − u x=\phi_{i-1}-u x = ϕ i − 1 − u and x = 1 + ϕ i − 1 − u x=1+\phi_{i-1}-u x = 1 + ϕ i − 1 − u for the first and the second integral respectively, each of which maps the interval of integration onto the one shown. In the two last equalities we first regrouped the two integrals into one, and then used that ⌊ { ∣ c i ∣ / Δ } + x ⌋ = 1 \lfloor\{\lvert c_i\rvert/\Delta\}+x\rfloor=1 ⌊{∣ c i ∣ /Δ } + x ⌋ = 1 for x > 1 − { ∣ c i ∣ / Δ } x>1-\{\lvert c_i\rvert/\Delta\} x > 1 − {∣ c i ∣ /Δ } and 0 otherwise.
Now we are equipped to compute the expectation value of our estimator c ^ i \hat{c}_i c ^ i in Eq. (59)
E [ c ^ i ] = sgn ( c i ) Δ E [ N i ] (68) \mathbb{E}[\hat{c}_i] = \operatorname{sgn}(c_i)\Delta\mathbb{E}[N_i] \tag*{(68)} E [ c ^ i ] = sgn ( c i ) Δ E [ N i ] (68)
= sgn ( c i ) Δ ( ⌊ ∣ c i ∣ Δ ⌋ + E [ I i ] ) (69) = \operatorname{sgn}(c_i)\Delta\left(\left\lfloor\frac{\lvert c_i\rvert}{\Delta} \right\rfloor+\mathbb{E}[I_i]\right) \tag*{(69)} = sgn ( c i ) Δ ( ⌊ Δ ∣ c i ∣ ⌋ + E [ I i ] ) (69)
= sgn ( c i ) Δ ( ⌊ ∣ c i ∣ Δ ⌋ + { ∣ c i ∣ Δ } ) = sgn ( c i ) Δ ∣ c i ∣ Δ = c i , (70) = \operatorname{sgn}(c_i)\Delta\left(\left\lfloor\frac{\lvert c_i\rvert}{\Delta} \right\rfloor+\left\{ \frac{\lvert c_i\rvert}{\Delta} \right\}\right)=\operatorname{sgn}(c_i)\Delta\frac{\lvert c_i\rvert}{\Delta}=c_i, \tag*{(70)} = sgn ( c i ) Δ ( ⌊ Δ ∣ c i ∣ ⌋ + { Δ ∣ c i ∣ } ) = sgn ( c i ) Δ Δ ∣ c i ∣ = c i , (70)
where in the first equality we used Eq. (63) , and in the second equality we used Eq. (64) . The estimator is therefore unbiased.
We can also compute the variance. Since N i = ⌊ ∣ c i ∣ / Δ ⌋ + I i N_i=\left\lfloor\lvert c_i\rvert/\Delta\right\rfloor+I_i N i = ⌊ ∣ c i ∣ /Δ ⌋ + I i , we have Var [ N i ] = Var [ I i ] = { ∣ c i ∣ / Δ } ( 1 − { ∣ c i ∣ / Δ } ) \operatorname{Var}[N_i]=\operatorname{Var}[I_i]=\{\lvert c_i\rvert/\Delta\}(1-\{\lvert c_i\rvert/\Delta\}) Var [ N i ] = Var [ I i ] = {∣ c i ∣ /Δ } ( 1 − {∣ c i ∣ /Δ }) . Therefore
Var [ c ^ i ] = Δ 2 Var [ I i ] = Δ 2 { ∣ c i ∣ Δ } ( 1 − { ∣ c i ∣ Δ } ) (71) \operatorname{Var}[\hat{c}_i] = \Delta^2\operatorname{Var}[I_i] = \Delta^2\left\{ \frac{\lvert c_i\rvert}{\Delta} \right\}\left(1-\left\{ \frac{\lvert c_i\rvert}{\Delta} \right\}\right) \tag*{(71)} Var [ c ^ i ] = Δ 2 Var [ I i ] = Δ 2 { Δ ∣ c i ∣ } ( 1 − { Δ ∣ c i ∣ } ) (71)
Comb resampling has two implementation advantages. The counts can be generated while walking through the cumulative distribution, so repeated outcomes are already aggregated and need not be merged in a second pass. The method also admits efficient parallel implementations on CPUs and GPUs [72 ] .
Calibrating the spacing. We are now left with the question of how to pick the comb spacing Δ \Delta Δ . The natural spacing W / m W/m W / m fixes the number of teeth, not the number of unique Pauli strings. Any interval, c i c_i c i , wider than Δ \Delta Δ can catch more than one tooth, and so contribute multiple Pauli strings but only one unique one. It follows that a peaked distribution (i.e., one with many large c i c_i c i ) again produces fewer than m m m stored Pauli strings. The expected number of unique Pauli strings at spacing Δ \Delta Δ is
F ( Δ ) = ∑ i = 1 N o min ( 1 , ∣ c i ∣ Δ ) , (72) F(\Delta)=\sum_{i=1}^{N_o}\min\left(1,\frac{\lvert c_i\rvert}{\Delta}\right), \tag*{(72)} F ( Δ ) = i = 1 ∑ N o min ( 1 , Δ ∣ c i ∣ ) , (72)
where a coefficient larger than the comb spacing is certain to receive at least one tooth, while a smaller one survives only with probability ∣ c i ∣ / Δ \lvert c_i\rvert/\Delta ∣ c i ∣ /Δ .
Calibrated comb sampling selects Δ \Delta Δ so that F ( Δ ) ≃ m F(\Delta) \simeq m F ( Δ ) ≃ m . To do so, we employ a fixed point iteration, updating Δ \Delta Δ until convergence with the following rule
Δ k + 1 ← Δ k F ( Δ k ) m . (73) \Delta_{k+1} \leftarrow\Delta_k \frac{F(\Delta_k)}{m}. \tag*{(73)} Δ k + 1 ← Δ k m F ( Δ k ) . (73)
Since F ( Δ ) ≤ W / Δ F(\Delta) \le W/\Delta F ( Δ ) ≤ W /Δ , the calibrated spacing satisfies Δ ≤ W / m \Delta\le W/m Δ ≤ W / m , and the comb lays m s = W / Δ ≥ m m_s = W/\Delta\ge m m s = W /Δ ≥ m teeth. Calibration therefore increases the effective number of draws m s m_s m s while bringing m p m_p m p closer to m m m .
With the following proposition, we will show that this procedure converges given that Δ \Delta Δ is initialized at max i ∣ c i ∣ \max_i \lvert c_i\rvert max i ∣ c i ∣ and some technical assumptions. Δ \Delta Δ decreases until the expected number of unique Pauli strings F ( Δ ) F(\Delta) F ( Δ ) reaches m m m . This is illustrated in Figure 9 (bottom).
Proposition 1. Consider the fixed point iteration initialized at Δ 0 = max i ∣ c i ∣ \Delta_0 = \max_i \lvert c_i\rvert Δ 0 = max i ∣ c i ∣ updating Δ \Delta Δ with
Δ k + 1 ← g ( Δ k ) (74) \Delta_{k+1} \leftarrow g(\Delta_k) \tag*{(74)} Δ k + 1 ← g ( Δ k ) (74) where g ( Δ ) = Δ F ( Δ ) m g(\Delta) = \Delta\frac{F(\Delta)}{m} g ( Δ ) = Δ m F ( Δ ) . Assume that max i ∣ c i ∣ > ∑ i ∣ c i ∣ m \max_i \lvert c_i\rvert> \frac{\sum_i \lvert c_i\rvert}{m} max i ∣ c i ∣ > m ∑ i ∣ c i ∣ and that there exists Δ > 0 \Delta> 0 Δ > 0 such that ∣ { i , ∣ c i ∣ > Δ } ∣ > m \lvert\{i,\lvert c_i\rvert> \Delta\}\rvert> m ∣{ i , ∣ c i ∣ > Δ }∣ > m . Then the fixed point iteration converges to Δ o p t \Delta_{\mathrm{opt}} Δ opt such that F ( Δ o p t ) = m F(\Delta_{\mathrm{opt}}) = m F ( Δ opt ) = m .
Proof. We will first establish that g ( Δ ) g(\Delta) g ( Δ ) is continuous and piecewise affine with decreasing slopes. We have by using the expression of F F F in Eq. (72)
g ( Δ ) = Δ m F ( Δ ) = Δ m ( ∑ i , ∣ c i ∣ > Δ 1 + 1 Δ ∑ i , ∣ c i ∣ ≤ Δ ∣ c i ∣ ) = 1 m ( a ( Δ ) Δ + b ( Δ ) ) (75) g(\Delta) = \frac{\Delta}{m}F(\Delta) = \frac{\Delta}{m}\left(\sum_{i,\lvert c_i\rvert>\Delta}1+\frac{1}{\Delta}\sum_{i,\lvert c_i\rvert\le\Delta}\lvert c_i\rvert\right)=\frac{1}{m}\left(a(\Delta)\Delta+b(\Delta)\right) \tag*{(75)} g ( Δ ) = m Δ F ( Δ ) = m Δ i , ∣ c i ∣ > Δ ∑ 1 + Δ 1 i , ∣ c i ∣ ≤ Δ ∑ ∣ c i ∣ = m 1 ( a ( Δ ) Δ + b ( Δ ) ) (75)
where we defined
a ( Δ ) = ∣ { i , ∣ c i ∣ > Δ } ∣ , (76) a(\Delta)=\lvert\{i,\lvert c_i\rvert>\Delta\}\rvert, \tag*{(76)} a ( Δ ) = ∣{ i , ∣ c i ∣ > Δ }∣ , (76)
b ( Δ ) = ∑ i , ∣ c i ∣ ≤ Δ ∣ c i ∣ . (77) b(\Delta)=\sum_{i,\lvert c_i\rvert\le\Delta}\lvert c_i\rvert. \tag*{(77)} b ( Δ ) = i , ∣ c i ∣ ≤ Δ ∑ ∣ c i ∣ . (77)
Some useful facts that will be used later are
a ( Δ 0 ) = a ( max i ∣ c i ∣ ) = 0 (78) a(\Delta_0)=a\left(\max_i\lvert c_i\rvert\right)=0 \tag*{(78)} a ( Δ 0 ) = a ( i max ∣ c i ∣ ) = 0 (78)
b ( Δ 0 ) = ∑ i ∣ c i ∣ (79) b(\Delta_0)=\sum_i\lvert c_i\rvert \tag*{(79)} b ( Δ 0 ) = i ∑ ∣ c i ∣ (79)
then by our assumption,
g ( Δ 0 ) = ∑ i ∣ c i ∣ m < Δ 0 (80) g(\Delta_0)=\frac{\sum_i\lvert c_i\rvert}{m}<\Delta_0 \tag*{(80)} g ( Δ 0 ) = m ∑ i ∣ c i ∣ < Δ 0 (80)
Assume that the ∣ c i ∣ \lvert c_i\rvert ∣ c i ∣ s are ordered such that ∣ c 1 ∣ ≤ ∣ c 2 ∣ ≤ … ≤ ∣ c N O ∣ \lvert c_1\rvert\le\lvert c_2\rvert\le\ldots\le\lvert c_{N_O}\rvert ∣ c 1 ∣ ≤ ∣ c 2 ∣ ≤ … ≤ ∣ c N O ∣ . a ( Δ ) a(\Delta) a ( Δ ) and b ( Δ ) b(\Delta) b ( Δ ) are constant in the intervals ] ∣ c i ∣ , ∣ c i + 1 ∣ [ \rbrack\lvert c_i\rvert,\lvert c_{i+1}\rvert\lbrack ] ∣ c i ∣ , ∣ c i + 1 ∣ [ where ∣ c i ∣ ≠ ∣ c i + 1 ∣ \lvert c_i\rvert\ne\lvert c_{i+1}\rvert ∣ c i ∣ = ∣ c i + 1 ∣ . Then g ( Δ ) g(\Delta) g ( Δ ) is affine in those same intervals and a ( Δ ) a(\Delta) a ( Δ ) is a decreasing function so the slopes are decreasing. We now have to prove that g ( Δ ) g(\Delta) g ( Δ ) is continuous in all points ∣ c i ∣ \lvert c_i\rvert ∣ c i ∣ . Let i 0 i_0 i 0 be an index, and let us study the limits of g ( Δ ) g(\Delta) g ( Δ ) in ∣ c i 0 ∣ + \lvert c_{i_0}\rvert^+ ∣ c i 0 ∣ + and ∣ c i 0 ∣ − \lvert c_{i_0}\rvert^- ∣ c i 0 ∣ − . We study m g ( Δ ) mg(\Delta) m g ( Δ ) for lighter notations. We have
if ∣ c i 0 ∣ < Δ < ∣ c i 0 + 1 ∣ , m g ( Δ ) = ∣ { i , ∣ c i ∣ > ∣ c i 0 ∣ } ∣ Δ + ∑ i , ∣ c i ∣ ≤ ∣ c i 0 ∣ ∣ c i ∣ (81) \text{if }\lvert c_{i_0}\rvert<\Delta<\lvert c_{i_0+1}\rvert,\quad mg(\Delta)=\lvert\{i,\lvert c_i\rvert>\lvert c_{i_0}\rvert\}\rvert\Delta+\sum_{i,\lvert c_i\rvert\le\lvert c_{i_0}\rvert}\lvert c_i\rvert \tag*{(81)} if ∣ c i 0 ∣ < Δ < ∣ c i 0 + 1 ∣ , m g ( Δ ) = ∣{ i , ∣ c i ∣ > ∣ c i 0 ∣}∣ Δ + i , ∣ c i ∣ ≤ ∣ c i 0 ∣ ∑ ∣ c i ∣ (81)
= ∣ { i , ∣ c i ∣ > ∣ c i 0 ∣ } ∣ Δ + ∑ i , ∣ c i ∣ < ∣ c i 0 ∣ ∣ c i ∣ + ∑ i , ∣ c i ∣ = ∣ c i 0 ∣ ∣ c i ∣ (82) =\lvert\{i,\lvert c_i\rvert>\lvert c_{i_0}\rvert\}\rvert\Delta+\sum_{i,\lvert c_i\rvert<\lvert c_{i_0}\rvert}\lvert c_i\rvert+\sum_{i,\lvert c_i\rvert=\lvert c_{i_0}\rvert}\lvert c_i\rvert \tag*{(82)} = ∣{ i , ∣ c i ∣ > ∣ c i 0 ∣}∣ Δ + i , ∣ c i ∣ < ∣ c i 0 ∣ ∑ ∣ c i ∣ + i , ∣ c i ∣ = ∣ c i 0 ∣ ∑ ∣ c i ∣ (82)
= ∣ { i , ∣ c i ∣ > ∣ c i 0 ∣ } ∣ Δ + ∑ i , ∣ c i ∣ < ∣ c i 0 ∣ ∣ c i ∣ + ∣ { i , ∣ c i ∣ = ∣ c i 0 ∣ } ∣ ∣ c i 0 ∣ (83) =\lvert\{i,\lvert c_i\rvert>\lvert c_{i_0}\rvert\}\rvert\Delta+\sum_{i,\lvert c_i\rvert<\lvert c_{i_0}\rvert}\lvert c_i\rvert+\lvert\{i,\lvert c_i\rvert=\lvert c_{i_0}\rvert\}\rvert\lvert c_{i_0}\rvert \tag*{(83)} = ∣{ i , ∣ c i ∣ > ∣ c i 0 ∣}∣ Δ + i , ∣ c i ∣ < ∣ c i 0 ∣ ∑ ∣ c i ∣ + ∣{ i , ∣ c i ∣ = ∣ c i 0 ∣}∣ ∣ c i 0 ∣ (83)
lim Δ → ∣ c i 0 ∣ + m g ( Δ ) = ∣ { i , ∣ c i ∣ > ∣ c i 0 ∣ } ∣ ∣ c i 0 ∣ + ∑ i , ∣ c i ∣ < ∣ c i 0 ∣ ∣ c i ∣ + ∣ { i , ∣ c i ∣ = ∣ c i 0 ∣ } ∣ ∣ c i 0 ∣ (84) \lim_{\Delta\to\lvert c_{i_0}\rvert^+}mg(\Delta)=\lvert\{i,\lvert c_i\rvert>\lvert c_{i_0}\rvert\}\rvert\lvert c_{i_0}\rvert+\sum_{i,\lvert c_i\rvert<\lvert c_{i_0}\rvert}\lvert c_i\rvert+\lvert\{i,\lvert c_i\rvert=\lvert c_{i_0}\rvert\}\rvert\lvert c_{i_0}\rvert \tag*{(84)} Δ → ∣ c i 0 ∣ + lim m g ( Δ ) = ∣{ i , ∣ c i ∣ > ∣ c i 0 ∣}∣ ∣ c i 0 ∣ + i , ∣ c i ∣ < ∣ c i 0 ∣ ∑ ∣ c i ∣ + ∣{ i , ∣ c i ∣ = ∣ c i 0 ∣}∣ ∣ c i 0 ∣ (84)
= ∣ { i , ∣ c i ∣ ≥ ∣ c i 0 ∣ } ∣ ∣ c i 0 ∣ + ∑ i , ∣ c i ∣ < ∣ c i 0 ∣ ∣ c i ∣ (85) =\lvert\{i,\lvert c_i\rvert\ge\lvert c_{i_0}\rvert\}\rvert\lvert c_{i_0}\rvert+\sum_{i,\lvert c_i\rvert<\lvert c_{i_0}\rvert}\lvert c_i\rvert \tag*{(85)} = ∣{ i , ∣ c i ∣ ≥ ∣ c i 0 ∣}∣ ∣ c i 0 ∣ + i , ∣ c i ∣ < ∣ c i 0 ∣ ∑ ∣ c i ∣ (85)
if ∣ c i 0 − 1 ∣ < Δ < ∣ c i 0 ∣ , m g ( Δ ) = ∣ { i , ∣ c i ∣ ≥ ∣ c i 0 ∣ } ∣ Δ + ∑ i , ∣ c i ∣ < ∣ c i 0 ∣ ∣ c i ∣ (86) \text{if }\lvert c_{i_0-1}\rvert<\Delta<\lvert c_{i_0}\rvert,\quad mg(\Delta)=\lvert\{i,\lvert c_i\rvert\ge\lvert c_{i_0}\rvert\}\rvert\Delta+\sum_{i,\lvert c_i\rvert<\lvert c_{i_0}\rvert}\lvert c_i\rvert \tag*{(86)} if ∣ c i 0 − 1 ∣ < Δ < ∣ c i 0 ∣ , m g ( Δ ) = ∣{ i , ∣ c i ∣ ≥ ∣ c i 0 ∣}∣ Δ + i , ∣ c i ∣ < ∣ c i 0 ∣ ∑ ∣ c i ∣ (86)
lim Δ → ∣ c i 0 ∣ − m g ( Δ ) = ∣ { i , ∣ c i ∣ ≥ ∣ c i 0 ∣ } ∣ ∣ c i 0 ∣ + ∑ i , ∣ c i ∣ < ∣ c i 0 ∣ ∣ c i ∣ (87) \lim_{\Delta\to\lvert c_{i_0}\rvert^-}mg(\Delta)=\lvert\{i,\lvert c_i\rvert\ge\lvert c_{i_0}\rvert\}\rvert\lvert c_{i_0}\rvert+\sum_{i,\lvert c_i\rvert<\lvert c_{i_0}\rvert}\lvert c_i\rvert \tag*{(87)} Δ → ∣ c i 0 ∣ − lim m g ( Δ ) = ∣{ i , ∣ c i ∣ ≥ ∣ c i 0 ∣}∣ ∣ c i 0 ∣ + i , ∣ c i ∣ < ∣ c i 0 ∣ ∑ ∣ c i ∣ (87)
We have proved that lim Δ → ∣ c i 0 ∣ + g ( Δ ) = lim Δ → ∣ c i 0 ∣ − g ( Δ ) \lim_{\Delta\to\lvert c_i^0\rvert^+} g(\Delta)=\lim_{\Delta\to\lvert c_i^0\rvert^-} g(\Delta) lim Δ → ∣ c i 0 ∣ + g ( Δ ) = lim Δ → ∣ c i 0 ∣ − g ( Δ ) therefore g g g is continuous.
We will now show that under our assumptions, g ( Δ ) g(\Delta) g ( Δ ) admits a fixed point Δ o p t > 0 \Delta_{\mathrm{opt}}>0 Δ opt > 0 and that the procedure converges to this fixed point. By the contraction mapping principle [91 ] , it is enough to show that g g g has a Lipschitz constant strictly below 1 on the interval [ Δ o p t , Δ 0 ] [\Delta_{\mathrm{opt}},\Delta_0] [ Δ opt , Δ 0 ] .
Let us first establish that Δ o p t \Delta_{\mathrm{opt}} Δ opt exists. By (A49), we have that Δ 0 − g ( Δ 0 ) > 0 \Delta_0-g(\Delta_0)>0 Δ 0 − g ( Δ 0 ) > 0 . We will show that there exists Δ > 0 \Delta>0 Δ > 0 such that Δ − g ( Δ ) < 0 \Delta-g(\Delta)<0 Δ − g ( Δ ) < 0 . Because Δ ↦ Δ − g ( Δ ) \Delta\mapsto\Delta-g(\Delta) Δ ↦ Δ − g ( Δ ) is continuous, by the intermediate values theorem it implies that there exists Δ o p t > 0 \Delta_{\mathrm{opt}}>0 Δ opt > 0 such that Δ o p t = g ( Δ o p t ) \Delta_{\mathrm{opt}}=g(\Delta_{\mathrm{opt}}) Δ opt = g ( Δ opt ) . We have
Δ − g ( Δ ) = Δ − a ( Δ ) m Δ − b ( Δ ) m = ( 1 − a ( Δ ) m ) Δ − b ( Δ ) m (88) \Delta-g(\Delta)=\Delta-\frac{a(\Delta)}{m}\Delta-\frac{b(\Delta)}{m}=\left(1-\frac{a(\Delta)}{m}\right)\Delta-\frac{b(\Delta)}{m} \tag*{(88)} Δ − g ( Δ ) = Δ − m a ( Δ ) Δ − m b ( Δ ) = ( 1 − m a ( Δ ) ) Δ − m b ( Δ ) (88)
By our assumption, we know that there exists Δ > 0 \Delta>0 Δ > 0 such that ∣ { i , ∣ c i ∣ > Δ } ∣ > m \lvert\{i,\lvert c_i\rvert>\Delta\}\rvert>m ∣{ i , ∣ c i ∣ > Δ }∣ > m , then for such a Δ \Delta Δ , 1 − a ( Δ ) m < 0 1-\frac{a(\Delta)}{m}<0 1 − m a ( Δ ) < 0 , and the second term in Δ − g ( Δ ) \Delta-g(\Delta) Δ − g ( Δ ) is non positive, which proves that there exists Δ > 0 \Delta>0 Δ > 0 such that Δ − g ( Δ ) < 0 \Delta-g(\Delta)<0 Δ − g ( Δ ) < 0 .
We will now show that the Lipschitz constant of g g g is strictly inferior to 1 in the interval [ Δ o p t , Δ 0 ] [\Delta_{\mathrm{opt}},\Delta_0] [ Δ opt , Δ 0 ] . We know that g g g is piecewise affine continuous, then the Lipschitz constant is upper bounded by the maximum of the slopes. Assume that there exists Δ 1 \Delta_1 Δ 1 such that g g g does not cross the identity line in the interval [ Δ 1 , Δ 0 ] [\Delta_1,\Delta_0] [ Δ 1 , Δ 0 ] (so we have g ( Δ 1 ) < Δ 1 g(\Delta_1)<\Delta_1 g ( Δ 1 ) < Δ 1 ) and that the slope at Δ 1 \Delta_1 Δ 1 is superior to 1. Then for all Δ < Δ 1 \Delta<\Delta_1 Δ < Δ 1 , we have
g ( Δ 1 ) − g ( Δ ) ≥ ℓ ( Δ 1 − Δ ) (89) g(\Delta_1)-g(\Delta)\ge\ell(\Delta_1-\Delta) \tag*{(89)} g ( Δ 1 ) − g ( Δ ) ≥ ℓ ( Δ 1 − Δ ) (89)
where ℓ \ell ℓ is the lower Lipschitz constant, lower bounded by the lowest slope, so ℓ ≥ 1 \ell\ge1 ℓ ≥ 1
Then we have
g ( Δ 1 ) − g ( Δ ) ≥ Δ 1 − Δ (90) g(\Delta_1)-g(\Delta)\ge\Delta_1-\Delta \tag*{(90)} g ( Δ 1 ) − g ( Δ ) ≥ Δ 1 − Δ (90)
Δ − g ( Δ ) ≥ Δ 1 − g ( Δ 1 ) > 0 (91) \Delta-g(\Delta)\ge\Delta_1-g(\Delta_1)>0 \tag*{(91)} Δ − g ( Δ ) ≥ Δ 1 − g ( Δ 1 ) > 0 (91)
We have then shown that for all Δ ≤ Δ 1 \Delta\le\Delta_1 Δ ≤ Δ 1 , g ( Δ ) < Δ g(\Delta)<\Delta g ( Δ ) < Δ so g g g can never cross the identity line. Because we have shown that g g g does cross the identity line at some point, it implies that the Lipschitz constant is strictly below 1 in the interval [ Δ o p t , Δ 0 ] [\Delta_{\mathrm{opt}},\Delta_0] [ Δ opt , Δ 0 ] .
Proposition 1 does not give a bound on the number of necessary iterations to converge, it depends in general on the distribution of coefficients. The process usually reaches the target tolerance within roughly five iterations. The calibration can approximately double the time spent resampling because each iteration requires another pass over the coefficient array. It is worthwhile when resampling dominates the error and less attractive when gate application or merging dominates the runtime.
Semi-deterministic comb resampling
There is little value in repeatedly sampling a coefficient that is almost certain to survive. Semi-deterministic comb resampling therefore divides the Pauli sum into a deterministic head and a stochastic tail. Choose a threshold τ \tau τ and define D D D as the set of indices whose coefficients are deterministically propagated, and T T T as its complement
D = { i : ∣ c i ∣ > τ } , T = D c = { i : ∣ c i ∣ ≤ τ } , (92) D=\{i:\lvert c_i\rvert>\tau\},\qquad T=D^{\mathrm{c}}=\{i:\lvert c_i\rvert\le\tau\}, \tag*{(92)} D = { i : ∣ c i ∣ > τ } , T = D c = { i : ∣ c i ∣ ≤ τ } , (92)
we can also call m d e t m_{\mathrm{det}} m det the number of distinct Paulis supported on D D D , and m s t o c h m_{\mathrm{stoch}} m stoch the number of distinct Paulis that the stochastic part must compress down to
m d e t = ∣ D ∣ , m s t o c h = m − m d e t . (93) m_{\mathrm{det}}=\lvert D\rvert,\qquad m_{\mathrm{stoch}}=m-m_{\mathrm{det}}. \tag*{(93)} m det = ∣ D ∣ , m stoch = m − m det . (93)
Finally we can define the one-norm of the stochastic coefficients as well as the comb size as
W s t o c h = ∑ i ∈ T ∣ c i ∣ , Δ s t o c h = W s t o c h m s t o c h . (94) W_{\mathrm{stoch}}=\sum_{i\in T}\lvert c_i\rvert,\qquad\Delta_{\mathrm{stoch}}=\frac{W_{\mathrm{stoch}}}{m_{\mathrm{stoch}}}. \tag*{(94)} W stoch = i ∈ T ∑ ∣ c i ∣ , Δ stoch = m stoch W stoch . (94)
The coefficients from the resampled Pauli sum are
c ^ i = { c i , i ∈ D , sgn ( c i ) N i Δ s t o c h , i ∈ T , (95) \hat{c}_i=
\begin{cases}
c_i, & i\in D,\\
\operatorname{sgn}(c_i)N_i\Delta_{\mathrm{stoch}}, & i\in T,
\end{cases} \tag*{(95)} c ^ i = { c i , sgn ( c i ) N i Δ stoch , i ∈ D , i ∈ T , (95)
where the counts N i N_i N i for the smaller ∣ c i ∣ \lvert c_i\rvert ∣ c i ∣ are generated via comb sampling described in the previous Appendix A 2 c. The larger coefficients are exact, while the coefficients in the tail remain unbiased. A safe and cheap choice sets τ \tau τ from m m m alone,
τ = W m , (96) \tau= \frac{W}{m}, \tag*{(96)} τ = m W , (96)
which guarantees that fewer than m m m terms are kept deterministically, since k k k coefficients above W / m W/m W / m would already carry a one norm of at least k W / m kW/m k W / m .
Once the large coefficients are removed, most Pauli strings in the tail receive either zero or one tooth. The uncalibrated tail comb therefore lands close to the desired number of stored Pauli strings, which removes most of the benefit of the iterative calibration. One may lower τ \tau τ to use still more of the available memory, but percentile-based thresholds require either an expensive global selection or a noisy estimate from a subset of coefficients.
Residual resampling [73 ] is a related construction. It assigns the integer part of every ideal multiplicity deterministically and samples only the residual probabilities. It likewise concentrates randomness in the part of the Pauli sum that cannot be allocated exactly. Which variant is fastest depends on the coefficient distribution and the target hardware, particularly on whether scans, sorting, and random-number generation are cheap relative to gate application.
Theoretical analysis of the errors of Monte Carlo Pauli Propagation.
In this section we present different results and theorems that help explain the numerical results.
Summary of results and overview of proof strategies
We start by showing that the error of the simple path sampling method can blow up exponentially. We do so by analyzing an example of a Trotter circuit of a TFIM (Example 1) where we give an exponential lower bound of the variance. We then derive a general formulation of the mean square error of the estimator obtained after sampling in Lemma 1. This lemma will be the starting point of all the future error analysis. In Theorem 1, we derive an upper bound of the mean square error of the one-norm sampling estimator without any truncation. It grows quadratically with the one norm of the Pauli sum at each layer. In Theorem 2, we show how the bound of Theorem 1 is modified when one introduces deterministic truncation before sampling. The error can be upper bounded by the same bound as in the case without truncation, but with a modified one norm, to which is added a bias term depending on the truncation. In Result 3, we propose a phenomenology model to explain the results observed in Figure 7 , by making assumptions on the behavior of the one-norm and the discarded one-norm after truncation. We then explain the errors of comb sampling and comb sampling with truncation observed in Figure 3 by deriving similar error bounds in results 4 and 5. We present these as results and not as theorems because we make technical assumptions that we cannot guarantee will universally hold. All the bounds derived so far are controlled by the number of raw draws m s m_s m s , whereas the memory only holds the number m p m_p m p of distinct Pauli strings. The two differ because repeated draws are merged, and how much they differ depends on how peaked the coefficient distribution is. We analyze this in Result 7.
Variance of the path sampling estimator
In this section, we will illustrate in an example why the simple path sampling estimator produces an error that scales exponentially with depth by computing a lower bound.
Example 1 (Exponential lower bound in the variance of path-sampling). Consider the task of estimating the expectation value f = Tr [ ∣ 0 ⟩ ⟨ 0 ∣ U ( θ ) Z 1 U ( θ ) † ] f = \operatorname{Tr}[\lvert0\rangle\langle0\rvert U(\theta) Z_1 U(\theta)^\dagger] f = Tr [∣ 0 ⟩ ⟨ 0 ∣ U ( θ ) Z 1 U ( θ ) † ] , where the unitary matrix corresponds to local X X X rotations and two-qubit Z Z ZZ Z Z rotations, the Z Z ZZ Z Z having a locally connected topology denoted by a set of edges E E E (like a square lattice) in which qubit 1 has degree d ≥ 1 d \ge1 d ≥ 1 ,
U ( θ ) = ( ∏ i = 1 n R X ( i ) ( θ 1 ) ∏ ( i , j ) ∈ E R Z Z ( i , j ) ( θ 2 ) ) L (97) U(\theta) = \left(\prod_{i=1}^{n} R_X^{(i)}(\theta_1) \prod_{(i,j)\in E} R_{ZZ}^{(i,j)}(\theta_2)\right)^L \tag*{(97)} U ( θ ) = i = 1 ∏ n R X ( i ) ( θ 1 ) ( i , j ) ∈ E ∏ R Z Z ( i , j ) ( θ 2 ) L (97)
where we note that all the X X X rotations share the same parameter θ 1 \theta_1 θ 1 , as well as θ 2 \theta_2 θ 2 for the Z Z ZZ Z Z , with 0 < θ 1 , θ 2 < π / 4 0 < \theta_1, \theta_2 < \pi/4 0 < θ 1 , θ 2 < π /4 , and that L ≥ 2 L \ge2 L ≥ 2 . Then if f ^ \hat{f} f ^ is the path-sampling estimator of f f f built from N N N independent paths, as described in Appendix § 2.1.1 .1, and N N N is held fixed, there exist a constant γ > 1 \gamma> 1 γ > 1 and a depth L 0 L_0 L 0 such that the variance of f ^ \hat{f} f ^ is lower bounded as
Var [ f ^ ] ≥ γ L (98) \operatorname{Var}[\hat{f}] \ge\gamma^{L} \tag*{(98)} Var [ f ^ ] ≥ γ L (98)
for every L ≥ L 0 L \ge L_0 L ≥ L 0 . One may take any γ \gamma γ with 1 < γ < A 2 2 1 < \gamma< A_2^2 1 < γ < A 2 2 , where A 2 = ∣ cos θ 2 ∣ + ∣ sin θ 2 ∣ A_2 = |\cos\theta_2| + |\sin\theta_2| A 2 = ∣ cos θ 2 ∣ + ∣ sin θ 2 ∣ ; the rate is therefore set by the degree d d d of qubit 1.
Proof. We are trying to estimate Tr [ ∣ 0 ⟩ ⟨ 0 ∣ U Z 1 U † ] \operatorname{Tr}[|0\rangle\langle0|UZ_1U^\dagger] Tr [ ∣0 ⟩ ⟨ 0∣ U Z 1 U † ] of a system of n n n qubits with path sampling, as described in Appendix § 2.1.1 .1.
Recall that path sampling obtains f ^ \hat{f} f ^ the estimator of f f f , by propagating one Pauli, that gets randomly chosen at each new unitary according to the magnitude of its transition amplitudes, as described in Eq. (35) . Recalling Eq. (38) , we find that the estimator f ^ \hat{f} f ^ can be written as
f ^ = 1 N ∑ i = 1 N Tr [ c ^ P K ( i ) P K ( i ) ∣ 0 ⟩ ⟨ 0 ∣ ] , c ^ P K = ∏ k = 1 K sgn ( a P k − 1 → P k ) A k ( P k − 1 ) (99) \hat{f} = \frac{1}{N}\sum_{i=1}^{N}\operatorname{Tr}\left[\hat{c}_{P_K}^{(i)}P_K^{(i)}|0\rangle\langle0|\right], \qquad\hat{c}_{P_K} = \prod_{k=1}^{K}\operatorname{sgn}\left(a_{P_{k-1}\to P_k}\right)A_k(P_{k-1}) \tag*{(99)} f ^ = N 1 i = 1 ∑ N Tr [ c ^ P K ( i ) P K ( i ) ∣0 ⟩ ⟨ 0∣ ] , c ^ P K = k = 1 ∏ K sgn ( a P k − 1 → P k ) A k ( P k − 1 ) (99)
where the sum on i i i denotes the different number of runs.
To compute the variance of such estimator we define the notion of Pauli paths. A path can be used to model the evolution of a Pauli along the circuit, and is represented as a vector Φ ∈ { − 1 , 0 , 1 } K \Phi\in\{-1,0,1\}^{K} Φ ∈ { − 1 , 0 , 1 } K , where K K K is the total number of gates. We write ϑ k \vartheta_k ϑ k for the rotation angle of gate k k k , so that ϑ k ∈ { θ 1 , θ 2 } \vartheta_k \in\{\theta_1,\theta_2\} ϑ k ∈ { θ 1 , θ 2 } depending on whether gate k k k is an R X R_X R X or an R Z Z R_{ZZ} R Z Z rotation; the separate symbol avoids a clash between the gate index and the two rotation-type labels. The entries of Φ \Phi Φ are
Φ k = 0 \Phi_k = 0 Φ k = 0 if the gate k k k commutes with P k − 1 P_{k-1} P k − 1
Φ k = 1 \Phi_k = 1 Φ k = 1 if P k − 1 P_{k-1} P k − 1 is chosen with probability ∣ cos ϑ k ∣ ∣ cos ϑ k ∣ + ∣ sin ϑ k ∣ \frac{|\cos\vartheta_k|}{|\cos\vartheta_k|+|\sin\vartheta_k|} ∣ c o s ϑ k ∣ + ∣ s i n ϑ k ∣ ∣ c o s ϑ k ∣
Φ k = − 1 \Phi_k = -1 Φ k = − 1 if i [ P k − 1 , Q k ] / 2 i[P_{k-1},Q_k]/2 i [ P k − 1 , Q k ] /2 is chosen with probability ∣ sin ϑ k ∣ ∣ cos ϑ k ∣ + ∣ sin ϑ k ∣ \frac{|\sin\vartheta_k|}{|\cos\vartheta_k|+|\sin\vartheta_k|} ∣ c o s ϑ k ∣ + ∣ s i n ϑ k ∣ ∣ s i n ϑ k ∣
where basically we see that a path “stores” the history of the Pauli when using the path sampling strategy. We note the final coefficient and Pauli associated to Φ \Phi Φ as c ( Φ ) c(\Phi) c ( Φ ) and P Φ P_\Phi P Φ . Because a path is a probabilistic outcome, it can be associated with a probability p ( Φ ) p(\Phi) p ( Φ ) , and its contribution to the final estimator is w ( Φ ) = c ( Φ ) Tr [ P Φ ∣ 0 ⟩ ⟨ 0 ∣ ] w(\Phi) = c(\Phi)\operatorname{Tr}[P_\Phi|0\rangle\langle0|] w ( Φ ) = c ( Φ ) Tr [ P Φ ∣0 ⟩ ⟨ 0∣ ] , which is nonzero only if P Φ ∈ { I , Z } n P_\Phi\in\{I,Z\}^n P Φ ∈ { I , Z } n . We have for a path ending in { I , Z } n \{I,Z\}^n { I , Z } n , the w ( Φ ) w(\Phi) w ( Φ ) is:
∣ w ( Φ ) ∣ = ∏ k = 1 K A k ( P k − 1 ) = ∏ k = 1 K ( ∣ cos ϑ k ∣ + ∣ sin ϑ k ∣ ) ∣ Φ k ∣ (100) |w(\Phi)| = \prod_{k=1}^{K} A_k(P_{k-1}) = \prod_{k=1}^{K}\left(|\cos\vartheta_k|+|\sin\vartheta_k|\right)^{|\Phi_k|} \tag*{(100)} ∣ w ( Φ ) ∣ = k = 1 ∏ K A k ( P k − 1 ) = k = 1 ∏ K ( ∣ cos ϑ k ∣ + ∣ sin ϑ k ∣ ) ∣ Φ k ∣ (100)
with an associated probability
p ( Φ ) = ∏ k = 1 K ( ∣ cos ϑ k ∣ ∣ cos ϑ k ∣ + ∣ sin ϑ k ∣ ) I { Φ k = 1 } ( ∣ sin ϑ k ∣ ∣ cos ϑ k ∣ + ∣ sin ϑ k ∣ ) I { Φ k = − 1 } (101) p(\Phi) = \prod_{k=1}^{K}\left(\frac{|\cos\vartheta_k|}{|\cos\vartheta_k|+|\sin\vartheta_k|}\right)^{\mathbb{I}\{\Phi_k=1\}}\left(\frac{|\sin\vartheta_k|}{|\cos\vartheta_k|+|\sin\vartheta_k|}\right)^{\mathbb{I}\{\Phi_k=-1\}} \tag*{(101)} p ( Φ ) = k = 1 ∏ K ( ∣ cos ϑ k ∣ + ∣ sin ϑ k ∣ ∣ cos ϑ k ∣ ) I { Φ k = 1 } ( ∣ cos ϑ k ∣ + ∣ sin ϑ k ∣ ∣ sin ϑ k ∣ ) I { Φ k = − 1 } (101)
We used the fact that if for an index k k k , Φ k = 0 \Phi_k = 0 Φ k = 0 , then P k = P k − 1 P_k = P_{k-1} P k = P k − 1 deterministically and A k ( P k − 1 ) = 1 A_k(P_{k-1}) = 1 A k ( P k − 1 ) = 1 . If ∣ Φ k ∣ = 1 |\Phi_k| = 1 ∣ Φ k ∣ = 1 , then A k ( P k − 1 ) = ∣ cos ϑ k ∣ + ∣ sin ϑ k ∣ A_k(P_{k-1}) = |\cos\vartheta_k| + |\sin\vartheta_k| A k ( P k − 1 ) = ∣ cos ϑ k ∣ + ∣ sin ϑ k ∣ and the corresponding probability depends on the sign of Φ k \Phi_k Φ k .
Let Y Y Y denote the contribution of a single sampled path, that is, the random variable that takes the value w ( Φ ) w(\Phi) w ( Φ ) when the path Φ \Phi Φ is sampled, so that the estimator of Eq. (99) reads f ^ = 1 N ∑ i = 1 N Y i \hat{f} = \frac{1}{N}\sum_{i=1}^{N}Y_i f ^ = N 1 ∑ i = 1 N Y i with Y 1 , … , Y N Y_1,\ldots,Y_N Y 1 , … , Y N independent copies of Y Y Y . We use a separate letter here because W W W denotes the one norm everywhere else in this appendix. The second moment of Y Y Y is
E [ Y 2 ] = ∑ Φ w ( Φ ) 2 p ( Φ ) = ∑ Φ : P Φ ∈ { I , Z } n ∣ w ( Φ ) ∣ ∏ k = 1 K ∣ cos ϑ k ∣ I { Φ k = 1 } ∣ sin ϑ k ∣ I { Φ k = − 1 } , (102) \begin{aligned}
\mathbb{E}[Y^2] = \sum_{\Phi} w(\Phi)^2p(\Phi) \\
&= \sum_{\Phi:P_\Phi\in\{I,Z\}^{n}} |w(\Phi)|\prod_{k=1}^{K}|\cos\vartheta_k|^{\mathbb{I}\{\Phi_k=1\}}|\sin\vartheta_k|^{\mathbb{I}\{\Phi_k=-1\}}, \tag*{(102)}
\end{aligned} E [ Y 2 ] = Φ ∑ w ( Φ ) 2 p ( Φ ) = Φ : P Φ ∈ { I , Z } n ∑ ∣ w ( Φ ) ∣ k = 1 ∏ K ∣ cos ϑ k ∣ I { Φ k = 1 } ∣ sin ϑ k ∣ I { Φ k = − 1 } , (102)
where we used Eqs. (100) and (101) to cancel one factor of A k ( P k − 1 ) A_k(P_{k-1}) A k ( P k − 1 ) per gate between w ( Φ ) 2 w(\Phi)^2 w ( Φ ) 2 and p ( Φ ) p(\Phi) p ( Φ ) . The sum may be restricted to the paths ending in { I , Z } n \{I,Z\}^n { I , Z } n because every other path has w ( Φ ) = 0 w(\Phi)=0 w ( Φ ) = 0 , and Eq. (100) holds precisely on that set.
We lower bound the second moment of Eq. (102) by restricting the sum to a particular family of paths, which is legitimate because every term in that sum is nonnegative. Recall that the propagation starts from P 0 = Z 1 P_0 = Z_1 P 0 = Z 1 , and that expanding the product of Eq. (97) in the conjugation U ( θ ) Z 1 U ( θ ) † U(\theta)Z_1U(\theta)^\dagger U ( θ ) Z 1 U ( θ ) † makes the R Z Z R_{ZZ} R Z Z rotations of a given layer act on the running Pauli string before the R X R_X R X rotations of the same layer. Since L ≥ 2 L \ge2 L ≥ 2 , the first and the last R X R_X R X rotation acting on qubit 1 are distinct gates, and we may consider the paths satisfying the following conditions:
At the first noncommuting R X R_X R X rotation acting on qubit 1, the path takes direction − 1 -1 − 1 . This transforms Z 1 Z_1 Z 1 into Y 1 Y_1 Y 1 , up to an irrelevant sign.
At every noncommuting R X R_X R X rotation other than the two singled out in conditions 1 and 4, whether it acts on qubit 1 or on one of its neighbours and whether it precedes or follows them within its layer, the path takes direction + 1 +1 + 1 , so that the current Pauli string is left unchanged. We refer to these as the intermediate rotations.
Among the R Z Z R_{ZZ} R Z Z rotations acting on qubit 1, the path takes direction − 1 -1 − 1 an even number of times. The Pauli string at the end is equal to Y 1 ⊗ Q Y_1 \otimes Q Y 1 ⊗ Q where Q ∈ { I , Z } ⊗ n − 1 Q \in\{I,Z\}^{\otimes n-1} Q ∈ { I , Z } ⊗ n − 1 .
At the last R X R_X R X rotation acting on qubit 1, the path again takes direction − 1 -1 − 1 . The Pauli string at the end is in { I , Z } ⊗ n \{I,Z\}^{\otimes n} { I , Z } ⊗ n .
In each of the remaining L − 1 L-1 L − 1 layers, qubit 1 carries X X X or Y Y Y while all of its neighbours carry I I I or Z Z Z , so each of the d d d incident edges hosts a rotation that anticommutes with the string, and therefore one can choose 2 k 2k 2 k times direction − 1 -1 − 1 among n Z Z = d ( L − 1 ) n_{ZZ}=d(L-1) n Z Z = d ( L − 1 ) possible gates. All other R X R_X R X rotations take the direction 1 1 1 , and we note their number r ( Φ ) r(\Phi) r ( Φ ) . Denote by A a = ∣ cos θ a ∣ + ∣ sin θ a ∣ A_a = |\cos\theta_a| + |\sin\theta_a| A a = ∣ cos θ a ∣ + ∣ sin θ a ∣ , a ∈ { 1 , 2 } a \in\{1,2\} a ∈ { 1 , 2 } so that A 1 A_1 A 1 multiplies ∣ w ( Φ ) ∣ |w(\Phi)| ∣ w ( Φ ) ∣ at every noncommuting R X R_X R X rotation and A 2 A_2 A 2 at every noncommuting R Z Z R_{ZZ} R Z Z rotation, in Eq. (100) . Collecting the factors of Eq. (100) and Eq. (101) gate by gate, its contribution to Eq. (102) is
w ( Φ ) 2 p ( Φ ) = ( A 1 ∣ sin θ 1 ∣ ) 2 ( A 1 ∣ cos θ 1 ∣ ) r ( Φ ) A 2 n Z Z ∣ sin θ 2 ∣ 2 k ∣ cos θ 2 ∣ n Z Z − 2 k , (103) w(\Phi)^2p(\Phi) = (A_1|\sin\theta_1|)^2(A_1|\cos\theta_1|)^{r(\Phi)} A_2^{n_{ZZ}}|\sin\theta_2|^{2k}|\cos\theta_2|^{n_{ZZ}-2k}, \tag*{(103)} w ( Φ ) 2 p ( Φ ) = ( A 1 ∣ sin θ 1 ∣ ) 2 ( A 1 ∣ cos θ 1 ∣ ) r ( Φ ) A 2 n Z Z ∣ sin θ 2 ∣ 2 k ∣ cos θ 2 ∣ n Z Z − 2 k , (103)
where the first factor collects the two direction-(− 1 -1 − 1 ) choices of conditions 1 and 4, the second the r ( Φ ) r(\Phi) r ( Φ ) direction-(+1) choices of condition 2, and the last three the n Z Z n_{ZZ} n Z Z noncommuting R Z Z R_{ZZ} R Z Z rotations of condition 3. The one-norm factors satisfy A 1 , 2 > 1 A_{1,2} > 1 A 1 , 2 > 1 for every θ 1 , 2 \theta_{1,2} θ 1 , 2 that is not a multiple of π / 2 \pi/2 π /2 . The restriction 0 < θ 1 < π / 4 0 < \theta_1 < \pi/4 0 < θ 1 < π /4 is what makes the intermediate factors harmless as well, since then
A 1 ∣ cos θ 1 ∣ = cos 2 θ 1 + ∣ sin θ 1 cos θ 1 ∣ = 1 + cos 2 θ 1 + ∣ sin 2 θ 1 ∣ 2 > 1 , (104) A_1|\cos\theta_1| = \cos^2\theta_1 + |\sin\theta_1\cos\theta_1| = \frac{1+\cos2\theta_1+|\sin2\theta_1|}{2} > 1, \tag*{(104)} A 1 ∣ cos θ 1 ∣ = cos 2 θ 1 + ∣ sin θ 1 cos θ 1 ∣ = 2 1 + cos 2 θ 1 + ∣ sin 2 θ 1 ∣ > 1 , (104)
so that each of the r ( Φ ) r(\Phi) r ( Φ ) intermediate factors is at least one and may be omitted when deriving a lower bound. Since A 1 > 1 A_1 > 1 A 1 > 1 as well, Eq. (103) gives
w ( Φ ) 2 p ( Φ ) ≥ ∣ sin θ 1 ∣ 2 A 2 n Z Z ∣ sin θ 2 ∣ 2 k ∣ cos θ 2 ∣ n Z Z − 2 k . (105) w(\Phi)^2p(\Phi) \ge|\sin\theta_1|^2 A_2^{n_{ZZ}}|\sin\theta_2|^{2k}|\cos\theta_2|^{n_{ZZ}-2k}. \tag*{(105)} w ( Φ ) 2 p ( Φ ) ≥ ∣ sin θ 1 ∣ 2 A 2 n Z Z ∣ sin θ 2 ∣ 2 k ∣ cos θ 2 ∣ n Z Z − 2 k . (105)
Distinct paths of the family differ in which of the n Z Z n_{ZZ} n Z Z noncommuting incident R Z Z R_{ZZ} R Z Z rotations take direction − 1 -1 − 1 , and there are ( n Z Z 2 k ) \binom{n_{ZZ}}{2k} ( 2 k n Z Z ) ways of selecting 2 k 2k 2 k of them. Keeping only these paths in Eq. (102) and inserting Eq. (105) therefore yields
E [ Y 2 ] ≥ ∣ sin θ 1 ∣ 2 A 2 n Z Z ∑ k = 0 ⌊ n Z Z / 2 ⌋ ( n Z Z 2 k ) ∣ sin θ 2 ∣ 2 k ∣ cos θ 2 ∣ n Z Z − 2 k . (106) \mathbb{E}[Y^2] \ge|\sin\theta_1|^2 A_2^{n_{ZZ}} \sum_{k=0}^{\lfloor n_{ZZ}/2\rfloor} \binom{n_{ZZ}}{2k} |\sin\theta_2|^{2k}|\cos\theta_2|^{n_{ZZ}-2k}. \tag*{(106)} E [ Y 2 ] ≥ ∣ sin θ 1 ∣ 2 A 2 n Z Z k = 0 ∑ ⌊ n Z Z /2 ⌋ ( 2 k n Z Z ) ∣ sin θ 2 ∣ 2 k ∣ cos θ 2 ∣ n Z Z − 2 k . (106)
The even part of a binomial expansion resumes to
∑ k = 0 ⌊ n Z Z / 2 ⌋ ( n Z Z 2 k ) x 2 k y n Z Z − 2 k = ( y + x ) n Z Z + ( y − x ) n Z Z 2 , (107) \sum_{k=0}^{\lfloor n_{ZZ}/2\rfloor} \binom{n_{ZZ}}{2k}x^{2k}y^{n_{ZZ}-2k} = \frac{(y+x)^{n_{ZZ}}+(y-x)^{n_{ZZ}}}{2}, \tag*{(107)} k = 0 ∑ ⌊ n Z Z /2 ⌋ ( 2 k n Z Z ) x 2 k y n Z Z − 2 k = 2 ( y + x ) n Z Z + ( y − x ) n Z Z , (107)
as follows by adding the expansions of ( y + x ) n Z Z (y+x)^{n_{ZZ}} ( y + x ) n Z Z and ( y − x ) n Z Z (y-x)^{n_{ZZ}} ( y − x ) n Z Z , in which the odd powers of x x x cancel pairwise. Setting x = ∣ sin θ 2 ∣ x=|\sin\theta_2| x = ∣ sin θ 2 ∣ and y = ∣ cos θ 2 ∣ y=|\cos\theta_2| y = ∣ cos θ 2 ∣ , we obtain
E [ Y 2 ] ≥ ∣ sin θ 1 ∣ 2 ( ∣ cos θ 2 ∣ + ∣ sin θ 2 ∣ ) n Z Z ( ∣ cos θ 2 ∣ + ∣ sin θ 2 ∣ ) n Z Z + ( ∣ cos θ 2 ∣ − ∣ sin θ 2 ∣ ) n Z Z 2 (108) \mathbb{E}[Y^2] \ge|\sin\theta_1|^2(|\cos\theta_2|+|\sin\theta_2|)^{n_{ZZ}} \frac{(|\cos\theta_2|+|\sin\theta_2|)^{n_{ZZ}}+(|\cos\theta_2|-|\sin\theta_2|)^{n_{ZZ}}}{2} \tag*{(108)} E [ Y 2 ] ≥ ∣ sin θ 1 ∣ 2 ( ∣ cos θ 2 ∣ + ∣ sin θ 2 ∣ ) n Z Z 2 ( ∣ cos θ 2 ∣ + ∣ sin θ 2 ∣ ) n Z Z + ( ∣ cos θ 2 ∣ − ∣ sin θ 2 ∣ ) n Z Z (108)
≥ ∣ sin θ 1 ∣ 2 2 ( ∣ cos θ 2 ∣ + ∣ sin θ 2 ∣ ) 2 n Z Z = ∣ sin θ 1 ∣ 2 2 ( ∣ cos θ 2 ∣ + ∣ sin θ 2 ∣ ) 2 d ( L − 1 ) . (109) \ge\frac{|\sin\theta_1|^2}{2}(|\cos\theta_2|+|\sin\theta_2|)^{2n_{ZZ}} = \frac{|\sin\theta_1|^2}{2}(|\cos\theta_2|+|\sin\theta_2|)^{2d(L-1)}. \tag*{(109)} ≥ 2 ∣ sin θ 1 ∣ 2 ( ∣ cos θ 2 ∣ + ∣ sin θ 2 ∣ ) 2 n Z Z = 2 ∣ sin θ 1 ∣ 2 ( ∣ cos θ 2 ∣ + ∣ sin θ 2 ∣ ) 2 d ( L − 1 ) . (109)
where in the second line we discarded ( ∣ cos θ 2 ∣ − ∣ sin θ 2 ∣ ) n Z Z (\lvert\cos\theta_2\rvert-\lvert\sin\theta_2\rvert)^{n_{ZZ}} (∣ cos θ 2 ∣ − ∣ sin θ 2 ∣ ) n Z Z , and in the last equality we substituted n Z Z = d ( L − 1 ) n_{ZZ}=d(L-1) n Z Z = d ( L − 1 ) . Since ( ∣ cos θ 2 ∣ + ∣ sin θ 2 ∣ ) > 1 (\lvert\cos\theta_2\rvert+\lvert\sin\theta_2\rvert)>1 (∣ cos θ 2 ∣ + ∣ sin θ 2 ∣) > 1 for 0 < ∣ θ 1 , 2 ∣ < π / 4 0<\lvert\theta_{1,2}\rvert<\pi/4 0 < ∣ θ 1 , 2 ∣ < π /4 , the second moment of a single-path contribution grows exponentially with the number of layers L L L .
Finally, path sampling is unbiased by Eq. (37) , so E [ Y ] = f \mathbb{E}[Y]=f E [ Y ] = f , and f f f is the expectation value of a Pauli operator, so ∣ f ∣ ≤ 1 \lvert f\rvert\le1 ∣ f ∣ ≤ 1 . The variance of a single-path contribution therefore obeys
Var [ Y ] = E [ Y 2 ] − f 2 ≥ ∣ sin θ 1 ∣ 2 2 ( ( ∣ cos θ 2 ∣ + ∣ sin θ 2 ∣ ) 2 d ( L − 1 ) − 1 ) . (110) \operatorname{Var}[Y]=\mathbb{E}[Y^2]-f^2\ge\frac{\lvert\sin\theta_1\rvert^2}{2}\left((\lvert\cos\theta_2\rvert+\lvert\sin\theta_2\rvert)^{2d(L-1)}-1\right). \tag*{(110)} Var [ Y ] = E [ Y 2 ] − f 2 ≥ 2 ∣ sin θ 1 ∣ 2 ( (∣ cos θ 2 ∣ + ∣ sin θ 2 ∣ ) 2 d ( L − 1 ) − 1 ) . (110)
The N N N paths entering Eq. (99) are independent and identically distributed, hence
Var [ f ^ ] = Var [ Y ] N ≥ 1 N [ ∣ sin θ 1 ∣ 2 2 ( ∣ cos θ 2 ∣ + ∣ sin θ 2 ∣ ) 2 d ( L − 1 ) − 1 ] . (111) \operatorname{Var}[\hat{f}]=\frac{\operatorname{Var}[Y]}{N}\ge\frac{1}{N}\left[\frac{\lvert\sin\theta_1\rvert^2}{2}(\lvert\cos\theta_2\rvert+\lvert\sin\theta_2\rvert)^{2d(L-1)}-1\right]. \tag*{(111)} Var [ f ^ ] = N Var [ Y ] ≥ N 1 [ 2 ∣ sin θ 1 ∣ 2 (∣ cos θ 2 ∣ + ∣ sin θ 2 ∣ ) 2 d ( L − 1 ) − 1 ] . (111)
For a fixed number of paths N N N , the right hand side grows exponentially in the circuit depth L L L . Equivalently, for every constant γ \gamma γ with 1 < γ < A 2 d 1<\gamma<A_2^d 1 < γ < A 2 d the ratio ( A 2 2 d / γ ) L (A_2^{2d}/\gamma)^L ( A 2 2 d / γ ) L diverges, so there exists an L 0 L_0 L 0 such that
Var [ f ^ ] ≥ γ L (112) \operatorname{Var}[\hat{f}]\ge\gamma^L \tag*{(112)} Var [ f ^ ] ≥ γ L (112)
for every L ≥ L 0 L\ge L_0 L ≥ L 0 , which is the statement of Eq. (98) .
Layered propagation and the exact error recursion
In this subsection we present a general lemma that can be used to compute the MSE of a propagated observable.
Lemma 1 (General MSE formula for layered propagation). Let a unitary circuit U U U of L L L gates be U = U L ⋯ U 2 U 1 U=U_L\cdots U_2U_1 U = U L ⋯ U 2 U 1 and define the state after j j j forward layers by ρ j = U j ⋯ U 1 ρ U 1 † ⋯ U j † \rho_j=U_j\cdots U_1\rho U_1^\dagger\cdots U_j^\dagger ρ j = U j ⋯ U 1 ρ U 1 † ⋯ U j † , likewise, define the back-propagated observable after k k k layers as O k = U L − k + 1 † ⋯ U L † O U L ⋯ U L − k + 1 = ∑ i c i ( k ) P i O_k=U_{L-k+1}^\dagger\cdots U_L^\dagger O U_L\cdots U_{L-k+1}=\sum_i c_i^{(k)}P_i O k = U L − k + 1 † ⋯ U L † O U L ⋯ U L − k + 1 = ∑ i c i ( k ) P i , so that O 0 = O O_0=O O 0 = O and O L = U † O U O_L=U^\dagger O U O L = U † O U , with f = Tr [ ρ U † O U ] f=\operatorname{Tr}[\rho U^\dagger O U] f = Tr [ ρ U † O U ] , then, if compression is applied at the layers of a subset R ⊆ { 1 , … , L } \mathcal{R}\subseteq\{1,\ldots,L\} R ⊆ { 1 , … , L } , the mean squared error after L L L layers is
MSE [ f ^ ] = E [ ( ∑ k ∈ R ∑ i δ c i ( k ) Tr [ ρ L − k P i ] ) 2 ] , (113) \operatorname{MSE}[\hat{f}]=\mathbb{E}\left[\left(\sum_{k\in\mathcal{R}}\sum_i\delta c_i^{(k)}\operatorname{Tr}[\rho_{L-k}P_i]\right)^2\right], \tag*{(113)} MSE [ f ^ ] = E ( k ∈ R ∑ i ∑ δ c i ( k ) Tr [ ρ L − k P i ] ) 2 , (113) where δ c j ( k + 1 ) = c ^ j ( k + 1 ) − c j ( k + 1 ) \delta c_j^{(k+1)}=\hat{c}_j^{(k+1)}-c_j^{(k+1)} δ c j ( k + 1 ) = c ^ j ( k + 1 ) − c j ( k + 1 ) is the error due to compression at step k + 1 k+1 k + 1 .
Proof. Write the circuit as U = U L ⋯ U 2 U 1 U=U_L\cdots U_2U_1 U = U L ⋯ U 2 U 1 and define the state after j j j forward layers by
ρ j = U j ⋯ U 1 ρ U 1 † ⋯ U j † . (114) \rho_j=U_j\cdots U_1\rho U_1^\dagger\cdots U_j^\dagger. \tag*{(114)} ρ j = U j ⋯ U 1 ρ U 1 † ⋯ U j † . (114)
Similarly, we can define the backward-propagated observable after k k k layers to be
O k = U L − k + 1 † ⋯ U L † O U L ⋯ U L − k + 1 = ∑ i c i ( k ) P i , (115) O_k=U_{L-k+1}^\dagger\cdots U_L^\dagger O U_L\cdots U_{L-k+1}=\sum_i c_i^{(k)}P_i, \tag*{(115)} O k = U L − k + 1 † ⋯ U L † O U L ⋯ U L − k + 1 = i ∑ c i ( k ) P i , (115)
where c i ( k ) c_i^{(k)} c i ( k ) represents the coefficient of the P i P_i P i Pauli, with k k k representing the layer. Then the expectation value of O k O_k O k and a general ρ \rho ρ can be written as
Tr [ ρ O k ] = ∑ i c i ( k ) Tr [ ρ P i ] . (116) \operatorname{Tr}[\rho O_k]=\sum_i c_i^{(k)}\operatorname{Tr}[\rho P_i]. \tag*{(116)} Tr [ ρ O k ] = i ∑ c i ( k ) Tr [ ρ P i ] . (116)
Our randomized algorithm stores estimates of c i ( k ) c_i^{(k)} c i ( k ) instead. Indeed, we have O ^ k = ∑ i c ^ i ( k ) P i \hat{O}_k=\sum_i\hat{c}_i^{(k)}P_i O ^ k = ∑ i c ^ i ( k ) P i . To be able to find a general expression for the error, we need to find a recursion step that allows us to go from layer k k k to layer k + 1 k+1 k + 1 , and we can do so as follows
U L − k † P i U L − k = ∑ j a i j ( k + 1 ) P j . (117) U_{L-k}^\dagger P_iU_{L-k}=\sum_j a_{ij}^{(k+1)}P_j. \tag*{(117)} U L − k † P i U L − k = j ∑ a ij ( k + 1 ) P j . (117)
Then, if we propagate the current random coefficients, obtained by using the randomized compression algorithm, exactly through layer k + 1 k+1 k + 1 , the resulting coefficients would be
c j ( k + 1 ) = ∑ i c i ( k ) a i j ( k + 1 ) , (118) c_{j}^{(k+1)} = \sum_i c_i^{(k)} a_{ij}^{(k+1)}, \tag*{(118)} c j ( k + 1 ) = i ∑ c i ( k ) a ij ( k + 1 ) , (118)
where we note that we do not use c ^ j ( k + 1 ) \hat{c}_{j}^{(k+1)} c ^ j ( k + 1 ) as this is an exact propagation from the previous c ^ i ( k ) \hat{c}_{i}^{(k)} c ^ i ( k ) . It is the same notation as the true expansion defined in Eq. (116) that we will keep for simplicity for the rest of the paper unless explicitly stated otherwise.
After compression, we can write the stored coefficient as the exact propagated coefficient c j ( k + 1 ) c_{j}^{(k+1)} c j ( k + 1 ) and a perturbation due to the randomness or truncation δ c j ( k + 1 ) \delta c_{j}^{(k+1)} δ c j ( k + 1 )
c ^ j ( k + 1 ) = c j ( k + 1 ) + δ c j ( k + 1 ) . (119) \hat{c}_{j}^{(k+1)} = c_{j}^{(k+1)} + \delta c_{j}^{(k+1)}. \tag*{(119)} c ^ j ( k + 1 ) = c j ( k + 1 ) + δ c j ( k + 1 ) . (119)
Therefore, when propagating from step k k k to step k + 1 k+1 k + 1 , the running estimate Tr [ ρ L − k O ^ k ] \operatorname{Tr}[\rho_{L-k}\hat{O}_{k}] Tr [ ρ L − k O ^ k ] of f = Tr [ ρ U † O U ] f = \operatorname{Tr}[\rho U^{\dagger}OU] f = Tr [ ρ U † O U ] transforms as
∑ i c ^ i ( k ) Tr [ ρ L − k P i ] = ∑ j c j ( k + 1 ) Tr [ ρ L − k − 1 P j ] (120) \sum_i \hat{c}_i^{(k)} \operatorname{Tr}[\rho_{L-k}P_i] = \sum_j c_j^{(k+1)} \operatorname{Tr}[\rho_{L-k-1}P_j] \tag*{(120)} i ∑ c ^ i ( k ) Tr [ ρ L − k P i ] = j ∑ c j ( k + 1 ) Tr [ ρ L − k − 1 P j ] (120)
= ∑ j ( c ^ j ( k + 1 ) − δ c j ( k + 1 ) ) Tr [ ρ L − k − 1 P j ] (121) = \sum_j \left(\hat{c}_j^{(k+1)} - \delta c_j^{(k+1)}\right) \operatorname{Tr}[\rho_{L-k-1}P_j] \tag*{(121)} = j ∑ ( c ^ j ( k + 1 ) − δ c j ( k + 1 ) ) Tr [ ρ L − k − 1 P j ] (121)
where in the first identity we used the map in Eq. (117) , and in the second we used Eq. (119) to write the propagated coefficient as a function of the estimated coefficient and the error. By rearranging this sum, we can find
∑ j c ^ j ( k + 1 ) Tr [ ρ L − k − 1 P j ] = ∑ i c ^ i ( k ) Tr [ ρ L − k P i ] + ∑ j δ c j ( k + 1 ) Tr [ ρ L − k − 1 P j ] (122) \sum_j \hat{c}_j^{(k+1)} \operatorname{Tr}[\rho_{L-k-1}P_j] = \sum_i \hat{c}_i^{(k)} \operatorname{Tr}[\rho_{L-k}P_i] + \sum_j \delta c_j^{(k+1)} \operatorname{Tr}[\rho_{L-k-1}P_j] \tag*{(122)} j ∑ c ^ j ( k + 1 ) Tr [ ρ L − k − 1 P j ] = i ∑ c ^ i ( k ) Tr [ ρ L − k P i ] + j ∑ δ c j ( k + 1 ) Tr [ ρ L − k − 1 P j ] (122)
that gives us a description of the compressed function at step k + 1 k+1 k + 1 as a function of the coefficients on the previous step, and the error. This is the crucial expression that will allow us to write the error as a recursive formula. Indeed, we can apply Eq. (122) recursively and write
f ^ = ∑ j c ^ j ( L ) Tr [ ρ P j ] = ∑ k = 1 L ∑ j δ c j ( k ) Tr [ ρ L − k P j ] + ∑ j c ^ j ( 0 ) Tr [ ρ P j ] (123) \hat{f} = \sum_j \hat{c}_j^{(L)} \operatorname{Tr}[\rho P_j] = \sum_{k=1}^{L} \sum_j \delta c_j^{(k)} \operatorname{Tr}[\rho_{L-k}P_j] + \sum_j \hat{c}_j^{(0)} \operatorname{Tr}[\rho P_j] \tag*{(123)} f ^ = j ∑ c ^ j ( L ) Tr [ ρ P j ] = k = 1 ∑ L j ∑ δ c j ( k ) Tr [ ρ L − k P j ] + j ∑ c ^ j ( 0 ) Tr [ ρ P j ] (123)
to obtain a formula of our estimator f ^ \hat{f} f ^ as a function of the errors and estimators at each step. The only thing that is left now is to compute the error. Hence, with the convention c ^ j ( 0 ) = c j ( 0 ) \hat{c}_j^{(0)} = c_j^{(0)} c ^ j ( 0 ) = c j ( 0 ) , we have that the original f f f can be written as f = ∑ j c j ( 0 ) Tr [ ρ P j ] f = \sum_j c_j^{(0)} \operatorname{Tr}[\rho P_j] f = ∑ j c j ( 0 ) Tr [ ρ P j ] . We can readily compute the error of our estimator, that reads
f ^ − f = ∑ k = 1 L ∑ i δ c i ( k ) Tr [ ρ L − k P i ] . (124) \hat{f} - f = \sum_{k=1}^{L} \sum_i \delta c_i^{(k)} \operatorname{Tr}[\rho_{L-k}P_i]. \tag*{(124)} f ^ − f = k = 1 ∑ L i ∑ δ c i ( k ) Tr [ ρ L − k P i ] . (124)
If the compression occurs only at the layers of a subset R ⊆ { 1 , … , L } \mathcal{R} \subseteq\{1,\ldots,L\} R ⊆ { 1 , … , L } , the outer sum is restricted to k ∈ R k \in\mathcal{R} k ∈ R , because δ c i ( k ) = 0 \delta c_i^{(k)} = 0 δ c i ( k ) = 0 at every layer where no compression takes place. Since P i P_i P i is a Pauli string and ρ L − k \rho_{L-k} ρ L − k a density matrix, we also have ∣ Tr [ ρ L − k P i ] ∣ ≤ 1 |\operatorname{Tr}[\rho_{L-k}P_i]| \le1 ∣ Tr [ ρ L − k P i ] ∣ ≤ 1 at every layer, a bound used repeatedly below. Then, we can write the mean squared error by plugging in Eq. (124)
MSE [ f ^ ] = E [ ( ∑ k ∈ R ∑ i δ c i ( k ) Tr [ ρ L − k P i ] ) 2 ] , (125) \operatorname{MSE}[\hat{f}] = \mathbb{E}\left[\left(\sum_{k \in\mathcal{R}} \sum_i \delta c_i^{(k)} \operatorname{Tr}[\rho_{L-k}P_i]\right)^2\right], \tag*{(125)} MSE [ f ^ ] = E ( k ∈ R ∑ i ∑ δ c i ( k ) Tr [ ρ L − k P i ] ) 2 , (125)
which concludes the proof.
Equipped with this lemma, we can move forward to bounding the MSE of the unbiased one-norm, as well as the comb sampling strategy.
One-norm sampling
Bound on the variance of the one-norm sampling strategy
Before turning to the mean squared error of the one-norm sampling with truncation, let us get a feeling for the computation by analysing the variance of the estimator, assuming no truncation is done. The variance tends to zero when the number of samples goes to infinity, and the bound grows quadratically with the one norm of the Pauli sum at each layer.
Theorem 1 (Unbiased one-norm sampling). Consider f = Tr [ ρ U † O U ] f = \operatorname{Tr}[\rho U^\dagger O U] f = Tr [ ρ U † O U ] , such that U = U L … U 2 U 1 U = U_L \ldots U_2 U_1 U = U L … U 2 U 1 . Suppose that we propagate the observable forward using the one-norm sampling strategy of Appendix § 2.1.1 2 a to reduce the memory overhead at every layer k k k of a subset R ⊆ { 1 , … , L } \mathcal{R} \subseteq\{1,\ldots,L\} R ⊆ { 1 , … , L } , using m s m_s m s independent one-norm draws at each of them. Then the variance is bounded as
Var [ f ^ ] ≤ 1 m s ∑ k ∈ R E [ W k 2 ] , (126) \operatorname{Var}[\hat{f}] \le\frac{1}{m_s}\sum_{k\in\mathcal{R}}\mathbb{E}[W_k^2], \tag*{(126)} Var [ f ^ ] ≤ m s 1 k ∈ R ∑ E [ W k 2 ] , (126) where W k = ∑ i ∣ c i ( k ) ∣ W_k = \sum_i \lvert c_i^{(k)} \rvert W k = ∑ i ∣ c i ( k ) ∣ is the one norm of the Pauli sum arriving at layer k k k . For $k \ge 1 this is itself a random variable, because the coefficients arriving at layer k k k depend on the outcome of the resampling performed at the earlier layers, which is why the bound carries an expectation value. If W k ≤ W ‾ k W_k \le\overline{W}_k W k ≤ W k almost surely for some deterministic W ‾ k \overline{W}_k W k , then E [ W k 2 ] ∗ m a y b e r e p l a c e d b y ∗ \mathbb{E}[W_k^2] *may be replaced by* E [ W k 2 ] ∗ ma y b er e pl a ce d b y ∗ \overline{W}_k^2$. In particular, if resampling is applied at every layer, R = { 1 , … , L } \mathcal{R} = \{1,\ldots,L\} R = { 1 , … , L } , and the one norm grows at most exponentially, W k ≤ W 0 γ k W_k \le W_0\gamma^k W k ≤ W 0 γ k with γ > 1 \gamma> 1 γ > 1 , then we can bound the variance as
Var [ f ^ ] ≤ W 0 2 γ 2 m s γ 2 L − 1 γ 2 − 1 , (127) \operatorname{Var}[\hat{f}] \le\frac{W_0^2\gamma^2}{m_s}\frac{\gamma^{2L}-1}{\gamma^2-1}, \tag*{(127)} Var [ f ^ ] ≤ m s W 0 2 γ 2 γ 2 − 1 γ 2 L − 1 , (127) We stress that the exponent here is the circuit depth L L L and not the number ∣ R ∣ \lvert\mathcal{R}\rvert ∣ R ∣ of resampling events. For a sparse R \mathcal{R} R the relevant quantity is ∑ k ∈ R γ 2 k \sum_{k\in\mathcal{R}}\gamma^{2k} ∑ k ∈ R γ 2 k , which is controlled by the largest index in R \mathcal{R} R rather than by how many indices it contains.
Proof. Every one-norm resampling step is unbiased by Eq. (41) , so E [ f ^ ] = f \mathbb{E}[\hat{f}] = f E [ f ^ ] = f and the variance coincides with the mean squared error, Var [ f ^ ] = MSE [ f ^ ] \operatorname{Var}[\hat{f}] = \operatorname{MSE}[\hat{f}] Var [ f ^ ] = MSE [ f ^ ] ; we bound the latter. Throughout, F k \mathcal{F}_k F k denotes the σ \sigma σ -algebra generated by every resampling outcome at the layers preceding k k k , so that conditioning on F k \mathcal{F}_k F k fixes the coefficients c i ( k ) c_i^{(k)} c i ( k ) arriving at layer k k k , and with them W k W_k W k and p i ( k ) p_i^{(k)} p i ( k ) , leaving only the layer-k k k draws random. Every layer-k k k moment below is conditional in this sense. Let us start by defining, at a layer k k k , the total one norm W k W_k W k and the probability of the i i i -th outcome p i ( k ) p_i^{(k)} p i ( k ) ,
W k = ∑ i ∣ c i ( k ) ∣ , p i ( k ) = ∣ c i ( k ) ∣ W k . (128) W_k = \sum_i \lvert c_i^{(k)} \rvert,\qquad p_i^{(k)} = \frac{\lvert c_i^{(k)} \rvert}{W_k}. \tag*{(128)} W k = i ∑ ∣ c i ( k ) ∣ , p i ( k ) = W k ∣ c i ( k ) ∣ . (128)
Let m s m_s m s be the number of draws of the multinomial distribution created by sampling from the probabilities p i ( k ) p_i^{(k)} p i ( k ) . Recall that the estimator for this sampling strategy was defined in Eq. (40) as
c ^ i ( k ) = sgn ( c i ( k ) ) W k m s N i ( k ) , (129) \hat{c}_i^{(k)} = \operatorname{sgn}(c_i^{(k)})\frac{W_k}{m_s}N_i^{(k)}, \tag*{(129)} c ^ i ( k ) = sgn ( c i ( k ) ) m s W k N i ( k ) , (129)
where N i ( k ) N_i^{(k)} N i ( k ) is the number of draws at layer k k k that return the Pauli string P i P_i P i .
We have already shown in Eq. (41) that c ^ i ( k ) \hat{c}_i^{(k)} c ^ i ( k ) is unbiased, and that
E [ N i ( k ) ] = m s p i ( k ) . (130) \mathbb{E}[N_i^{(k)}] = m_s p_i^{(k)}. \tag*{(130)} E [ N i ( k ) ] = m s p i ( k ) . (130)
By using standard properties of the multinomial distribution [92 ] , we can also see that the variance of N i ( k ) N_i^{(k)} N i ( k )
Var [ N i ( k ) ] = m s p i ( k ) ( 1 − p i ( k ) ) , (131) \operatorname{Var}[N_i^{(k)}] = m_s p_i^{(k)}\left(1-p_i^{(k)}\right), \tag*{(131)} Var [ N i ( k ) ] = m s p i ( k ) ( 1 − p i ( k ) ) , (131)
and similarly, the covariance between two different counts N i ( k ) N_i^{(k)} N i ( k ) and N j ( k ) N_j^{(k)} N j ( k ) with i ≠ j i \ne j i = j in the same layer is
Cov [ N i ( k ) , N j ( k ) ] = − m s p i ( k ) p j ( k ) . (132) \operatorname{Cov}[N_i^{(k)},N_j^{(k)}] = -m_s p_i^{(k)}p_j^{(k)}. \tag*{(132)} Cov [ N i ( k ) , N j ( k ) ] = − m s p i ( k ) p j ( k ) . (132)
Recall that the goal is to compute the variance of the estimator. To that end, we are going to use Lemma 1. Before we do that, we can use the results we just derived to individually compute the quantities required. We start by recalling the definition of δ c i ( k ) = c ^ i ( k ) − c i ( k ) \delta c_i^{(k)} = \hat{c}_i^{(k)} - c_i^{(k)} δ c i ( k ) = c ^ i ( k ) − c i ( k ) , and using it to compute E [ δ c i ( k ) ] \mathbb{E}[\delta c_i^{(k)}] E [ δ c i ( k ) ]
E [ δ c i ( k ) ] = 0 , (133) \mathbb{E}[\delta c_i^{(k)}] = 0 , \tag*{(133)} E [ δ c i ( k ) ] = 0 , (133)
where we just need to use that E [ c ^ i ( k ) ] = c i ( k ) \mathbb{E}[\hat{c}_i^{(k)}] = c_i^{(k)} E [ c ^ i ( k ) ] = c i ( k ) as already shown in Eq. (41) . Other quantities that we need to compute to use Lemma 1 are E [ ( δ c i ( k ) ) 2 ] \mathbb{E}[(\delta c_i^{(k)})^2] E [( δ c i ( k ) ) 2 ] , E [ δ c i ( k ) δ c j ( k ) ] \mathbb{E}[\delta c_i^{(k)}\delta c_j^{(k)}] E [ δ c i ( k ) δ c j ( k ) ] . Let us start with the second moment of δ c i ( k ) \delta c_i^{(k)} δ c i ( k )
E [ ( δ c i ( k ) ) 2 ] = Var [ c ^ i ( k ) ] (134) \mathbb{E}[(\delta c_i^{(k)})^2] = \operatorname{Var}[\hat{c}_i^{(k)}] \tag*{(134)} E [( δ c i ( k ) ) 2 ] = Var [ c ^ i ( k ) ] (134)
= W k 2 m s 2 Var [ N i ( k ) ] (135) = \frac{W_k^2}{m_s^2}\operatorname{Var}[N_i^{(k)}] \tag*{(135)} = m s 2 W k 2 Var [ N i ( k ) ] (135)
= W k m s ∣ c i ( k ) ∣ ( 1 − ∣ c i ( k ) ∣ W k ) , (136) = \frac{W_k}{m_s}|c_i^{(k)}|\left(1-\frac{|c_i^{(k)}|}{W_k}\right), \tag*{(136)} = m s W k ∣ c i ( k ) ∣ ( 1 − W k ∣ c i ( k ) ∣ ) , (136)
in the first equality we just used that E [ ( δ c i ( k ) ) 2 ] = E [ ( c ^ i ( k ) − E [ c ^ i ( k ) ] ) 2 ] \mathbb{E}[(\delta c_i^{(k)})^2] = \mathbb{E}[(\hat{c}_i^{(k)}-\mathbb{E}[\hat{c}_i^{(k)}])^2] E [( δ c i ( k ) ) 2 ] = E [( c ^ i ( k ) − E [ c ^ i ( k ) ] ) 2 ] , the definition of the variance. In the second equality we used the form of c ^ i ( k ) \hat{c}_i^{(k)} c ^ i ( k ) in Eq. (129) , and in the last equality we used Eq. (131) along with p i ( k ) p_i^{(k)} p i ( k ) in Eq. (128) . Finally, we can move to E [ δ c i ( k ) δ c j ( k ) ] \mathbb{E}[\delta c_i^{(k)}\delta c_j^{(k)}] E [ δ c i ( k ) δ c j ( k ) ]
E [ δ c i ( k ) δ c j ( k ) ] = Covar [ c ^ i ( k ) , c ^ j ( k ) ] (137) \mathbb{E}[\delta c_i^{(k)}\delta c_j^{(k)}] = \operatorname{Covar}[\hat{c}_i^{(k)},\hat{c}_j^{(k)}] \tag*{(137)} E [ δ c i ( k ) δ c j ( k ) ] = Covar [ c ^ i ( k ) , c ^ j ( k ) ] (137)
= W k 2 m s 2 sgn ( c i ( k ) ) sgn ( c j ( k ) ) Covar [ N i ( k ) , N j ( k ) ] (138) = \frac{W_k^2}{m_s^2}\operatorname{sgn}(c_i^{(k)})\operatorname{sgn}(c_j^{(k)})\operatorname{Covar}[N_i^{(k)},N_j^{(k)}] \tag*{(138)} = m s 2 W k 2 sgn ( c i ( k ) ) sgn ( c j ( k ) ) Covar [ N i ( k ) , N j ( k ) ] (138)
= − c i ( k ) c j ( k ) m s , i ≠ j , (139) = -\frac{c_i^{(k)}c_j^{(k)}}{m_s}, \qquad i \ne j , \tag*{(139)} = − m s c i ( k ) c j ( k ) , i = j , (139)
where in the first equality we used the definition of covariance Covar [ x , y ] = E [ ( x − E [ x ] ) ( y − E [ y ] ) ] \operatorname{Covar}[x,y] = \mathbb{E}[(x-\mathbb{E}[x])(y-\mathbb{E}[y])] Covar [ x , y ] = E [( x − E [ x ]) ( y − E [ y ])] . Similarly to the previous equation, in the second equality we use the definition of c ^ i ( k ) \hat{c}_i^{(k)} c ^ i ( k ) in Eq. (129) . In the final equality we used Eq. (132) along with p i ( k ) p_i^{(k)} p i ( k ) in Eq. (128) .
Before applying the lemma we note that the sampling performed at a layer k k k is independent of the history of the sampling before k k k . Concretely, for k > ℓ k > \ell k > ℓ ,
E [ δ c i ( k ) δ c j ( ℓ ) ] = E [ E [ δ c i ( k ) δ c j ( ℓ ) ∣ F k ] ] = E [ δ c j ( ℓ ) E [ δ c i ( k ) ∣ F k ] ] = 0 (140) \mathbb{E}[\delta c_i^{(k)}\delta c_j^{(\ell)}] = \mathbb{E}\left[\mathbb{E}[\delta c_i^{(k)}\delta c_j^{(\ell)}\mid\mathcal{F}_k]\right] = \mathbb{E}\left[\delta c_j^{(\ell)}\mathbb{E}[\delta c_i^{(k)}\mid\mathcal{F}_k]\right] = 0 \tag*{(140)} E [ δ c i ( k ) δ c j ( ℓ ) ] = E [ E [ δ c i ( k ) δ c j ( ℓ ) ∣ F k ] ] = E [ δ c j ( ℓ ) E [ δ c i ( k ) ∣ F k ] ] = 0 (140)
because E [ δ c i ( k ) ∣ F k ] = 0 \mathbb{E}[\delta c_i^{(k)}\mid\mathcal{F}_k] = 0 E [ δ c i ( k ) ∣ F k ] = 0 by Eq. (133) , and because δ c j ( ℓ ) \delta c_j^{(\ell)} δ c j ( ℓ ) is F k \mathcal{F}_k F k -measurable for every ℓ < k \ell< k ℓ < k , hence constant under the inner expectation value.
With this, we are ready to invoke Lemma 1 and massage the equation using the results we obtained above
MSE [ f ^ ] = E [ ( ∑ k ∈ R ∑ i δ c i ( k ) Tr [ ρ L − k P i ] ) 2 ] (141) \operatorname{MSE}[\hat{f}] = \mathbb{E}\left[\left(\sum_{k\in\mathcal{R}}\sum_i \delta c_i^{(k)}\operatorname{Tr}[\rho L^{-k}P_i]\right)^2\right] \tag*{(141)} MSE [ f ^ ] = E ( k ∈ R ∑ i ∑ δ c i ( k ) Tr [ ρ L − k P i ] ) 2 (141)
= ∑ k ∈ R E [ ( ∑ i δ c i ( k ) Tr [ ρ L − k P i ] ) 2 ] + ∑ k ≠ ℓ ∈ R E [ ( ∑ i δ c i ( k ) Tr [ ρ L − k P i ] ) ( ∑ i δ c i ( ℓ ) Tr [ ρ L − ℓ P i ] ) ] (142) = \sum_{k\in\mathcal{R}}\mathbb{E}\left[\left(\sum_i\delta c_i^{(k)}\operatorname{Tr}[\rho L^{-k}P_i]\right)^2\right] + \sum_{k\ne\ell\in\mathcal{R}}\mathbb{E}\left[\left(\sum_i\delta c_i^{(k)}\operatorname{Tr}[\rho L^{-k}P_i]\right)\left(\sum_i\delta c_i^{(\ell)}\operatorname{Tr}[\rho L^{-\ell}P_i]\right)\right] \tag*{(142)} = k ∈ R ∑ E ( i ∑ δ c i ( k ) Tr [ ρ L − k P i ] ) 2 + k = ℓ ∈ R ∑ E [ ( i ∑ δ c i ( k ) Tr [ ρ L − k P i ] ) ( i ∑ δ c i ( ℓ ) Tr [ ρ L − ℓ P i ] ) ] (142)
= ∑ k ∈ R E [ ( ∑ i δ c i ( k ) Tr [ ρ L − k P i ] ) 2 ] + ∑ k ≠ ℓ ∈ R ∑ i , j E [ δ c i ( k ) δ c j ( ℓ ) ] Tr [ ρ L − k P i ] Tr [ ρ L − ℓ P j ] (143) = \sum_{k\in\mathcal{R}}\mathbb{E}\left[\left(\sum_i\delta c_i^{(k)}\operatorname{Tr}[\rho L^{-k}P_i]\right)^2\right] + \sum_{k\ne\ell\in\mathcal{R}}\sum_{i,j}\mathbb{E}[\delta c_i^{(k)}\delta c_j^{(\ell)}]\operatorname{Tr}[\rho L^{-k}P_i]\operatorname{Tr}[\rho L^{-\ell}P_j] \tag*{(143)} = k ∈ R ∑ E ( i ∑ δ c i ( k ) Tr [ ρ L − k P i ] ) 2 + k = ℓ ∈ R ∑ i , j ∑ E [ δ c i ( k ) δ c j ( ℓ ) ] Tr [ ρ L − k P i ] Tr [ ρ L − ℓ P j ] (143)
= ∑ k ∈ R E [ ( ∑ i δ c i ( k ) Tr [ ρ L − k P i ] ) 2 ] , (144) = \sum_{k\in\mathcal{R}}\mathbb{E}\left[\left(\sum_i\delta c_i^{(k)}\operatorname{Tr}[\rho L^{-k}P_i]\right)^2\right], \tag*{(144)} = k ∈ R ∑ E ( i ∑ δ c i ( k ) Tr [ ρ L − k P i ] ) 2 , (144)
where in the second equality we expand the sum over k k k , in the third equality we used that Tr [ ρ L − k P i ] \operatorname{Tr}[\rho L^{-k}P_i] Tr [ ρ L − k P i ] and Tr [ ρ L − ℓ P j ] \operatorname{Tr}[\rho L^{-\ell}P_j] Tr [ ρ L − ℓ P j ] are constants with respect to E [ ⋅ ] \mathbb{E}[\cdot] E [ ⋅ ] . In the final equality we used the fact that for k ≠ ℓ k\ne\ell k = ℓ and all i , j i,j i , j we have E [ δ c i ( k ) δ c j ( ℓ ) ] = 0 \mathbb{E}[\delta c_i^{(k)}\delta c_j^{(\ell)}]=0 E [ δ c i ( k ) δ c j ( ℓ ) ] = 0 as derived in Eq. (140) , to remove the crossed terms.
Now we can use Eqs. (136) and (139) , to analyze the conditional variance at a single event k k k , i.e.
E [ ( ∑ i δ c i ( k ) Tr [ ρ L − k P i ] ) 2 ] = ∑ i E [ ( δ c i ( k ) ) 2 ] Tr [ ρ L − k P i ] 2 + ∑ i ≠ j E [ δ c i ( k ) δ c j ( k ) ] Tr [ ρ L − k P i ] Tr [ ρ L − k P j ] (145) \mathbb{E}\left[\left(\sum_i \delta c_i^{(k)}\operatorname{Tr}[\rho_{L-k}P_i]\right)^2\right]
= \sum_i \mathbb{E}\left[(\delta c_i^{(k)})^2\right]\operatorname{Tr}[\rho_{L-k}P_i]^2
+ \sum_{i\ne j}\mathbb{E}\left[\delta c_i^{(k)}\delta c_j^{(k)}\right]\operatorname{Tr}[\rho_{L-k}P_i]\operatorname{Tr}[\rho_{L-k}P_j] \tag*{(145)} E ( i ∑ δ c i ( k ) Tr [ ρ L − k P i ] ) 2 = i ∑ E [ ( δ c i ( k ) ) 2 ] Tr [ ρ L − k P i ] 2 + i = j ∑ E [ δ c i ( k ) δ c j ( k ) ] Tr [ ρ L − k P i ] Tr [ ρ L − k P j ] (145)
= W k m s ∑ i ∣ c i ( k ) ∣ Tr [ ρ L − k P i ] 2 − 1 m s ∑ i c i ( k ) Tr [ ρ L − k P i ] 2 − 1 m s ∑ i ≠ j c i ( k ) c j ( k ) Tr [ ρ L − k P i ] Tr [ ρ L − k P j ] (146) = \frac{W_k}{m_s}\sum_i |c_i^{(k)}|\operatorname{Tr}[\rho_{L-k}P_i]^2
-\frac{1}{m_s}\sum_i c_i^{(k)}\operatorname{Tr}[\rho_{L-k}P_i]^2
-\frac{1}{m_s}\sum_{i\ne j}c_i^{(k)}c_j^{(k)}\operatorname{Tr}[\rho_{L-k}P_i]\operatorname{Tr}[\rho_{L-k}P_j] \tag*{(146)} = m s W k i ∑ ∣ c i ( k ) ∣ Tr [ ρ L − k P i ] 2 − m s 1 i ∑ c i ( k ) Tr [ ρ L − k P i ] 2 − m s 1 i = j ∑ c i ( k ) c j ( k ) Tr [ ρ L − k P i ] Tr [ ρ L − k P j ] (146)
= W k m s ∑ i ∣ c i ( k ) ∣ Tr [ ρ L − k P i ] 2 − 1 m s ( ∑ i c i ( k ) Tr [ ρ L − k P i ] ) 2 , (147) = \frac{W_k}{m_s}\sum_i |c_i^{(k)}|\operatorname{Tr}[\rho_{L-k}P_i]^2
-\frac{1}{m_s}\left(\sum_i c_i^{(k)}\operatorname{Tr}[\rho_{L-k}P_i]\right)^2, \tag*{(147)} = m s W k i ∑ ∣ c i ( k ) ∣ Tr [ ρ L − k P i ] 2 − m s 1 ( i ∑ c i ( k ) Tr [ ρ L − k P i ] ) 2 , (147)
where in the first equality we just expanded the sum in i i i . In the second equality we used Eq. (136) and Eq. (139) as mentioned above and in the last equality we wrote both negative sums into one.
The second term in Eq. (147) is non-positive, thus we can use this and the fact that ∣ Tr [ ρ L − k P i ] ∣ ≤ 1 |\operatorname{Tr}[\rho_{L-k}P_i]|\le1 ∣ Tr [ ρ L − k P i ] ∣ ≤ 1 to upper bound
E [ ( ∑ i δ c i ( k ) Tr [ ρ L − k P i ] ) 2 ] ≤ W k m s ∑ i ∣ c i ( k ) ∣ Tr [ ρ L − k P i ] 2 ≤ W k 2 m s . (148) \mathbb{E}\left[\left(\sum_i \delta c_i^{(k)}\operatorname{Tr}[\rho_{L-k}P_i]\right)^2\right]
\le\frac{W_k}{m_s}\sum_i |c_i^{(k)}|\operatorname{Tr}[\rho_{L-k}P_i]^2
\le\frac{W_k^2}{m_s}. \tag*{(148)} E ( i ∑ δ c i ( k ) Tr [ ρ L − k P i ] ) 2 ≤ m s W k i ∑ ∣ c i ( k ) ∣ Tr [ ρ L − k P i ] 2 ≤ m s W k 2 . (148)
This bound holds conditionally on F k \mathcal{F}_k F k . Taking the outer expectation value and summing over the resampling events gives
MSE [ f ^ ] ≤ 1 m s ∑ k ∈ R E [ W k 2 ] , (149) \operatorname{MSE}[\hat{f}] \le\frac{1}{m_s}\sum_{k\in\mathcal{R}}\mathbb{E}[W_k^2], \tag*{(149)} MSE [ f ^ ] ≤ m s 1 k ∈ R ∑ E [ W k 2 ] , (149)
which is Eq. (126) . If resampling occurs at every layer and we further assume that W k ≤ γ k W 0 W_k\le\gamma^kW_0 W k ≤ γ k W 0 , then
MSE [ f ^ ] ≤ W 0 2 m s ∑ k = 1 L γ 2 k = W 0 2 γ 2 m s γ 2 L − 1 γ 2 − 1 , (150) \operatorname{MSE}[\hat{f}]
\le\frac{W_0^2}{m_s}\sum_{k=1}^{L}\gamma^{2k}
= \frac{W_0^2\gamma^2}{m_s}\frac{\gamma^{2L}-1}{\gamma^2-1}, \tag*{(150)} MSE [ f ^ ] ≤ m s W 0 2 k = 1 ∑ L γ 2 k = m s W 0 2 γ 2 γ 2 − 1 γ 2 L − 1 , (150)
by the standard geometric sum ∑ k = 1 K x k = x x K − 1 x − 1 \sum_{k=1}^{K}x^k=x\frac{x^K-1}{x-1} ∑ k = 1 K x k = x x − 1 x K − 1 , which concludes the proof. This last step requires R = { 1 , … , L } \mathcal{R}=\{1,\ldots,L\} R = { 1 , … , L } : for a sparse R \mathcal{R} R the sum ∑ k ∈ R γ 2 k \sum_{k\in\mathcal{R}}\gamma^{2k} ∑ k ∈ R γ 2 k is not equal to ∑ k = 1 ∣ R ∣ γ 2 k \sum_{k=1}^{|\mathcal{R}|}\gamma^{2k} ∑ k = 1 ∣ R ∣ γ 2 k , and is in general much larger.
Deterministic truncation followed by resampling
We will now show how the upper bound of Theorem 1 is modified when one introduces deterministic truncation before sampling. The one-norm resampling with bias can be described as one norm resampling with modified coefficients. Therefore, the MSE can be upper bounded by the same bound as in the case without truncation, but with the modified one norm, to which is added a bias term depending on the truncation. Because of the bias term, the error does not tend to zero when the number of samples goes to infinity.
Theorem 2 (MSE bound for the one-norm sampling with truncation). Consider f = Tr [ ρ U † O U ] f=\operatorname{Tr}[\rho U^\dagger O U] f = Tr [ ρ U † O U ] , such that U = U L … U 2 U 1 U=U_L\ldots U_2U_1 U = U L … U 2 U 1 . Suppose that we propagate the observable forward using the one-norm sampling strategy preceded by truncation as in Appendix § 2.1.1 2b. At every layer k k k of a subset R ⊆ { 1 , … , L } \mathcal{R}\subseteq\{1,\ldots,L\} R ⊆ { 1 , … , L } we use a bias threshold b k b_k b k and we perform m s m_s m s independent one-norm draws. Then the mean squared error is upper bounded as
MSE [ f ^ ] ≤ E [ ( ∑ k ∈ R ( W k − W ~ k ) ) 2 ] + 2 m s ∑ k > ℓ ∈ R Var [ β k ] E [ W ~ ℓ 2 ] + 1 m s ∑ k ∈ R E [ W ~ k 2 ] , (151) \operatorname{MSE}[\hat{f}]
\le\mathbb{E}\left[\left(\sum_{k\in\mathcal{R}}(W_k-\widetilde{W}_k)\right)^2\right]
+\frac{2}{\sqrt{m_s}}\sum_{k>\ell\in\mathcal{R}}\sqrt{\operatorname{Var}[\beta_k]\mathbb{E}[\widetilde{W}_\ell^2]}
+\frac{1}{m_s}\sum_{k\in\mathcal{R}}\mathbb{E}[\widetilde{W}_k^2], \tag*{(151)} MSE [ f ^ ] ≤ E ( k ∈ R ∑ ( W k − W k ) ) 2 + m s 2 k > ℓ ∈ R ∑ Var [ β k ] E [ W ℓ 2 ] + m s 1 k ∈ R ∑ E [ W k 2 ] , (151) where W k = ∑ i ∣ c i ( k ) ∣ W_k=\sum_i|c_i^{(k)}| W k = ∑ i ∣ c i ( k ) ∣ is the one norm without truncation at layer k k k , W ~ k = ∑ i , ∣ c i ( k ) ∣ > b k ∣ c i ( k ) ∣ \widetilde{W}_k=\sum_{i,|c_i^{(k)}|>b_k}|c_i^{(k)}| W k = ∑ i , ∣ c i ( k ) ∣ > b k ∣ c i ( k ) ∣ is the one norm of the coefficients above the threshold b k b_k b k , and β k \beta_k β k is the truncation error committed at layer k k k , β k = − ∑ i , ∣ c i ( k ) ∣ ≤ b k c i ( k ) Tr [ ρ L − k P i ] \beta_k=-\sum_{i,|c_i^{(k)}|\le b_k}c_i^{(k)}\operatorname{Tr}[\rho_{L-k}P_i] β k = − ∑ i , ∣ c i ( k ) ∣ ≤ b k c i ( k ) Tr [ ρ L − k P i ] . As in Theorem 1, all three quantities are random for k ≥ 1 k\ge1 k ≥ 1 , which is why the bound carries expectation values; if W k − W ~ k W_k-\widetilde{W}_k W k − W k and W ~ k \widetilde{W}_k W k admit deterministic almost-sure upper bounds, those may be substituted and the expectation values dropped, which is how the model of Appendix § 2.1.2 § 3.2.2 uses this result.
Proof. The one-norm resampling with bias can be described as one norm resampling with modified coefficients. The modified coefficients, modified one-norm, and modified probabilities at layer k k k with threshold b k b_k b k can be respectively expressed as
c ~ i ( k ) = c i ( k ) 1 ( ∣ c i ( k ) ∣ > b k ) , (152) \widetilde{c}_i^{(k)} = c_i^{(k)} \mathbb{1}\left(\left|c_i^{(k)}\right| > b_k\right), \tag*{(152)} c i ( k ) = c i ( k ) 1 ( c i ( k ) > b k ) , (152)
W ~ k = ∑ i ∣ c i ( k ) ∣ 1 ( ∣ c i ( k ) ∣ > b k ) , (153) \widetilde{W}_k = \sum_i \left|c_i^{(k)}\right| \mathbb{1}\left(\left|c_i^{(k)}\right| > b_k\right), \tag*{(153)} W k = i ∑ c i ( k ) 1 ( c i ( k ) > b k ) , (153)
p ~ i ( k ) = ∣ c i ( k ) ∣ W ~ k 1 ( ∣ c i ( k ) ∣ > b k ) . (154) \widetilde{p}_i^{(k)} = \frac{\left|c_i^{(k)}\right|}{\widetilde{W}_k}\mathbb{1}\left(\left|c_i^{(k)}\right| > b_k\right). \tag*{(154)} p i ( k ) = W k c i ( k ) 1 ( c i ( k ) > b k ) . (154)
This directly follows from Appendix § 2.1.1 2b. The estimator of the coefficient i i i at layer k k k is equal to
c ^ i ( k ) = sgn ( c i ( k ) ) W ~ k m s N i ( k ) , (155) \widehat{c}_i^{(k)} = \operatorname{sgn}\left(c_i^{(k)}\right)\frac{\widetilde{W}_k}{m_s}N_i^{(k)}, \tag*{(155)} c i ( k ) = sgn ( c i ( k ) ) m s W k N i ( k ) , (155)
where the N i ( k ) N_i^{(k)} N i ( k ) follow a multinomial distribution of m s m_s m s draws with probabilities p ~ i ( k ) \widetilde{p}_i^{(k)} p i ( k ) .
For a retained index, ∣ c i ( k ) ∣ > b k \left|c_i^{(k)}\right| > b_k c i ( k ) > b k , the sampling step is exactly the unbiased one-norm resampling of Appendix § 2.1.1 2a applied to the modified Pauli sum ∑ i c ~ i ( k ) P i \sum_i \widetilde{c}_i^{(k)}P_i ∑ i c i ( k ) P i . The computations of Appendix § 2.1.2 § 3.2.2 therefore hold with W k W_k W k replaced by W ~ k \widetilde{W}_k W k , so that Eqs. (B37,B40,B43) become
E [ δ c i ( k ) ] = 0 , (156) \mathbb{E}\left[\delta c_i^{(k)}\right] = 0, \tag*{(156)} E [ δ c i ( k ) ] = 0 , (156)
E [ ( δ c i ( k ) ) 2 ] = W ~ k m s ∣ c i ( k ) ∣ ( 1 − ∣ c i ( k ) ∣ W ~ k ) , (157) \mathbb{E}\left[\left(\delta c_i^{(k)}\right)^2\right] = \frac{\widetilde{W}_k}{m_s}\left|c_i^{(k)}\right|\left(1-\frac{\left|c_i^{(k)}\right|}{\widetilde{W}_k}\right), \tag*{(157)} E [ ( δ c i ( k ) ) 2 ] = m s W k c i ( k ) 1 − W k c i ( k ) , (157)
E [ δ c i ( k ) δ c j ( k ) ] = − c i ( k ) c j ( k ) m s , i ≠ j , (158) \mathbb{E}\left[\delta c_i^{(k)}\delta c_j^{(k)}\right] = -\frac{c_i^{(k)}c_j^{(k)}}{m_s}, \qquad i \ne j, \tag*{(158)} E [ δ c i ( k ) δ c j ( k ) ] = − m s c i ( k ) c j ( k ) , i = j , (158)
where δ c i ( k ) = c ^ i ( k ) − c i ( k ) \delta c_i^{(k)}=\widehat{c}_i^{(k)}-c_i^{(k)} δ c i ( k ) = c i ( k ) − c i ( k ) as in Lemma 1, and both i i i and j j j are retained indices. For a discarded index, ∣ c i ( k ) ∣ ≤ b k \left|c_i^{(k)}\right| \le b_k c i ( k ) ≤ b k , Eq. (B58) gives p ~ i ( k ) = 0 \widetilde{p}_i^{(k)}=0 p i ( k ) = 0 , so that index can never be drawn. Equation (B59) then yields c ^ i ( k ) = 0 \widehat{c}_i^{(k)}=0 c i ( k ) = 0 , and therefore δ c i ( k ) = − c i ( k ) \delta c_i^{(k)}=-c_i^{(k)} δ c i ( k ) = − c i ( k ) for every discarded index i i i .
The two groups of indices therefore contribute in two very different ways to the error that layer k k k hands to Lemma 1. Splitting that error accordingly we find
∑ i δ c i ( k ) Tr [ ρ L − k P i ] = S k + β k , (159) \sum_i \delta c_i^{(k)} \operatorname{Tr}\left[\rho_{L-k}P_i\right] = S_k+\beta_k, \tag*{(159)} i ∑ δ c i ( k ) Tr [ ρ L − k P i ] = S k + β k , (159)
where we introduced the sampling noise of the retained coefficients
S k = ∑ i , ∣ c i ( k ) ∣ > b k δ c i ( k ) Tr [ ρ L − k P i ] , (160) S_k = \sum_{i,\left|c_i^{(k)}\right|>b_k}\delta c_i^{(k)}\operatorname{Tr}\left[\rho_{L-k}P_i\right], \tag*{(160)} S k = i , c i ( k ) > b k ∑ δ c i ( k ) Tr [ ρ L − k P i ] , (160)
and the truncation error committed at layer k k k
β k = − ∑ i , ∣ c i ( k ) ∣ ≤ b k c i ( k ) Tr [ ρ L − k P i ] . (161) \beta_k = -\sum_{i,\left|c_i^{(k)}\right|\le b_k}c_i^{(k)}\operatorname{Tr}\left[\rho_{L-k}P_i\right]. \tag*{(161)} β k = − i , c i ( k ) ≤ b k ∑ c i ( k ) Tr [ ρ L − k P i ] . (161)
Similarly to the calculations in Eqs. (B60-B62), we can compute the first two conditional moments of S k S_k S k . Conditioning on F k \mathcal{F}_k F k fixes the coefficients arriving at layer k k k , and therefore also W ~ k \widetilde{W}_k W k and the set of retained indices, so that
E [ S k ] = ∑ i , ∣ c i ( k ) ∣ > b k E [ δ c i ( k ) ] Tr [ ρ L − k P i ] = 0 , (162) \mathbb{E}\left[S_k\right] = \sum_{i,\left|c_i^{(k)}\right|>b_k}\mathbb{E}\left[\delta c_i^{(k)}\right]\operatorname{Tr}\left[\rho_{L-k}P_i\right] = 0, \tag*{(162)} E [ S k ] = i , c i ( k ) > b k ∑ E [ δ c i ( k ) ] Tr [ ρ L − k P i ] = 0 , (162)
and, by the tower property, E [ S k ] = 0 \mathbb{E}[S_k] = 0 E [ S k ] = 0 as well. Similarly, the conditional second moment is
E [ S k 2 ] = W ~ k 2 m s ∑ i , ∣ c i ( k ) ∣ > b k ∣ c i ( k ) ∣ Tr [ ρ L − k P i ] 2 − 1 m s ( ∑ i , ∣ c i ( k ) ∣ > b k c i ( k ) Tr [ ρ L − k P i ] ) 2 ≤ W ~ k 2 m s . (163) \mathbb{E}\left[S_k^2\right] = \frac{\widetilde{W}_k^2}{m_s}\sum_{i,\left|c_i^{(k)}\right|>b_k}\left|c_i^{(k)}\right|\operatorname{Tr}\left[\rho_{L-k}P_i\right]^2-\frac{1}{m_s}\left(\sum_{i,\left|c_i^{(k)}\right|>b_k}c_i^{(k)}\operatorname{Tr}\left[\rho_{L-k}P_i\right]\right)^2 \leq\frac{\widetilde{W}_k^2}{m_s}. \tag*{(163)} E [ S k 2 ] = m s W k 2 i , c i ( k ) > b k ∑ c i ( k ) Tr [ ρ L − k P i ] 2 − m s 1 i , c i ( k ) > b k ∑ c i ( k ) Tr [ ρ L − k P i ] 2 ≤ m s W k 2 . (163)
where the derivation is the exact same as Eqs. (145) –(147) .
Equipped with this, we are ready to invoke Lemma 1 and expand the square over the resampling steps, as we did in Eq. (141) , allows us to find the following expression
MSE [ f ^ ] = E [ ( ∑ k ∈ R ∑ i δ c i ( k ) Tr [ ρ L − k P i ] ) 2 ] (164) \operatorname{MSE}[\hat{f}] = \mathbb{E}\left[\left(\sum_{k\in\mathcal{R}}\sum_i\delta c_i^{(k)}\operatorname{Tr}\left[\rho_{L-k}P_i\right]\right)^2\right] \tag*{(164)} MSE [ f ^ ] = E ( k ∈ R ∑ i ∑ δ c i ( k ) Tr [ ρ L − k P i ] ) 2 (164)
= E [ ( ∑ k ∈ R ( S k + β k ) ) 2 ] (165) = \mathbb{E}\left[\left(\sum_{k\in\mathcal{R}}(S_k+\beta_k)\right)^2\right] \tag*{(165)} = E ( k ∈ R ∑ ( S k + β k ) ) 2 (165)
= ∑ k ∈ R E [ ( S k + β k ) 2 ] + 2 ∑ k > ℓ ∈ R E [ ( S k + β k ) ( S ℓ + β ℓ ) ] , (166) = \sum_{k\in\mathcal{R}}\mathbb{E}\left[(S_k+\beta_k)^2\right]+2\sum_{k>\ell\in\mathcal{R}}\mathbb{E}\left[(S_k+\beta_k)(S_\ell+\beta_\ell)\right], \tag*{(166)} = k ∈ R ∑ E [ ( S k + β k ) 2 ] + 2 k > ℓ ∈ R ∑ E [ ( S k + β k ) ( S ℓ + β ℓ ) ] , (166)
where in the second equality we used Eq. (159) and in the third one ( ∑ k x k ) 2 = ∑ k x k 2 + 2 ∑ k > ℓ x k x ℓ (\sum_k x_k)^2=\sum_k x_k^2+2\sum_{k>\ell}x_kx_\ell ( ∑ k x k ) 2 = ∑ k x k 2 + 2 ∑ k > ℓ x k x ℓ .
Now we will analyze the different terms. For the diagonal ones we condition on F k \mathcal{F}_k F k , which fixes β k \beta_k β k and leaves S k S_k S k random,
E [ ( S k + β k ) 2 ] = E [ S k 2 ] + 2 E [ β k E [ S k ∣ F k ] ] + E [ β k 2 ] (167) \mathbb{E}\left[(S_k+\beta_k)^2\right]=\mathbb{E}\left[S_k^2\right]+2\mathbb{E}\left[\beta_k\mathbb{E}\left[S_k\mid\mathcal{F}_k\right]\right]+\mathbb{E}\left[\beta_k^2\right] \tag*{(167)} E [ ( S k + β k ) 2 ] = E [ S k 2 ] + 2 E [ β k E [ S k ∣ F k ] ] + E [ β k 2 ] (167)
≤ E [ β k 2 ] + E [ W ~ k 2 ] m s , (168) \leq\mathbb{E}\left[\beta_k^2\right]+\frac{\mathbb{E}\left[\widetilde{W}_k^2\right]}{m_s}, \tag*{(168)} ≤ E [ β k 2 ] + m s E [ W k 2 ] , (168)
where in the first equality we used the tower property E [ ⋅ ] = E [ E [ ⋅ ∣ F k ] ] \mathbb{E}[\cdot]=\mathbb{E}[\mathbb{E}[\cdot\mid\mathcal{F}_k]] E [ ⋅ ] = E [ E [ ⋅ ∣ F k ]] , and that E [ β k ∣ F k ] = β k \mathbb{E}[\beta_k\mid\mathcal{F}_k]=\beta_k E [ β k ∣ F k ] = β k . In the inequality we used that the cross term vanishes by Eq. (162) together with the bound of Eq. (163) . The diagonal terms are therefore exactly the sum of a squared truncation error and a sampling noise, with no interference between the two within a layer.
For the off-diagonal terms with k > ℓ k>\ell k > ℓ we condition on F k \mathcal{F}_k F k as well. The layer-ℓ \ell ℓ error is then fixed, because the resampling at layer ℓ \ell ℓ has already taken place, so it can be taken out of the inner expectation value as we did in Eq. (140) , and Eq. (162) leaves
E [ ( S k + β k ) ( S ℓ + β ℓ ) ] = E [ E [ ( S k + β k ) ( S ℓ + β ℓ ) ∣ F k ] ] (169) \mathbb{E}\left[(S_k+\beta_k)(S_\ell+\beta_\ell)\right]=\mathbb{E}\left[\mathbb{E}\left[(S_k+\beta_k)(S_\ell+\beta_\ell)\mid\mathcal{F}_k\right]\right] \tag*{(169)} E [ ( S k + β k ) ( S ℓ + β ℓ ) ] = E [ E [ ( S k + β k ) ( S ℓ + β ℓ ) ∣ F k ] ] (169)
= E [ ( S ℓ + β ℓ ) ( E [ S k ∣ F k ] + β k ) ] (170) =\mathbb{E}\left[(S_\ell+\beta_\ell)\left(\mathbb{E}[S_k\mid\mathcal{F}_k]+\beta_k\right)\right] \tag*{(170)} = E [ ( S ℓ + β ℓ ) ( E [ S k ∣ F k ] + β k ) ] (170)
= E [ β k ( S ℓ + β ℓ ) ] = E [ β k S ℓ ] + E [ β k β ℓ ] , (171) =\mathbb{E}\left[\beta_k(S_\ell+\beta_\ell)\right]=\mathbb{E}[\beta_kS_\ell]+\mathbb{E}[\beta_k\beta_\ell], \tag*{(171)} = E [ β k ( S ℓ + β ℓ ) ] = E [ β k S ℓ ] + E [ β k β ℓ ] , (171)
where in the first equality we used again the tower property, in the second one that S ℓ S_\ell S ℓ , β ℓ \beta_\ell β ℓ and β k \beta_k β k are all F k \mathcal{F}_k F k -measurable for ℓ < k \ell<k ℓ < k , and in the third one Eq. (162) . This is the only step where the truncated calculation departs from the unbiased one. The truncation errors of different layers are correlated with one another, as β k \beta_k β k is built from the coefficients from an earlier k k k with the earlier sampling noise, and this is what makes the truncation error accumulate coherently along the circuit.
To bound Eq. (171) we treat the two terms separately. Since E [ S ℓ ] = 0 \mathbb{E}[S_\ell]=0 E [ S ℓ ] = 0 by Eq. (162) , the first term in Eq. (171) can be expressed as a covariance, and bounded by Cauchy–Schwarz inequality
∣ E [ β k S ℓ ] ∣ = ∣ Covar [ β k , S ℓ ] + E [ β k ] E [ S ℓ ] ∣ ≤ Var [ β k ] Var [ S ℓ ] ≤ Var [ β k ] E [ W ~ ℓ 2 ] m s , (172) \left|\mathbb{E}[\beta_kS_\ell]\right|=\left|\operatorname{Covar}[\beta_k,S_\ell]+\mathbb{E}[\beta_k]\mathbb{E}[S_\ell]\right|\leq\sqrt{\operatorname{Var}[\beta_k]\operatorname{Var}[S_\ell]}\leq\sqrt{\operatorname{Var}[\beta_k]}\frac{\sqrt{\mathbb{E}[\widetilde{W}_\ell^2]}}{\sqrt{m_s}}, \tag*{(172)} ∣ E [ β k S ℓ ] ∣ = ∣ Covar [ β k , S ℓ ] + E [ β k ] E [ S ℓ ] ∣ ≤ Var [ β k ] Var [ S ℓ ] ≤ Var [ β k ] m s E [ W ℓ 2 ] , (172)
where in the last inequality we used Var [ S ℓ ] ≤ E [ S ℓ 2 ] = E [ E [ S ℓ 2 ∣ F ℓ ] ] ≤ E [ W ~ ℓ 2 ] / m s \operatorname{Var}[S_\ell]\leq\mathbb{E}[S_\ell^2]=\mathbb{E}[\mathbb{E}[S_\ell^2\mid\mathcal{F}_\ell]]\leq\mathbb{E}[\widetilde{W}_\ell^2]/m_s Var [ S ℓ ] ≤ E [ S ℓ 2 ] = E [ E [ S ℓ 2 ∣ F ℓ ]] ≤ E [ W ℓ 2 ] / m s , which follows from Eq. (163) and the tower property.
Collecting Eqs. (168) , (171) , (172) in the expansion of Eq. (166) ,
MSE [ f ^ ] ≤ ∑ k ∈ R E [ β k 2 ] + 2 ∑ k > ℓ ∈ R E [ β k β ℓ ] + 2 m s ∑ k > ℓ ∈ R Var [ β k ] E [ W ~ ℓ 2 ] + 1 m s ∑ k ∈ R E [ W ~ k 2 ] (173) \operatorname{MSE}[\hat{f}] \leq\sum_{k\in\mathcal{R}} \mathbb{E}\left[\beta_k^2\right] + 2\sum_{k>\ell\in\mathcal{R}} \mathbb{E}\left[\beta_k\beta_\ell\right] + \frac{2}{\sqrt{m_s}}\sum_{k>\ell\in\mathcal{R}}\sqrt{\operatorname{Var}[\beta_k]\mathbb{E}\left[\widetilde{W}_\ell^2\right]} + \frac{1}{m_s}\sum_{k\in\mathcal{R}}\mathbb{E}\left[\widetilde{W}_k^2\right] \tag*{(173)} MSE [ f ^ ] ≤ k ∈ R ∑ E [ β k 2 ] + 2 k > ℓ ∈ R ∑ E [ β k β ℓ ] + m s 2 k > ℓ ∈ R ∑ Var [ β k ] E [ W ℓ 2 ] + m s 1 k ∈ R ∑ E [ W k 2 ] (173)
= E [ ( ∑ k ∈ R β k ) 2 ] + 2 m s ∑ k > ℓ ∈ R Var [ β k ] E [ W ~ ℓ 2 ] + 1 m s ∑ k ∈ R E [ W ~ k 2 ] , (174) = \mathbb{E}\left[\left(\sum_{k\in\mathcal{R}}\beta_k\right)^2\right] + \frac{2}{\sqrt{m_s}}\sum_{k>\ell\in\mathcal{R}}\sqrt{\operatorname{Var}[\beta_k]\mathbb{E}\left[\widetilde{W}_\ell^2\right]} + \frac{1}{m_s}\sum_{k\in\mathcal{R}}\mathbb{E}\left[\widetilde{W}_k^2\right], \tag*{(174)} = E ( k ∈ R ∑ β k ) 2 + m s 2 k > ℓ ∈ R ∑ Var [ β k ] E [ W ℓ 2 ] + m s 1 k ∈ R ∑ E [ W k 2 ] , (174)
where in the last equality we recognised the first two sums as the expansion of the square of the total truncation error. Finally, applying ∣ Tr [ ρ L − k P i ] ∣ ≤ 1 \left|\operatorname{Tr}[\rho_{L-k}P_i]\right|\leq1 ∣ Tr [ ρ L − k P i ] ∣ ≤ 1 to Eq. (161) bounds the truncation error of a single layer by the mass that the threshold discards,
∣ β k ∣ ≤ ∑ i , ∣ c i ( k ) ∣ < b k ∣ c i ( k ) ∣ = W k − W ~ k , (175) |\beta_k| \leq\sum_{i,\lvert c_i^{(k)}\rvert<b_k}|c_i^{(k)}|=W_k-\widetilde{W}_k, \tag*{(175)} ∣ β k ∣ ≤ i , ∣ c i ( k ) ∣ < b k ∑ ∣ c i ( k ) ∣ = W k − W k , (175)
so that the triangle inequality, followed by the monotonicity of x ↦ x 2 x\mapsto x^2 x ↦ x 2 on [ 0 , ∞ ) [0,\infty) [ 0 , ∞ ) , gives
E [ ( ∑ k ∈ R β k ) 2 ] ≤ E [ ( ∑ k ∈ R ( W k − W ~ k ) ) 2 ] , (176) \mathbb{E}\left[\left(\sum_{k\in\mathcal{R}}\beta_k\right)^2\right]\leq\mathbb{E}\left[\left(\sum_{k\in\mathcal{R}}(W_k-\widetilde{W}_k)\right)^2\right], \tag*{(176)} E ( k ∈ R ∑ β k ) 2 ≤ E ( k ∈ R ∑ ( W k − W k ) ) 2 , (176)
which together with Eq. (174) is the claim of Eq. (151) and concludes the proof. We keep the variance of β k \beta_k β k explicit in Eq. (151) because it is the quantity that controls the coupling between layers, and it can always be bounded in the worst case using Eq. (175) ,
Var [ β k ] ≤ E [ β k 2 ] ≤ E [ ( W k − W ~ k ) 2 ] , (177) \operatorname{Var}[\beta_k]\leq\mathbb{E}\left[\beta_k^2\right]\leq\mathbb{E}\left[(W_k-\widetilde{W}_k)^2\right], \tag*{(177)} Var [ β k ] ≤ E [ β k 2 ] ≤ E [ ( W k − W k ) 2 ] , (177)
which turns the whole bound into an expression involving only the discarded masses and the retained one-norms. □
Mean squared error model
In order to better parse the consequences of Theorem 2, we propose a phenomenology model to explain the results observed in Figure 7 , by making assumptions on the behaviour of the one-norm and the discarded one-norm after truncation. We can retrieve the fact that truncating the smallest terms will add a floor to the error, but will decrease the asymptotically dominant term by a constant factor, compared to the unbiased case. The approximate inequality ≲ \lesssim ≲ captures that our bound holds approximately in the limit that L ≫ 1 L\gg1 L ≫ 1 .
Result 3 (Model for the MSE of the one-norm sampling with truncation). Assume that relative truncation is applied at each of the L L L layers with b k = ϵ r e l max j ∣ c j ( k ) ∣ b_k=\epsilon_{\mathrm{rel}}\max_j\lvert c_j^{(k)}\rvert b k = ϵ rel max j ∣ c j ( k ) ∣ , that the fraction of the one-norm discarded at layer k k k decays geometrically as φ k = ν ϵ r e l λ k − 1 \varphi_k=\nu\epsilon_{\mathrm{rel}}\lambda^{k-1} φ k = ν ϵ rel λ k − 1 with 0 < λ < 1 0<\lambda<1 0 < λ < 1 while the one-norm grows by a factor γ > 1 \gamma>1 γ > 1 per layer, that μ ϵ r e l ≪ 1 \mu\epsilon_{\mathrm{rel}}\ll1 μ ϵ rel ≪ 1 with μ = ν 1 − λ \mu=\frac{\nu}{1-\lambda} μ = 1 − λ ν , and that the truncation error of a layer varies little from run to run. Then, for q = γ λ ≠ 1 q=\gamma\lambda\ne1 q = γ λ = 1 ,
MSE [ f ^ ] ≲ ( ν ϵ r e l W 0 γ L q L − 1 q − 1 ) 2 + ( 1 − μ ϵ r e l ) 2 W 0 2 γ 2 L γ 2 − 1 1 m s , q = γ λ , (178) \operatorname{MSE}[\hat{f}]\lesssim\left(\nu\epsilon_{\mathrm{rel}}W_0\gamma^L\frac{q^L-1}{q-1}\right)^2+\frac{(1-\mu\epsilon_{\mathrm{rel}})^2W_0^2\gamma^{2L}}{\gamma^2-1}\frac{1}{m_s},\qquad q=\gamma\lambda, \tag*{(178)} MSE [ f ^ ] ≲ ( ν ϵ rel W 0 γ L q − 1 q L − 1 ) 2 + γ 2 − 1 ( 1 − μ ϵ rel ) 2 W 0 2 γ 2 L m s 1 , q = γ λ , (178)
where ν > 0 \nu>0 ν > 0 is a problem-dependent constant. For q = 1 q=1 q = 1 the geometric sum degenerates and ( q L − 1 ) / ( q − 1 ) (q^L-1)/(q-1) ( q L − 1 ) / ( q − 1 ) must be replaced by L L L , which is the marginal case discussed below and the one quoted in the main text in Eq. (30) .
We will consider a relative threshold,
b k = ϵ r e l max j ∣ c j ( k ) ∣ . (179) b_k=\epsilon_{\mathrm{rel}}\max_j\lvert c_j^{(k)}\rvert. \tag*{(179)} b k = ϵ rel j max ∣ c j ( k ) ∣ . (179)
Both quantities that Theorem 2 needs, the discarded mass W k − W ~ k W_k-\widetilde{W}_k W k − W k and the retained norm W ~ k \widetilde{W}_k W k , follow from a single modelling assumption on the fraction of the one-norm that the threshold removes at each layer. Let
φ k = W k − W ~ k W k (180) \varphi_k=\frac{W_k-\widetilde{W}_k}{W_k} \tag*{(180)} φ k = W k W k − W k (180)
be that fraction, and assume that it decays geometrically along the circuit at a rate λ \lambda λ
φ k = ν ϵ r e l λ k − 1 , 0 < λ < 1 , (181) \varphi_k = \nu\epsilon_{\mathrm{rel}}\lambda^{k-1}, \qquad0 < \lambda< 1, \tag*{(181)} φ k = ν ϵ rel λ k − 1 , 0 < λ < 1 , (181)
while the one-norm grows on average by a factor γ > 1 \gamma> 1 γ > 1 per layer, so that the norm arriving at layer k k k is W k = γ W ~ k − 1 W_k = \gamma\widetilde{W}_{k-1} W k = γ W k − 1 . The linear dependence on ϵ r e l \epsilon_{\mathrm{rel}} ϵ rel is what one expects in the first layers, where the coefficient distribution is still peaked and max j ∣ c j ( k ) ∣ \max_j \lvert c_j^{(k)}\rvert max j ∣ c j ( k ) ∣ sits well above the typical coefficient. The threshold then cuts into the bulk of the distribution, so that the mass below it grows linearly in ϵ r e l \epsilon_{\mathrm{rel}} ϵ rel . The decay in k k k reflects the flattening of the distribution as the circuit scrambles: once max j ∣ c j ( k ) ∣ \max_j \lvert c_j^{(k)}\rvert max j ∣ c j ( k ) ∣ approaches the typical coefficient, the threshold falls below it and much less is discarded.
Applying Eq. (181) to the retained norm, we get the recursion
W ~ k = ( 1 − φ k ) W k = γ ( 1 − φ k ) W ~ k − 1 , (182) \widetilde{W}_k = (1-\varphi_k)W_k = \gamma(1-\varphi_k)\widetilde{W}_{k-1}, \tag*{(182)} W k = ( 1 − φ k ) W k = γ ( 1 − φ k ) W k − 1 , (182)
and iterating from W ~ 0 = W 0 \widetilde{W}_0 = W_0 W 0 = W 0 gives
W ~ k = W 0 γ k ∏ j = 1 k ( 1 − φ j ) . (183) \widetilde{W}_k = W_0\gamma^k\prod_{j=1}^{k}(1-\varphi_j). \tag*{(183)} W k = W 0 γ k j = 1 ∏ k ( 1 − φ j ) . (183)
Because Eq. (181) is summable, the product converges and for ν ϵ r e l ≪ 1 \nu\epsilon_{\mathrm{rel}} \ll1 ν ϵ rel ≪ 1
∏ j = 1 ∞ ( 1 − φ j ) = exp ( ∑ j = 1 ∞ ln ( 1 − φ j ) ) ≃ exp ( − ∑ j = 1 ∞ φ j ) ≃ 1 − μ ϵ r e l , μ = ν 1 − λ , (184) \prod_{j=1}^{\infty}(1-\varphi_j) = \exp\left(\sum_{j=1}^{\infty}\ln(1-\varphi_j)\right) \simeq\exp\left(-\sum_{j=1}^{\infty}\varphi_j\right) \simeq1-\mu\epsilon_{\mathrm{rel}}, \qquad\mu= \frac{\nu}{1-\lambda}, \tag*{(184)} j = 1 ∏ ∞ ( 1 − φ j ) = exp ( j = 1 ∑ ∞ ln ( 1 − φ j ) ) ≃ exp ( − j = 1 ∑ ∞ φ j ) ≃ 1 − μ ϵ rel , μ = 1 − λ ν , (184)
where we expanded the logarithm and the exponential to first order and summed the geometric series. For sufficiently large k k k the retained norm is therefore
W ~ k ≃ ( 1 − μ ϵ r e l ) W 0 γ k . (185) \widetilde{W}_k \simeq(1-\mu\epsilon_{\mathrm{rel}})W_0\gamma^k. \tag*{(185)} W k ≃ ( 1 − μ ϵ rel ) W 0 γ k . (185)
Applying Eq. (181) to the discarded mass instead, and using W k = γ W ~ k − 1 W_k = \gamma\widetilde{W}_{k-1} W k = γ W k − 1 together with Eq. (183) , we find
W k − W ~ k = φ k W k = ν ϵ r e l W 0 γ k λ k − 1 ∏ j = 1 k − 1 ( 1 − φ j ) ≃ ν ϵ r e l W 0 γ k λ k − 1 , q = γ λ , (186) W_k-\widetilde{W}_k = \varphi_k W_k = \nu\epsilon_{\mathrm{rel}}W_0\gamma^k\lambda^{k-1}\prod_{j=1}^{k-1}(1-\varphi_j) \simeq\nu\epsilon_{\mathrm{rel}}W_0\gamma^k\lambda^{k-1}, \qquad q=\gamma\lambda, \tag*{(186)} W k − W k = φ k W k = ν ϵ rel W 0 γ k λ k − 1 j = 1 ∏ k − 1 ( 1 − φ j ) ≃ ν ϵ rel W 0 γ k λ k − 1 , q = γ λ , (186)
where in the last step we used that the product is 1 + O ( ϵ r e l ) 1+O(\epsilon_{\mathrm{rel}}) 1 + O ( ϵ rel ) and that the prefactor φ k \varphi_k φ k of Eq. (181) is already linear in ϵ r e l \epsilon_{\mathrm{rel}} ϵ rel .
Finally, assume that the truncation error of a layer varies little from run to run,
Var [ β k ] ≪ ( W k − W ~ k ) 2 , (187) \operatorname{Var}[\beta_k] \ll(W_k-\widetilde{W}_k)^2, \tag*{(187)} Var [ β k ] ≪ ( W k − W k ) 2 , (187)
so that the cross term of Eq. (151) can be dropped. What makes β k \beta_k β k fluctuate strongly is a coefficient sitting so close to b k b_k b k that the resampling noise of the previous layers decides whether it is kept or discarded. Away from that situation the set of surviving indices is a stable function of the incoming coefficients, so β k \beta_k β k varies only through the smooth run-to-run drift of those coefficients rather than through discrete changes of the discard set. It is in this sense, and not as a deterministic number, that β k \beta_k β k is treated as fixed here.
Inserting Eqs. (B89,B90,B91) into Eq. (151) with R = { 1 , … , L } R=\{1,\ldots,L\} R = { 1 , … , L } we find
MSE [ f ^ ] ≲ ( ν ϵ r e l W 0 γ ∑ k = 1 L q k − 1 ) 2 + ( 1 − μ ϵ r e l ) 2 W 0 2 m s ∑ k = 1 L γ 2 k (188) \operatorname{MSE}[\hat{f}] \lesssim\left(\nu\epsilon_{\mathrm{rel}}W_0\gamma\sum_{k=1}^{L}q^{k-1}\right)^2 + \frac{(1-\mu\epsilon_{\mathrm{rel}})^2W_0^2}{m_s}\sum_{k=1}^{L}\gamma^{2k} \tag*{(188)} MSE [ f ^ ] ≲ ( ν ϵ rel W 0 γ k = 1 ∑ L q k − 1 ) 2 + m s ( 1 − μ ϵ rel ) 2 W 0 2 k = 1 ∑ L γ 2 k (188)
= ( ν ϵ r e l W 0 γ q L − 1 q − 1 ) 2 + ( 1 − μ ϵ r e l ) 2 W 0 2 γ 2 m s ( γ 2 − 1 ) ( γ 2 L − 1 ) , (189) = \left(\nu\epsilon_{\mathrm{rel}}W_0\gamma\frac{q^L-1}{q-1}\right)^2 + \frac{(1-\mu\epsilon_{\mathrm{rel}})^2W_0^2\gamma^2}{m_s(\gamma^2-1)}(\gamma^{2L}-1), \tag*{(189)} = ( ν ϵ rel W 0 γ q − 1 q L − 1 ) 2 + m s ( γ 2 − 1 ) ( 1 − μ ϵ rel ) 2 W 0 2 γ 2 ( γ 2 L − 1 ) , (189)
which for large L L L is Eq. (178) . In the first line the cross term was dropped by Eq. (187) , and in the second line we summed the two geometric series.
The truncation term of Eq. (189) behaves in three different ways depending on q q q . For q < 1 q<1 q < 1 the discarded fraction shrinks faster than the one-norm grows, the series converges and the truncation error saturates at a depth-independent floor
( ∑ k = 1 ∞ ( W k − W ~ k ) ) 2 = ( ν ϵ r e l W 0 γ 1 − q ) 2 , (190) \left(\sum_{k=1}^{\infty}(W_k-\widetilde{W}_k)\right)^2 = \left(\frac{\nu\epsilon_{\mathrm{rel}}W_0\gamma}{1-q}\right)^2, \tag*{(190)} ( k = 1 ∑ ∞ ( W k − W k ) ) 2 = ( 1 − q ν ϵ rel W 0 γ ) 2 , (190)
so the bias does not accumulate with depth at all. For q = 1 q=1 q = 1 the sum is exactly L L L and we recover the linear accumulation ( ν ϵ r e l W 0 γ L ) 2 (\nu\epsilon_{\mathrm{rel}}W_0\gamma L)^2 ( ν ϵ rel W 0 γ L ) 2 quoted in the main text in Eq. (30) . For q > 1 q>1 q > 1 the truncation error grows exponentially as ϵ r e l 2 q 2 L \epsilon_{\mathrm{rel}}^2q^{2L} ϵ rel 2 q 2 L , and since it carries no factor of 1 / m s 1/m_s 1/ m s it cannot be reduced by sampling more.
Comb sampling
Throughout this subsection, m s m_s m s denotes the number of comb teeth at each resampling event, taken to be the same at every event. This holds exactly for uncalibrated comb sampling, where m s = m m_s=m m s = m , whereas calibration often yields m s > m m_s>m m s > m depending on the specific coefficient structure.
Bound on the variance of the comb sampling strategy
As we did for the one-norm sampling, let us start by analysing the variance of the estimator with the comb sampling strategy assuming that no truncation is done. We call this a result rather than theorem because we introduce some technical assumptions that we cannot guarantee will universally hold, and we denote it by the approximate ≲ \lesssim ≲ inequality. We retrieve the observed fact of Figure 3 that when the coefficient distribution is peaked (small L L L ), the error made with comb sampling has a better scaling with the number of samples than the one norm resampling (inverse quadratic vs. inverse linear), and when the coefficient distribution flattens (when L L L increases) the two methods have similar errors.
Result 4 (Unbiased comb sampling). Consider f = Tr [ ρ U † O U ] f=\operatorname{Tr}[\rho U^\dagger O U] f = Tr [ ρ U † O U ] , such that U = U L … U 2 U 1 U=U_L\ldots U_2U_1 U = U L … U 2 U 1 . Suppose that we propagate the observable forward using the comb sampling strategy of Appendix § 2.1.1 2 c to reduce the memory overhead at every layer k k k of a subset R ⊆ { 1 , … , L } \mathcal{R}\subseteq\{1,\ldots,L\} R ⊆ { 1 , … , L } , with comb spacing Δ k = W k / m s \Delta_k=W_k/m_s Δ k = W k / m s . Assume that the observable is generic with respect to the comb, meaning that the overlaps Tr [ ρ L − k P i ] \operatorname{Tr}[\rho_{L-k}P_i] Tr [ ρ L − k P i ] carry no information about the order in which the coefficients are laid out along the cumulative weights, so that the error probes the typical size of the correlations between comb counts rather than their worst combination. Then the mean squared error is bounded as
MSE [ f ^ ] ≲ 1 m s 2 ∑ k ∈ R E [ W k 2 ∑ i { ∣ c i ( k ) ∣ Δ k } ] , (191) \operatorname{MSE}[\hat{f}] \lesssim\frac{1}{m_s^2}\sum_{k\in\mathcal{R}}\mathbb{E}\left[W_k^2\sum_i\left\{\frac{\lvert c_i^{(k)}\rvert}{\Delta_k}\right\}\right], \tag*{(191)} MSE [ f ^ ] ≲ m s 2 1 k ∈ R ∑ E [ W k 2 i ∑ { Δ k ∣ c i ( k ) ∣ } ] , (191)
where { x } \{x\} { x } denotes the non-integer part of x x x , and where the expectation value accounts for the fact that the coefficients arriving at layer k k k are random, exactly as in Theorem 1 . If ∣ c i ( k ) ∣ < Δ k \lvert c_i^{(k)}\rvert<\Delta_k ∣ c i ( k ) ∣ < Δ k for all i i i , so that no coefficient fills a whole tooth, then ∑ i { ∣ c i ( k ) ∣ / Δ k } = m s \sum_i\{\lvert c_i^{(k)}\rvert/\Delta_k\}=m_s ∑ i {∣ c i ( k ) ∣ / Δ k } = m s and we recover the one-norm sampling bound of Theorem 1 ,
MSE [ f ^ ] ≲ 1 m s ∑ k ∈ R E [ W k 2 ] , (192) \operatorname{MSE}[\hat{f}]\lesssim\frac{1}{m_s}\sum_{k\in\mathcal{R}}\mathbb{E}[W_k^2], \tag*{(192)} MSE [ f ^ ] ≲ m s 1 k ∈ R ∑ E [ W k 2 ] , (192)
whereas if ∣ c i ( k ) ∣ ≫ Δ k \lvert c_i^{(k)}\rvert\gg\Delta_k ∣ c i ( k ) ∣ ≫ Δ k for all i i i , so that every coefficient spans many teeth, then only the last tooth of each coefficient is uncertain, the number ∣ P k ∣ \lvert\mathcal{P}_k\rvert ∣ P k ∣ of stored Pauli strings obeys ∣ P k ∣ ≪ m s \lvert\mathcal{P}_k\rvert\ll m_s ∣ P k ∣ ≪ m s , and ∑ i { ∣ c i ( k ) ∣ / Δ k } ≤ ∣ P k ∣ ≪ m s \sum_i\{\lvert c_i^{(k)}\rvert/\Delta_k\}\leq\lvert\mathcal{P}_k\rvert\ll m_s ∑ i {∣ c i ( k ) ∣ / Δ k } ≤ ∣ P k ∣ ≪ m s , so that
MSE [ f ^ ] ≲ 1 m s 2 ∑ k ∈ R E [ W k 2 ∣ P k ∣ ] , (193) \operatorname{MSE}[\hat{f}]\lesssim\frac{1}{m_s^2}\sum_{k\in\mathcal{R}}\mathbb{E}[W_k^2\lvert\mathcal{P}_k\rvert], \tag*{(193)} MSE [ f ^ ] ≲ m s 2 1 k ∈ R ∑ E [ W k 2 ∣ P k ∣] , (193)
which is smaller than the one-norm bound of Eq. (192) by the factor ∣ P k ∣ / m s ≪ 1 \lvert\mathcal{P}_k\rvert/m_s\ll1 ∣ P k ∣ / m s ≪ 1 . Here P k \mathcal{P}_k P k denotes the set of Pauli strings stored at layer k k k . In the extreme case where the one norm is carried by O ( 1 ) \mathcal{O}(1) O ( 1 ) coefficients, the bound becomes MSE [ f ^ ] ≲ m s − 2 ∑ k ∈ R E [ W k 2 ] \operatorname{MSE}[\hat{f}]\lesssim m_s^{-2}\sum_{k\in\mathcal{R}}\mathbb{E}[W_k^2] MSE [ f ^ ] ≲ m s − 2 ∑ k ∈ R E [ W k 2 ] .
Proof. Let us start by recalling the comb estimator of Eq. (59) , which for a spacing Δ k = W k / m s \Delta_k=W_k/m_s Δ k = W k / m s reads
c ^ i ( k ) = sgn ( c i ( k ) ) W k m s N i ( k ) , (194) \hat{c}_i^{(k)}=\operatorname{sgn}(c_i^{(k)})\frac{W_k}{m_s}N_i^{(k)}, \tag*{(194)} c ^ i ( k ) = sgn ( c i ( k ) ) m s W k N i ( k ) , (194)
where N i ( k ) N_i^{(k)} N i ( k ) is the number of comb teeth that fall in the interval corresponding to c i ( k ) c_i^{(k)} c i ( k ) . Contrary to the one-norm sampling, N i ( k ) N_i^{(k)} N i ( k ) does not follow a multinomial law. Instead, Eq. (63) gives
N i ( k ) = ⌊ ∣ c i ( k ) ∣ Δ k ⌋ + I i ( k ) , (195) N_i^{(k)}=\left\lfloor\frac{\lvert c_i^{(k)}\rvert}{\Delta_k}\right\rfloor+I_i^{(k)}, \tag*{(195)} N i ( k ) = ⌊ Δ k ∣ c i ( k ) ∣ ⌋ + I i ( k ) , (195)
where I i ( k ) I_i^{(k)} I i ( k ) takes the values 0 or 1 with E [ I i ( k ) ] = { ∣ c i ( k ) ∣ / Δ k } \mathbb{E}[I_i^{(k)}]=\{\lvert c_i^{(k)}\rvert/\Delta_k\} E [ I i ( k ) ] = {∣ c i ( k ) ∣ / Δ k } by Eq. (64) , and where the different I i ( k ) I_i^{(k)} I i ( k ) are not independent of each other because they are all driven by the single random offset of the comb.
The first two moments of the counts follow. The integer part of Eq. (195) is deterministic, so
E [ N i ( k ) ] = ⌊ ∣ c i ( k ) ∣ Δ k ⌋ + { ∣ c i ( k ) ∣ Δ k } = ∣ c i ( k ) ∣ Δ k , (196) \mathbb{E}\left[N_i^{(k)}\right]=\left\lfloor\frac{\left|c_i^{(k)}\right|}{\Delta_k}\right\rfloor+\left\{\frac{\left|c_i^{(k)}\right|}{\Delta_k}\right\}=\frac{\left|c_i^{(k)}\right|}{\Delta_k}, \tag*{(196)} E [ N i ( k ) ] = Δ k c i ( k ) + ⎩ ⎨ ⎧ Δ k c i ( k ) ⎭ ⎬ ⎫ = Δ k c i ( k ) , (196)
Var [ N i ( k ) ] = Var [ I i ( k ) ] = { ∣ c i ( k ) ∣ Δ k } ( 1 − { ∣ c i ( k ) ∣ Δ k } ) , (197) \operatorname{Var}\left[N_i^{(k)}\right]=\operatorname{Var}\left[I_i^{(k)}\right]=\left\{\frac{\left|c_i^{(k)}\right|}{\Delta_k}\right\}\left(1-\left\{\frac{\left|c_i^{(k)}\right|}{\Delta_k}\right\}\right), \tag*{(197)} Var [ N i ( k ) ] = Var [ I i ( k ) ] = ⎩ ⎨ ⎧ Δ k c i ( k ) ⎭ ⎬ ⎫ 1 − ⎩ ⎨ ⎧ Δ k c i ( k ) ⎭ ⎬ ⎫ , (197)
where in the first line we used x = ⌊ x ⌋ + { x } x=\lfloor x\rfloor+\{x\} x = ⌊ x ⌋ + { x } and in the second one that I i ( k ) I_i^{(k)} I i ( k ) is a Bernoulli variable of mean { ∣ c i ( k ) ∣ / Δ k } \left\{\left|c_i^{(k)}\right|/\Delta_k\right\} { c i ( k ) / Δ k } .
Recalling δ c i ( k ) = c ^ i ( k ) − c i ( k ) \delta c_i^{(k)}=\widehat{c}_i^{(k)}-c_i^{(k)} δ c i ( k ) = c i ( k ) − c i ( k ) from Lemma 1, Eqs. (194) –(197) give
E [ δ c i ( k ) ] = 0 , (198) \mathbb{E}\left[\delta c_i^{(k)}\right]=0, \tag*{(198)} E [ δ c i ( k ) ] = 0 , (198)
E [ ( δ c i ( k ) ) 2 ] = W k 2 m s 2 { ∣ c i ( k ) ∣ Δ k } ( 1 − { ∣ c i ( k ) ∣ Δ k } ) , (199) \mathbb{E}\left[\left(\delta c_i^{(k)}\right)^2\right]=\frac{W_k^2}{m_s^2}\left\{\frac{\left|c_i^{(k)}\right|}{\Delta_k}\right\}\left(1-\left\{\frac{\left|c_i^{(k)}\right|}{\Delta_k}\right\}\right), \tag*{(199)} E [ ( δ c i ( k ) ) 2 ] = m s 2 W k 2 ⎩ ⎨ ⎧ Δ k c i ( k ) ⎭ ⎬ ⎫ 1 − ⎩ ⎨ ⎧ Δ k c i ( k ) ⎭ ⎬ ⎫ , (199)
E [ δ c i ( k ) δ c j ( k ) ] = W k 2 m s 2 sgn ( c i ( k ) ) sgn ( c j ( k ) ) Covar [ N i ( k ) , N j ( k ) ] , i ≠ j . (200) \mathbb{E}\left[\delta c_i^{(k)}\delta c_j^{(k)}\right]=\frac{W_k^2}{m_s^2}\operatorname{sgn}\left(c_i^{(k)}\right)\operatorname{sgn}\left(c_j^{(k)}\right)\operatorname{Covar}\left[N_i^{(k)},N_j^{(k)}\right],\qquad i\ne j. \tag*{(200)} E [ δ c i ( k ) δ c j ( k ) ] = m s 2 W k 2 sgn ( c i ( k ) ) sgn ( c j ( k ) ) Covar [ N i ( k ) , N j ( k ) ] , i = j . (200)
This is where comb sampling departs from the one-norm sampling. There the covariance of the counts is known in closed form, Eq. (132) , whereas here the I i ( k ) I_i^{(k)} I i ( k ) are correlated through the single offset of the comb and Eq. (200) cannot be evaluated term by term. We therefore keep the covariances as a matrix.
Because Eq. (198) holds also when conditioned on the history of the propagation, the cross-layer cancellation of Eq. (140) applies directly and the expansion of Eq. (141) carries over unchanged,
MSE [ f ^ ] = ∑ k ∈ R E [ ( ∑ i δ c i ( k ) Tr [ ρ L − k P i ] ) 2 ] . (201) \operatorname{MSE}[\widehat{f}]=\sum_{k\in\mathcal{R}}\mathbb{E}\left[\left(\sum_i\delta c_i^{(k)}\operatorname{Tr}\left[\rho_{L-k}P_i\right]\right)^2\right]. \tag*{(201)} MSE [ f ] = k ∈ R ∑ E ( i ∑ δ c i ( k ) Tr [ ρ L − k P i ] ) 2 . (201)
Recall that we could not compute the value of the covariances, thus we expand the square of a single layer with Eqs. (199) ,(200) and write it as a matrix vector product
E [ ( ∑ i δ c i ( k ) Tr [ ρ L − k P i ] ) 2 ] = W k 2 m s 2 x T Λ x , (202) \mathbb{E}\left[\left(\sum_i\delta c_i^{(k)}\operatorname{Tr}\left[\rho_{L-k}P_i\right]\right)^2\right]=\frac{W_k^2}{m_s^2}x^{\mathsf{T}}\Lambda x, \tag*{(202)} E ( i ∑ δ c i ( k ) Tr [ ρ L − k P i ] ) 2 = m s 2 W k 2 x T Λ x , (202)
where
x i = sgn ( c i ( k ) ) Tr [ ρ L − k P i ] , Λ i j = Covar [ N i ( k ) , N j ( k ) ] , (203) x_i=\operatorname{sgn}\left(c_i^{(k)}\right)\operatorname{Tr}\left[\rho_{L-k}P_i\right],\qquad\Lambda_{ij}=\operatorname{Covar}\left[N_i^{(k)},N_j^{(k)}\right], \tag*{(203)} x i = sgn ( c i ( k ) ) Tr [ ρ L − k P i ] , Λ ij = Covar [ N i ( k ) , N j ( k ) ] , (203)
so that the diagonal of Λ \Lambda Λ is Λ i i = Var [ N i ( k ) ] \Lambda_{ii}=\operatorname{Var}\left[N_i^{(k)}\right] Λ ii = Var [ N i ( k ) ] .
The matrix Λ \Lambda Λ is a covariance matrix, hence positive semidefinite, and admits an eigendecomposition
Λ = ∑ a = 1 ∣ P k ∣ λ a u a u a T , (204) \Lambda=\sum_{a=1}^{\lvert P_k\rvert}\lambda_a u_a u_a^{\mathsf{T}}, \tag*{(204)} Λ = a = 1 ∑ ∣ P k ∣ λ a u a u a T , (204)
where P k P_k P k denotes the set of Pauli strings in the sum at layer k k k , so that ∣ P k ∣ \lvert P_k\rvert ∣ P k ∣ is their number, and the u a u_a u a are orthonormal. By the assumption of Result 4, x x x has no particular alignment with the eigenvectors of Λ \Lambda Λ , so that it can be approximated as
x ≃ ∥ x ∥ ∣ P k ∣ ∑ a = 1 ∣ P k ∣ u a , (205) x\simeq\frac{\lVert x\rVert}{\sqrt{\lvert P_k\rvert}}\sum_{a=1}^{\lvert P_k\rvert}u_a, \tag*{(205)} x ≃ ∣ P k ∣ ∥ x ∥ a = 1 ∑ ∣ P k ∣ u a , (205)
where we could have attached a different sign to each term without changing what follows. Using Eq. (205) twice in Eq. (202) we find
x T Λ x ≃ ∥ x ∥ ∣ P k ∣ ∑ b = 1 ∣ P k ∣ u b T ( ∥ x ∥ ∣ P k ∣ ∑ a = 1 ∣ P k ∣ λ a u a ) = ∥ x ∥ 2 ∣ P k ∣ ∑ a = 1 ∣ P k ∣ λ a , (206) x^{\mathsf{T}}\Lambda x\simeq\frac{\lVert x\rVert}{\sqrt{\lvert P_k\rvert}}\sum_{b=1}^{\lvert P_k\rvert}u_b^{\mathsf{T}}\left(\frac{\lVert x\rVert}{\sqrt{\lvert P_k\rvert}}\sum_{a=1}^{\lvert P_k\rvert}\lambda_a u_a\right)=\frac{\lVert x\rVert^2}{\lvert P_k\rvert}\sum_{a=1}^{\lvert P_k\rvert}\lambda_a, \tag*{(206)} x T Λ x ≃ ∣ P k ∣ ∥ x ∥ b = 1 ∑ ∣ P k ∣ u b T ∣ P k ∣ ∥ x ∥ a = 1 ∑ ∣ P k ∣ λ a u a = ∣ P k ∣ ∥ x ∥ 2 a = 1 ∑ ∣ P k ∣ λ a , (206)
∥ x ∥ 2 = ∑ i sgn ( c i ( k ) ) 2 Tr [ ρ L − k P i ] 2 = ∑ i Tr [ ρ L − k P i ] 2 ≤ ∣ P k ∣ . (207) \lVert x\rVert^2=\sum_i\operatorname{sgn}\left(c_i^{(k)}\right)^2\operatorname{Tr}\left[\rho_{L-k}P_i\right]^2=\sum_i\operatorname{Tr}\left[\rho_{L-k}P_i\right]^2\leq\lvert P_k\rvert. \tag*{(207)} ∥ x ∥ 2 = i ∑ sgn ( c i ( k ) ) 2 Tr [ ρ L − k P i ] 2 = i ∑ Tr [ ρ L − k P i ] 2 ≤ ∣ P k ∣ . (207)
where in the first line we used that the u a u_a u a are orthonormal eigenvectors of Λ \Lambda Λ , and in the second one that ∣ Tr [ ρ L − k P i ] ∣ ≤ 1 \left|\operatorname{Tr}[\rho L_{-k}P_i]\right| \le1 ∣ Tr [ ρ L − k P i ] ∣ ≤ 1 . Combining Eqs. (B110,B111) with ∑ a λ a = Tr [ Λ ] \sum_a \lambda_a=\operatorname{Tr}[\Lambda] ∑ a λ a = Tr [ Λ ] and Eq. (B101),
E [ ( ∑ i δ i ( k ) Tr [ ρ L − k P i ] ) 2 ] ≲ W k 2 m s 2 Tr [ Λ ] = W k 2 m s 2 ∑ i { ∣ c i ( k ) ∣ Δ k } ( 1 − { ∣ c i ( k ) ∣ Δ k } ) ≤ W k 2 m s 2 ∑ i { ∣ c i ( k ) ∣ Δ k } , (208) \begin{aligned}
\mathbb{E}\left[\left(\sum_i\delta_i^{(k)}\operatorname{Tr}[\rho L_{-k}P_i]\right)^2\right]\lesssim\frac{W_k^2}{m_s^2}\operatorname{Tr}[\Lambda]=\frac{W_k^2}{m_s^2}\sum_i\left\{\frac{\left|c_i^{(k)}\right|}{\Delta_k}\right\}\left(1-\left\{\frac{\left|c_i^{(k)}\right|}{\Delta_k}\right\}\right) \\
&\le\frac{W_k^2}{m_s^2}\sum_i\left\{\frac{\left|c_i^{(k)}\right|}{\Delta_k}\right\}, \tag*{(208)}
\end{aligned} E ( i ∑ δ i ( k ) Tr [ ρ L − k P i ] ) 2 ≲ m s 2 W k 2 Tr [ Λ ] = m s 2 W k 2 i ∑ ⎩ ⎨ ⎧ Δ k c i ( k ) ⎭ ⎬ ⎫ 1 − ⎩ ⎨ ⎧ Δ k c i ( k ) ⎭ ⎬ ⎫ ≤ m s 2 W k 2 i ∑ ⎩ ⎨ ⎧ Δ k c i ( k ) ⎭ ⎬ ⎫ , (208)
where in the last inequality we used { ∣ c i ( k ) ∣ / Δ k } ≤ 1 \left\{\left|c_i^{(k)}\right|/\Delta_k\right\}\le1 { c i ( k ) / Δ k } ≤ 1 . Inserting Eq. (B112) into Eq. (B105), and taking the outer expectation value over the coefficients arriving at layer k k k , gives Eq. (B95).
The two limits follow from the definition of the non-integer part. If ∣ c i ( k ) ∣ < Δ k \left|c_i^{(k)}\right|<\Delta_k c i ( k ) < Δ k for every i i i , then the integer part vanishes, so { ∣ c i ( k ) ∣ / Δ k } = ∣ c i ( k ) ∣ / Δ k \left\{\left|c_i^{(k)}\right|/\Delta_k\right\}=\left|c_i^{(k)}\right|/\Delta_k { c i ( k ) / Δ k } = c i ( k ) / Δ k and
∑ i { ∣ c i ( k ) ∣ Δ k } = 1 Δ k ∑ i ∣ c i ( k ) ∣ = W k Δ k = m s , (209) \sum_i\left\{\frac{\left|c_i^{(k)}\right|}{\Delta_k}\right\}=\frac{1}{\Delta_k}\sum_i\left|c_i^{(k)}\right|=\frac{W_k}{\Delta_k}=m_s, \tag*{(209)} i ∑ ⎩ ⎨ ⎧ Δ k c i ( k ) ⎭ ⎬ ⎫ = Δ k 1 i ∑ c i ( k ) = Δ k W k = m s , (209)
which turns Eq. (B95) into Eq. (B96). Every coefficient is then resolved by at most one tooth and the comb has no advantage over independent draws. If instead ∣ c i ( k ) ∣ ≫ Δ k \left|c_i^{(k)}\right|\gg\Delta_k c i ( k ) ≫ Δ k for every i i i , each coefficient is resolved by many teeth and only the last of them is uncertain, so each non-integer part is a subleading remainder and there are only ∣ P k ∣ \lvert\mathcal{P}_k\rvert ∣ P k ∣ of them. Since ∑ i ∣ c i ( k ) ∣ = W k = m s Δ k \sum_i\left|c_i^{(k)}\right|=W_k=m_s\Delta_k ∑ i c i ( k ) = W k = m s Δ k while every ∣ c i ( k ) ∣ ≫ Δ k \left|c_i^{(k)}\right|\gg\Delta_k c i ( k ) ≫ Δ k , we must have ∣ P k ∣ ≪ m s \lvert\mathcal{P}_k\rvert\ll m_s ∣ P k ∣ ≪ m s , and ∑ i { ∣ c i ( k ) ∣ / Δ k } ≤ ∣ P k ∣ ≪ m s \sum_i\left\{\left|c_i^{(k)}\right|/\Delta_k\right\}\le\lvert\mathcal{P}_k\rvert\ll m_s ∑ i { c i ( k ) / Δ k } ≤ ∣ P k ∣ ≪ m s , which gives Eq. (B97). This is the origin of the better scaling of comb resampling at early depth.
Deterministic truncation followed by comb resampling
We now analyze the error made with comb sampling when deterministic truncation is added. We obtain a similar bound as in Theorem 2, but the terms corresponding to the unbiased sampling on modified coefficients are replaced by the error made with comb sampling as described in Result 4.
Result 5 (MSE bound for the comb sampling with truncation). Consider f = Tr [ ρ U † O U ] f=\operatorname{Tr}[\rho U^\dagger O U] f = Tr [ ρ U † O U ] , such that U = U L … U 2 U 1 U=U_L\ldots U_2U_1 U = U L … U 2 U 1 . Suppose that we propagate the observable forward using the comb sampling strategy preceded by truncation as in Appendix A 2 b. At every layer k k k of a subset R ⊆ { 1 , … , L } \mathcal{R}\subseteq\{1,\ldots,L\} R ⊆ { 1 , … , L } we use a bias threshold b k b_k b k and a comb of spacing Δ ~ k = W ~ k / m s \widetilde{\Delta}_k=\widetilde{W}_k/m_s Δ k = W k / m s over the retained coefficients. Then, under the same assumption as Result 4, the mean squared error is bounded as
MSE [ f ^ ] ≲ E [ ( ∑ k ∈ R ( W k − W ~ k ) ) 2 ] + 2 m s ∑ k > ℓ ∈ R Var [ β k ] E [ W ~ ℓ 2 ∑ i { ∣ c ~ i ( ℓ ) ∣ Δ ~ ℓ } ] + 1 m s 2 ∑ k ∈ R E [ W ~ k 2 ∑ i { ∣ c ~ i ( k ) ∣ Δ ~ k } ] , (210) \operatorname{MSE}[\hat{f}]\lesssim\mathbb{E}\left[\left(\sum_{k\in\mathcal{R}}(W_k-\widetilde{W}_k)\right)^2\right]+\frac{2}{m_s}\sum_{k>\ell\in\mathcal{R}}\sqrt{\operatorname{Var}[\beta_k]\mathbb{E}\left[\widetilde{W}_\ell^2\sum_i\left\{\frac{\left|\widetilde{c}_i^{(\ell)}\right|}{\widetilde{\Delta}_\ell}\right\}\right]}+\frac{1}{m_s^2}\sum_{k\in\mathcal{R}}\mathbb{E}\left[\widetilde{W}_k^2\sum_i\left\{\frac{\left|\widetilde{c}_i^{(k)}\right|}{\widetilde{\Delta}_k}\right\}\right], \tag*{(210)} MSE [ f ^ ] ≲ E ( k ∈ R ∑ ( W k − W k ) ) 2 + m s 2 k > ℓ ∈ R ∑ Var [ β k ] E W ℓ 2 i ∑ ⎩ ⎨ ⎧ Δ ℓ c i ( ℓ ) ⎭ ⎬ ⎫ + m s 2 1 k ∈ R ∑ E W k 2 i ∑ ⎩ ⎨ ⎧ Δ k c i ( k ) ⎭ ⎬ ⎫ , (210) where W k W_k W k and W ~ k \widetilde{W}_k W k are the one norms without and with truncation as in Theorem 2, β k \beta_k β k is the truncation error committed at layer k k k , β k = − ∑ i , ∣ c i ( k ) ∣ ≤ b k c i ( k ) Tr [ ρ L − k P i ] \beta_k=-\sum_{i,\left|c_i^{(k)}\right|\le b_k}c_i^{(k)}\operatorname{Tr}[\rho L_{-k}P_i] β k = − ∑ i , c i ( k ) ≤ b k c i ( k ) Tr [ ρ L − k P i ] , and { ∣ c ~ i ( k ) ∣ / Δ ~ k } \left\{\left|\widetilde{c}_i^{(k)}\right|/\widetilde{\Delta}_k\right\} { c i ( k ) / Δ k } denotes the same non-integer part built with the truncated spacing Δ ~ k \widetilde{\Delta}_k Δ k , which follows the same convention as W ~ k \widetilde{W}_k W k and c ~ i ( k ) \widetilde{c}_i^{(k)} c i ( k ) .
Proof. We recall the definitions of S k S_k S k and β k \beta_k β k introduced in Eqs. (B64,B65)
S k = ∑ i , ∣ c i ( k ) ∣ > b k δ i ( k ) Tr [ ρ L − k P i ] , S_k=\sum_{i,\left|c_i^{(k)}\right|>b_k}\delta_i^{(k)}\operatorname{Tr}[\rho L_{-k}P_i], S k = i , c i ( k ) > b k ∑ δ i ( k ) Tr [ ρ L − k P i ] , β k = − ∑ i , ∣ c i ( k ) ∣ ≤ b k c i ( k ) Tr [ ρ L − k P i ] . \beta_k=-\sum_{i,\left|c_i^{(k)}\right|\le b_k}c_i^{(k)}\operatorname{Tr}[\rho L_{-k}P_i]. β k = − i , c i ( k ) ≤ b k ∑ c i ( k ) Tr [ ρ L − k P i ] .
and the expression of the mean square error of f ^ \hat{f} f ^ as in Eq. (166)
MSE [ f ^ ] = ∑ k ∈ R E [ ( S k + β k ) 2 ] + 2 ∑ k > ℓ ∈ R E [ ( S k + β k ) ( S ℓ + β ℓ ) ] (211) \operatorname{MSE}[\hat{f}] = \sum_{k\in\mathcal{R}} \mathbb{E}\left[(S_k+\beta_k)^2\right] + 2\sum_{k>\ell\in\mathcal{R}}\mathbb{E}\left[(S_k+\beta_k)(S_\ell+\beta_\ell)\right] \tag*{(211)} MSE [ f ^ ] = k ∈ R ∑ E [ ( S k + β k ) 2 ] + 2 k > ℓ ∈ R ∑ E [ ( S k + β k ) ( S ℓ + β ℓ ) ] (211)
We have, with the same justification as in Eq. (168) and Eq. (171) that
E [ ( S k + β k ) 2 ] = E [ S k 2 ] + E [ β k 2 ] (212) \mathbb{E}\left[(S_k+\beta_k)^2\right] = \mathbb{E}\left[S_k^2\right]+\mathbb{E}\left[\beta_k^2\right] \tag*{(212)} E [ ( S k + β k ) 2 ] = E [ S k 2 ] + E [ β k 2 ] (212)
E [ ( S k + β k ) ( S ℓ + β ℓ ) ] = E [ β k ( S ℓ + β ℓ ) ] (213) \mathbb{E}\left[(S_k+\beta_k)(S_\ell+\beta_\ell)\right] = \mathbb{E}\left[\beta_k(S_\ell+\beta_\ell)\right] \tag*{(213)} E [ ( S k + β k ) ( S ℓ + β ℓ ) ] = E [ β k ( S ℓ + β ℓ ) ] (213)
We can transform the last equation in the same way as in Eq. (172) that gives us
E [ ( S k + β k ) ( S ℓ + β ℓ ) ] = E [ β k β ℓ ] + E [ β k S ℓ ] (214) \mathbb{E}\left[(S_k+\beta_k)(S_\ell+\beta_\ell)\right] = \mathbb{E}\left[\beta_k\beta_\ell\right]+\mathbb{E}\left[\beta_kS_\ell\right] \tag*{(214)} E [ ( S k + β k ) ( S ℓ + β ℓ ) ] = E [ β k β ℓ ] + E [ β k S ℓ ] (214)
E [ ( S k + β k ) ( S ℓ + β ℓ ) ] ≤ E [ β k β ℓ ] + Var ( β k ) Var ( S ℓ ) (215) \mathbb{E}\left[(S_k+\beta_k)(S_\ell+\beta_\ell)\right] \le\mathbb{E}\left[\beta_k\beta_\ell\right]+\sqrt{\operatorname{Var}(\beta_k)\operatorname{Var}(S_\ell)} \tag*{(215)} E [ ( S k + β k ) ( S ℓ + β ℓ ) ] ≤ E [ β k β ℓ ] + Var ( β k ) Var ( S ℓ ) (215)
Then we can recover Eq. (211) , and the derived Eqs. (212) ,(215) to find the following bound
MSE [ f ^ ] ≤ ∑ k ∈ R E [ β k 2 ] + ∑ k ∈ R E [ S k 2 ] + 2 ∑ k > ℓ ∈ R E [ β k β ℓ ] + 2 ∑ k > ℓ ∈ R Var ( β k ) Var ( S ℓ ) (216) \operatorname{MSE}[\hat{f}] \le\sum_{k\in\mathcal{R}}\mathbb{E}[\beta_k^2]+\sum_{k\in\mathcal{R}}\mathbb{E}[S_k^2]+2\sum_{k>\ell\in\mathcal{R}}\mathbb{E}[\beta_k\beta_\ell]+2\sum_{k>\ell\in\mathcal{R}}\sqrt{\operatorname{Var}(\beta_k)\operatorname{Var}(S_\ell)} \tag*{(216)} MSE [ f ^ ] ≤ k ∈ R ∑ E [ β k 2 ] + k ∈ R ∑ E [ S k 2 ] + 2 k > ℓ ∈ R ∑ E [ β k β ℓ ] + 2 k > ℓ ∈ R ∑ Var ( β k ) Var ( S ℓ ) (216)
= E [ ( ∑ k ∈ R β k ) 2 ] + 2 ∑ k > ℓ ∈ R Var ( β k ) Var ( S ℓ ) + ∑ k ∈ R E [ S k 2 ] (217) = \mathbb{E}\left[\left(\sum_{k\in\mathcal{R}}\beta_k\right)^2\right]+2\sum_{k>\ell\in\mathcal{R}}\sqrt{\operatorname{Var}(\beta_k)\operatorname{Var}(S_\ell)}+\sum_{k\in\mathcal{R}}\mathbb{E}[S_k^2] \tag*{(217)} = E ( k ∈ R ∑ β k ) 2 + 2 k > ℓ ∈ R ∑ Var ( β k ) Var ( S ℓ ) + k ∈ R ∑ E [ S k 2 ] (217)
where in the equality we grouped the terms summing in β i \beta_i β i .
The comb resampling with bias can be described as comb resampling with modified coefficients. The modified coefficients, modified one-norm and modified probabilities at layer k k k with threshold b k b_k b k are those of Eqs. (152) -(154) , and the estimator of the coefficient i i i at layer k k k is now
c ~ i ( k ) = sgn ( c i ( k ) ) W ~ k m s N i ( k ) , (218) \widetilde{c}_i^{(k)}=\operatorname{sgn}(c_i^{(k)})\frac{\widetilde{W}_k}{m_s}N_i^{(k)}, \tag*{(218)} c i ( k ) = sgn ( c i ( k ) ) m s W k N i ( k ) , (218)
where N i ( k ) N_i^{(k)} N i ( k ) counts the teeth of a comb of spacing Δ ~ k \widetilde{\Delta}_k Δ k laid over the cumulative weights of the retained coefficients only. For a retained index, ∣ c i ( k ) ∣ > b k \lvert c_i^{(k)}\rvert>b_k ∣ c i ( k ) ∣ > b k , the resampling step is exactly the comb sampling of Appendix § 2.1.1 2 c applied to the modified Pauli sum ∑ i c ~ i ( k ) P i \sum_i\widetilde{c}_i^{(k)}P_i ∑ i c i ( k ) P i . The computations of Result 4 therefore hold with W k W_k W k replaced by W ~ k \widetilde{W}_k W k and Δ k \Delta_k Δ k by Δ ~ k \widetilde{\Delta}_k Δ k , so that Eqs. (198) -(200) become
E [ δ c i ( k ) ] = 0 , (219) \mathbb{E}\left[\delta c_i^{(k)}\right]=0, \tag*{(219)} E [ δ c i ( k ) ] = 0 , (219)
E [ ( δ c i ( k ) ) 2 ] = W ~ k 2 m s 2 { ∣ c i ( k ) ∣ Δ ~ k } ( 1 − { ∣ c i ( k ) ∣ Δ ~ k } ) , (220) \mathbb{E}\left[\left(\delta c_i^{(k)}\right)^2\right]=\frac{\widetilde{W}_k^2}{m_s^2}\left\{\frac{\lvert c_i^{(k)}\rvert}{\widetilde{\Delta}_k}\right\}\left(1-\left\{\frac{\lvert c_i^{(k)}\rvert}{\widetilde{\Delta}_k}\right\}\right), \tag*{(220)} E [ ( δ c i ( k ) ) 2 ] = m s 2 W k 2 { Δ k ∣ c i ( k ) ∣ } ( 1 − { Δ k ∣ c i ( k ) ∣ } ) , (220)
E [ δ c i ( k ) δ c j ( k ) ] = W ~ k 2 m s 2 sgn ( c i ( k ) ) sgn ( c j ( k ) ) Covar [ N i ( k ) , N j ( k ) ] , i ≠ j . (221) \mathbb{E}\left[\delta c_i^{(k)}\delta c_j^{(k)}\right]=\frac{\widetilde{W}_k^2}{m_s^2}\operatorname{sgn}(c_i^{(k)})\operatorname{sgn}(c_j^{(k)})\operatorname{Covar}\left[N_i^{(k)},N_j^{(k)}\right],\qquad i\ne j. \tag*{(221)} E [ δ c i ( k ) δ c j ( k ) ] = m s 2 W k 2 sgn ( c i ( k ) ) sgn ( c j ( k ) ) Covar [ N i ( k ) , N j ( k ) ] , i = j . (221)
For a discarded index, ∣ c i ( k ) ∣ ≤ b k \lvert c_i^{(k)}\rvert\le b_k ∣ c i ( k ) ∣ ≤ b k , Eq. (152) gives c ~ i ( k ) = 0 \widetilde{c}_i^{(k)}=0 c i ( k ) = 0 , so the interval that this index occupies in the cumulative weights has zero width and no tooth can fall in it. Equation (218) then yields c ^ i ( k ) = 0 \widehat{c}_i^{(k)}=0 c i ( k ) = 0 , and therefore δ c i ( k ) = − c i ( k ) \delta c_i^{(k)}=-c_i^{(k)} δ c i ( k ) = − c i ( k ) for every discarded index i i i , exactly as in the one-norm case.
The second moment of S k S_k S k follows from Eqs. (202) -(208) with the sums restricted to the retained indices,
E [ S k 2 ] ≲ W ~ k 2 m s 2 ∑ i { ∣ c i ( k ) ∣ Δ ~ k } . (222) \mathbb{E}\left[S_k^2\right]\lesssim\frac{\widetilde{W}_k^2}{m_s^2}\sum_i\left\{\frac{\lvert c_i^{(k)}\rvert}{\widetilde{\Delta}_k}\right\}. \tag*{(222)} E [ S k 2 ] ≲ m s 2 W k 2 i ∑ { Δ k ∣ c i ( k ) ∣ } . (222)
This is Eq. (191) with the full one-norm replaced by the retained one and the remainders recomputed after truncation, and it is the sense in which truncation reduces the sampling noise of the comb.
By plugging Eq. (222) , and using that E [ S k ] = 0 \mathbb{E}[S_k]=0 E [ S k ] = 0 in Eq. (217) , we have
MSE [ f ^ ] ≲ E [ ( ∑ k ∈ R β k ) 2 ] + 2 m s 2 ∑ k > ℓ ∈ R Var [ β k ] E [ W ~ ℓ 2 ∑ i { ∣ c i ( ℓ ) ∣ Δ ~ ℓ } ] + 1 m s 2 ∑ k ∈ R E [ W ~ k 2 ∑ i { ∣ c i ( k ) ∣ Δ ~ k } ] , (223) \operatorname{MSE}[\hat{f}]\lesssim\mathbb{E}\left[\left(\sum_{k\in\mathcal{R}}\beta_k\right)^2\right]+\frac{2}{m_s^2}\sum_{k>\ell\in\mathcal{R}}\sqrt{\operatorname{Var}[\beta_k]\mathbb{E}\left[\widetilde{W}_\ell^2\sum_i\left\{\frac{\lvert c_i^{(\ell)}\rvert}{\widetilde{\Delta}_\ell}\right\}\right]}+\frac{1}{m_s^2}\sum_{k\in\mathcal{R}}\mathbb{E}\left[\widetilde{W}_k^2\sum_i\left\{\frac{\lvert c_i^{(k)}\rvert}{\widetilde{\Delta}_k}\right\}\right], \tag*{(223)} MSE [ f ^ ] ≲ E ( k ∈ R ∑ β k ) 2 + m s 2 2 k > ℓ ∈ R ∑ Var [ β k ] E [ W ℓ 2 i ∑ { Δ ℓ ∣ c i ( ℓ ) ∣ } ] + m s 2 1 k ∈ R ∑ E [ W k 2 i ∑ { Δ k ∣ c i ( k ) ∣ } ] , (223)
which concludes the proof.
Mean squared error model
We apply the same phenomenological model as in Result 2 to the comb sampling estimator. We obtain the same result, and we cannot show a distinctive effect of comb sampling because it would require to model how the concentration of the coefficient distribution evolves, and there is not a clear way to do it.
Result 6 (Model for the MSE of the comb sampling with truncation). Assume the same three ingredients as in Result 3, namely a relative threshold b k = ϵ r e l max j ∣ c j ( k ) ∣ b_k = \epsilon_{\mathrm{rel}} \max_j \lvert c_j^{(k)} \rvert b k = ϵ rel max j ∣ c j ( k ) ∣ , a discarded fraction φ k = ν ϵ r e l λ k − 1 \varphi_k = \nu\epsilon_{\mathrm{rel}} \lambda^{k-1} φ k = ν ϵ rel λ k − 1 against a one-norm growing by γ > 1 \gamma> 1 γ > 1 per layer, a truncation error that varies little from run to run, and ν ϵ r e l ≪ 1 \nu\epsilon_{\mathrm{rel}} \ll1 ν ϵ rel ≪ 1 . Then, for q = γ λ ≠ 1 q = \gamma\lambda\ne1 q = γ λ = 1 ,
MSE [ f ^ ] ≲ ( ν ϵ r e l W 0 γ q L − 1 q − 1 ) 2 + ( 1 − μ ϵ r e l ) 2 W 0 2 γ 2 γ 2 − 1 γ 2 L m s , (224) \operatorname{MSE}[\hat{f}] \lesssim\left(\nu\epsilon_{\mathrm{rel}} W_0 \gamma\frac{q^L-1}{q-1}\right)^2 + \frac{(1-\mu\epsilon_{\mathrm{rel}})^2 W_0^2 \gamma^2}{\gamma^2-1}\frac{\gamma^{2L}}{m_s}, \tag*{(224)} MSE [ f ^ ] ≲ ( ν ϵ rel W 0 γ q − 1 q L − 1 ) 2 + γ 2 − 1 ( 1 − μ ϵ rel ) 2 W 0 2 γ 2 m s γ 2 L , (224) *where q = γ λ q = \gamma\lambda q = γ λ and μ = ν / ( 1 − λ ) \mu= \nu/(1-\lambda) μ = ν / ( 1 − λ ) , with ( q L − 1 ) / ( q − 1 ) (q^L-1)/(q-1) ( q L − 1 ) / ( q − 1 ) replaced by L L L when q = 1 q=1 q = 1 . This is exactly the model of Result 3: once the remainder factor is bounded by m s m_s m s , the comb bound collapses onto the one-norm bound, so this model cannot resolve the difference between the two schemes. The advantage of the comb is the one identified in the second regime of Result 4, where the remainder factor is ∣ P k ∣ ≪ m s \lvert P_k\rvert\ll m_s ∣ P k ∣ ≪ m s rather than m s m_s m s .
Proof. The truncation part of Eq. (210) is identical to that of Theorem 2, so the assumptions of Appendix § 2.1.2 § 3.2.2 apply to it word for word. The relative threshold of Eq. (179) and the geometric decay of Eq. (181) give the retained norm of Eq. (185) and the discarded mass of Eq. (186) , and Eq. (187) lets us drop the cross term. What is new is the extra factor ∑ i { ∣ c ~ i ( k ) ∣ / Δ ~ k } \sum_i \{\lvert\tilde{c}_i^{(k)}\rvert/\tilde{\Delta}_k\} ∑ i {∣ c ~ i ( k ) ∣ / Δ ~ k } carried by the sampling noise, and for it no further assumption is needed. Since the non-integer part obeys { x } ≤ x \{x\}\le x { x } ≤ x for x ≥ 0 x\ge0 x ≥ 0 ,
∑ i { ∣ c ~ i ( k ) ∣ Δ ~ k } ≤ 1 Δ ~ k ∑ i ∣ c i ( k ) ∣ = W ~ k Δ ~ k = m s , (225) \sum_i \left\{\frac{\lvert\tilde{c}_i^{(k)}\rvert}{\tilde{\Delta}_k}\right\}\le\frac{1}{\tilde{\Delta}_k}\sum_i\lvert c_i^{(k)}\rvert=\frac{\widetilde{W}_k}{\tilde{\Delta}_k}=m_s, \tag*{(225)} i ∑ { Δ ~ k ∣ c ~ i ( k ) ∣ } ≤ Δ ~ k 1 i ∑ ∣ c i ( k ) ∣ = Δ ~ k W k = m s , (225)
where in the last two steps we used the definition of the retained one-norm and Δ ~ k = W ~ k / m s \tilde{\Delta}_k=\widetilde{W}_k/m_s Δ ~ k = W k / m s . Inserting Eqs. (185) ,(186) ,(187) ,(225) into Eq. (210) with R = { 1 , … , L } R=\{1,\ldots,L\} R = { 1 , … , L } , the sampling noise becomes
1 m s 2 ∑ k = 1 L W ~ k 2 ∑ i { ∣ c ~ i ( k ) ∣ Δ ~ k } ≤ 1 m s ∑ k = 1 L W ~ k 2 ≃ ( 1 − μ ϵ r e l ) 2 W 0 2 γ 2 m s ( γ 2 − 1 ) ( γ 2 L − 1 ) , (226) \frac{1}{m_s^2}\sum_{k=1}^{L}\widetilde{W}_k^2\sum_i\left\{\frac{\lvert\tilde{c}_i^{(k)}\rvert}{\tilde{\Delta}_k}\right\}\le\frac{1}{m_s}\sum_{k=1}^{L}\widetilde{W}_k^2\simeq\frac{(1-\mu\epsilon_{\mathrm{rel}})^2W_0^2\gamma^2}{m_s(\gamma^2-1)}\left(\gamma^{2L}-1\right), \tag*{(226)} m s 2 1 k = 1 ∑ L W k 2 i ∑ { Δ ~ k ∣ c ~ i ( k ) ∣ } ≤ m s 1 k = 1 ∑ L W k 2 ≃ m s ( γ 2 − 1 ) ( 1 − μ ϵ rel ) 2 W 0 2 γ 2 ( γ 2 L − 1 ) , (226)
which for large L L L gives Eq. (224) . Equation (B129) is saturated when every retained coefficient is smaller than one comb tooth, which is the first limit of Result 4, and which concludes the proof.
Merging and the number of effective draws
All the bounds derived so far are controlled by the number of raw draws m s m_s m s , whereas the memory only holds the number m p m_p m p of distinct Pauli strings. The two differ because repeated draws are merged, and how much they differ depends on how peaked the coefficient distribution is. The following occupancy model relates them.
Result 7 (Effective number of draws). Suppose that m s m_s m s independent one-norm draws are taken from the coefficient distribution induced by the one-norm resampling, with p i = ∣ c i ∣ / W p_i=\lvert c_i\rvert/W p i = ∣ c i ∣ / W as in Eq. (39) and that the m p m_p m p distinct outcomes are merged and stored. Then, up to a fixed relative deviation δ > 0 \delta>0 δ > 0 on the number of stored strings, the number of raw draws that m p m_p m p represents obeys
m s ∝ m p 2 with probability 1 − O ( 1 δ 2 m p ) (227) m_s\propto m_p^2 \qquad\text{with probability }1-\mathcal{O}\left(\frac{1}{\delta^2m_p}\right) \tag*{(227)} m s ∝ m p 2 with probability 1 − O ( δ 2 m p 1 ) (227) for the power law p i = C i − 2 p_i=C i^{-2} p i = C i − 2 , and
m s ∝ m p with probability 1 − O ( 1 δ 2 m p ) (228) m_s\propto m_p \qquad\text{with probability }1-\mathcal{O}\left(\frac{1}{\delta^2m_p}\right) \tag*{(228)} m s ∝ m p with probability 1 − O ( δ 2 m p 1 ) (228) for the uniform distribution over N N N Pauli strings with m p = c N m_p=cN m p = c N and 0 < c < 1 0<c<1 0 < c < 1 held fixed. A variance proportional to 1 / m s 1/m_s 1/ m s decays as m p − 2 m_p^{-2} m p − 2 for the power law but only as m p − 1 m_p^{-1} m p − 1 for the uniform distribution.
Proof. To relate m s m_s m s and m p m_p m p , let I i ( m s ) I_i(m_s) I i ( m s ) indicate whether outcome i i i has appeared at least once in m s m_s m s independent draws. Since the draws are independent, outcome i i i is missed with probability ( 1 − p i ) m s (1-p_i)^{m_s} ( 1 − p i ) m s and
E [ I i ( m s ) ] = 1 − ( 1 − p i ) m s , (229) \mathbb{E}[I_i(m_s)] = 1 - (1-p_i)^{m_s}, \tag*{(229)} E [ I i ( m s )] = 1 − ( 1 − p i ) m s , (229)
so that the number of distinct Pauli strings, U ( m s ) = ∑ i I i ( m s ) U(m_s) = \sum_i I_i(m_s) U ( m s ) = ∑ i I i ( m s ) , has mean
E [ U ( m s ) ] = ∑ i [ 1 − ( 1 − p i ) m s ] . (230) \mathbb{E}[U(m_s)] = \sum_i [1-(1-p_i)^{m_s}]. \tag*{(230)} E [ U ( m s )] = i ∑ [ 1 − ( 1 − p i ) m s ] . (230)
Identifying m p m_p m p with E [ U ( m s ) ] \mathbb{E}[U(m_s)] E [ U ( m s )] and inverting Eq. (230) estimates the number of raw draws represented by m p m_p m p stored Pauli strings. This is an occupancy model for the scaling seen in the data, and it does not assert that every detail of merged propagation is equivalent to independent trajectories.
That identification is only useful if U ( m s ) U(m_s) U ( m s ) does not fluctuate much from run to run, so let us bound its variance. Because I i ( m s ) ∈ { 0 , 1 } I_i(m_s) \in\{0,1\} I i ( m s ) ∈ { 0 , 1 } we have I i ( m s ) 2 = I i ( m s ) I_i(m_s)^2 = I_i(m_s) I i ( m s ) 2 = I i ( m s ) , and therefore
Var [ I i ] = E [ I i ( m s ) 2 ] − E [ I i ( m s ) ] 2 = E [ I i ( m s ) ] ( 1 − E [ I i ( m s ) ] ) = ( 1 − p i ) m s [ 1 − ( 1 − p i ) m s ] . (231) \begin{aligned}
\operatorname{Var}[I_i] = \mathbb{E}[I_i(m_s)^2] - \mathbb{E}[I_i(m_s)]^2 = \mathbb{E}[I_i(m_s)](1-\mathbb{E}[I_i(m_s)]) \\
&= (1-p_i)^{m_s}\left[1-(1-p_i)^{m_s}\right]. \tag*{(231)}
\end{aligned} Var [ I i ] = E [ I i ( m s ) 2 ] − E [ I i ( m s ) ] 2 = E [ I i ( m s )] ( 1 − E [ I i ( m s )]) = ( 1 − p i ) m s [ 1 − ( 1 − p i ) m s ] . (231)
The indicators are not independent, because a fixed number of draws makes the outcomes compete for them. For i ≠ j i \ne j i = j ,
Covar [ I i , I j ] = Pr ( I i = 1 , I j = 1 ) − Pr ( I i = 1 ) Pr ( I j = 1 ) = [ 1 − ( 1 − p i ) m s − ( 1 − p j ) m s + ( 1 − p i − p j ) m s ] \begin{aligned}
\operatorname{Covar}[I_i,I_j] = \Pr(I_i=1,I_j=1)-\Pr(I_i=1)\Pr(I_j=1) \\
&= \left[1-(1-p_i)^{m_s}-(1-p_j)^{m_s}+(1-p_i-p_j)^{m_s}\right]
\end{aligned} Covar [ I i , I j ] = Pr ( I i = 1 , I j = 1 ) − Pr ( I i = 1 ) Pr ( I j = 1 ) = [ 1 − ( 1 − p i ) m s − ( 1 − p j ) m s + ( 1 − p i − p j ) m s ]
− [ 1 − ( 1 − p i ) m s ] [ 1 − ( 1 − p j ) m s ] = ( 1 − p i − p j ) m s − ( 1 − p i ) m s ( 1 − p j ) m s ≤ 0 , (232) \begin{aligned}
\quad-\left[1-(1-p_i)^{m_s}\right]\left[1-(1-p_j)^{m_s}\right] \\
&= (1-p_i-p_j)^{m_s}-(1-p_i)^{m_s}(1-p_j)^{m_s}\le0, \tag*{(232)}
\end{aligned} − [ 1 − ( 1 − p i ) m s ] [ 1 − ( 1 − p j ) m s ] = ( 1 − p i − p j ) m s − ( 1 − p i ) m s ( 1 − p j ) m s ≤ 0 , (232)
where the second equality is inclusion–exclusion for Pr ( I i = 1 , I j = 1 ) \Pr(I_i=1,I_j=1) Pr ( I i = 1 , I j = 1 ) and Pr ( I i = 0 , I j = 0 ) = ( 1 − p i − p j ) m s \Pr(I_i=0,I_j=0)=(1-p_i-p_j)^{m_s} Pr ( I i = 0 , I j = 0 ) = ( 1 − p i − p j ) m s . The result is non-positive because ( 1 − x − y ) k ≤ [ ( 1 − x ) ( 1 − y ) ] k (1-x-y)^k \le[(1-x)(1-y)]^k ( 1 − x − y ) k ≤ [( 1 − x ) ( 1 − y ) ] k for x , y ≥ 0 x,y \ge0 x , y ≥ 0 , so that summing Eqs. (231) ,(232) gives
Var [ U ( m s ) ] = ∑ i Var [ I i ] + ∑ i ≠ j Covar [ I i , I j ] ≤ ∑ i ( 1 − p i ) m s [ 1 − ( 1 − p i ) m s ] ≤ E [ U ( m s ) ] , (233) \operatorname{Var}[U(m_s)] = \sum_i \operatorname{Var}[I_i] + \sum_{i\ne j}\operatorname{Covar}[I_i,I_j]
\le\sum_i (1-p_i)^{m_s}\left[1-(1-p_i)^{m_s}\right]\le\mathbb{E}[U(m_s)], \tag*{(233)} Var [ U ( m s )] = i ∑ Var [ I i ] + i = j ∑ Covar [ I i , I j ] ≤ i ∑ ( 1 − p i ) m s [ 1 − ( 1 − p i ) m s ] ≤ E [ U ( m s )] , (233)
where in the last inequality we used ( 1 − p i ) m s ≤ 1 (1-p_i)^{m_s}\le1 ( 1 − p i ) m s ≤ 1 together with Eqs. (229) ,(230) . Equation (233) holds for any coefficient distribution and is all we need, since Chebyshev’s inequality then bounds the probability of departing from Eq. (230) by a fraction δ \delta δ as
Pr ( ∣ U ( m s ) − E [ U ( m s ) ] ∣ > δ E [ U ( m s ) ] ) ≤ Var [ U ( m s ) ] δ 2 E [ U ( m s ) ] 2 ≤ 1 δ 2 m p . (234) \Pr\left(\left|U(m_s)-\mathbb{E}[U(m_s)]\right|>\delta\mathbb{E}[U(m_s)]\right)
\le\frac{\operatorname{Var}[U(m_s)]}{\delta^2\mathbb{E}[U(m_s)]^2}
\le\frac{1}{\delta^2m_p}. \tag*{(234)} Pr ( ∣ U ( m s ) − E [ U ( m s )] ∣ > δ E [ U ( m s )] ) ≤ δ 2 E [ U ( m s ) ] 2 Var [ U ( m s )] ≤ δ 2 m p 1 . (234)
The number of stored Pauli strings therefore concentrates around Eq. (230) . Equation (234) is expressed in terms of m p m_p m p , and substituting the relation between m p m_p m p and m s m_s m s turns it into a bound in terms of the number of raw draws, which we do for each of the two distributions of interest below.
Peaked distributions. Take p i = C i − α p_i = Ci^{-\alpha} p i = C i − α with α > 1 \alpha>1 α > 1 . For small p i p_i p i and large m s m_s m s we have ( 1 − p i ) m s ≃ e − m s p i (1-p_i)^{m_s}\simeq e^{-m_sp_i} ( 1 − p i ) m s ≃ e − m s p i , so that Eq. (230) becomes
m p ≃ ∑ i = 1 ∞ ( 1 − e − C m s / i α ) . (235) m_p \simeq\sum_{i=1}^{\infty}\left(1-e^{-Cm_s/i^\alpha}\right). \tag*{(235)} m p ≃ i = 1 ∑ ∞ ( 1 − e − C m s / i α ) . (235)
Approximating the sum by an integral and substituting u = C m s / x α u=Cm_s/x^\alpha u = C m s / x α gives
m p ≃ ∫ 0 ∞ ( 1 − e − C m s / x α ) d x = ( C m s ) 1 / α α ∫ 0 ∞ ( 1 − e − u ) u − ( 1 + 1 / α ) d u = ( C m s ) 1 / α Γ ( 1 − 1 α ) , (236) \begin{aligned}
m_p \simeq\int_0^\infty\left(1-e^{-Cm_s/x^\alpha}\right)\,dx \\
&= \frac{(Cm_s)^{1/\alpha}}{\alpha}\int_0^\infty(1-e^{-u})u^{-(1+1/\alpha)}\,du \\
&= (Cm_s)^{1/\alpha}\Gamma\left(1-\frac{1}{\alpha}\right), \tag*{(236)}
\end{aligned} m p ≃ ∫ 0 ∞ ( 1 − e − C m s / x α ) d x = α ( C m s ) 1/ α ∫ 0 ∞ ( 1 − e − u ) u − ( 1 + 1/ α ) d u = ( C m s ) 1/ α Γ ( 1 − α 1 ) , (236)
so that inverting Eq. (236) gives
m s ≃ 1 C [ m p Γ ( 1 − 1 / α ) ] α = Θ ( m p α ) . (237) m_s \simeq\frac{1}{C}\left[\frac{m_p}{\Gamma(1-1/\alpha)}\right]^\alpha=\Theta(m_p^\alpha). \tag*{(237)} m s ≃ C 1 [ Γ ( 1 − 1/ α ) m p ] α = Θ ( m p α ) . (237)
For α = 2 \alpha= 2 α = 2 we have Γ ( 1 / 2 ) = π \Gamma(1/2) = \sqrt{\pi} Γ ( 1/2 ) = π , so that m p ≃ π C m s m_p \simeq\sqrt{\pi C m_s} m p ≃ π C m s and Eq. (237) reads m s ≃ m p 2 / ( π C ) m_s \simeq m_p^2/(\pi C) m s ≃ m p 2 / ( π C ) , which together with Eq. (234) is Eq. (227) . A variance proportional to 1 / m s 1/m_s 1/ m s becomes proportional to 1 / m p 2 1/m_p^2 1/ m p 2 and the estimator standard deviation falls as 1 / m p 1/m_p 1/ m p . This is the mechanism consistent with the intermediate-depth curve in Figure 3 . Nothing in this derivation is special to α = 2 \alpha= 2 α = 2 , and Eq. (237) together with Eq. (234) gives a deviation probability O ( 1 / ( δ 2 m s 1 / α ) ) O\left(1/(\delta^2m_s^{1/\alpha})\right) O ( 1/ ( δ 2 m s 1/ α ) ) for any α > 1 \alpha> 1 α > 1 .
For this distribution the general bound of Eq. (233) can be sharpened into an estimate. Using ( 1 − p i ) m s ≃ e − m s p i (1-p_i)^{m_s} \simeq e^{-m_s p_i} ( 1 − p i ) m s ≃ e − m s p i in Eq. (231) and approximating the sum by an integral as above,
Var [ U ( m s ) ] ≃ ∑ i ( e − m s p i − e − 2 m s p i ) ≃ ∫ 0 ∞ ( e − C m s / x α − e − 2 C m s / x α ) d x = Γ ( 1 − 1 α ) ( 2 1 / α − 1 ) ( C m s ) 1 / α = ( 2 1 / α − 1 ) E [ U ( m s ) ] , (238) \begin{aligned}
\operatorname{Var}[U(m_s)] \simeq\sum_i \left(e^{-m_s p_i}-e^{-2m_s p_i}\right) \simeq\int_0^\infty\left(e^{-C m_s/x^\alpha}-e^{-2C m_s/x^\alpha}\right)\,dx \\
&= \Gamma\left(1-\frac{1}{\alpha}\right)\left(2^{1/\alpha}-1\right)(C m_s)^{1/\alpha} = \left(2^{1/\alpha}-1\right)\mathbb{E}[U(m_s)], \tag*{(238)}
\end{aligned} Var [ U ( m s )] ≃ i ∑ ( e − m s p i − e − 2 m s p i ) ≃ ∫ 0 ∞ ( e − C m s / x α − e − 2 C m s / x α ) d x = Γ ( 1 − α 1 ) ( 2 1/ α − 1 ) ( C m s ) 1/ α = ( 2 1/ α − 1 ) E [ U ( m s )] , (238)
where in the last equality we used Eq. (236) . This is exact to leading order in the Poissonized occupancy model. For a fixed number of draws the covariance contribution of Eq. (232) is subleading, scaling as O ( m s 2 / α − 1 ) = o ( m s 1 / α ) O\left(m_s^{2/\alpha-1}\right)=o\left(m_s^{1/\alpha}\right) O ( m s 2/ α − 1 ) = o ( m s 1/ α ) , and therefore does not alter the leading result.
Uniform distributions. If the distribution is uniform over N N N Pauli strings, then Eq. (230) gives
m p = N [ 1 − ( 1 − 1 N ) m s ] . (239) m_p=N\left[1-\left(1-\frac{1}{N}\right)^{m_s}\right]. \tag*{(239)} m p = N [ 1 − ( 1 − N 1 ) m s ] . (239)
Writing m p = c N m_p=cN m p = c N with 0 < c < 1 0<c<1 0 < c < 1 held fixed and using log ( 1 − 1 / N ) ≃ − 1 / N \log(1-1/N)\simeq-1/N log ( 1 − 1/ N ) ≃ − 1/ N gives
m s ≃ − N log ( 1 − c ) = − log ( 1 − c ) c m p , (240) m_s\simeq-N\log(1-c)=\frac{-\log(1-c)}{c}m_p, \tag*{(240)} m s ≃ − N log ( 1 − c ) = c − log ( 1 − c ) m p , (240)
which together with Eq. (234) is Eq. (228) . The ordinary 1 / m p 1/\sqrt{m_p} 1/ m p standard-error scaling therefore returns once the coefficient distribution becomes flat. Note that Eq. (234) applies here unchanged, since Eq. (233) was derived without any assumption on the distribution, so the two regimes concentrate equally well and differ only in the exponent relating m s m_s m s to m p m_p m p .
The same memory therefore encodes many more effective draws in the peaked regime than in the uniform one, which is why merging helps strongly at intermediate depth and much less at late depth.
Probabilistic truncation
In an ordinary breadth-first calculation, a deterministic coefficient threshold discards every term below a chosen magnitude. A local unbiased alternative is often called probabilistic truncation or Russian roulette. Let
O = ∑ P c P P , c P ∈ C , (241) O=\sum_P c_P P,\qquad c_P\in\mathbb{C}, \tag*{(241)} O = P ∑ c P P , c P ∈ C , (241)
and choose a stochastic threshold b > 0 b>0 b > 0 . Coefficients above b b b are kept exactly. A smaller coefficient is either removed or promoted to magnitude b b b ,
c ^ P = { c P , ∣ c P ∣ ≥ b , sgn ( c P ) b , with probability ∣ c P ∣ / b , 0 , with probability 1 − ∣ c P ∣ / b , (242) \widehat{c}_P=
\begin{cases}
c_P, & |c_P|\ge b,\\
\operatorname{sgn}(c_P)b, & \text{with probability } |c_P|/b,\\
0, & \text{with probability } 1-|c_P|/b,
\end{cases} \tag*{(242)} c P = ⎩ ⎨ ⎧ c P , sgn ( c P ) b , 0 , ∣ c P ∣ ≥ b , with probability ∣ c P ∣/ b , with probability 1 − ∣ c P ∣/ b , (242)
where the last two lines apply when 0 < ∣ c P ∣ < b 0<|c_P|<b 0 < ∣ c P ∣ < b and sgn ( c P ) = c P / ∣ c P ∣ \operatorname{sgn}(c_P)=c_P/|c_P| sgn ( c P ) = c P /∣ c P ∣ . Zero coefficients remain zero. The reweighting is essential. For a sub-threshold term,
E [ c ^ P ] = ∣ c P ∣ b sgn ( c P ) b = c P . (243) \mathbb{E}[\widehat{c}_P]=\frac{|c_P|}{b}\operatorname{sgn}(c_P)b=c_P. \tag*{(243)} E [ c P ] = b ∣ c P ∣ sgn ( c P ) b = c P . (243)
The coefficient-level variance is
E [ ( c ^ P − c P ) 2 ] = { 0 , ∣ c P ∣ ≥ b , ∣ c P ∣ ( b − ∣ c P ∣ ) , 0 < ∣ c P ∣ < b . (244) \mathbb{E}\left[(\widehat{c}_P-c_P)^2\right]=
\begin{cases}
0, & |c_P|\ge b,\\
|c_P|(b-|c_P|), & 0<|c_P|<b.
\end{cases} \tag*{(244)} E [ ( c P − c P ) 2 ] = { 0 , ∣ c P ∣ ( b − ∣ c P ∣ ) , ∣ c P ∣ ≥ b , 0 < ∣ c P ∣ < b . (244)
The one-norm is conserved in expectation, but the surviving small coefficients are larger than before. The one-norm is consequently spread over fewer terms, and the two-norm of a typical realization increases. Repeating the rule through many layers therefore accumulates variance even though it does not accumulate bias.
One can reduce this variance by adding a lower deterministic threshold or by retaining the original coefficient rather than promoting it to b b b . Either choice is biased. It can still be sensible if the resulting bias is below the target precision, but the error will no longer disappear with more repetitions.
The connection to semi-deterministic comb is close. Both rules leave a head untouched and randomize a tail. Probabilistic truncation acts on each tail coefficient independently and does not guarantee the number of stored Pauli strings. Semi-deterministic comb sampling correlates the decisions globally so that the tail stays close to a prescribed number of stored Pauli strings. When every tail coefficient can receive only zero or one comb tooth, the coefficient update is essentially the same as Eq. (242) . The difference is the control over the number of stored Pauli strings supplied by the comb.
The local rule remains attractive when a global cumulative sum is expensive or when an occasional fluctuation in the number of stored Pauli strings is harmless. When exceeding memory would terminate the job, global resampling is the safer outer mechanism.
Importance sampling
One-norm sampling is agnostic about the final observable. It samples large transition amplitudes because they are locally important, not because their descendants necessarily have a large final overlap. If prior information identifies a subspace that is likely to dominate the answer, an importance function can steer samples toward it without introducing bias [88 ] . A prime example is that of Pauli weight, where Ref. [57 ] has shown that expectation values in random quantum circuits are dominated by low Pauli weight. Importance sampling remains unbiased while leading to strong variance reduction if the prior is indeed correct. It can, however, also strongly increase variance if the prior is misaligned.
A note on terminology: we will use wording such as “biased sampling”. This does not mean that the estimator becomes biased, but that we bias the transition probabilities and appropriately re-weight the running coefficient to keep the estimator unbiased. This is an unfortunate collision of terminology throughout the Monte Carlo literature.
Consider again an incoming Pauli P i P_i P i with coefficient c i c_i c i and a gate with transfer rule
P i ⟼ ∑ j a i j P j . (245) P_i \longmapsto\sum_j a_{ij}P_j. \tag*{(245)} P i ⟼ j ∑ a ij P j . (245)
Let g ( i , j ) > 0 g(i,j)>0 g ( i , j ) > 0 be a biasing function. Define modified transition amplitudes and their one-norm by
a ~ i j = a i j g ( i , j ) , A ~ i = ∑ j ∣ a ~ i j ∣ . (246) \widetilde{a}_{ij}=a_{ij}g(i,j), \qquad\widetilde{A}_i=\sum_j\lvert\widetilde{a}_{ij}\rvert. \tag*{(246)} a ij = a ij g ( i , j ) , A i = j ∑ ∣ a ij ∣ . (246)
The outgoing branch is drawn from
q ( j ∣ i ) = ∣ a ~ i j ∣ A ~ i . (247) q(j\mid i)=\frac{\lvert\widetilde{a}_{ij}\rvert}{\widetilde{A}_i}. \tag*{(247)} q ( j ∣ i ) = A i ∣ a ij ∣ . (247)
To compensate for the distorted probability, an incoming coefficient c i c_i c i is updated to
c j ′ = c i sgn ( a i j ) A ~ i g ( i , j ) . (248) c'_j=c_i\operatorname{sgn}(a_{ij})\frac{\widetilde{A}_i}{g(i,j)}. \tag*{(248)} c j ′ = c i sgn ( a ij ) g ( i , j ) A i . (248)
The cancellation between g g g and 1 / g 1/g 1/ g verifies unbiasedness directly,
E q [ c j ′ P j ] = ∑ j ∣ a i j g ( i , j ) ∣ A ~ i c i sgn ( a i j ) A ~ i g ( i , j ) P j = c i ∑ j a i j P j , (249) \begin{aligned}
\mathbb{E}_q[c'_jP_j]&=\sum_j\frac{\lvert a_{ij}g(i,j)\rvert}{\widetilde{A}_i}c_i\operatorname{sgn}(a_{ij})\frac{\widetilde{A}_i}{g(i,j)}P_j\\
&=c_i\sum_j a_{ij}P_j, \tag*{(249)}
\end{aligned} E q [ c j ′ P j ] = j ∑ A i ∣ a ij g ( i , j )∣ c i sgn ( a ij ) g ( i , j ) A i P j = c i j ∑ a ij P j , (249)
which holds for all strictly positive choices of g ( i , j ) g(i,j) g ( i , j ) . Because the re-weighting is local to each gate, unbiasedness persists throughout the circuit and yields an unbiased estimator of the final Pauli sum.
One-norm and uniform sampling. The trivial choice g ( i , j ) = 1 g(i,j)=1 g ( i , j ) = 1 gives a ~ i j = a i j \widetilde{a}_{ij}=a_{ij} a ij = a ij and A ~ i = A i = ∑ j ∣ a i j ∣ \widetilde{A}_i=A_i=\sum_j\lvert a_{ij}\rvert A i = A i = ∑ j ∣ a ij ∣ , so that Eq. (247) reduces to plain one-norm sampling and Eq. (248) to c j ′ = c i sgn ( a i j ) A i c'_j=c_i\operatorname{sgn}(a_{ij})A_i c j ′ = c i sgn ( a ij ) A i . Conversely, the choice g ( i , j ) = 1 / ∣ a i j ∣ g(i,j)=1/\lvert a_{ij}\rvert g ( i , j ) = 1/ ∣ a ij ∣ gives a ~ i j = sgn ( a i j ) \widetilde{a}_{ij}=\operatorname{sgn}(a_{ij}) a ij = sgn ( a ij ) and A ~ i = n i \widetilde{A}_i=n_i A i = n i , where n i n_i n i is the number of branches, i.e., the number of P j P_j P j with a i j ≠ 0 a_{ij}\ne0 a ij = 0 . The sampler then draws uniformly, q ( j ∣ i ) = 1 / n i q(j\mid i)=1/n_i q ( j ∣ i ) = 1/ n i , and the update becomes c j ′ = n i a i j c i c'_j=n_i a_{ij}c_i c j ′ = n i a ij c i . One-norm sampling is the variance-optimal choice of biasing function [88 ] . Importantly, this is a local optimality statement for one gate. It neither implies that this is the variance-optimal estimator for the coefficient of a Pauli string after two gates or the entire circuit, nor does it imply that it is the variance-optimal estimator for expectation values of the form Tr [ ρ P j ] \operatorname{Tr}[\rho P_j] Tr [ ρ P j ] even after a single gate.
Biasing by Pauli weight. A relevant example is importance sampling by the Pauli weight ∣ P ∣ \lvert P\rvert ∣ P ∣ , i.e., the number of non-identity Paulis in a Pauli string. Low-weight Pauli strings typically exhibit higher overlaps with generic states, so it may reduce variance to guide the sampler away from commonly populating high-weight Pauli strings. Let δ i j = ∣ P j ∣ − ∣ P i ∣ \delta_{ij}=\lvert P_j\rvert-\lvert P_i\rvert δ ij = ∣ P j ∣ − ∣ P i ∣ be the change in Pauli weight incurred by the gate; we avoid Δ \Delta Δ here because it denotes the comb spacing throughout Appendix § 2.1.1 . We can then penalize transitions that raise the weight,
g ( i , j ) = exp ( − γ max ( δ i j , 0 ) ) , (250) g(i,j)=\exp\left(-\gamma\max(\delta_{ij},0)\right), \tag*{(250)} g ( i , j ) = exp ( − γ max ( δ ij , 0 ) ) , (250)
where γ ≥ 0 \gamma\ge0 γ ≥ 0 is a tunable hyperparameter controlling the strength of the sampling bias, and γ = 0 \gamma=0 γ = 0 recovers one-norm sampling. We decorate the symbol because γ \gamma γ denotes the growth rate of the one norm throughout Appendix § 2.1.2 . Because the biasing function enters Eq. (246) multiplicatively, priors can be combined at will. For instance, biasing a uniform sampler by Pauli weight corresponds to
g ( i , j ) = 1 ∣ a i j ∣ exp ( − γ max ( δ i j , 0 ) ) . (251) g(i,j)=\frac{1}{\lvert a_{ij}\rvert}\exp\left(-\gamma\max(\delta_{ij},0)\right). \tag*{(251)} g ( i , j ) = ∣ a ij ∣ 1 exp ( − γ max ( δ ij , 0 ) ) . (251)
We numerically demonstrate the effect of importance sampling for the 6 × 5 6 \times5 6 × 5 TFIM Trotter circuit and the single Pauli-Z observable used throughout this work. Figure 10 compares uniform sampling and 1-norm sampling, and each of those additionally biased by Pauli weight for various γ \gamma γ , where every estimator averages over R = 10 4 R=10^4 R = 1 0 4 paths. We use two different initial states, the all-zero state as before, and a random stabilizer state. The latter is chosen to be closer to the assumptions that yield theoretical guarantees for Pauli weight truncation [57 ] .
Figure 10. Importance sampling the path sampling approach by Pauli weight. Left: Importance sampling by Pauli weight for a 6 × 5 6 \times5 6 × 5 TFIM Trotter circuit with the all-zero initial state. Right: The same circuit and observable but with a random stabilizer initial state. We see that importance sampling can be beneficial, but it can quickly become detrimental.
It becomes evident that biasing the sampling against high Pauli weight can significantly reduce the STD of the estimator compared to uniform sampling. This is a particularly stark effect for the random stabilizer initial state. At the same time, sampling by 1-norm of the transition amplitudes is again significantly better, and Pauli weight biasing on top of 1-norm sampling yields no significant improvements, even for the random initial state.
Weight degeneracy. Large γ \gamma γ makes paths that visit high Pauli weight very rare. If one of those paths later returns to low weight or otherwise contributes to the observable, its 1 / g 1/g 1/ g compensation can be enormous. A finite run may see none of these events and report a deceptively small empirical variance. The estimator can look biased until enough rare, high-weight samples appear, even though its exact expectation is unbiased. This is the familiar weight-degeneracy problem in sequential Monte Carlo [88 ] . Importance strength should therefore be increased gradually and checked against γ = 0 \gamma=0 γ = 0 and against multiple independent batches. The same idea can be applied while resampling the Pauli sum, but the danger of rare compensating weights remains.
Nonlinear observables and independent replica
The one-norm estimators are constructed for quantities that depend linearly on the propagated coefficients. Many physical quantities are nonlinear. Examples include purities, fluctuations, squared expectation values, and out-of-time-ordered correlators. This section details the strategies mentioned in the main text.
Squaring an estimator
Let X X X be a single-pass estimator of a scalar μ \mu μ with
E [ X ] = μ , Var [ X ] = σ 2 . (252) \mathbb{E}[X] = \mu,\qquad\operatorname{Var}[X] = \sigma^2. \tag*{(252)} E [ X ] = μ , Var [ X ] = σ 2 . (252)
Squaring the estimator does not give an unbiased estimate of μ 2 \mu^2 μ 2 ,
E [ X 2 ] = μ 2 + σ 2 . (253) \mathbb{E}[X^2] = \mu^2 + \sigma^2. \tag*{(253)} E [ X 2 ] = μ 2 + σ 2 . (253)
The extra term is positive and is exactly the estimator variance. Averaging first reduces, but does not remove, the bias. If
X ‾ = 1 R ∑ r = 1 R X r , (254) \overline{X} = \frac{1}{R}\sum_{r=1}^{R} X_r, \tag*{(254)} X = R 1 r = 1 ∑ R X r , (254)
then
E [ X ‾ 2 ] = μ 2 + σ 2 R (255) \mathbb{E}\left[\overline{X}^2\right] = \mu^2 + \frac{\sigma^2}{R} \tag*{(255)} E [ X 2 ] = μ 2 + R σ 2 (255)
Var [ X ‾ ] = E [ X ‾ 2 ] − E [ X ‾ ] 2 = σ 2 R (256) \operatorname{Var}[\overline{X}] = \mathbb{E}\left[\overline{X}^2\right] - \mathbb{E}[\overline{X}]^2 = \frac{\sigma^2}{R} \tag*{(256)} Var [ X ] = E [ X 2 ] − E [ X ] 2 = R σ 2 (256)
This squaring approach can have relatively low variance, but its systematic upward shift is especially problematic when many squared observables are added. Every term contributes a non-negative bias.
Independent replica
The dual-replica construction, familiar from projector Monte Carlo estimates of reduced density matrices [79 ] , replaces the square by a product of independent estimates. Run two statistically independent groups of propagations and form
Q = X ‾ ( 1 ) X ‾ ( 2 ) . (257) Q = \overline{X}^{(1)}\overline{X}^{(2)}. \tag*{(257)} Q = X ( 1 ) X ( 2 ) . (257)
Independence gives
E [ Q ] = E [ X ‾ ( 1 ) ] E [ X ‾ ( 2 ) ] = μ 2 . (258) \mathbb{E}[Q] = \mathbb{E}\left[\overline{X}^{(1)}\right]\mathbb{E}\left[\overline{X}^{(2)}\right] = \mu^2. \tag*{(258)} E [ Q ] = E [ X ( 1 ) ] E [ X ( 2 ) ] = μ 2 . (258)
If each replica mean contains R R R passes and each single pass has variance σ 2 \sigma^2 σ 2 , then
Var [ Q ] = E [ ( X ‾ ( 1 ) ) 2 ( X ‾ ( 2 ) ) 2 ] − E [ Q ] 2 = E [ ( X ‾ ( 1 ) ) 2 ] E [ ( X ‾ ( 2 ) ) 2 ] − E [ Q ] 2 (259) \operatorname{Var}[Q] = \mathbb{E}\left[\left(\overline{X}^{(1)}\right)^2\left(\overline{X}^{(2)}\right)^2\right] - \mathbb{E}[Q]^2 = \mathbb{E}\left[\left(\overline{X}^{(1)}\right)^2\right]\mathbb{E}\left[\left(\overline{X}^{(2)}\right)^2\right] - \mathbb{E}[Q]^2 \tag*{(259)} Var [ Q ] = E [ ( X ( 1 ) ) 2 ( X ( 2 ) ) 2 ] − E [ Q ] 2 = E [ ( X ( 1 ) ) 2 ] E [ ( X ( 2 ) ) 2 ] − E [ Q ] 2 (259)
= ( Var [ X ‾ ( 1 ) ] + E [ X ‾ ( 1 ) ] 2 ) ( Var [ X ‾ ( 2 ) ] + E [ X ‾ ( 2 ) ] 2 ) − E [ Q ] 2 (260) = \left(\operatorname{Var}\left[\overline{X}^{(1)}\right] + \mathbb{E}\left[\overline{X}^{(1)}\right]^2\right)\left(\operatorname{Var}\left[\overline{X}^{(2)}\right] + \mathbb{E}\left[\overline{X}^{(2)}\right]^2\right) - \mathbb{E}[Q]^2 \tag*{(260)} = ( Var [ X ( 1 ) ] + E [ X ( 1 ) ] 2 ) ( Var [ X ( 2 ) ] + E [ X ( 2 ) ] 2 ) − E [ Q ] 2 (260)
= ( σ 2 R + μ 2 ) 2 − μ 4 (261) = \left(\frac{\sigma^2}{R}+\mu^2\right)^2-\mu^4 \tag*{(261)} = ( R σ 2 + μ 2 ) 2 − μ 4 (261)
= σ 4 R 2 + 2 μ 2 σ 2 R . (262) = \frac{\sigma^4}{R^2}+\frac{2\mu^2\sigma^2}{R}. \tag*{(262)} = R 2 σ 4 + R 2 μ 2 σ 2 . (262)
In the noise-dominated regime, where μ 2 ≪ σ 2 / R \mu^2 \ll\sigma^2/R μ 2 ≪ σ 2 / R , the standard deviation of Q Q Q is approximately σ 2 / R \sigma^2/R σ 2 / R . This has the same 1 / R 1/R 1/ R scaling as the bias in Eq. (255) . In the signal-dominated regime, the second term controls the error and the usual 1 / R 1/\sqrt{R} 1/ R behaviour returns,
STD [ Q ] ≃ 2 ∣ μ ∣ σ R . (263) \operatorname{STD}[Q] \simeq\frac{\sqrt{2}|\mu|\sigma}{\sqrt{R}}. \tag*{(263)} STD [ Q ] ≃ R 2 ∣ μ ∣ σ . (263)
The replica estimator is unbiased but generally noisier than squaring one sample mean. Its advantage is clearest for a sum of many squares, of which the 511 Pauli expectation values entering the collision entropy are an example. The individual squaring biases add with the same sign, whereas centred replica errors can partially cancel. Higher powers are obtained in the same way by multiplying the corresponding number of mutually independent replica. Independence must include the random seed, the resampling offsets, and every randomized Pauli sum used in the propagation.
Replica independence removes only the nonlinear sampling bias. If deterministic truncation gives E [ X ] = μ + β \mathbb{E}[X] = \mu+ \beta E [ X ] = μ + β , then the product estimates ( μ + β ) 2 (\mu+ \beta)^2 ( μ + β ) 2 , not μ 2 \mu^2 μ 2 , where β \beta β is the truncation bias. Convergence in the truncation threshold is therefore still required.