WorksPhysics and Astronomy
Self-guided estimation of the stabilizer fidelity with single-copy Pauli measurements
Abstract
The stabilizer fidelity quantifies the non-stabilizerness of pure states, but it is hard to estimate because it requires optimizing over stabilizer states for qubits. Here, we propose a self-guided estimation protocol for the stabilizer fidelity of an unknown state, pure or mixed, which requires only Pauli measurements on single copies. The protocol moves through the graph of neighboring stabilizer states, obtains the fidelities of a whole stabilizer basis from a single direct fidelity estimation, and reuses previous outcomes, which also provide a restart point that mitigates the barren plateau of a random start. In addition, it certifies the global optimum when the lower confidence bound of the estimated fidelity exceeds . In numerical simulations of up to 14 qubits, the protocol reached the optimum in all runs, with the number of iterations remaining small and increasing only slightly with .
Introduction
The resources that make quantum computers more powerful than classical ones can be quantified through their distance to efficiently simulable states. In particular, Clifford circuits acting on stabilizer states can be simulated in polynomial time [1], so that the non-stabilizerness of a state, also known as magic, is a necessary resource for quantum advantage [2, 3, 4]. A natural measure of non-stabilizerness is the stabilizer fidelity , that is, the largest fidelity between the state and a stabilizer state [5]. Its estimation from experimental data allows certifying how close the states prepared in current quantum devices are to a stabilizer state and, for pure states, when is certified, their non-stabilizerness [6, 7, 8, 9].
Estimating is hard, since the number of stabilizer states grows as with the number of qubits. Moreover, the existence of pseudomagic states [10] implies that no efficient method can estimate in all regimes [11]. Even when the state vector is known, has been computed only up to 9 qubits for Haar-random states [12]. For unknown pure states, the stabilizer Rényi entropies [13] provide only upper bounds on [14]. Beyond such bounds, most approaches rely on joint measurements on two copies of the state. For pure states, Bell difference sampling [15, 16, 17] finds a stabilizer state whose fidelity is close to [18]. For mixed states, two-copy measurements find the closest stabilizer product state [19] and, through stabilizer bootstrapping, estimate [11]. Two-copy measurements also enable tolerant testers that decide whether is high or low [20, 21, 22], as well as the learning of -doped states via Bell measurements [23, 24]. Single-copy measurements, in contrast, have been explored mainly for testing and learning. Random Clifford measurements decide whether a state is a stabilizer state [25], adaptive Clifford measurements find a near-optimal stabilizer state above a fidelity threshold, even for mixed states [26], and local Clifford circuits of logarithmic depth learn stabilizer groups on average [27]. Likewise, -doped states can be learned from single copies [28, 29]. These methods, however, aim to identify or reconstruct a state rather than to estimate , and they rely on Clifford rather than Pauli measurements. Consequently, apart from an exhaustive search over stabilizer states, no current method directly estimates using only Pauli measurements on single copies, the simplest measurements available in current devices.
A natural alternative is a variational approach [30, 31, 32, 33, 34], where the fidelity with a candidate state is measured and optimized by a classical routine, as in self-guided quantum tomography [35, 36, 37, 38, 39, 40]. However, the fidelity is a global function, whose differences between candidates decrease exponentially with from a random start, which is known as the barren plateau phenomenon [41, 42]. Local cost functions avoid barren plateaus in shallow circuits [42], and two-qubit local functions provide a good starting point for the geometric measure of entanglement [43, 44]. Despite these advances, the set of stabilizer states is discrete, so that gradient-based optimization does not apply, and it is not clear how to search over it with single-copy measurements and how to mitigate its barren plateau.
In this article, we propose a self-guided estimation protocol for the stabilizer fidelity of an unknown state, pure or mixed, which requires only Pauli measurements on single copies. The protocol keeps a stabilizer state as the current estimate and moves to the best of a few candidates, mostly among its neighbors, that is, the stabilizer states with overlap with [45], whose fidelities are estimated by direct fidelity estimation (DFE) [46, 47, 48, 49, 50, 51]. A single DFE run on the group of provides the fidelity of any state of its stabilizer basis, in analogy with the error rates of Pauli channels [52], and we show that only a few directions can contain a better neighbor, which a prefix search finds without enumerating the directions [53, 54], and that and its neighbors share half of their Pauli strings. A Pauli store reuses these outcomes, and every measured string also provides outcomes for its substrings [55, 56], so that the store contains the expectation values of the Pauli strings of few qubits, from which we build a restart point that mitigates the barren plateau. The classical cost of the protocol is polynomial in for circuits of constant depth, and the protocol certifies the global optimum when the lower confidence bound of its estimated fidelity exceeds .
We carried out numerical simulations of up to 14 qubits, starting always from a random stabilizer state, for four families of states whose stabilizer fidelity is known exactly, namely stabilizer states with a random perturbation, T-doped states prepared by Clifford circuits of depth or , and depolarized stabilizer states. The protocol reached the optimum in all runs, without false certificates. The number of iterations remained small and increased only slightly with , while the number of shots per iteration increased with , as the reuse of the Pauli store decreases.
Theoretical background
In this section, we introduce the concepts of stabilizer fidelity and direct fidelity estimation, on which our protocol is built.
Stabilizer states and stabilizer fidelity
Let us consider qubits and the Pauli strings , labeled by , with computed over the integers, where is the set of binary vectors of length with addition modulo 2. A stabilizer state is the unique common eigenstate with eigenvalue of an Abelian group of signed Pauli strings, which is generated by independent signed strings , where is a Pauli string and is its sign. The elements of are products of the generators, that is, with , where and is a Pauli string, and their average over the group gives the projector onto
The stabilizer fidelity of a state , pure or mixed, is defined as the largest fidelity between and a stabilizer state [5],
where is the set of -qubit stabilizer states, which contains states [1, 11]. Thereby, an exhaustive search over is only feasible for a few qubits.
Direct fidelity estimation
DFE estimates the fidelity between an unknown state and a known pure state by sampling Pauli strings with probability proportional to the squared coefficients of the known state [46, 47]. For a stabilizer target these coefficients are uniform on the group, so that Eq. (1) leads to
with uniform in . Then, the estimator measures strings once each on fresh copies of , with outcomes , and returns . Since each term lies in , shots give an error below with probability at least for any , in contrast with non-stabilizer targets, whose DFE becomes harder with their non-stabilizeriness [57].
Self-guided estimation protocol
In this section, we introduce the neighbors of a stabilizer state, and then we describe the search, the Pauli store, the local restart and the classical cost of the protocol.
Stabilizer neighbors
Let be the current stabilizer state, with generators and destabilizers , that is, Pauli strings that anticommute with and commute with all other generators and destabilizers [1]. The product , with , flips the signs of the generators with , so that the states form a stabilizer basis with . We define the neighbors of as
which are the stabilizer states with overlap , the largest overlap between two different stabilizer states [45]. For one qubit, the neighbors of are the four states on the equator of the Bloch sphere, as shown in Figure 1(a), and, in general, , and the four neighbors in direction form an octahedron.
Figure 1. Self-guided estimation protocol. Inset (a) shows the single-qubit stabilizer states on the Bloch sphere, where the neighbors of (red edges) are the four states on the equator. Inset (b) shows the flow diagram of the protocol, whose steps are described in Sec. III B.
The fidelities of the neighbors are determined by and as
for pure and mixed states (Appendix A). Therefore, the best neighbor in direction has a fidelity of at most , which increases with and can exceed only if . Since the sum to one, at most directions satisfy this condition, that is, only a few of the directions deserve to be explored.
The probabilities are obtained from the DFE of without additional measurements, since Eq. (3) generalizes to (Appendix C). Each is a sum over the measured group elements, so that the protocol evaluates only the values that it needs, namely those of the single directions , of the pair directions , and of the best sign flip, together with those of the few directions above the threshold when no candidate improves, which a prefix search finds whatever their weight (Appendix C). In addition, the octahedron of direction uses only four cosets of the subgroup of strings that commute with , and two of them belong to (Appendix A). Thereby, the DFE of a neighbor shares half of its Pauli strings with the DFE of .
Self-guided search
The protocol moves through the graph of neighbors, as shown in Figure 1(b), according to the following steps.
Selection of a stabilizer state to initialize the search.
DFE on the group of with at most new shots, which gives and any on demand, and whose outcomes are kept in the Pauli store.
Estimation of three kinds of candidates, that is, (i) the sign flip that maximizes , (ii) the octahedron of the single or pair direction with the largest , formed by the flip , whose estimate is , and the four neighbors , whose DFEs reuse the stored outcomes, and (iii) the local candidate built from the stored Pauli strings of few qubits (Sec. III D).
Move to the best candidate if its estimate improves on , and return to step (1).
Freshly check if there is no improvement. That is, new shots on uniformly drawn elements of the group of are added to the store, and a prefix search finds the directions with with the values of and of step (1). Then,
steps (1)–(3) are repeated once with the octahedra of these directions, where and the candidates are estimated with the updated store, while the flips of these directions keep the values that selected them. The search stops if no candidate improves, or after a predefined maximum number of iterations.
Fresh DFE of the output with shots, which gives and its lower confidence bound .
We use and , with and , so that with probability at least (Appendix A 4).
The best sign flip is found by a coordinate ascent of over the bits of , started from and from the solution of the linear system over for independent measured elements , where . The second starting point is necessary, since an ascent from can miss the flips of several generators, while it is exact for exact signs whenever one basis state has , since then every has the sign (Appendix C).
The fresh check corrects two effects of the reuse of outcomes. On the one hand, every candidate is the best of many noisy estimates, scored with the outcomes that selected it, and the estimate of the current state can be inflated by its selection as the best move. On the other hand, this estimate no longer changes when all the elements of the current group are stored, since Eq. (6) then draws no new shots. In addition, the single and pair directions depend on the choice of generators, while the best direction can combine several of them, which the prefix search finds for exact values and , whatever its weight (Appendix C).
Like any local search, the protocol can stop at a local maximum of the graph of neighbors, such as for with . Since the output is a stabilizer state, is a lower estimate of . However, at most one stabilizer state has a fidelity above , since two different stabilizer states satisfy for any [18, 45] (Appendix A 4). Therefore, if , the output is the unique global optimum and estimates , while below this threshold it certifies a lower bound on .
Pauli store
Consecutive candidates share many Pauli strings, as shown in Sec. III A. In order to reuse their outcomes, the Pauli store keeps, for every measured unsigned Pauli string and for its substrings of weight at most , the number of outcomes and their mean . Then, the DFE of a target with group splits into the reused set of strings with stored outcomes, each with weight , and the sampled set , which receives new shots on uniformly drawn strings.
The estimate is
where and are the sign and the outcome of the -th sampled string. For queries fixed in advance, this estimator is unbiased (Appendix B), although its variance can exceed that of a new DFE with shots when and many strings of have fewer than outcomes, since each of them keeps the weight . Since the search queries depend on previous outcomes, the store is used only to decide where to move, and the reported fidelity is always estimated using fresh copies.
The reuse is limited by the number of elements stored in . After the DFE of , a neighbor finds stored essentially only the sampled elements of , so that , which is close to for and decreases as for . Therefore, the store saves shots mainly for few qubits. In addition, the set is found by decomposing the stored strings in the group, at a cost linear in their number, so that the elements of are never enumerated.
The store also exploits the structure of a single measurement. Measuring a string in its product eigenbasis gives one bit per qubit, and the parity of these bits on the support of a substring , that is, with some letters replaced by the identity, is an unbiased outcome of . In this way, every shot also feeds the substrings of weight at most in the measured string, increasing reuse between candidates and yielding the few-qubit expectation values of the local restart.
Local restart
From a random stabilizer state, the fidelities of all neighbors are on the order of , so their differences are smaller than the DFE noise , which is a discrete analog of the barren plateau phenomenon [41, 42]. Moreover, the neighbors of step (2) lie only along single and pair directions, in order to keep the classical cost polynomial, so that from a random start the search can stop before the region of high fidelity. In fact, without the local restart, the moves in step (2) stopped before this region, even with exact fidelity, whereas with shots the search reached it only after a long random walk driven by statistical noise (Appendix D).
In order to mitigate this barren plateau, we build an additional candidate from the few-qubit data of the store, which does not rely on the global fidelity. If the optimal stabilizer state has generators of weight at most , these generators have large expectation values , and so do their estimates . Then, the local restart builds a candidate in three steps.
Significance test. For every stored string of weight at most , we compute the Hoeffding -
value of the hypothesis , and we call significant if , where is the number of non-identity Pauli strings of weight at most and is that of the certificate.
Ranking. The significant strings come first, in decreasing order of , followed by the other strings in increasing order of , since for them is not reliable.
Greedy selection. Going down the ranking, a string is accepted with the sign of if it commutes with the accepted strings and is not a product of them, until generators are accepted.
The candidate defined by these generators is built at every iteration and compared in step (3) through its DFE. Appendix § 1.2.5 shows an example for four qubits.
The significance test is necessary, since most stored strings have few outcomes and many of them have by chance. This test is the Bonferroni correction [58], for which is fixed before any measurement, so that, for numbers of outcomes fixed in advance, no string with is selected with probability at least , whatever the correlations between strings that share shots. In the search the numbers of outcomes depend on previous outcomes, but an error of the ranking can only lead to a poor move, since the reported fidelity is always estimated with fresh copies, although the DFE of the candidate can reuse the outcomes of the ranking. For the same reason, the candidate is always completed to generators, if necessary with strings that are not significant or with further commuting strings with sign , since a poor candidate is usually discarded by its DFE.
The local restart maximizes greedily the local cost
over the stabilizer states with generators of weight at most , where depends on the generators and not only on the state that they define. Each term of Eq. (7) changes by order when one generator is found, while the fidelity changes by order far from the optimum. In addition, , since is the product of the projectors , as for the local and global costs of Ref. [42], so that a state with also has a fidelity close to one. Thereby, maximizing leads the search to the region of high fidelity, where the moves of step (2) are effective. For noisy states this lower bound is not informative, and the local restart relies on the generators of the optimal state having the largest expectation values, as for the depolarized stabilizer states of Sec. IV A.
The local restart requires that the optimal stabilizer state has generators of weight at most , which holds for states prepared by Clifford circuits whose light cone covers at most qubits. A circuit of depth with two-qubit gates between neighboring qubits has a light cone of at most qubits, so that we use , which covers layers of such gates, while is enough for circuits of known constant depth . Notice that for , so that in this range the store keeps every substring of the measured strings, and the restart is local only for larger .
Classical cost
A shot of a string of weight feeds substrings, and an iteration decomposes the stored strings in the groups of the candidates, merges the new outcomes into the store, and evaluates the of the single and pair directions on the group elements with data. In addition, the prefix search keeps at most prefixes at each of its levels. Therefore, a search with shots and iterations costs
operations, with , where a product of two Pauli strings counts as one operation, as for with strings stored as machine words. This cost is polynomial in for constant , and it grows as for the circuits of logarithmic depth of Sec. III D.
Numerical simulations
In this section, we test the protocol on four families of states whose stabilizer fidelity is known exactly, and we analyze its success probability, its number of measurements and the role of the depth of the circuit.
Simulation setup
The first family consists of stabilizer states with a random perturbation, , with a random stabilizer state and a Haar-random orthogonal to it, for which since (Appendix A.§ 1.6.4). The second and third families consist of T-doped states [29, 59], with [60], which is reached by stabilizer states, where is a random Clifford, whose depth grows as , or layers of random two-qubit Cliffords between neighboring qubits, respectively. The fourth family consists of depolarized stabilizer states , with the same circuits of logarithmic depth, for which . For each family and parameter, we simulated 15 states of up to 14 qubits, starting always from a random stabilizer state, with , a limit of 200 iterations, and .
Each shot was sampled from the exact probability distribution of the outcomes of the measured Pauli string, which follows from the expectation values of its substrings (Appendix D). For the perturbed states, these expectation values were taken from the Pauli spectrum of the state, that is, the expectation values of all its Pauli strings, computed once from its dense state vector, which limited these states to . For T-doped and depolarized stabilizer states, they were computed from the Clifford circuit for each string, without storing the state. In all cases, the store keeps the substrings of weight at most , and a run succeeds when the fidelity of its output, which we compute exactly, equals .
Success probability
Figure 2(a)–(Figure 2d) show the success probability as a function of for the four families. As is apparent from this figure, the protocol reached the optimum in all runs. Since every output is optimal and is a fresh DFE of it, the error is that of a DFE of the optimal state. In addition, the certificate was obtained in all runs whose stabilizer fidelity exceeds by more than , and in none of the runs with , where a certificate would be false. Thereby, our simulations indicate that the protocol finds the optimum of the four families from a random start.
Figure 2. Self-guided estimation protocol starting from a random stabilizer state. Insets (a)–(d) show the success probability, that is, the fraction of runs whose output has fidelity , as a function of the number of qubits, for (a) stabilizer states with a random perturbation of overlap , (b) T-doped states with magic states and a random Clifford circuit, (c) T-doped states with layers of two-qubit Cliffords between neighboring qubits, and (d) depolarized stabilizer states prepared by the same circuits. Insets (e)–(h) show the median number of shots of the search, without the shots of the final DFE, where error bars correspond to the interquartile range. Fifteen states for each point.
Number of measurements
Figure 2(e)–(Figure 2h) show the median number of shots of the search as a function of . We can see that this number increases with , faster for the largest simulated , and that, on average over , it is largest for T-doped states prepared by random Cliffords. In order to identify the origin of this growth, Table 1 separates the number of shots into the number of iterations and the number of shots per iteration . The number of iterations remains small and increases only slightly with , that is, the search reaches the optimum with a few moves, typically one or two of them given by the local restart, followed by the two iterations of the fresh check. In contrast, the number of shots per iteration increases with , since the fraction of stored strings in a group of elements decreases (Sec. III C), so that the DFE of each new candidate samples more strings according to Eq. (6). Therefore, the growth of the number of measurements comes from the decreasing reuse of the Pauli store, and not from a longer search.
| 6 | 8 | 10 | 12 | 14 | ||
| Perturbed | 3 | 3 | 3 | - | - | - |
| 1.1 | 1.5 | 1.7 | - | - | - | |
| T-doped | 4 | 4 | 3.5 | 4 | 5 | 6 |
| 1.0 | 1.2 | 1.6 | 2.1 | 3.6 | 5.3 | |
| T-doped | 4 | 4 | 4 | 4 | 4 | 5 |
| 1.0 | 1.2 | 1.3 | 1.5 | 2.5 | 4.3 | |
| Depolarized | 3 | 3 | 3 | 3 | 3 | 3 |
| 1.1 | 1.4 | 1.5 | 2.0 | 3.2 | 5.0 |
Table 1. Median number of iterations of the search and median over runs of the number of shots per iteration , in units of shots, as a function of the number of qubits, for and all parameters of each family.
For , the reuse is lost, and each iteration costs a few DFEs with shots, plus about shots for each level of the prefix search whose subgroup contains more than elements. Since the simulated range ends shortly after , it does not determine the asymptotic number of shots. For circuits of logarithmic depth, however, a string of weight appears in a fraction of about of the shots, so that, in the worst case, the local restart needs a number of shots of the order of times the outcomes required by the test of each string. Thereby, the number of shots is polynomial in for these circuits, while the classical cost of Eq. (8) grows as .
Depth of the circuit
The protocol also reached the optimum for T-doped states prepared by random Cliffords, as shown in Figure 2(b), although their generators are not local in general. This is because is comparable with in the simulated range, so that a random stabilizer group contains many elements of weight at most . However, these elements have a larger weight than for circuits of logarithmic depth, and a string of weight appears in a fraction of about of the shots, so that few of them pass the significance test for the largest , and the candidate relies also on the strings that are not significant, which increases the number of shots, as shown in Figure 2(f). In addition, the state built by the local restart may be improvable only along directions of large weight, which the prefix search of the fresh check finds, at least for exact values (Appendix C). For larger , the number of elements of weight at most in a random stabilizer group decreases quickly, while circuits of logarithmic depth keep generators of small weight. All of this indicates that the depth of the circuit appears first in the cost of the protocol and, for larger , in the success of the local restart.
Discussion
Estimating the stabilizer fidelity requires an optimization over stabilizer states, which is difficult even when the fidelity of each candidate can be estimated efficiently. In this article, we proposed a self-guided estimation protocol that performs this optimization with Pauli measurements on single copies. The protocol obtains the fidelities of the stabilizer basis of the current state from a single DFE, which identifies the few directions that can improve, it reuses the outcomes of previous measurements through a Pauli store, and it builds from the few-qubit expectation values of the store a restart point that mitigates the barren plateau of a random start.
Our simulations of up to 14 qubits showed that the protocol reached the optimum in all runs for perturbed stabilizer states, T-doped states, and depolarized stabilizer states, without false certificates. The median number of iterations remained small and increased only slightly with , so that the number of measurements grew mainly through the decreasing reuse of the Pauli store. For comparison, an exhaustive search requires classical operations, even though classical shadows with random Clifford measurements estimate all the fidelities from copies [56].
The local restart mitigates the barren plateau because the generators of small weight have expectation values of order one, while the fidelities from a random start are exponentially small. The cost of this strategy is set by the weight of the generators, since a string of weight appears in a fraction of about of the shots, which gives a number of shots polynomial in and a classical cost for circuits of logarithmic depth. For deep circuits, however, a random stabilizer group has almost no element of small weight as grows, so that in this regime the search must start close to the optimum.
The methods with theoretical guarantees for the stabilizer fidelity use Bell measurements on two copies of the state [11, 16, 18, 20, 21, 22] or adaptive Clifford measurements on single copies [26]. They succeed for deep circuits, since Bell difference sampling, or the computational difference sampling of the adaptive scheme, reveals the stabilizer group of the optimum independently of depth, at the expense of entangling gates between two copies or between qubits in one copy. In contrast, our protocol only rotates and measures single qubits, and it provides a heuristic estimate below the fidelity thresholds of Refs. [18, 26], at the expense of requiring shallow circuits or a good starting point. States prepared by geometrically local shallow circuits can also be learned from single-qubit measurements [61], but computing from the learned description requires again the maximization of Eq. (2). Furthermore, unlike the local cost functions of variational algorithms [42, 44], our protocol searches over a discrete set of states and obtains the local information from the data of the search itself, and, unlike the discrete search over Clifford circuits of Ref. [62], whose objective is evaluated classically, it is guided by measurements of the unknown state.
Our protocol finds direct application in certifying how close the states prepared by shallow circuits in current devices are to a stabilizer state, such as the noisy code states of error-correcting codes [63]. In contrast, the magic states of distillation protocols [2] have a stabilizer fidelity of at most , where the protocol only provides a lower bound. The main limitation of the protocol is the memory of the Pauli store, which keeps substrings per shot, and approaches based on classical shadows [56], which keep only the measured strings and their outcomes, could reduce it. In addition, the use of the shots could be refined, for instance by scoring the selected candidate on fresh shots before moving, or by measuring each level of the prefix search only until its comparisons with the threshold are decided. Finally, a recent scheme bounds the fidelities of different non-stabilizer targets from the same local Pauli measurements [64], so that it could be combined with the Pauli store to bound the fidelities of the candidates without additional measurements.
Acknowledgments
L.P. was supported by the Government of Spain (Severo Ochoa CEX2019-000910-S, FUNQIP, and QEC4QEA PCI2025-163167), European Union (PASQuanS2.1, 101113690 and QEC4QEA, 101194322), Fundació Cellex, Fundació Mir-Puig, and Generalitat de Catalunya (CERCA program). J. G. acknowledges the support of the European Union under grant agreement No. 101194322 (QEC4QEA).
Properties of the stabilizer neighbors
In this appendix, we derive the fidelity of the neighbors, the directions that can improve on the current state, the Pauli strings shared by the neighbors, and the uniqueness of the optimum above .
Stabilizer basis
Let us consider a stabilizer state with generators , that is, , and destabilizers , which commute among themselves and anticommute only with [1]. Then, the product and the elements of satisfy
since counts the generators in that anticommute with . Therefore, Eq. (9) gives for , so that is stabilized by the Abelian group
which is generated by . That is, contains the same Pauli strings as , with the signs of the generators with flipped. Therefore, for there is a generator with opposite eigenvalues on and , so that these states are orthogonal, and, since is unitary, the states form an orthonormal basis.
Fidelity of the neighbors and directions that can improve
In this subsection, we bound the fidelity of the neighbors of in each direction , showing that only a few directions can improve the current fidelity.
The neighbors are the superpositions of Eq. (4), with overlap with [45]. In the basis , the values are the populations of , and is the coherence between and . Expanding the fidelity of a neighbor in this basis gives the first expression of Eq. (5). Since is positive, is the inner product of and , and the Cauchy–Schwarz inequality gives for pure and mixed states. Therefore, since , every neighbor in direction satisfies
whatever the coherence . This equation gives a necessary, but not sufficient, condition for a direction to improve on the current fidelity. In fact, the bound exceeds only if , that is, , so that the directions below this threshold cannot improve, while a direction above it improves only if its coherence is large enough. Since the are the probabilities of a measurement in the basis , they sum to one, and directions above this threshold require . For instance, at most five directions can improve for , independently of . Conversely, the four values are and , so that the best of the four neighbors has , that is, the four neighbors sample the phase of finely enough.
Pauli strings shared by the neighbors
In this subsection, we show that the DFE of a neighbor can reuse half of the outcomes of the DFE of . According to Eq. (10), the elements with have the same sign in and , so that the subgroup , of the elements of that commute with , stabilizes both and . In fact, since selects the elements with , Eqs. (1) and Eq. (9) give its projector
so that stabilizes exactly the plane spanned by and . This plane behaves as one qubit, with $s_jg_j and as logical and operators, where is any generator with , and its six stabilizer states are , and the four neighbors in direction , which form the octahedron of Sec. III A. Thereby, the stabilizer group of a neighbor contains the elements of , with the same signs as in the stabilizer group of , and one more generator, namely the logical operator that has the neighbor as eigenstate with eigenvalue ,
where the factor makes Hermitian, since and anticommute [45]. The other half of the stabilizer group of the neighbor consists of the elements of multiplied by , which do not belong to the stabilizer group of . Therefore, a DFE of a neighbor draws half of its strings from those of the DFE of . In addition, the neighbors with and have the same strings in the second half with opposite signs, as do those with and , so that the outcomes measured for one of them also serve the other. However, this saves shots only when the strings of the second half are already stored, which requires few qubits, with .
Uniqueness of the optimum and certificate
In this subsection, we show that at most one stabilizer state has a fidelity above , and that the final DFE certifies when the output is this state. Two different stabilizer states satisfy [45], so that the sum of their fidelities is bounded by the largest eigenvalue of , that is, for any . Therefore, a stabilizer state with fidelity above is the unique optimum of Eq. (2), as shown for pure states in Ref. [18]. In order to certify the optimum, we use that the terms of the final DFE are independent and lie in , so that the Hoeffding inequality gives , since , with probability at least [46, 47]. Thereby, if , the output is the global optimum with probability at least , which for requires .
Unbiasedness of the Pauli store
In this appendix, we show that the estimate of Eq. (6) is unbiased for queries fixed in advance, and we explain why it is biased in the search. Let be the unsigned group of the target, with signs , and let its fidelity be the mean of over . For queries fixed in advance, the reused set of Eq. (6) depends only on which strings were measured before, and not on their outcomes, and every stored outcome of , as well as the parity of a substring, has mean . Therefore, the first term of Eq. (6) is an unbiased estimate of the contribution of to , the second one of the contribution of , since its strings are drawn uniformly, and is an unbiased estimate of , whatever the correlations between strings that share a shot. In the search, in contrast, a candidate is selected because its estimate is large, so that the stored outcomes that selected it are biased upward for that candidate, and the search maximizes the estimate built from the stored outcomes rather than the fidelity itself. For this reason, the fresh check adds new shots before the search stops, and the reported fidelity is always estimated with fresh copies, whose estimate is unbiased for the output state.
Fidelities of the stabilizer basis
In this appendix, we show how a single DFE yields the fidelities of the stabilizer basis of , how the protocol determines the best sign flip, and how the prefix search identifies the directions above the threshold. Equations (1) and (9) give , so that, with ,
that is, is the Walsh transform of , the analog of the Fourier transform for functions of bit strings, as the error rates of a Pauli channel are the Walsh transform of its eigenvalues [52]. For instance, gives Eq. (3), and its only group element with gives and . The DFE of provides pairs with uniform and of mean , so that is an unbiased estimate of , with variance at most , and with the Pauli store the same expression holds with the weights of Eq. (6). Therefore, each requires no additional measurements and operations, where is the number of group elements with data, whereas the full transform would require values.
The best sign flip maximizes , a sum of signed parities, which is hard in general, but simple when one basis state carries most of the weight. If , Eq. (14) gives , so that every has the sign , and is the unique solution of for any independent elements . The protocol solves this system with the estimated signs, which are wrong with probability for an element measured once, taking first the elements with the largest contributions to , and improves this solution and by a coordinate ascent over the bits of , keeping the better endpoint. The second starting point is necessary, since the ascent from can stop when the best flip changes two or more generators, and each single-bit step can have zero gain, as in . The flips of three or more generators are found from this starting point or by the prefix search of the fresh check. The directions above the threshold are found bit by bit, as the large Fourier coefficients in the Goldreich-Levin and Kushilevitz-Mansour algorithms [53, 54], and finding the large error rates of sparse Pauli channels is a related problem [65]. The sum of over the directions whose first bits are is , where is the subgroup generated by the first generators, so that is given by a DFE on . Since the of each level sum to one, at most prefixes reach , and the protocol keeps the prefixes with , with , at most of them, and estimates each level with the Pauli store, which already contains the new shots of the fresh check, while the threshold and the last level use the estimate of of step (1). The cap of 64 only applies for , far from the optimum. Then, the directions with are explored in decreasing order of , at most of them, a number independent of , since further directions above the threshold can only come from statistical noise, and the prefix search is skipped for , where the local restart provides the moves. For exact values, this search finds every direction above the threshold, while with estimates it is limited by the statistical noise of and by the cap . In addition, each level whose subgroup contains more than elements requires about new shots.
Simulation details
In this appendix, we describe the simulation of the measurements, the exact values of the stabilizer fidelity, and the tests on the barren plateau. All simulations were carried out with Qiskit [66].
The measurement of a Pauli string is simulated exactly, since the joint distribution of the outcome bits of a string of weight is the Walsh transform of the expectation values of its substrings, from which we sample the outcomes. For a -doped state , with , the expectation value of is that of the signed Pauli string , obtained letter by letter from the images of the single-qubit Pauli operators, on the product state , that is, a product of single-qubit factors, with and for . For depolarized stabilizer states, the expectation values of the stabilizer state are multiplied by , except for the identity. These expectation values agree with those of the dense state vector for . The circuits of logarithmic depth consist of layers of random two-qubit Cliffords on the pairs , starting at even and odd in alternate layers.
The reference values are exact. For perturbed states, according to Appendix A.4. For depolarized stabilizer states, the fidelity with a stabilizer state is , which is largest for . For -doped states, does not change under Clifford gates nor when stabilizer qubits are attached, so that it equals the stabilizer fidelity of [60], which we confirmed for by enumerating all stabilizer states of qubits [67].
The statements of Sec. III D on the barren plateau are based on the tests of Table II. Without local restart, the moves of step (2) did not reach the optimum even with exact fidelities, while a greedy search over all sign flips and neighbors with exact fidelities did. With shots, the protocol without local restart also reached the optimum, since the statistical noise makes it accept moves that do not improve until it leaves the region of small fidelities, but it needed many more measurements than the protocol. Conversely, the protocol with the local candidate as its only move needed fewer measurements, but it stopped below the optimum in several runs, mostly for random Cliffords. Thereby, the local restart leads the search to the region of high fidelity, and the moves through the graph of neighbors complete it.
Example of a local candidate
In this appendix, we follow the construction of a local candidate for four qubits in the state , whose closest stabilizer state has generators of weight two with expectation values , and . The search starts at a random stabilizer state with generators , , and , whose fidelity is , so that it lies in the flat region of the search. The DFE of this state with shots, together with the substrings of every shot, provides outcomes for 91 Pauli strings, the first of which are shown in Table III and in Figure 3(a) in the order of the local restart. Exactly seven strings are significant at the level , namely the six elements of weight two of the optimal group and , while the following ones have expectation value zero.
Figure 3. Local candidate from the Pauli store. Inset (a) shows the stored strings in the order of the local restart, colored by the result of the greedy selection, where hatched bars are not significant at the level , with and . Inset (b) shows the exact fidelity of the initial state, of its best sign flip and best neighbor, and of the local candidate , where the dashed line marks .
| Selection | |||||
| 62 | +0.839 | +0.8 | accepted | ||
| 58 | +0.793 | +0.8 | accepted | ||
| 78 | +0.769 | +0.8 | accepted | ||
| 59 | −0.763 | −0.8 | product | ||
| 58 | +0.724 | +0.8 | accepted | ||
| 58 | +0.724 | +0.8 | not needed | ||
| 68 | −0.618 | −0.8 | not needed | ||
| 60 | +0.433 | 0 | not needed |
Table III. Stored strings in the order of the local restart after one DFE of a random stabilizer state, for the state of Appendix E, with the number of outcomes, the mean outcome, the exact expectation value, the Hoeffding -value and the result of the greedy selection. The first seven strings are significant.
The greedy selection accepts , and , rejects since , and accepts , which completes four generators. Then, the candidate with generators , , and is the optimal state . The store gives , so that the search jumps
| Search | Optimum | Shots/ |
| All flips and neighbors, exact | 20/20 | - |
| Moves of step (2), exact | 0/20 | - |
| Protocol without local restart | 20/20 | 93.8 |
| Local candidate only | 12/20 | 3.0 |
| Protocol | 20/20 | 5.5 |
Table 2. Number of runs that reached the optimum from a random start and median number of shots of the search, for 20 T-doped states with and , ten of them prepared by random Cliffords and ten by layers of two-qubit Cliffords between neighboring qubits, with . The first two rows use exact fidelities and no local restart.
from a fidelity of 0.0125 to 0.8125 in a single step, while the best sign flip and the best neighbor of the initial state have fidelities 0.1125 and 0.0625, as shown in Figure 3(b), and a fresh DFE with shots gives . Notice that in this example every stored string has tens of outcomes, so that the strings with , such as with , are not significant. For larger , however, most stored strings have few outcomes, and an ordering by alone would place first many of them with .
References
References
- [1]S. Aaronson and D. Gottesman, Improved simulation of stabilizer circuits, Phys. Rev. A 70, 052328 (2004).DOI
- [2]S. Bravyi and A. Kitaev, Universal quantum computation with ideal Clifford gates and noisy ancillas, Phys. Rev. A 71, 022316 (2005).DOI
- [3]V. Veitch, S. A. H. Mousavian, D. Gottesman, and J. Emerson, The resource theory of stabilizer quantum computation, New J. Phys. 16, 013009 (2014).DOI
- [4]M. Howard and E. Campbell, Application of a resource theory for magic states to fault-tolerant quantum computing, Phys. Rev. Lett. 118, 090501 (2017).DOI
- [5]S. Bravyi, D. Browne, P. Calpin, E. Campbell, D. Gosset, and M. Howard, Simulation of quantum circuits by low-rank stabilizer decompositions, Quantum 3, 181 (2019).
- [6]R. Wagner, F. C. R. Peres, E. Zambrini Cruzeiro, and E. F. Galvão, Unitary-invariant method for witnessing nonstabilizerness in quantum processors, J. Phys. A: Math. Theor. 58, 285302 (2025), arXiv:2404.16107.
- [7]T. Haug, S. Lee, and M. S. Kim, Efficient quantum algorithms for stabilizer entropies, Phys. Rev. Lett. 132, 240602 (2024).DOI
- [8]M. Kliesch and I. Roth, Theory of quantum system certification, PRX Quantum 2, 010201 (2021), arXiv:2010.05925.DOI
- [9]J. Eisert, D. Hangleiter, N. Walk, I. Roth, D. Markham, R. Parekh, U. Chabaud, and E. Kashefi, Quantum certification and benchmarking, Nat. Rev. Phys. 2, 382 (2020), arXiv:1910.06343.DOI
- [10]A. Gu, L. Leone, S. Ghosh, J. Eisert, S. Yelin, and Y. Quek, Pseudomagic quantum states, Phys. Rev. Lett. 132, 210606 (2024).DOI
- [11]S. Chen, W. Gong, Q. Ye, and Z. Zhang, Stabilizer bootstrapping: A recipe for efficient agnostic tomography and magic estimation, in Proceedings of the 57th Annual ACM Symposium on Theory of Computing (STOC ’25) (2025) pp. 429–438, arXiv:2408.06967.arxiv.org/abs/2408.06967
- [12]H. Hamaguchi, K. Hamada, N. Marumo, and N. Yoshioka, Faster computation of nonstabilizerness, Phys. Rev. Appl. 23, 014069 (2025).DOI
- [13]L. Leone, S. F. E. Oliviero, and A. Hamma, Stabilizer Rényi entropy, Phys. Rev. Lett. 128, 050402 (2022).DOI
- [14]T. Haug and L. Piroli, Stabilizer entropies and nonstabilizerness monotones, Quantum 7, 1092 (2023).DOI
- [15]A. Montanaro, Learning stabilizer states by Bell sampling (2017), arXiv:1707.04012.arxiv.org/abs/1707.04012
- [16]D. Gross, S. Nezami, and M. J. Walter, Schur–Weyl duality for the Clifford group with applications: Property testing, a robust Hudson theorem, and Finetti representations, Commun. Math. Phys. 385, 1325 (2021).DOI
- [17]D. Hangleiter and M. J. Gullans, Bell sampling from quantum circuits, Phys. Rev. Lett. 133, 020601 (2024), arXiv:2306.00083.DOI
- [18]S. Grewal, V. Iyer, W. Kretschmer, and D. Liang, Improved stabilizer estimation via Bell difference sampling, in Proceedings of the 56th Annual ACM Symposium on Theory of Computing (STOC ’24) (2024) pp. 1352–1363, arXiv:2304.13915.DOI
- [19]S. Grewal, V. Iyer, W. Kretschmer, and D. Liang, Agnostic tomography of stabilizer product states, Quantum 10, 2027 (2026).arxiv.org/abs/2404.03813
- [20]S. Arunachalam and A. Dutt, Polynomial-time tolerant testing stabilizer states (2024), arXiv:2408.06289.arxiv.org/abs/2408.06289
- [21]Z. Bao, P. van Dordrecht, and J. Helsén, Tolerant testing of stabilizer states with a polynomial gap via a generalized uncertainty relation, in Proceedings of the 57th Annual ACM Symposium on Theory of Computing (STOC ’25) (2025) pp. 1254–1262, arXiv:2410.21811.arxiv.org/abs/2410.21811
- [22]V. Iyer and D. Liang, Tolerant testing of stabilizer states with mixed state inputs (2024), arXiv:2411.08765.arxiv.org/abs/2411.08765
- [23]C.-Y. Lai and H.-C. Cheng, Learning quantum circuits of some T gates, IEEE Trans. Inf. Theory 68, 3951 (2022), arXiv:2106.12524.DOI
- [24]L. Leone, S. F. E. Oliviero, and A. Hamma, Learning t-doped stabilizer states, Quantum 8, 1361 (2024), arXiv:2305.15398.DOI
- [25]M. Hinsche and J. Helsén, Single-copy stabilizer testing, in Proceedings of the 57th Annual ACM Symposium on Theory of Computing (STOC ’25) (2025) pp. 439–450.
- [26]L. Bittel, J. Eisert, W. Gong, A. A. Mele, and L. Schatzki, Adaptivity is all you need: Optimal stabilizer learning using just single-copy measurements (2026), arXiv:2610.02031.arxiv.org/abs/2610.02031
- [27]G. Cho and D. Kim, Single-copy stabilizer learning: average case and worst case (2026), arXiv:2604.24099.arxiv.org/abs/2604.24099
- [28]N.-H. Chia, C.-Y. Lai, and H.-H. Lin, Efficient learning of t-doped stabilizer states with single-copy measurements, Quantum 8, 1250 (2024), arXiv:2308.07014.DOI
- [29]S. Grewal, V. Iyer, W. Kretschmer, and D. Liang, Efficient learning of quantum states prepared with few non-Clifford gates, Quantum 9, 1907 (2025), arXiv:2305.13409.DOI
- [30]A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, X.-Q. Zhou, P. J. Love, A. Aspuru-Guzik, and J. L. O’Brien, A variational eigenvalue solver on a photonic quantum processor, Nat. Commun. 5, 4213 (2014).DOI
- [31]A. Kandala, A. Mezzacapo, K. Temme, M. Takita, M. Brink, J. M. Chow, and J. M. Gambetta, Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets, Nature 549, 242 (2017).DOI
- [32]M. Cerezo, A. Arrasmith, R. Babbush, S. C. Benjamin, S. Endo, K. Fujii, J. R. McClean, K. Mitarai, X. Yuan, L. Cinacio, and P. J. Coles, Variational quantum algorithms, Nat. Rev. Phys. 3, 625 (2021).DOI
- [33]M. Cerezo, A. Poremba, L. Cincio, and P. J. Coles, Variational quantum fidelity estimation, Quantum 4, 248 (2020), arXiv:1906.09253.DOI
- [34]J. Gidi, B. Candia, A. D. Muñoz-Moller, A. Rojas, L. Pereira, M. Muñoz, L. Zambrano, and A. Delgado, Stochastic optimization algorithms for quantum applications, Phys. Rev. A 108, 032409 (2023), arXiv:2203.06044.arxiv.org/abs/2203.06044
- [35]C. Ferrie, Self-guided quantum tomography, Phys. Rev. Lett. 113, 190404 (2014).DOI
- [36]R. J. Chapman, C. Ferrie, and A. Peruzzo, Experimental demonstration of self-guided quantum tomography, Phys. Rev. Lett. 117, 040402 (2016), arXiv:1602.04194.DOI
- [37]A. Utreras-Alarcón, M. Rivera-Tapia, S. Niklitschek, and A. Delgado, Stochastic optimization on complex variables and pure-state quantum tomography, Sci. Rep. 9, 16143 (2019).
- [38]Z. Hou, J.-F. Tang, C. Ferrie, G.-Y. Xiang, C.-F. Li, and G.-C. Guo, Experimental realization of self-guided quantum process tomography, Phys. Rev. A 101, 022317 (2020), arXiv:1908.01082.DOI
- [39]L. Zambrano, L. Pereira, S. Niklitschek, and A. Delgado, Estimation of pure quantum states in high dimension at the limit of quantum accuracy through complex optimization and statistical inference, Sci. Rep. 10, 12781 (2020).DOI
- [40]M. Rambach, M. Qaryan, M. Kewming, C. Ferrie, A. G. White, and J. Romero, Robust and efficient high-dimensional quantum state tomography, Phys. Rev. Lett. 126, 100402 (2021), arXiv:2010.00632.DOI
- [41]R. J. McClean, S. Boixo, V. N. Smelyanskiy, R. Babbush, and H. Neven, Barren plateaus in quantum neural network training landscapes, Nat. Commun. 9, 4812 (2018).DOI
- [42]M. Cerezo, A. Sone, T. Volkoff, L. Cincio, and P. J. Coles, Cost function dependent barren plateaus in shallow parametrized quantum circuits, Nat. Commun. 12, 1791 (2021).DOI
- [43]A. D. Muñoz-Moller, L. Pereira, L. Zambrano, J. Cortés-Vega, and A. Delgado, Variational determination of multiqubit geometrical entanglement in noisy intermediate-scale quantum computers, Phys. Rev. Appl. 18, 024048 (2022), arXiv:2110.03709.
- [44]L. Zambrano, A. D. Muñoz-Moller, M. Muñoz, L. Pereira, and A. Delgado, Avoiding barren plateaus in the variational determination of geometric entanglement, Quantum Sci. Technol. 9, 025016 (2024).arxiv.org/abs/2304.13388
- [45]H. J. García, I. L. Markov, and A. W. Cross, On the geometry of stabilizer states, Quantum Info. Comput. 14, 683–720 (2014), arXiv:1711.07848.
- [46]S. T. Flammia and Y.-K. Liu, Direct fidelity estimation from few Pauli measurements, Phys. Rev. Lett. 106, 230501 (2011).
- [47]M. P. da Silva, O. Landon-Cardinal, and D. Poulin, Practical characterization of quantum devices without tomography, Phys. Rev. Lett. 107, 210404 (2011).
- [48]S. Pallister, N. Linden, and A. Montanaro, Optimal verification of entangled states with local measurements, Phys. Rev. Lett. 120, 170502 (2018), arXiv:1709.03353.DOI
- [49]H. Zhu and M. Hayashi, Optimal verification and fidelity estimation of maximally entangled states, Phys. Rev. A 99, 052346 (2019), arXiv:1901.09772.DOI
- [50]J. Barberà-Rodríguez, M. Navarro, and L. Zambrano, Sampling groups of Pauli operators to enhance direct fidelity estimation, Quantum 9, 1784 (2025), arXiv:2501.19228.
- [51]H. Cha and J. Lee, Efficient sampling for Pauli-measurement-based shadow tomography in direct fidelity estimation, Phys. Rev. A 112, 032427 (2025), arXiv:2501.03512.arxiv.org/abs/2501.03512
- [52]S. T. Flammia and J. J. Wallman, Efficient estimation of pauli channels, ACM Transactions on Quantum Computing 1, 10.1145/3480039 (2020).
- [53]O. Goldreich and L. A. Levin, A hard-core predicate for all one-way functions, in Proceedings of the 21st Annual ACM Symposium on Theory of Computing (1989) pp. 25–32.DOI
- [54]E. Kushilevitz and Y. Mansour, Learning decision trees using the Fourier spectrum, SIAM J. Comput. 22, 1331 (1993).
- [55]J. Cotler and F. Wilczek, Quantum overlapping tomography, Phys. Rev. Lett. 124, 100401 (2020).DOI
- [56]H.-Y. Huang, R. Kueng, and J. Preskill, Predicting many properties of a quantum system from very few measurements, Nat. Phys. 16, 1050 (2020).DOI
- [57]L. Leone, S. F. E. Oliviero, and A. Hamma, Nonstabilizerness determining the hardness of direct fidelity estimation, Phys. Rev. A 107, 022429 (2023).DOI
- [58]O. J. Dunn, Multiple comparisons among means, J. Am. Stat. Assoc. 56, 52 (1961).DOI
- [59]L. Leone, S. F. E. Oliviero, Y. Zhou, and A. Hamma, Quantum chaos is quantum, Quantum 5, 453 (2021), arXiv:2102.08406.DOI
- [60]R. Rubboli, R. Takagi, and M. Tomamichel, Mixed-state additivity properties of magic monotones based on quantum relative entropies for single-qubit states and beyond, Quantum 8, 1492 (2024).DOI
- [61]H.-Y. Huang, Y. Liu, M. Broughton, I. Kim, A. Anshu, Z. Landau, and J. R. McClean, Learning shallow quantum circuits, in Proceedings of the 56th Annual ACM Symposium on Theory of Computing (STOC ’24) (2024) pp. 1343–1351.
- [62]G. S. Ravi, P. Gokhale, Y. Ding, W. M. Kirby, K. N. Smith, J. M. Baker, P. J. Love, H. Hoffmann, K. R. Brown, and F. T. Chong, CAFQA: A classical simulation bootstrap for variational quantum algorithms, in Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS ’23), Volume 1 (2023) pp. 15–29, arXiv:2202.12924.arxiv.org/abs/2202.12924
- [63]D. Gottesman, Stabilizer codes and quantum error correction, Ph.D. thesis, California Institute of Technology (1997), arXiv:quant-ph/9705052.DOI
- [64]Y. Li, O. Gü hne, and Q. He, Bounding fidelity of non-stabilizer states from local Pauli measurements (2026), arXiv:2610.41808.arxiv.org/abs/2610.41808
- [65]R. Harper, W. Yu, and S. T. Flammia, Fast estimation of sparse quantum noise, PRX Quantum 2, 010322 (2021).DOI
- [66]Qiskit contributors, Qiskit: An open-source framework for quantum computing, https://github.com/Qiskit/qiskit (2026), version 2.4.1.
- [67]J. Dehaene and B. De Moor, Clifford group, stabilizer states, and linear and quadratic operations over GF(2), Phys. Rev. A 68, 042318 (2003).DOI


