betaFeedback

WorksPhysics and Astronomy

Magic Moments: An Operational Approach of Certifying Nonstabilizerness from Few Copies

Abstract

Magic is the key resource enabling universal fault-tolerant quantum computation beyond classically simulable stabilizer circuits. Certifying it, however, usually requires either full state tomography or an optimization over the set of stabilizer states, both of which rapidly become prohibitive as the system grows. Here, we introduce a moment-based criterion that certifies magic from a few moments of the discrete Wigner function, without fully reconstructing the distribution itself. For pure states of any number of qudits the criterion is necessary and sufficient, while for mixed states we construct a hierarchy of higher moments conditions that reaches the exact negativity threshold. We also derive lower bounds on sum negativity and mana from low-order moments, and use them to bound the negativity factor in quasiprobability simulation. Each moment can be evaluated as the expectation value of a two-outcome observable on a few copies of the state, measurable with a constant-depth Clifford circuit and a number of rounds independent of qudit number, providing efficient, experimentally accessible tools for certifying and quantifying nonstabilizer resources.

Introduction

Universal fault-tolerant quantum computation offers a promising route to information-processing capabilities beyond the reach of classical computers [1]. Identifying the quantum resources underlying this potential advantage remains a fundamental challenge. Although entanglement is essential for many quantum information-processing tasks, it alone does not guarantee a computational advantage. Indeed, the Gottesman-Knill theorem establishes that circuits comprising stabilizer-state preparations, Clifford operations, and computational-basis measurements can be efficiently simulated classically, even when they generate highly entangled states [2]. Achieving universal and efficient quantum computation, in contrast, requires extending this classically simulable framework with suitable non-Clifford operations [3, 4]. The quantum resource associated with this departure, known as nonstabilizerness or quantum magic, therefore plays a central role in enabling quantum computational advantage [3, 4, 5, 6].

Beyond computation, nonstabilizerness has emerged as an important resource in quantum many-body physics and communication complexity, offering insights into quantum dynamics, resource generation, and the limits of classical information processing [7, 8, 9]. For odd-prime-dimensional qudits, the discrete Wigner function provides a natural phase-space description, connecting negativity to contextuality and limitations of efficient classical simulation within the quasiprobability framework [10, 11, 12, 13]. These connections have motivated the development of several quantitative measures of nonstabilizerness, including the mana and relative entropy of magic [5], robustness of magic [6], thauma [14], and stabilizer Rényi entropy (SRE) [15, 16].

Although these measures capture complementary aspects of quantum magic, their experimental accessibility and computational evaluation remain significant challenges.

The difficulty stems from two fundamental bottlenecks. Experimentally, many existing approaches require extensive knowledge of the quantum state, with full tomography incurring a measurement overhead that scales exponentially with the number of qudits [17, 18]. Computationally, the stabilizer polytope, defined as the convex hull of pure stabilizer states, has a rapidly growing number of vertices, making its exact characterization increasingly demanding. Consequently, determining whether a state belongs to this polytope or quantifying its distance from the stabilizer set can become computationally intractable even when complete tomographic information is available. These limitations often restrict practical methods to systems of limited size or dimension, or to states possessing specific symmetries or structures.

To circumvent these difficulties, several measurement-based approaches have been proposed to probe quantum magic without complete state reconstruction. Randomized-measurement protocols based on the second stabilizer Rényi entropy enable magic quantification but suffer from sensitivity to experimental imperfections and require exponentially many measurements with increasing system size [19]. More robust entropy-based criteria have since been developed, although their efficient certification guarantees hold only under restricted entropy conditions and not for arbitrary mixed states [20]. Complementary methods exploit two-copy Bell-sampling statistics [21], while multifractal-flatness approaches can require exponentially many samples to estimate stabilizer entropy to fixed accuracy [22]. More recently, the reduced-stabilizer-polytope framework has enabled magic detection from a restricted set of Pauli measurements, together with lower bounds on the robustness of magic [23]. Despite these advances, experimentally accessible and scalable methods for detecting and quantifying magic in higher-dimensional quantum systems remain elusive. This raises a fundamental

