- Letter
- Open Access
Fast and exact approach for stabilizer Rényi entropy via the XOR-FWHT algorithm
Phys. Rev. Research 8, L042005 – Published 19 October, 2026
DOI: https://doi.org/10.1103/f7ss-6tl1
Abstract
Quantum advantage is widely understood to rely on key quantum resources beyond entanglement, among which nonstabilizerness (quantum “magic”) plays a central role in enabling universal quantum computation. However, the deterministic evaluation of the second-order stabilizer Rényi entropy for generic many-body quantum states remains computationally challenging, with brute-force methods scaling as for an -qubit state with . Here, we develop an exact algebraic reformulation and a deterministic numerical algorithm, numerically exact up to floating-point roundoff, that reduces this cost to while retaining natural parallelism. This is an exponential speedup, although the scaling remains exponential in the number of qubits. This advance enables high-precision calculations for generic state vectors at medium system sizes and provides a practical tool for investigating the scaling and nonequilibrium dynamics of quantum magic in many-body systems.
Physics Subject Headings (PhySH)
Article Text
Supplemental Material
References (112)
- L. Amico, R. Fazio, A. Osterloh, and V. Vedral, Entanglement in many-body systems, Rev. Mod. Phys. 80, 517 (2008).
- R. Horodecki, P. Horodecki, M. Horodecki, and K. Horodecki, Quantum entanglement, Rev. Mod. Phys. 81, 865 (2009).
- E. Chitambar and G. Gour, Quantum resource theories, Rev. Mod. Phys. 91, 025001 (2019).
- V. Veitch, S. A. H. Mousavian, D. Gottesman, and J. Emerson, The resource theory of stabilizer quantum computation, New J. Phys. 16, 013009 (2014).
- L. Leone, S. F. E. Oliviero, and A. Hamma, Stabilizer Rényi entropy, Phys. Rev. Lett. 128, 050402 (2022).
- Z.-W. Liu and A. Winter, Many-body quantum magic, PRX Quantum 3, 020333 (2022).
- D. Gottesman, The Heisenberg representation of quantum computers, in Group22: Proceedings of the XXII International Colloquium on Group Theoretical Methods in Physics (International Press, Cambridge, MA, 1999), pp. 32–43.
- S. Aaronson and D. Gottesman, Improved simulation of stabilizer circuits, Phys. Rev. A 70, 052328 (2004).
- J. Preskill, Quantum computing in the NISQ era and beyond, Quantum 2, 79 (2018).
- L. Daguerre, R. Blume-Kohout, N. C. Brown, D. Hayes, and I. H. Kim, Experimental demonstration of high-fidelity logical magic states from code switching, Phys. Rev. X 15, 041008 (2025).
- D. Aasen, M. Aghaee, Z. Alam, M. Andrzejczuk, A. Antipov, M. Astafev, L. Avilovas, A. Barzegar, B. Bauer, J. Becker, J. M. Bello-Rivas, U. Bhaskar, A. Bocharov, S. Boddapati, D. Bohn, et al., Roadmap to fault tolerant quantum computation using topological qubit arrays, arXiv:2502.12252.
- T. Peham, L. Schmid, L. Berent, M. Müller, and R. Wille, Automated synthesis of fault-tolerant state preparation circuits for quantum error-correction codes, PRX Quantum 6, 020330 (2025).
- P. Hayden and J. Preskill, Black holes as mirrors: Quantum information in random subsystems, J. High Energy Phys. 09 (2007) 120.
- Y. Sekino and L. Susskind, Fast scramblers, J. High Energy Phys. 10 (2008) 065.
- P. Hosur, X.-L. Qi, D. A. Roberts, and B. Yoshida, Chaos in quantum channels, J. High Energy Phys. 02 (2016) 004.
- C. W. von Keyserlingk, T. Rakovszky, F. Pollmann, and S. L. Sondhi, Operator hydrodynamics, OTOCs, and entanglement growth in systems without conservation laws, Phys. Rev. X 8, 021013 (2018).
- Y. Gu, C. Hua Lee, X. Wen, G. Y. Cho, S. Ryu, and X.-L. Qi, Holographic duality between -dimensional quantum anomalous Hall state and -dimensional topological insulators, Phys. Rev. B 94, 125107 (2016).
- V. Khemani, A. Vishwanath, and D. A. Huse, Operator spreading and the emergence of dissipative hydrodynamics under unitary evolution with conservation laws, Phys. Rev. X 8, 031057 (2018).
- B. Swingle, Unscrambling the physics of out-of-time-order correlators, Nat. Phys. 14, 988 (2018).
- R. Shen, F. Qin, J.-Y. Desaules, Z. Papić, and C. H. Lee, Enhanced many-body quantum scars from the non-Hermitian Fock skin effect, Phys. Rev. Lett. 133, 216601 (2024).
- I. García-Mata, R. Jalabert, and D. Wisniacki, Out-of-time-order correlations and quantum chaos, Scholarpedia 18, 55237 (2023).
- P. S. Tarabunga, Critical behaviors of non-stabilizerness in quantum spin chains, Quantum 8, 1413 (2024).
- P. S. Tarabunga, E. Tirrito, T. Chanda, and M. Dalmonte, Many-body magic via Pauli-Markov chains—From criticality to gauge theories, PRX Quantum 4, 040317 (2023).
- P. R. N. Falcão, P. S. Tarabunga, M. Frau, E. Tirrito, J. Zakrzewski, and M. Dalmonte, Nonstabilizerness in U(1) lattice gauge theory, Phys. Rev. B 111, L081102 (2025).
- S. Liu, H.-K. Zhang, S. Yin, and S.-X. Zhang, Symmetry restoration and quantum Mpemba effect in symmetric random circuits, Phys. Rev. Lett. 133, 140405 (2024).
- S. Liu, H.-K. Zhang, S. Yin, S.-X. Zhang, and H. Yao, Symmetry restoration and quantum Mpemba effect in many-body localization systems, Sci. Bull. 70, 3991 (2025).
- H. Yu, Z.-X. Li, and S.-X. Zhang, Symmetry breaking dynamics in quantum many-body systems, Chin. Phys. Lett. 42, 110602 (2025).
- C. Liu and W. Wei Ho, Solvable entanglement dynamics in quantum circuits with generalized space-time duality, Phys. Rev. Res. 7, L012011 (2025).
- Y.-Q. Chen, S. Liu, and S.-X. Zhang, Subsystem information capacity in random circuits and Hamiltonian dynamics, Quantum 9, 1783 (2025).
- S. Liu, M.-R. Li, S.-X. Zhang, S.-K. Jian, and H. Yao, Noise-induced phase transitions in hybrid quantum circuits, Phys. Rev. B 110, 064323 (2024).
- S. Liu, M.-R. Li, S.-X. Zhang, and S.-K. Jian, Entanglement structure and information protection in noisy hybrid quantum circuits, Phys. Rev. Lett. 132, 240402 (2024).
- W.-T. Xue and C. Hua Lee, Topologically protected negative entanglement, Adv. Sci. 13, e13868 (2026).
- W. K Wootters, A Wigner-function formulation of finite-state quantum mechanics, Ann. Phys. (NY) 176, 1 (1987).
- V. Veitch, C. Ferrie, D. Gross, and J. Emerson, Negative quasi-probability as a resource for quantum computation, New J. Phys. 14, 113011 (2012).
- S. Bravyi and D. Gosset, Improved classical simulation of quantum circuits dominated by Clifford gates, Phys. Rev. Lett. 116, 250501 (2016).
- S. Bravyi, G. Smith, and J. A. Smolin, Trading classical and quantum computational resources, Phys. Rev. X 6, 021043 (2016).
- X. Wang, M. M. Wilde, and Y. Su, Efficiently computable bounds for magic state distillation, Phys. Rev. Lett. 124, 090505 (2020).
- A. Heimendahl, F. Montealegre-Mora, F. Vallentin, and D. Gross, Stabilizer extent is not multiplicative, Quantum 5, 400 (2021).
- L. Leone, S. F. E. Oliviero, and A. Hamma, Nonstabilizerness determining the hardness of direct fidelity estimation, Phys. Rev. A 107, 022429 (2023).
- L. Leone and L. Bittel, Stabilizer entropies are monotones for magic-state resource theory, Phys. Rev. A 110, L040403 (2024).
- T. Haug and L. Piroli, Quantifying nonstabilizerness of matrix product states, Phys. Rev. B 107, 035148 (2023).
- J. Odavić, T. Haug, G. Torre, A. Hamma, F. Franchini, and S. M. Giampaolo, Complexity of frustration: A new source of non-local non-stabilizerness, SciPost Phys. 15, 131 (2023).
- G. Passarelli, R. Fazio, and P. Lucignano, Nonstabilizerness of permutationally invariant systems, Phys. Rev. A 110, 022436 (2024).
- Y.-M. Ding, Z. Wang, and Z. Yan, Evaluating many-body stabilizer Rényi entropy by sampling reduced Pauli strings: Singularities, volume law, and nonlocal magic, PRX Quantum 6, 030328 (2025).
- M. Hoshino and Y. Ashida, Stabilizer Rényi entropy encodes fusion rules of topological defects and boundaries, Phys. Rev. Lett. 136, 080402 (2026).
- S. Maity and R. Hamazaki, Local spreading of stabilizer Rényi entropy in a brickwork random Clifford circuit, Phys. Rev. Res. 8, 013324 (2026).
- M. Bejan, P. W. Claeys, and J. Yao, Spreading of magic resource under unitary Clifford dynamics, Phys. Rev. Lett. (2026).
- R. Shen, T. Chen, M. M. Aliyu, F. Qin, Y. Zhong, H. Loh, and C. H. Lee, Proposal for observing Yang-Lee criticality in Rydberg atomic arrays, Phys. Rev. Lett. 131, 080403 (2023).
- A. F. Mello, M. Collura, E. Miles Stoudenmire, and R. Levy, Magic of the well: Assessing quantum resources of fluid dynamics data, arXiv:2512.03177.
- D. Rattacaso, L. Leone, S. F. E. Oliviero, and A. Hamma, Stabilizer entropy dynamics after a quantum quench, Phys. Rev. A 108, 042407 (2023).
- Y. Zhang, S. Vijay, Y. Gu, and Y. Bao, Designs from magic-augmented Clifford circuits, PRX Quantum 7, 010344 (2026).
- X. Turkeshi, A. Dymarsky, and P. Sierant, Pauli spectrum and nonstabilizerness of typical quantum many-body states, Phys. Rev. B 111, 054301 (2025).
- E. Tirrito, X. Turkeshi, and P. Sierant, Anticoncentration and nonstabilizerness spreading under ergodic quantum dynamics, Phys. Rev. Lett. 135, 220401 (2025).
- J. Odavić, M. Viscardi, and A. Hamma, Stabilizer entropy in nonintegrable quantum evolutions, Phys. Rev. B 112, 104301 (2025).
- T. Haug, L. Aolita, and M. S. Kim, Probing quantum complexity via universal saturation of stabilizer entropies, Quantum 9, 1801 (2025).
- G. Passarelli, A. Russomanno, and P. Lucignano, Nonstabilizerness of a boundary time crystal, Phys. Rev. A 111, 062417 (2025).
- D. Szombathy, A. Valli, C. P. Moca, L. Farkas, and G. Zaránd, Asymptotically independent fluctuations of stabilizer Rényi entropy and entanglement in random unitary circuits, Phys. Rev. Res. 7, 043072 (2025).
- Z.-Y. Hou, C. J. Cao, and Z.-C. Yang, Stabilizer entanglement enhances magic injection, npj Quantum Inf. 12, 113 (2025).
- A. Russomanno, G. Passarelli, D. Rossini, and P. Lucignano, Nonstabilizerness in the unitary and monitored quantum dynamics of XXZ-staggered and Sachdev-Ye-Kitaev models, Phys. Rev. B 112, 064312 (2025).
- S. Bera and M. Schirò, Non-stabilizerness of Sachdev-Ye-Kitaev model, SciPost Phys. 19, 159 (2025).
- F. Brökemeier, S. M. Hengstenberg, J. W. T. Keeble, C. E. P. Robin, F. Rocco, and M. J. Savage, Quantum magic and multipartite entanglement in the structure of nuclei, Phys. Rev. C 111, 034317 (2025).
- F. B. Trigueros and J. A. M. Guzmán, Nonstabilizerness and error resilience in noisy quantum circuits, Phys. Rev. Lett. 136, 240602 (2026).
- X. Turkeshi, E. Tirrito, and P. Sierant, Magic spreading in random quantum circuits, Nat. Commun. 16, 2575 (2025).
- T. Haug and L. Piroli, Stabilizer entropies and nonstabilizerness monotones, Quantum 7, 1092 (2023).
- G. Lami and M. Collura, Nonstabilizerness via perfect Pauli sampling of matrix product states, Phys. Rev. Lett. 131, 180401 (2023).
- P. S. Tarabunga, E. Tirrito, M. C. Bañuls, and M. Dalmonte, Nonstabilizerness via matrix product states in the Pauli basis, Phys. Rev. Lett. 133, 010601 (2024).
- G. Lami and M. Collura, Unveiling the stabilizer group of a matrix product state, Phys. Rev. Lett. 133, 010602 (2024).
- P. S. Tarabunga and T. Haug, Efficient mutual magic and magic capacity with matrix product states, SciPost Phys. 19, 085 (2025).
- C. J. Cao, M. J. Gullans, B. Lackey, and Z. Wang, Quantum Lego expansion pack: Enumerators from tensor networks, PRX Quantum 5, 030313 (2024).
- L.-Y.-N. Liu, S. Yi, and J. Cui, Stabilizer Rényi entropy for translation-invariant matrix product states, Phys. Rev. A 113, 062414 (2026).
- G. Lami, T. Haug, and J. De Nardis, Quantum state designs with Clifford-enhanced matrix product states, PRX Quantum 6, 010345 (2025).
- M. Hoshino, M. Oshikawa, and Y. Ashida, Stabilizer Rényi entropy and conformal field theory, Phys. Rev. X 16, 011037 (2026).
- L. Chen, R. J. Garcia, K. Bu, and A. Jaffe, Magic of random matrix product states, Phys. Rev. B 109, 174207 (2024).
- Z. Liu and B. K. Clark, Nonequilibrium quantum Monte Carlo algorithm for stabilizer Rényi entropy in spin systems, Phys. Rev. B 111, 085144 (2025).
- P. S. Tarabunga and C. Castelnovo, Magic in generalized Rokhsar-Kivelson wavefunctions, Quantum 8, 1347 (2024).
- S. Crew and H. Hao Lu, Learning magic in the Schwinger model, arXiv:2508.09640.
- A. Sinibaldi, A. F. Mello, M. Collura, and G. Carleo, Non-stabilizerness of neural quantum states, Phys. Rev. Res. 7, 043289 (2025).
- M. Collura, J. De Nardis, V. Alba, and G. Lami, The non-stabilizerness of fermionic Gaussian states, Quantum 10, 2036 (2025).
- B. Dóra and C. P. Moca, Momentum space nonstabilizerness for the transverse field quantum Ising model, Phys. Rev. B 112, 125427 (2025).
- S. F. E. Oliviero, L. Leone, and A. Hamma, Magic-state resource theory for the ground state of the transverse-field Ising model, Phys. Rev. A 106, 042426 (2022).
- E. A. R. Trino and M.A. Rajabpour, Stabilizer-Shannon Renyi equivalence: Exact results for quantum critical chains, Phys. Rev. Lett. 137, 090403 (2026).
- C. Wang, Z.-C. Yang, T. Zhou, and X. Chen, Magic transition in monitored free fermion dynamics, arXiv:2507.10688.
- H. Hamaguchi, K. Hamada, and N. Yoshioka, Handbook for quantifying robustness of magic, Quantum 8, 1461 (2024).
- Z. Xiao and S. Ryu, Exponentially accelerated sampling of Pauli strings for nonstabilizerness, Phys. Rev. Lett. 137, 070402 (2026).
- P. Sierant, J. Vallès-Muns, and A. Garcia-Saez, Computing quantum magic of state vectors, Quantum 10, 2059 (2026).
- R. Ueno, A. Ito, Y. Todo, A. Inoue, K. Minematsu, H. Ishikawa, and N. Homma, All you need is XOR-convolution: A generalized higher-order side-channel attack with application to XEX/XE-based encryptions, Cryptogr. Hardw. Embed. 2025, 317 (2025).
- J. L. Shanks, Computation of the fast Walsh-Fourier transform, IEEE Trans. Comput. C–18, 457 (1969).
- The Walsh-Hadamard transforms return the complete Pauli expectation spectrum, which can also enter stabilizer Rényi moments at other values of . The derivation, complexity benchmarks, and applications in this work focus on .
- See Supplemental Material at http://link.aps.org/supplemental/10.1103/f7ss-6tl1 for detailed derivations of the XOR-FWHT formulation and reference implementations of the XOR-FWHT and brute-force algorithms.
- G. Styliaris, N. Anand, and P. Zanardi, Information scrambling over bipartitions: Equilibration, entropy production, and typicality, Phys. Rev. Lett. 126, 030601 (2021).
- J. Z. Imbrie, On many-body localization for quantum spin chains, J. Stat. Phys. 163, 998 (2016).
- E. Barouch and B. M. McCoy, Statistical mechanics of the XY model. II. Spin-correlation functions, Phys. Rev. A 3, 786 (1971).
- W. De Roeck, L. Giacomin, F. Huveneers, and O. Prosniak, Absence of normal heat conduction in strongly disordered interacting quantum chains, arXiv:2408.04338.
- G. B. Mbeng, A. Russomanno, and G. E. Santoro, The quantum Ising chain for beginners, SciPost Phys. Lect. Notes 82 (2024).
- E. Lieb, T. Schultz, and D. Mattis, Two soluble models of an antiferromagnetic chain, Ann. Phys. (NY) 16, 407 (1961).
- P. R. N. Falcão, P. Sierant, J. Zakrzewski, and E. Tirrito, Nonstabilizerness dynamics in many-body localized systems, Phys. Rev. Lett. 135, 240404 (2025).
- A. Nahum, S. Vijay, and J. Haah, Operator spreading in random unitary circuits, Phys. Rev. X 8, 021014 (2018).
- M. P.A. Fisher, V. Khemani, A. Nahum, and S. Vijay, Random quantum circuits, Annu. Rev. Condens. Matter Phys. 14, 335 (2023).
- N. Hunter-Jones, Unitary designs from statistical mechanics in random quantum circuits, arXiv:1905.12053.
- A. W. Harrow and R. A. Low, Random quantum circuits are approximate 2-designs, Commun. Math. Phys. 291, 257 (2009).
- F. G. S. L. Brandão, A. W. Harrow, and M. Horodecki, Local random quantum circuits are approximate polynomial-designs, Commun. Math. Phys. 346, 397 (2016).
- J. Haferkamp, Random quantum circuits are approximate unitary -designs in depth , Quantum 6, 795 (2022).
- S.-X. Zhang, J. Allcock, Z.-Q. Wan, S. Liu, J. Sun, H. Yu, X.-H. Yang, J. Qiu, Z. Ye, Y.-Q. Chen, C.-K. Lee, Y.-C. Zheng, S.-K. Jian, H. Yao, C.-Y. Hsieh, and S. Zhang, TensorCircuit: A quantum software framework for the NISQ era, Quantum 7, 912 (2023).
- S.-X. Zhang, Y.-Q. Chen, W. Li, J. Sun, W.-G. Ma, P.-L. Zheng, Y.-X. Huang, Q.-X. Wang, H. Yu, Z. Li, et al., TensorCircuit-NG: A universal, composable, and scalable platform for quantum computing and quantum simulation, arXiv:2602.14167.
- A. Paviglianiti, G. Lami, M. Collura, and A. Silva, Estimating nonstabilizerness dynamics without simulating it, PRX Quantum 6, 030320 (2025).
- C. H. Lee, Z. Papić, and R. Thomale, Geometric construction of quantum Hall clustering Hamiltonians, Phys. Rev. X 5, 041003 (2015).
- M. Yang, L. Yuan, and C. H. Lee, Non-Hermitian strong bosonic clustering through interaction-induced caging, Commun. Phys. 8, 388 (2025).
- M. Frau, P. S. Tarabunga, M. Collura, M. Dalmonte, and E. Tirrito, Nonstabilizerness versus entanglement in matrix product states, Phys. Rev. B 110, 045101 (2024).
- M. Viscardi, M. Dalmonte, A. Hamma, and E. Tirrito, Interplay of entanglement structures and stabilizer entropy in spin models, SciPost Phys. Core 9, 012 (2025).
- N. Dowling, P. Kos, and X. Turkeshi, Magic resources of the Heisenberg picture, Phys. Rev. Lett. 135, 050401 (2025).
- R. Shen, T. Chen, T. Tai, J. M. Koh, P. Ghaemi, and C. Hua Lee, Simulating condensed matter physics on quantum hardware, arXiv:2606.02721.
- https://github.com/hhhhhh258/2sre.