Quantum magic, or nonstabilizerness, provides a crucial characterization of quantum systems, regarding the classical simulability with stabilizer states. In this work, we propose an alternative and efficient algorithm for computing stabilizer R\'enyi entropy, one of the measures for quantum magic, in spin systems with sign-problem free Hamiltonians. This algorithm is based on the quantum Monte Carlo simulation of the path integral of the work between two partition function ensembles and it applies to all spatial dimensions and temperatures. We demonstrate this algorithm on the one- and two-dimensional transverse field Ising model at both finite and zero temperatures and show the quantitative agreements with tensor-network based algorithms. We analyze the computational cost and provide analytical and numerical evidences for it to be polynomial in system size. This work also suggests a unifying framework for calculating various types of entropy quantities including entanglement R\'enyi entropy and entanglement R\'enyi negativity.
Quantum magic, or nonstabilizerness, provides a crucial characterization of quantum systems, regarding the classical simulability with stabilizer states. In this work, we propose an alternative and efficient algorithm for computing stabilizer R'enyi entropy, one of the measures for quantum magic, in spin systems with sign-problem free Hamiltonians. This algorithm is based on the quantum Monte Carlo simulation of the path integral of the work between two partition function ensembles and it applies to all spatial dimensions and temperatures. We demonstrate this algorithm on the one- and two-dimensional transverse field Ising model at both finite and zero temperatures and show the quantitative agreements with tensor-network based algorithms. We analyze the computational cost and provide analytical and numerical evidences for it to be polynomial in system size. This work also suggests a unifying framework for calculating various types of entropy quantities including entanglement R'enyi entropy and entanglement R'enyi negativity.
We introduce a methodology to estimate nonstabilizerness or “magic,” a key resource for quantum complexity, with neural quantum states (NQS). Our framework relies on two schemes based on Monte Carlo sampling to quantify nonstabilizerness via stabilizer Rényi entropy (SRE) in arbitrary variational wave functions. When combined with NQS, this approach is effective for systems with strong correlations and in dimensions larger than one, unlike tensor network methods. First, we study the magic content in an ensemble of random NQS, demonstrating that neural network parametrizations of the wave function capture finite nonstabilizerness besides large entanglement. Second, we investigate the nonstabilizerness in the ground state of the J 1 − J 2 Heisenberg model. In one dimension, we find that the SRE vanishes at the Majumdar-Ghosh point J 2 = J 1 / 2 , consistent with a stabilizer ground state. In two dimensions, a dip in the SRE is observed near maximum frustration around J 2 / J 1 ≈ 0.6 , suggesting a valence bond solid between the two antiferromagnetic phases.
Quantum magic---the resource that separates universal quantum computation from efficiently simulable Clifford circuits---has emerged as a diagnostic of many-body quantum states, yet the stabilizer Rényi entropy (SRE) that quantifies it remains largely inaccessible in interacting fermion systems. Estimating the global SRE requires a sum over exponentially many Majorana strings, which in determinant quantum Monte Carlo can be sampled without a sign problem only for the interacting density matrix obtained after averaging the auxiliary fields: sampling strings and fields simultaneously incurs a sign problem even for sign-problem-free models, so that the known sign-free alternative is a nested Monte Carlo that does not scale. We propose instead the two-point SRE---a practical stabilizer-Rényi correlator built from rank-2 SREs of one- and two-site reduced density matrices, which are fixed exactly by single-particle Green functions and density correlations already measured in standard simulations---and show that it obeys universal finite-size scaling at fermionic quantum critical points. In the one-dimensional half-filled spinless t-V chain, the correlator distinguishes algebraic and exponential decay regimes and tracks the inverse-logarithmic finite-size drift characteristic of the Berezinskii--Kosterlitz--Thouless transition. On the honeycomb lattice, sign-problem-free quantum Monte Carlo yields Gross--Neveu--Ising scaling with finite anomalous dimension at zero temperature and two-dimensional Ising collapse at the thermal transition. Our results suggest stabilizer-Rényi microscopy as a spatially resolved, quantitatively universal probe of critical correlations in interacting fermionic matter, on par with conventional order-parameter correlators and accessible to quantum-simulator measurements.
We present a novel quantum Monte Carlo method for evaluating the α -stabilizer Rényi entropy (SRE) for any integer α ≥ 2 . By interpreting the α -SRE as partition-function ratios, we eliminate the sign problem in the imaginary-time path integral by sampling within a , which enables efficient classical computations of the α -SRE and its derivatives to explore magic in previously inaccessible two- or higher-dimensional systems. We first isolate the free-energy part in 2 -SRE, which is a trivial term. Notably, at quantum critical points in one-dimensional or two-dimensional transverse-field Ising (TFI) models, we reveal nontrivial singularities associated with the contribution, directly tied to magic. Their interplay leads to complicated behaviors of 2 -SRE, avoiding extrema at critical points generally. In contrast, analyzing the volume-law correction to SRE reveals a discontinuity tied to criticalities, suggesting that it is more informative than the full-state magic. For conformal critical points, we claim that it could reflect nonlocal magic residing in correlations. Finally, we verify that 2 -SRE fails to characterize magic in mixed states (e.g., Gibbs states), yielding nonphysical results. This work provides a powerful tool for exploring the roles of magic in large-scale many-body systems and reveals the intrinsic relation between magic and many-body physics.
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 exact evaluation of the second-order stabilizer Rényi entropy for generic many-body quantum states remains computationally challenging, with brute-force methods scaling as O(8N) for an N-qubit state. Here we develop a deterministic and exact algorithm that reduces this cost to O(N4N) while retaining natural parallelism. This advance enables high-precision exact calculations for generic state vectors at medium system sizes, and provides a practical tool for investigating the scaling, phase structure, and nonequilibrium dynamics of quantum magic in many-body systems.
Nonstabilizerness, or “magic,” is a resource for universal quantum computation in most fault-tolerant architectures; access to states with nonstabilizerness allows for nonclassically simulable quantum computation to be performed. Quantifying this resource for unknown states is therefore essential to assessing their utility in quantum computation. The stabilizer Rényi entropies have emerged as a leading tool for achieving this, having already enabled one efficient algorithm for measuring nonstabilizerness. In addition, the stabilizer Rényi entropies have proven useful in developing connections between nonstabilizerness and other quantum phenomena. In this work, we introduce an alternative algorithm for measuring the stabilizer Rényi entropies of an unknown quantum state. First, we show the existence of a state, produced from the action of a channel on α copies of some state ρ , that encodes the α -stabilizer Rényi entropy of ρ into its purity. We detail several methods of applying this channel, and then, by employing existing purity-measuring algorithms, provide an algorithm for measuring the α -stabilizer Rényi entropies for all integers α > 1 . This algorithm is benchmarked for qubits and the resource requirements compared to other known algorithms. Finally, a nonstabilizerness-entanglement relationship is shown to exist in the algorithm, demonstrating a relationship between the two resources, before an instance of resource hiding is found.
The Rényi entanglement entropy in quantum many-body systems can be viewed as the difference in free energy between partition functions with different trace topologies. We introduce an external field λ that controls the partition function topology, allowing us to define a notion of nonequilibrium work as λ is varied smoothly. Nonequilibrium fluctuation theorems of the work provide us with statistically exact estimates of the Rényi entanglement entropy. This framework also naturally leads to the idea of using quench functions with spatially smooth profiles, providing us a way to average over lattice scale features of the entanglement entropy while preserving long distance universal information. We use these ideas to extract universal information from quantum Monte Carlo simulations of SU(N) spin models in one and two dimensions. The vast gain in efficiency of this method allows us to access unprecedented system sizes up to 192×96 spins for the square lattice Heisenberg antiferromagnet.