Nonstabilizerness, or ‘magic’, is a crucial resource for quantum computation, but quantifying the magic of mixed states has been a notoriously difficult task. We introduce efficient magic witnesses based on stabilizer Rényi entropy that both robustly indicate magic and quantitatively estimate magic monotones. Building on these witnesses, we design testing algorithms that distinguish high- and low-magic states under entropy constraints and apply them to certify the number of noisy T-gates for a broad class of noise models. Using the IonQ quantum computer, we experimentally verify magic in noisy random circuits and find that magic remains robust, persisting even under depolarizing noise with probability exponentially close to one. Our witnesses are efficiently computable for matrix product states, showing that subsystems of many-body states can host extensive magic even when the system is entangled. Finally, we show that mimicking high-magic states with minimal magic requires an extensive amount of entropy, implying that entropy is a necessary cryptographic resource for hiding magic from eavesdroppers. Our results provide practical tools for characterizing the complexity of noisy quantum systems.
Nonstabilizerness, or ‘magic’, is a crucial resource for quantum computation, but quantifying the magic of mixed states has been a notoriously difficult task. We introduce efficient magic witnesses based on stabilizer Rényi entropy that both robustly indicate magic and quantitatively estimate magic monotones. Building on these witnesses, we design testing algorithms that distinguish high- and low-magic states under entropy constraints and apply them to certify the number of noisy T-gates for a broad class of noise models. Using the IonQ quantum computer, we experimentally verify magic in noisy random circuits and find that magic remains robust, persisting even under depolarizing noise with probability exponentially close to one. Our witnesses are efficiently computable for matrix product states, showing that subsystems of many-body states can host extensive magic even when the system is entangled. Finally, we show that mimicking high-magic states with minimal magic requires an extensive amount of entropy, implying that entropy is a necessary cryptographic resource for hiding magic from eavesdroppers. Our results provide practical tools for characterizing the complexity of noisy quantum systems.
Nonstabilizerness or magic resource characterizes the amount of non-Clifford operations needed to prepare quantum states.It is a crucial resource for quantum computing and a necessary condition for quantum advantage.However, quantifying magic resource beyond a few qubits has been a major challenge.Here, we introduce efficient measures of magic resource for pure quantum states with a sampling cost that is independent of the number of qubits.Our method uses Bell measurements over two copies of a state, which we implement in experiment together with a cost-free error-mitigation scheme.We show the transition of classically simulable stabilizer states into intractable quantum states on the IonQ quantum computer.For applications, we efficiently distinguish stabilizer and nonstabilizer states with low measurement cost even in the presence of experimental noise.Further, we propose a variational quantum algorithm to maximize our measure via the shift rule.Our algorithm can be free of barren plateaus even for highly expressible variational circuits.Finally, we experimentally demonstrate a Bell-measurement protocol for the stabilizer Rényi entropy as well as the Wallach-Meyer entanglement measure.Our results pave the way to understanding the nonclassical power of quantum computers, quantum simulators, and quantum 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 nonstabilizerness of quantum states is a necessary resource for universal quantum computation, yet its characterization is notoriously demanding. Quantifying nonstabilizerness typically requires an exponential number of measurements and a doubly exponential classical post-processing cost to evaluate its standard monotones. In this work, we show that nonstabilizerness is, to a large extent, in the eyes of the beholder: it can be witnessed and quantified using any set of mn-qubit Pauli measurements, provided the set contains anti-commuting pairs. We introduce a general framework that projects the stabilizer polytope onto the subspace defined by these observables and provide an algorithm that estimates magic from Pauli expectation values with runtime exponential in the number of measurements m and polynomial in the number of qubits n. By relating the problem to a stabilizer-restricted variant of the quantum marginal problem, we also prove that deciding membership in the corresponding reduced stabilizer polytope is NP-hard. In particular, unless P=NP, no algorithm polynomial in m can solve the problem in full generality, thus establishing fundamental complexity-theoretic limitations. Finally, we employ our framework to compute nonstabilizerness in different Hamiltonian ground states, demonstrating the practical performance of our method in regimes beyond the reach of existing techniques.
Stabilizer entropies (SEs) are measures of nonstabilizerness or "magic" that quantify the degree to which a state is described by stabilizers. SEs are especially interesting due to their connections to scrambling, localization and property testing. However, applications have been limited so far as previously known measurement protocols for SEs scale exponentially with the number of qubits. Here, we efficiently measure SEs for integer Rényi index n>1 via Bell measurements. The SE of N-qubit quantum states can be measured with O(n) copies and O(nN) classical computational time, where for even n we additionally require the complex conjugate of the state. We provide efficient bounds of various nonstabilizerness monotones that are intractable to compute beyond a few qubits. Using the IonQ quantum computer, we measure SEs of random Clifford circuits doped with non-Clifford gates and give bounds for the stabilizer fidelity, stabilizer extent, and robustness of magic. We provide efficient algorithms to measure Clifford-averaged 4n-point out-of-time-order correlators and multifractal flatness. With these measures we study the scrambling time of doped Clifford circuits and random Hamiltonian evolution depending on nonstabilizerness. Counterintuitively, random Hamiltonian evolution becomes less scrambled at long times, which we reveal with the multifractal flatness. Our results open up the exploration of nonstabilizerness with quantum computers.
Entanglement plays a crucial role in quantum information science and many-body physics, yet quantifying it in mixed quantum many-body systems has remained a notoriously difficult problem. Here, we introduce families of quantitative entanglement witnesses, constructed from partial transpose and realignment moments, which provide rigorous bounds on entanglement monotones as well as entanglement dimensionality. Our witnesses can be efficiently measured using SWAP tests or variants of Bell measurements, thus making them directly implementable on current hardware. Leveraging our witnesses, we present several novel results on entanglement properties of mixed states, both in quantum information and many-body physics. We develop efficient algorithms to test whether mixed states with bounded entropy have low or high entanglement, which previously was only possible for pure states. We also provide an efficient algorithm to test the Schmidt rank using only two-copy measurements, and the operator Schmidt rank using four-copy measurements. Further, our witnesses robustly certify the quantum circuit depth in the presence of noise, as well as the Schmidt rank of mixed states. Finally, we show that the entanglement phase diagram of Haar random states, quantified by the partial transpose negativity, can be fully established solely by computing our witness, a result that also applies to any state 4 -design. Our witnesses can also be efficiently computed for matrix product states, thus enabling the characterization of entanglement in extensive many-body systems. Finally, we make progress on the entanglement required for quantum cryptography, establishing rigorous limits on pseudoentanglement and pseudorandom density matrices with bounded entropy. Our work opens new avenues for quantifying entanglement in large and noisy quantum systems.
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ényi 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(Nd2N), providing an exponential improvement over the naive O(d3N) 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.