Computing quantum magic of state vectors
Pith reviewed 2026-05-16 14:45 UTC · model grok-4.3
The pith
Fast Hadamard transforms compute SRE and mana for qubit and qutrit state vectors at O(N d^{2N}) cost.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
The fast Hadamard transform can be applied directly to the sums that define the stabilizer Rényi entropy for qubits and the mana for qutrits, yielding numerically exact values for any pure state vector at cost O(N d^{2N}).
What carries the argument
Fast Hadamard transform applied to the character sums that define SRE and mana.
If this is right
- SRE and mana become accessible for system sizes that were previously out of reach.
- The algorithms admit straightforward parallelization across CPU cores and GPUs.
- Monte Carlo sampling combined with the transform yields practical estimates of SRE for large vectors.
- Mana can be evaluated for mixed states as well as pure states.
Where Pith is reading between the lines
- The reduced scaling opens the possibility of mapping how magic accumulates across quantum phase transitions.
- The same transform technique may be adaptable to other resource measures that are expressed as sums over characters.
- Integration with tensor-network or variational methods could push the reachable system sizes even farther.
Load-bearing premise
The quantum state must be supplied exactly as a full state vector and the defining sums must admit direct application of the fast Hadamard transform without approximation.
What would settle it
For any small N where both methods fit in memory, the numerical value of SRE or mana produced by the fast-transform algorithm must agree with the value from the naive triple sum to machine precision.
Figures
read the original abstract
Non-stabilizerness, also known as ``magic,'' quantifies how far a quantum state departs from the stabilizer set. It is a central resource behind quantum advantage and a useful probe of the complexity of quantum many-body states. Yet standard magic quantifiers, such as the stabilizer R\'enyi entropy (SRE) for qubits and the mana for qutrits, are costly to evaluate numerically, with the computational complexity growing rapidly with the number $N$ of qudits. Here we introduce efficient, numerically exact algorithms that exploit the fast Hadamard transform to compute the SRE for qubits ($d=2$) and the mana for qutrits ($d=3$) for pure states given as state vectors. Our methods compute SRE and mana at cost $O(N d^{2N})$, providing an exponential improvement over the naive $O(d^{3N})$ scaling, with substantial parallelism and straightforward GPU acceleration. We further show how to combine the fast Hadamard transform with Monte Carlo sampling to estimate the SRE of state vectors, and we extend the approach to compute the mana of mixed states. All algorithms are implemented in the open-source Julia package HadaMAG ( https://github.com/bsc-quantic/HadaMAG.jl/ ), which provides a high-performance toolbox for computing SRE and mana with built-in support for multithreading, MPI-based distributed parallelism, and GPU acceleration. The package, together with the methods developed in this work, offers a practical route to large-scale numerical studies of magic in quantum many-body systems.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper introduces numerically exact algorithms that use the fast Hadamard transform to evaluate the stabilizer Rényi entropy (SRE) for pure qubit states and the mana for pure qutrit states supplied as full state vectors. It claims an exact complexity of O(N d^{2N}) (versus the naive O(d^{3N})), with extensions to Monte Carlo sampling for SRE estimation and to mixed-state mana, all implemented in the open-source Julia package HadaMAG with multithreading, MPI, and GPU support.
Significance. If the exactness and complexity claims hold, the work removes a major computational bottleneck for quantifying non-stabilizerness, enabling routine calculations on systems an order of magnitude larger than before. The open-source, parallelized implementation is a concrete strength that directly supports reproducible large-scale studies of magic in many-body systems.
minor comments (2)
- [§3] The complexity analysis in the main text would benefit from an explicit step-by-step count of operations in the FHT application to the defining sums (currently summarized in the abstract).
- [Fig. 2] Figure captions should state the precise system sizes and hardware used for the reported timings to allow direct reproduction.
Simulated Author's Rebuttal
We thank the referee for their positive assessment of the manuscript, accurate summary of our contributions, and recommendation to accept. No major comments were raised that require point-by-point response.
Circularity Check
No significant circularity in derivation chain
full rationale
The paper derives an O(N d^{2N}) algorithm for exact SRE and mana computation by applying the standard fast Hadamard transform directly to the sums that define these quantities for pure state vectors. This mapping is presented as a straightforward consequence of linear-algebra properties of the FHT and does not rely on self-definitional equations, fitted parameters renamed as predictions, or load-bearing self-citations. The complexity improvement over the naive O(d^{3N}) scaling follows immediately from the known O(d^N log d^N) cost of the FHT without circular reduction. The open-source package provides an independent verification route, confirming the derivation is self-contained against external benchmarks.
Axiom & Free-Parameter Ledger
axioms (1)
- standard math The fast Hadamard transform efficiently computes the required sums defining SRE and mana for pure states given as vectors
Lean theorems connected to this paper
-
IndisputableMonolith/Cost/FunctionalEquation.leanwashburn_uniqueness_aczel unclear?
unclearRelation between the paper passage and the cited Recognition theorem.
Our methods compute SRE and mana at cost O(N d^{2N}) ... by exploiting the fast Hadamard transform
-
IndisputableMonolith/Foundation/AlexanderDuality.leanalexander_duality_circle_linking unclear?
unclearRelation between the paper passage and the cited Recognition theorem.
the fast Hadamard transform evaluates Eq.(13) in O(N 2^N) time
What do these tags mean?
- matches
- The paper's claim is directly supported by a theorem in the formal canon.
- supports
- The theorem supports part of the paper's argument, but the paper may add assumptions or extra steps.
- extends
- The paper goes beyond the formal theorem; the theorem is a base layer rather than the whole result.
- uses
- The paper appears to rely on the theorem as machinery.
- contradicts
- The paper's claim conflicts with a theorem or certificate in the canon.
- unclear
- Pith found a possible connection, but the passage is too broad, indirect, or ambiguous to say the theorem truly supports the claim.
Forward citations
Cited by 2 Pith papers
-
Non-Local Magic Resources for Fermionic Gaussian States
Closed-form formula computes non-local magic for fermionic Gaussian states from two-point correlations in polynomial time.
-
Quantum Complexity and New Directions in Nuclear Physics and High-Energy Physics Phenomenology
A review of how quantum information science is expected to provide new tools and insights for nuclear and high-energy physics phenomenology and quantum simulations.
Reference graph
Works this paper leans on
-
[1]
Quantum computing and the entanglement frontier
J. Preskill, “Quantum computing and the entanglement frontier,” (2012), arXiv:1203.5813
work page internal anchor Pith review Pith/arXiv arXiv 2012
-
[2]
A. J. Daley, I. Bloch, C. Kokail, S. Flannigan, N. Pearson, M. Troyer, and P. Zoller, Nature 607, 667 (2022)
work page 2022
- [3]
- [4]
- [5]
-
[6]
S.-J. Ran, E. Tirrito, C. Peng, X. Chen, L. Tagliacozzo, G. Su, and M. Lewenstein,Tensor network contractions: methods and applications to quantum many-body systems(Springer Nature, 2020)
work page 2020
-
[7]
M. C. Bañuls, Annu. Rev. Condens. Matter Phys.14, 173–191 (2023)
work page 2023
- [8]
- [9]
- [10]
-
[11]
L. G. Valiant, inProceedings of the Thirty-Third Annual ACM Symposium on Theory of Computing, STOC ’01 (Association for Computing Machinery, New York, NY, USA, 2001) p. 114–123
work page 2001
-
[12]
B. M. Terhal and D. P. DiVincenzo, Phys. Rev. A65, 032325 (2002)
work page 2002
- [13]
-
[14]
The Heisenberg representation of quantum computers
D. Gottesman, “The heisenberg representation of quantum computers,” (1998), arXiv:quant- ph/9807006
- [15]
- [16]
- [17]
- [18]
-
[19]
A. Heimendahl, M. Heinrich, and D. Gross, Journal of Mathematical Physics63, 112201 (2022)
work page 2022
- [20]
-
[21]
M. A. Nielsen and I. L. Chuang,Quantum computation and quantum information(2000)
work page 2000
- [22]
-
[23]
A. Barenco, C. H. Bennett, R. Cleve, D. P. DiVincenzo, N. Margolus, P. Shor, T. Sleator, J. A. Smolin, and H. Weinfurter, Phys. Rev. A52, 3457 (1995)
work page 1995
- [24]
- [25]
- [26]
- [27]
- [28]
- [29]
- [30]
- [31]
- [32]
- [33]
-
[34]
P. S. Tarabunga, E. Tirrito, T. Chanda, and M. Dalmonte, PRX Quantum4, 040317 (2023)
work page 2023
- [35]
-
[36]
G. Passarelli, R. Fazio, and P. Lucignano, Phys. Rev. A110, 022436 (2024)
work page 2024
-
[37]
P. S. Tarabunga and C. Castelnovo, Quantum8, 1347 (2024)
work page 2024
-
[38]
P. R. N. Falcão, P. S. Tarabunga, M. Frau, E. Tirrito, J. Zakrzewski, and M. Dalmonte, Phys. Rev. B111, L081102 (2025)
work page 2025
- [39]
- [40]
-
[41]
Y.-M. Ding, Z. Wang, and Z. Yan, PRX Quantum6, 030328 (2025)
work page 2025
-
[42]
M. Hoshino, M. Oshikawa, and Y. Ashida, Phys. Rev. X16, 011037 (2026). Accepted in Quantum 2026-04-05, click title to verify. Published under CC-BY 4.0.22
work page 2026
- [43]
-
[44]
D. Rattacaso, L. Leone, S. F. E. Oliviero, and A. Hamma, Phys. Rev. A108, 042407 (2023)
work page 2023
- [45]
-
[46]
X. Turkeshi, E. Tirrito, and P. Sierant, Nature Communications16, 2575 (2025)
work page 2025
-
[47]
E. Tirrito, X. Turkeshi, and P. Sierant, Phys. Rev. Lett.135, 220401 (2025)
work page 2025
- [48]
-
[49]
T. Haug, L. Aolita, and M. Kim, Quantum9, 1801 (2025)
work page 2025
-
[50]
J. A. Montañà López and P. Kos, J. Phys. A: Math. and Theor.57, 475301 (2024)
work page 2024
-
[51]
P. S. Tarabunga and E. Tirrito, npj Quantum Information11, 166 (2025)
work page 2025
- [52]
-
[53]
G. Passarelli, A. Russomanno, and P. Lucignano, Phys. Rev. A111, 062417 (2025)
work page 2025
-
[54]
Stabilizer entanglement as a magic highway,
Z.-Y. Hou, C. Cao, and Z.-C. Yang, “Stabilizer entanglement as a magic highway,” (2025), arXiv:2503.20873 [quant-ph]
-
[55]
Y. Zhang and Y. Gu, “Quantum magic dynamics in random circuits,” (2024), arXiv:2410.21128 [quant-ph]
- [56]
- [57]
- [58]
-
[59]
D. Szombathy, A. Valli, C. P. Moca, L. Farkas, and G. Zaránd, Phys. Rev. Res.7, 043072 (2025)
work page 2025
-
[60]
S. F. E. Oliviero, L. Leone, A. Hamma, and S. Lloyd, npj Quantum Info.8, 148 (2022)
work page 2022
- [61]
-
[62]
T. Haug, S. Lee, and M. S. Kim, Phys. Rev. Lett.132, 240602 (2024)
work page 2024
- [63]
- [64]
- [65]
- [66]
-
[67]
H. Pashayan, J. J. Wallman, and S. D. Bartlett, Phys. Rev. Lett.115, 070501 (2015)
work page 2015
-
[68]
C. D. White, C. Cao, and B. Swingle, Phys. Rev. B103, 075145 (2021)
work page 2021
-
[69]
P. S. Tarabunga, Quantum8, 1413 (2024)
work page 2024
-
[70]
C. D. White and J. H. Wilson, “Mana in haar-random states,” (2020), arXiv:2011.13937 [quant-ph]
-
[71]
K. Goto, T. Nosaka, and M. Nozaki, Phys. Rev. D106, 126009 (2022)
work page 2022
-
[72]
T. J. Sewell and C. D. White, Phys. Rev. B106, 125130 (2022)
work page 2022
-
[73]
N. Koukoulekidis and D. Jennings, npj Quantum Information8, 42 (2022)
work page 2022
-
[74]
R. Basu, A. Ganguly, S. Nath, and O. Parrikar, Journal of High Energy Physics2024, 264 (2024)
work page 2024
- [75]
-
[76]
R. Nyström, N. Pranzini, and E. Keski-Vakkuri, Phys. Rev. Res.7, 033085 (2025)
work page 2025
-
[77]
C. E. P. Robin and M. J. Savage, Phys. Rev. C112, 044004 (2025)
work page 2025
-
[78]
F. Brökemeier, S. M. Hengstenberg, J. W. T. Keeble, C. E. P. Robin, F. Rocco, and M. J. Savage, Phys. Rev. C111, 034317 (2025)
work page 2025
-
[79]
C. D. White and M. J. White, Phys. Rev. D110, 116016 (2024)
work page 2024
-
[80]
I. Chernyshev, C. E. P. Robin, and M. J. Savage, Phys. Rev. Res.7, 023228 (2025)
work page 2025
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.