Results

Throughout the paper, nn denotes the number of qudits, dd their odd prime local dimension, and D=dnD=d^n the total dimension. On a single qudit, the shift and phase operators satisfy X∣j⟩=∣j+1⟩X|j\rangle=|j+1\rangle and Z∣j⟩=ωj∣j⟩Z|j\rangle=\omega^j|j\rangle, where ω=e2πi/d\omega=e^{2\pi i/d} and arithmetic is modulo dd. The displacement operator at (p,q)∈Zd2(p,q)\in\mathbb{Z}_d^2 is

T(p,q)=ω−2−1pqZpXq,(1)T_{(p,q)}=\omega^{-2^{-1}pq}Z^pX^q, \tag*{(1)}

where 2−12^{-1} is the inverse of 2 modulo dd. For u=(p,q)∈Zd2n\mathbf{u}=(\mathbf{p},\mathbf{q})\in\mathbb{Z}_d^{2n}, the corresponding nn-qudit displacement is Tu=⨂ℓ=1nT(pℓ,qℓ)T_{\mathbf{u}}=\bigotimes_{\ell=1}^{n}T_{(p_\ell,q_\ell)}.

The operators ωaTu\omega^aT_{\mathbf{u}}, with a∈Zda\in\mathbb{Z}_d, form the Pauli group Hd\mathcal{H}_d. The Clifford group is its normalizer,

Cd={U∈U(D):UHdU†=Hd}.(2)\mathcal{C}_d=\{U\in\mathrm{U}(D):U\mathcal{H}_dU^\dagger=\mathcal{H}_d\}. \tag*{(2)}

A pure stabilizer state is the unique common +1+1 eigenstate of an abelian Pauli subgroup of order DD that contains no non-identity scalar. The convex hull of pure stabilizer states is the stabilizer polytope. States outside this polytope are magic states.

The phase-point operators are defined by [10]

A0=1D∑vTv,Au=TuA0Tu†.(3)A_{\mathbf{0}}=\frac{1}{D}\sum_{\mathbf{v}}T_{\mathbf{v}},\qquad A_{\mathbf{u}}=T_{\mathbf{u}}A_{\mathbf{0}}T_{\mathbf{u}}^\dagger. \tag*{(3)}

Here A0∣x⟩=∣−x⟩A_{\mathbf{0}}|\mathbf{x}\rangle=|-\mathbf{x}\rangle. The operators satisfy Tr⁡(Au)=1\operatorname{Tr}(A_{\mathbf{u}})=1 and Tr⁡(AuAv)=Dδu,v\operatorname{Tr}(A_{\mathbf{u}}A_{\mathbf{v}})=D\delta_{\mathbf{u},\mathbf{v}}. The discrete Wigner function (DWF) is

Wρ(u)=1DTr⁡(Auρ),∑uWρ(u)=1,(4)W_\rho(\mathbf{u})=\frac{1}{D}\operatorname{Tr}(A_{\mathbf{u}}\rho),\qquad\sum_{\mathbf{u}}W_\rho(\mathbf{u})=1, \tag*{(4)}

and its moments are defined in Eq. (5). By the discrete Hudson theorem, Wigner negativity is equivalent to magic for pure states. For mixed states, Wigner negativity is sufficient to certify magic [10, 11]. The Supplementary Materials give further details of the formalism along with examples.

Detecting magic from low-order Wigner moments

We first introduce a moment-based framework for detecting nonstabilizerness, then show how to experimentally measure the required moments and use them to quantify Wigner negativity.

Definition 1. For a quantum state ρ∈D(Cd)\rho\in\mathbb{D}(\mathbb{C}^d), with discrete Wigner function Wρ(u)W_\rho(\mathbf{u}) (with u∈Zd×Zd\mathbf{u}\in\mathbb{Z}_d\times\mathbb{Z}_d labels the points of the discrete phase-space), we define its kk-th Wigner moment as

