Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2311.01362 · Quantum

Handbook for Quantifying Robustness of Magic

Hiroki Hamaguchi, Kou Hamada, Nobuyuki Yoshioka

Published Sep 5, 2024• 23 citations
arXivHTMLPDF

Abstract

Nonstabilizerness, or magic, is an essential quantum resource for performing universal quantum computation. Specifically, Robustness of Magic (RoM) characterizes the usefulness of a given quantum state for non-Clifford operations. While the mathematical formalism of RoM is concise, determining RoM in practice is highly challenging due to the necessity of dealing with a super-exponential number of stabilizer states. In this work, we present novel algorithms to compute RoM. The key technique is a subroutine for calculating overlaps between all stabilizer states and a target state, with the following remarkable features: (i) the time complexity per state is reduced {exponentially}, and (ii) the total space complexity is reduced {super-exponentially}. Based on this subroutine, we present algorithms to compute RoM for arbitrary states up to n = 8 qubits, whereas the naive method requires a memory size of at least 86 PiB , which is infeasible for any current classical computer. Additionally, the proposed subroutine enables the computation of stabilizer fidelity for a mixed state up to n = 8 qubits. We further propose novel algorithms that exploit prior knowledge of the structure of the target quantum state, such as permutation symmetry or disentanglement, and numerically demonstrate our results for copies of magic states and partially disentangled quantum states. This series of algorithms constitutes a comprehensive ``handbook'' for scaling up the computation of RoM. We envision that the proposed technique will also apply to the computation of other quantum resource measures.

DOI
10.22331/q-2024-09-05-1461

Related papers

Efficient Quantum Algorithms for Stabilizer Entropies

Tobias Haug, Soovin Lee, M. S. Kim

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.

arXiv:2305.19152•Physical Review Letters•Jun 13, 2024•72 citations

Robustness of Magic and the Directed Geometry of State Conversion

Satoshi Kanno, Yoshi-aki Shimada

In this work, we introduce a state-space distance calibrated by stabilizer states based on the dual structure of the robustness of magic (RoM), and show that RoM is exactly represented as the distance to the free-state set. We then extend this geometry to state conversion by defining the directed conversion deficiency $C_{\mathcal F}$ as the distance between a target state and the set of states freely reachable from a given input state. The quantity $C_{\mathcal F}$ characterizes free convertibility and is related to the minimum stabilizer quasiprobability weight required to represent the conversion residual through the relation $1+2C_{\mathcal F}$. It also contains the conventional magic state resource lower bounds based on RoM and can detect stronger conversion obstructions. For single-qubit systems, we analytically construct a continuous family of mixed states with identical RoM but asymmetric convertibility.

quant-pharXiv:2610.38401•Oct 29, 2026•0 citations

Scalable Measures of Magic Resource for Quantum Computers

Tobias Haug, M. S. Kim

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.

arXiv:2204.10061•PRX Quantum•Jan 3, 2023•104 citations

When Symmetry Suppresses Magic

A. de Oliveira Junior, Jake Xuereb, Rafael A. Macêdo +2 more

Nonstabilizerness is a critical resource for quantum advantage, but evaluating it, especially for mixed states, requires superexponentially many samples in system size, making the problem NP-hard. While symmetries are known to reduce this complexity, it is unclear whether they also restrict the amount of magic. In this work, we provide an explicit example of such a symmetry by proving that the Robustness of Magic (RoM) for N-qubit X-states is at most $\sqrt{3}$. Leveraging this symmetry constraint, we introduce a computationally efficient method to lower-bound the RoM of arbitrary many-body states, demonstrating its utility on the ground states of a spin-1/2 Hamiltonian with system sizes well beyond the reach of exact evaluation. Furthermore, for Hamiltonians whose equilibrium states are X-states, we analytically derive the critical temperature at which magic emerges. Our work shows why certain symmetries constrain magic while others do not, provides a scalable lower-bounding method, and identifies a nontrivial regime where many-body nonstabilizerness is analytically solvable.

quant-pharXiv:2609.38319•Oct 1, 2026•0 citations

Computing quantum magic of state vectors