wk:=∑u=(0,0)(d−1,d−1)[Wρ(u)]k,(5)w_k:=\sum_{\mathbf{u}=(0,0)}^{(d-1,d-1)}[W_\rho(\mathbf{u})]^k, \tag*{(5)}

where, k∈Nk\in\mathbb{N}, and k≥1k\ge1.

A necessary and sufficient criterion for detecting pure magic states

By the discrete Hudson theorem, a pure state is magic if and only if its Wigner function is negative at some phase-space point [10]. Checking this directly requires evaluating the Wigner function at every point, which is hard in general. We show that for pure states a single number built from the moments suffices, with no need for individual phase-space values. We first review three properties of the Wigner moments that hold for any number of qudits.

Lemma 1. For every state ρ\rho of nn qudits of odd prime dimension dd, the Wigner function and its moments satisfy

∣Wρ(u)∣≤1Dfor all u,(6)\lvert W_{\rho}(u)\rvert\le\frac{1}{D} \qquad\text{for all }u, \tag*{(6)}
w2=1DTr⁡[ρ2],(7)w_2 = \frac{1}{D}\operatorname{Tr}[\rho^2], \tag*{(7)}
∣wk∣≤w2Dk−2for all k≥2.(8)\lvert w_k\rvert\le\frac{w_2}{D^{k-2}} \qquad\text{for all } k \ge2. \tag*{(8)}

The detailed proof is given in Methods IV A 1. Eq. (7) tells us that the second moment is simply the purity, up to the factor DD. We therefore introduce rescaled moments whose magnitudes are bounded independently of the number of qudits,

P=Dw2=Tr⁡[ρ2],b=D2w3,c=D3w4.(9)P = D w_2 = \operatorname{Tr}[\rho^2], \qquad b = D^2w_3, \qquad c = D^3w_4. \tag*{(9)}

In these variables, Lemma 1 takes a compact form,

∣b∣≤P,0≤c≤P.(10)\lvert b\rvert\le P, \qquad0 \le c \le P. \tag*{(10)}

For a pure state the purity is one, so P=1P=1 and this inequality reduces to a condition on bb alone. The bound ∣b∣≤P\lvert b\rvert\le P shows that bb can never exceed one. The central question is therefore whether the upper value b=1b=1 is reserved for stabilizer states. The following theorem answers it.

Theorem 1. Let ∣ψ⟩\lvert\psi\rangle be a pure state of nn qudits of odd prime dimension dd. Then

D2w3≤1,(11)D^2w_3 \le1, \tag*{(11)}

and equality holds if and only if ∣ψ⟩\lvert\psi\rangle is a stabilizer state. Consequently,

D2w3>1⟺∣ψ⟩ is a magic state.(12)D^2w_3 > 1 \Longleftrightarrow\lvert\psi\rangle\text{ is a magic state}. \tag*{(12)}

For a detailed proof see Methods IV A 2. Theorem 1 is one of the main detection result of this work. For pure states the moment criterion is not merely sufficient but exact, so no pure magic state can escape it, and it depends only on the third moment, regardless of the number of qudits.

The single number D2w3D^2w_3 has two further properties that make it a natural figure of merit. It does not change under Clifford unitaries, because these only permute the points of phase space [10] and every moment is a sum over all points. It is also multiplicative under tensor products, because the Wigner function of a product state is the product of the Wigner functions.

To make the certificates concrete, we use the strange state

∣ψ1⟩=∣1⟩−∣2⟩2,(13)\lvert\psi_1\rangle= \frac{\lvert1\rangle-\lvert2\rangle}{\sqrt{2}}, \tag*{(13)}

and the ququint state

∣ψ4⟩=∣0⟩−∣1⟩+∣2⟩+∣3⟩+∣4⟩5.(14)\lvert\psi_4\rangle= \frac{\lvert0\rangle-\lvert1\rangle+\lvert2\rangle+\lvert3\rangle+\lvert4\rangle}{\sqrt{5}}. \tag*{(14)}

Their rescaled third moments are b=0b=0 and b=77/125=0.616b=77/125=0.616, respectively, compared with b=1b=1 for every pure stabilizer state. The detailed discrete Wigner distributions and the original pure-state examples are provided in the Supplementary Information.

Extension to mixed states

The proof of Theorem 1 relies essentially on purity, and Hudson’s theorem does not extend to mixed states. The moment inequality below, however, requires only Wigner non-negativity, so it applies to both pure and mixed states.

Theorem 2. If ρ∈D(CD)\rho\in\mathcal{D}(\mathbb{C}^{D}) is a quantum state whose discrete Wigner function is nonnegative at every point of the discrete phase space, i.e., Wρ(u)≥0 ∀u∈Zd2nW_{\rho}(u) \ge0\ \forall u \in\mathbb{Z}_d^{2n}, then

w22≤w3(15)w_2^2 \le w_3 \tag*{(15)}

where, w2w_2 and w3w_3 are defined in Definition 1.

A detailed proof is given in Methods IV A 3. The condition holds for every non-negative, normalized DW, independent of the Hilbert-space dimension and the purity of the state, so any violation certifies Wigner negativity. For pure states, it recovers one direction of Theorem 1, which also proves the converse. To establish Theorem 2 as a witness of magic for mixed states, we must show that every mixed stabilizer state has a non-negative Wigner function. We begin with the following lemma.

Lemma 2. Let ρ=∑kpk∣Sk⟩⟨Sk∣\rho=\sum_k p_k\lvert S_k\rangle\langle S_k\rvert be a mixed stabilizer state in an odd prime or prime-power dimension, where {pk}\{p_k\} forms a probability distribution and ∣Sk⟩\lvert S_k\rangle are pure stabilizer states. Then,

Wρ(u)≥0,∀u∈Zd×Zd.(16)W_{\rho}(u) \ge0, \qquad\forall u \in\mathbb{Z}_d \times\mathbb{Z}_d. \tag*{(16)}

The proof is given in Methods IV A 4. The above lemma implies that a violation of Theorem 2 certifies a magic state. A nonnegative Wigner function, however, does not imply stabilizer-polytope membership for mixed states. The rescaled witness is G=P2−b=P2(D2w22−w3)G=P^2-b=P^2(D^2w_2^2-w_3), which is nonpositive for every nonnegative Wigner function, so G>0G>0 certifies magic.

For illustration consider the two depolarized families

ρ1(p)=p∣ψ1⟩⟨ψ1∣+(1−p)I3/3,\rho_1(p)=p\lvert\psi_1\rangle\langle\psi_1\rvert+(1-p)\mathbb{I}_3/3,
ρ2(p)=p∣ψ4⟩⟨ψ4∣+(1−p)I5/5.(17)\rho_2(p)=p\lvert\psi_4\rangle\langle\psi_4\rvert+(1-p)\mathbb{I}_5/5. \tag*{(17)}

with 0≤p≤10\le p\le1. Their full Wigner distributions and moment calculations are provided in the Supplementary Information. For the noisy strange state,

w22−w3=p2(p+2)(4p−1)81,(18)w_2^2-w_3=\frac{p^2(p+2)(4p-1)}{81}, \tag*{(18)}

so the third-moment witness detects exactly the Wigner-negative region p>1/4p>1/4. The fourth-moment witness has the same threshold. For the noisy ququint,

w22−w3=4p2(20p2−3p−5)3125,(19)w_2^2-w_3=\frac{4p^2(20p^2-3p-5)}{3125}, \tag*{(19)}

so the third-moment threshold is (3+409)/40≃0.5806(3+\sqrt{409})/40 \simeq0.5806, whereas Wigner negativity starts at 1/5≃0.44721/\sqrt{5}\simeq0.4472. Figure 1 displays this distinction.