Piotr Sierant, Jofre Vallès-Muns, Artur Garcia-Saez

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(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.

quant-pharXiv:2601.07824•Quantum•Jan 13, 2026•7 citations

Faster computation of nonstabilizerness

Hiroki Hamaguchi, Kou Hamada, Naoki Marumo +1 more

The characterization of nonstabilizerness is fruitful due to its application in gate synthesis and classical simulation. In particular, the resource monotone called the stabilizer extent is a useful tool to estimate the simulation cost using rank-based simulators, one of the state-of-the-art simulators of Clifford+$T$ circuits. In this work, we propose faster numerical algorithms to compute the stabilizer extent. Our algorithm utilizes the column generation method, which iteratively updates the subset of pure stabilizer states used for calculation. This subset is selected based on the overlaps between all stabilizer states and a target state. In order to update the subset, we make use of a newly proposed subroutine for calculating the stabilizer fidelity that (i) achieves linear time complexity with respect to the number of stabilizer states, (ii) superexponentially reduces the space complexity by in-place calculation, and (iii) prunes unnecessary states for the computation. As a result, our algorithm can compute the stabilizer fidelity and the stabilizer extent for Haar random pure states up to $n=9$ qubits, which naively requires a memory of $305\phantom{\rule{0.1em}{0ex}}\mathrm{Ei}\mathrm{B}$. We further show that our algorithm runs faster when the target state vector is real. We prove that the problem size is reduced by $\mathcal{O}({2}^{n})$ compared to the general cases, which makes it computable for the case of $n=10$ qubits.

arXiv:2406.16673•Physical Review Applied•Jan 28, 2025•4 citations
Nonstabilizerness, or magic, is an essential quantum resource for performing universal quantum computation. Specifically, Robustness of Magic (RoM) characterizes the usefulness of a given quantum state for non-Clifford operations. While the mathematical formalism of RoM is concise, determining RoM in practice is highly challenging due to the necessity of dealing with a super-exponential number of stabilizer states. In this work, we present novel algorithms to compute RoM. The key technique is a subroutine for calculating overlaps between all stabilizer states and a target state, with the following remarkable features: (i) the time complexity per state is reduced {exponentially}, and (ii) the total space complexity is reduced {super-exponentially}. Based on this subroutine, we present algorithms to compute RoM for arbitrary states up to n = 8 qubits, whereas the naive method requires a memory size of at least 86 PiB , which is infeasible for any current classical computer. Additionally, the proposed subroutine enables the computation of stabilizer fidelity for a mixed state up to n = 8 qubits. We further propose novel algorithms that exploit prior knowledge of the structure of the target quantum state, such as permutation symmetry or disentanglement, and numerically demonstrate our results for copies of magic states and partially disentangled quantum states. This series of algorithms constitutes a comprehensive ``handbook'' for scaling up the computation of RoM. We envision that the proposed technique will also apply to the computation of other quantum resource measures.
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.
In this work, we introduce a state-space distance calibrated by stabilizer states based on the dual structure of the robustness of magic (RoM), and show that RoM is exactly represented as the distance to the free-state set. We then extend this geometry to state conversion by defining the directed conversion deficiency CFC_{\mathcal F}CF​ as the distance between a target state and the set of states freely reachable from a given input state. The quantity CFC_{\mathcal F}CF​ characterizes free convertibility and is related to the minimum stabilizer quasiprobability weight required to represent the conversion residual through the relation 1+2CF1+2C_{\mathcal F}1+2CF​. It also contains the conventional magic state resource lower bounds based on RoM and can detect stronger conversion obstructions. For single-qubit systems, we analytically construct a continuous family of mixed states with identical RoM but asymmetric convertibility.
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 is a critical resource for quantum advantage, but evaluating it, especially for mixed states, requires superexponentially many samples in system size, making the problem NP-hard. While symmetries are known to reduce this complexity, it is unclear whether they also restrict the amount of magic. In this work, we provide an explicit example of such a symmetry by proving that the Robustness of Magic (RoM) for N-qubit X-states is at most 3\sqrt{3}3​. Leveraging this symmetry constraint, we introduce a computationally efficient method to lower-bound the RoM of arbitrary many-body states, demonstrating its utility on the ground states of a spin-1/2 Hamiltonian with system sizes well beyond the reach of exact evaluation. Furthermore, for Hamiltonians whose equilibrium states are X-states, we analytically derive the critical temperature at which magic emerges. Our work shows why certain symmetries constrain magic while others do not, provides a scalable lower-bounding method, and identifies a nontrivial regime where many-body nonstabilizerness is analytically solvable.
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 NNN of qudits. Here we introduce efficient, numerically exact algorithms that exploit the fast Hadamard transform to compute the SRE for qubits (d=2d=2d=2) and the mana for qutrits (d=3d=3d=3) for pure states given as state vectors. Our methods compute SRE and mana at cost O(Nd2N)O(N d^{2N})O(Nd2N), providing an exponential improvement over the naive O(d3N)O(d^{3N})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.
The characterization of nonstabilizerness is fruitful due to its application in gate synthesis and classical simulation. In particular, the resource monotone called the stabilizer extent is a useful tool to estimate the simulation cost using rank-based simulators, one of the state-of-the-art simulators of Clifford+TTT circuits. In this work, we propose faster numerical algorithms to compute the stabilizer extent. Our algorithm utilizes the column generation method, which iteratively updates the subset of pure stabilizer states used for calculation. This subset is selected based on the overlaps between all stabilizer states and a target state. In order to update the subset, we make use of a newly proposed subroutine for calculating the stabilizer fidelity that (i) achieves linear time complexity with respect to the number of stabilizer states, (ii) superexponentially reduces the space complexity by in-place calculation, and (iii) prunes unnecessary states for the computation. As a result, our algorithm can compute the stabilizer fidelity and the stabilizer extent for Haar random pure states up to n=9n=9n=9 qubits, which naively requires a memory of 305EiB305\phantom{\rule{0.1em}{0ex}}\mathrm{Ei}\mathrm{B}305EiB. We further show that our algorithm runs faster when the target state vector is real. We prove that the problem size is reduced by O(2n)\mathcal{O}({2}^{n})O(2n) compared to the general cases, which makes it computable for the case of n=10n=10n=10 qubits.