References

  1. [1]I. H. Deutsch, Harnessing the power of the second quantum revolution, PRX Quantum 1, 020101 (2020).arxiv.org/abs/2010.10283
  2. [2]D. Gottesman, The Heisenberg representation of quantum computers (1998), arXiv:quant-ph/9807006.arxiv.org/abs/quant-ph/9807006
  3. [3]S. Bravyi and A. Kitaev, Universal quantum computation with ideal Clifford gates and noisy ancillas, Phys. Rev. A 71, 022316 (2005).DOI
  4. [4]F. Hosseini-nejad, P. Iyer, G. Dauphinais, and D. L. Feder, Realistic gottesman-kitaev-preskill stabilizer states enable universal quantum computation, Phys. Rev. Lett. 136, 150602 (2026).
  5. [5]V. Veitch, S. A. Hamed Moussavian, D. Gottesman, and J. Emerson, The resource theory of stabilizer quantum computation, New Journal of Physics 16, 013009 (2014).DOI
  6. [6]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
  7. [7]Z.-W. Liu and A. Winter, Many-body quantum magic, PRX Quantum 3, 020333 (2022).DOI
  8. [8]P. R. N. Falcão, P. Sierant, J. Zakrzewski, and E. Tirrito, Non-stabilizerness dynamics in many-body localized systems, Phys. Rev. Lett. 135, 240404 (2025).
  9. [9]S. R. Chowdhury, S. G. Naik, A. Chakraborty, R. K. Patra, S. B. Ghosh, P. Ghosal, M. Banik, and A. G. Maity, Gottesman-knill limit on one-way communication complexity: Tracing the quantum advantage down to magic resources, Phys. Rev. A 113, 042607 (2026).DOI
  10. [10]D. Gross, Hudson’s theorem for finite-dimensional quantum systems, Journal of Mathematical Physics 47, 122107 (2006).DOI
  11. [11]V. Veitch, C. Ferrie, D. Gross, and J. Emerson, Negative quasiprobability as a resource for quantum computation, New Journal of Physics 14, 113011 (2012).DOI
  12. [12]A. Mari and J. Eisert, Positive wigner functions render classical simulation of quantum computation efficient, Phys. Rev. Lett. 109, 230503 (2012).DOI
  13. [13]M. Howard, J. Wallman, V. Veitch, and J. Emerson, Contextuality supplies the ’magic’ for quantum computation, Nature 510, 351 (2014).
  14. [14]X. Wang, M. M. Wilde, and Y. Su, Efficiently computable bounds for magic state distillation, Phys. Rev. Lett. 124, 090505 (2020).DOI
  15. [15]L. Leone, S. F. E. Oliviero, and A. Hamma, Stabilizer rényi entropy, Phys. Rev. Lett. 128, 050402 (2022).DOI
  16. [16]Y. Wang and Y. Li, Stabilizer rényi entropy on qudits, Quantum Inf. Process. 22, 444 (2023).DOI
  17. [17]J. Haah, A. W. Harrow, Z. Ji, X. Wu, and N. Yu, Sample-optimal tomography of quantum states, IEEE Transactions on Information Theory 63, 5628 (2017).
  18. [18]R. O’Donnell and J. Wright, Efficient quantum tomography, in Proceedings of the Forty-Eighth Annual ACM Symposium on Theory of Computing, STOC ’16 (Association for Computing Machinery, New York, NY, USA, 2016) p. 899–912.arxiv.org/abs/1508.01907
  19. [19]S. F. E. Oliviero, L. Leone, and A. Hamma, Measuring magic on a quantum processor, NPJ Quantum Inf. 8, 148 (2022).DOI
  20. [20]T. Haug and P. S. Tarabunga, Efficient witnessing and testing of magic in mixed quantum states, NPJ Quantum Inf. 12 (2026).DOI
  21. [21]T. Haug and M. Kim, Scalable measures of magic resource for quantum computers, PRX Quantum 4, 010301 (2023).DOI
  22. [22]X. Turkeshi, M. Schirò, and P. Sierant, Measuring nonstabilizerness via multifractal flatness, Phys. Rev. A 108, 042408 (2023).DOI
  23. [23]J. M. Varela, L. L. Keller, A. d. O. Junior, D. A. Moreira, R. Chaves, and R. A. Macêdo, Predicting magic from very few measurements, PRX Quantum 7, 043009 (2026).arxiv.org/abs/2602.18939
  24. [39]H. Pashayan, J. J. Wallman, and S. D. Bartlett, Estimating outcome probabilities of quantum circuits using quasiprobabilities, Phys. Rev. Lett. 115, 070501 (2015).DOI
  25. [40]A. K. Ekert, C. M. Alves, D. K. L. Oi, M. Horodecki, P. Horodecki, and L. C. Kwek, Direct estimations of linear and nonlinear functionals of a quantum state, Phys. Rev. Lett. 88, 217901 (2002).pubmed.ncbi.nlm.nih.gov/12059503
  26. [41]D. Gross, S. Nezami, and M. Walter, Schur–Weyl duality for the Clifford group with applications: Property testing, a robust Hudson theorem, and the Finetti representations, Communications in Mathematical Physics 385, 1325 (2021).DOI
  27. [42]W. Hoeffding, Probability inequalities for sums of bounded random variables, Journal of the American Statistical Association 58, 13 (1963), https://doi.org/10.1080/01621459.1963.10500830.
  28. [43]H.-Y. Huang, R. Kueng, and J. Preskill, Predicting many properties of a quantum system from very few measurements, Nature Physics 16, 1050 (2020).DOI
  29. [44]S. J. van Enk and C. W. J. Beenakker, Measuring Trρⁿ on single copies of ρ using random measurements, Phys. Rev. Lett. 108, 110503 (2012).pubmed.ncbi.nlm.nih.gov/22540446
  30. [45]T. Brydges, A. Elben, P. Jurcevic, B. Vermersch, C. Maier, B. P. Lanyon, P. Zoller, R. Blatt, and C. F. Roos, Probing rényi entanglement entropy via randomized measurements, Science 364, 260 (2019).DOI
  31. [46]A. Elben, S. T. Flammia, H.-Y. Huang, R. Kueng, J. Preskill, B. Vermersch, and P. Zoller, The randomized measurement toolbox, Nature Reviews Physics 5, 9 (2023).
  32. [47]W. K. Wootters and B. D. Fields, Optimal state-determination by mutually unbiased measurements, Annals of Physics 191, 363 (1989).DOI
  33. [48]J. A. Smolin, J. M. Gambetta, and G. Smith, Efficient method for computing the maximum-likelihood quantum state from measurements with additive gaussian noise, Phys. Rev. Lett. 108, 070502 (2012).pubmed.ncbi.nlm.nih.gov/22401185
  34. [49]M. Ringbauer, M. Meth, L. Postler, R. Stricker, R. Blatt, P. Schindler, and T. Monz, A universal qudit quantum processor with trapped ions, Nat. Phys. 18, 1053 (2022).DOI
  35. [50]A. Morvan, V. Ramasesh, M. S. Blok, J. M. Kreikebaum, K. O’Brien, L. Chen, K. K. Mitchell, R. K. Naik, D. I. Santiago, and I. Siddiqi, Qutrit randomized benchmarking, Phys. Rev. Lett. 126, 210504 (2021).DOI
  36. [51]D. Gottesman, Stabilizer codes and quantum error correction (1997), arXiv:quant-ph/9705052 [quant-ph].DOI
  37. [52]E. Wigner, On the quantum correction to the thermodynamic equilibrium, Phys. Rev. 40, 749 (1932).
  38. [53]W. K. Wootters, A wigner-function formulation of finite-state quantum mechanics, Annals of Physics 176, 1 (1987).DOI
  39. [54]S. Prakash, Magic state distillation with the ternary golay code, Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences 476, 20200187 (2020).DOI

Paper details

vlnc:W_hqwjztbs
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 9

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents