Non-stabilizer resources are also necessary together with entanglement to attain a quantum advantage [6–8]. Recently, it has been put forward the notion that other features of quantum complexity require both entangling and non-stabilizer resources [9, 10]. In order to quantify non-stabilizerness, we resort to the Stabilizer Entropy (SE), the unique computable monotone of non-stabilizerness for pure states [11, 12]. SE is experimentally measurable [13] and efficiently computable by tensor networks methods [14–16]. Having a computable quantity such as SE at disposal, has allowed to test and quantify the role of non-stabilizer resources in several settings and scenarios, ranging from quantum phase transitions [17–21] and quantum chaos [10, 22, 23], to high-energy physics [24–27], quantum-information [9, 28–38], and condensed matter [39–50]. In this paper, we detail what kind of structure entanglement and SE need to have in order to violate the CHSH inequality. Counterintuitively, we prove that SE needs to be local in order to obtain a violation: non-local SE [24] is shown to be detrimental to CHSH violations. Moreover, the resources must be asymmetric between Alice and Bob. We use both Haar averaging and numerical techniques to compute the probability of violations given the resources. Finally, we use the technique of isospectral twirling to show how knowledge of the structure of entangling and non-stabilizer resources can be used to improve the probability of a CHSH violation when one lacks perfect control of the system.

References [1] John F. Clauser, Michael A. Horne, Abner Shimony, and Richard A. Holt. Proposed experiment to test local hidden-variable theories. Phys. Rev. Lett., 23:880–884, Oct 1969. DOI: 10.1103/PhysRevLett.23.880. URL https://link.aps.org/doi/10.1103/PhysRevLett.23. 880. [2] Mark Howard. Maximum nonlocality and minimum uncertainty using magic states. Phys. Rev. A, 91:042103, Apr 2015. DOI: 10.1103/PhysRevA.91.042103. URL https://link.aps. org/doi/10.1103/PhysRevA.91.042103. [3] Mark Howard, Joel Wallman, Victor Veitch, and Joseph Emerson. Contextuality supplies the ‘magic’ for quantum computation. Nature, 510(7505):351–355, 2014. ISSN 1476-4687. DOI: 10.1038/nature13460. URL https://doi.org/10.1038/nature13460. [4] Mark Howard and Jiri Vala. Nonlocality as a benchmark for universal quantum computation in ising anyon topological quantum computers. Phys. Rev. A, 85:022304, Feb 2012. DOI: 10.1103/PhysRevA.85.022304. URL https://link.aps.org/doi/10.1103/PhysRevA. 85.022304. [5] Rafael A. Macedo, Patrick Andriolo, Santiago Zamora, Davide Poderini, and Rafael Chaves. Witnessing magic with bell inequalities, 2025. URL https://arxiv.org/abs/2503.18734. [6] Daniel Gottesman. Stabilizer Codes and Quantum Error Correction. PhD thesis, Caltech, Pasadena, May 1997. URL http://arxiv.org/abs/quant-ph/9705052. arXiv:quantph/9705052. [7] Daniel Gottesman. The Heisenberg Representation of Quantum Computers, July 1998. URL http://arxiv.org/abs/quant-ph/9807006. arXiv:quant-ph/9807006. [8] Scott Aaronson and Daniel Gottesman. Improved simulation of stabilizer circuits. Phys. Rev. A, 70(5):052328, November 2004. DOI: 10.1103/PhysRevA.70.052328. URL https://link. aps.org/doi/10.1103/PhysRevA.70.052328. Publisher: American Physical Society. [9] Shiyu Zhou, Zhi-Cheng Yang, Alioscia Hamma, and Claudio Chamon. Single T gate in a Clifford circuit drives transition to universal entanglement spectrum statistics. SciPost Phys., 9:087, 2020. DOI: 10.21468/SciPostPhys.9.6.087. URL https://scipost.org/10.21468/ SciPostPhys.9.6.087. [10] Lorenzo Leone, Salvatore F. E. Oliviero, You Zhou, and Alioscia Hamma. Quantum Chaos is Quantum. Quantum, 5:453, May 2021. ISSN 2521-327X. DOI: 10.22331/q-2021-05-04-453. URL https://doi.org/10.22331/q-2021-05-04-453. [11] Lorenzo Leone, Salvatore F. E. Oliviero, and Alioscia Hamma. Stabilizer R\’enyi Entropy. Phys. Rev. Lett., 128(5):050402, February 2022. DOI: 10.1103/PhysRevLett.128.050402. URL https://link.aps.org/doi/10.1103/PhysRevLett.128.050402. Publisher: American Physical Society. [12] Lorenzo Leone and Lennart Bittel. Stabilizer entropies are monotones for magic-state resource theory, April 2024. URL http://arxiv.org/abs/2404.11652. arXiv:2404.11652 [quant-ph]. [13] Salvatore F E Oliviero, Lorenzo Leone, Alioscia Hamma, and Seth Lloyd. Measuring magic on a quantum processor. npj Quantum Information, 8(1):148, 2022. ISSN 2056-6387. DOI: 10.1038/s41534-022-00666-5. URL https://doi.org/10.1038/s41534-022-00666-5. [14] Guglielmo Lami and Mario Collura. Nonstabilizerness via perfect pauli sampling of matrix product states. Phys. Rev. Lett., 131:180401, Oct 2023. DOI: 10.1103/PhysRevLett.131.180401. URL https://link.aps.org/doi/10.1103/PhysRevLett.131.180401. [15] Poetri Sonya Tarabunga, Emanuele Tirrito, Mari Carmen Bañuls, and Marcello Dalmonte. Nonstabilizerness via matrix product states in the pauli basis. Phys. Rev. Lett., 133:010601, Jul 2024. DOI: 10.1103/PhysRevLett.133.010601. URL https://link.aps.org/doi/10.1103/ PhysRevLett.133.010601. [16] Poetri Sonya Tarabunga, Emanuele Tirrito, Titas Chanda, and Marcello Dalmonte. Manybody magic via pauli-markov chains—from criticality to gauge theories. PRX Quantum, 4: 040317, Oct 2023. DOI: 10.1103/PRXQuantum.4.040317. URL https://link.aps.org/doi/ 10.1103/PRXQuantum.4.040317. [17] Salvatore F E Oliviero, Lorenzo Leone, and Alioscia Hamma. Transitions in entanglement complexity in random quantum circuits by measurements. Physics Letters A, 418:127721, 2021. ISSN 0375-9601. DOI: https://doi.org/10.1016/j.physleta.2021.127721. URL https: //www.sciencedirect.com/science/article/pii/S0375960121005855. [18] Salvatore F. E. Oliviero, Lorenzo Leone, You Zhou, and Alioscia Hamma. Stability of topological purity under random local unitaries. SciPost Phys., 12:096, 2022. DOI: 10.21468/SciPostPhys.12.3.096. URL https://scipost.org/10.21468/SciPostPhys.12.3.096. [19] Sarah True and Alioscia Hamma. Transitions in Entanglement Complexity in Random Circuits. Quantum, 6:818, September 2022. ISSN 2521-327X. DOI: 10.22331/q-2022-09-22-818. URL https://doi.org/10.22331/q-2022-09-22-818. [20] A. G. Catalano, J. Odavi´c, G. Torre, A. Hamma, F. Franchini, and S. M. Giampaolo. Magic phase transition and non-local complexity in generalized w state, 2024. URL https://arxiv. org/abs/2406.19457. [21] Gongchu Li, Lei Chen, Si-Qi Zhang, Xu-Song Hong, Huaqing Xu, Yuancheng Liu, You Zhou, Geng Chen, Chuan-Feng Li, Alioscia Hamma, and Guang-Can Guo. Measurement induced magic resources, 2024. URL https://arxiv.org/abs/2408.01980. [22] Jovan Odavi´c, Michele Viscardi, and Alioscia Hamma. Stabilizer entropy in non-integrable quantum evolutions, 2025. URL https://arxiv.org/abs/2412.10228. [23] Barbara Jasser, Jovan Odavic, and Alioscia Hamma. Stabilizer entropy and entanglement complexity in the sachdev-ye-kitaev model, 2025. URL https://arxiv.org/abs/2502. 03093. [24] ChunJun Cao, Gong Cheng, Alioscia Hamma, Lorenzo Leone, William Munizzi, and Savatore F. E. Oliviero. Gravitational back-reaction is magical, May 2024. URL http://arxiv. org/abs/2403.07056. arXiv:2403.07056 [gr-qc, physics:hep-th, physics:quant-ph]. [25] Florian Brökemeier, S. Momme Hengstenberg, James W. T. Keeble, Caroline E. P. Robin, Federico Rocco, and Martin J. Savage. Quantum magic and multi-partite entanglement in the structure of nuclei, September 2024. URL http://arxiv.org/abs/2409.12064. [26] Ivan Chernyshev, Caroline E. P. Robin, and Martin J. Savage. Quantum magic and computational complexity in the neutrino sector, November 2024. URL http://arxiv.org/abs/ 2411.04203. [27] Chris D. White and Martin J. White. Magic states of top quarks. Physical Review D, 110(11): 116016, December 2024. DOI: 10.1103/PhysRevD.110.116016. URL https://link.aps.org/ doi/10.1103/PhysRevD.110.116016. [28] Lorenzo Leone, Salvatore F. E. Oliviero, Stefano Piemontese, Sarah True, and Alioscia Hamma. Retrieving information from a black hole using quantum machine learning. Phys. Rev. A, 106:062434, Dec 2022. DOI: 10.1103/PhysRevA.106.062434. URL https://link.aps. org/doi/10.1103/PhysRevA.106.062434.

[29] Lorenzo Leone, Salvatore F. E. Oliviero, and Alioscia Hamma. Nonstabilizerness determining the hardness of direct fidelity estimation. Phys. Rev. A, 107:022429, Feb 2023. DOI: 10.1103/PhysRevA.107.022429. URL https://link.aps.org/doi/10.1103/PhysRevA.107. 022429.

[30] Salvatore F. E. Oliviero, Lorenzo Leone, Seth Lloyd, and Alioscia Hamma. Unscrambling quantum information with clifford decoders. Phys. Rev. Lett., 132:080402, Feb 2024. DOI: 10.1103/PhysRevLett.132.080402. URL https://link.aps.org/doi/10.1103/ PhysRevLett.132.080402. [31] Lorenzo Leone, Salvatore F. E. Oliviero, Seth Lloyd, and Alioscia Hamma. Learning efficient decoders for quasichaotic quantum scramblers. Phys. Rev. A, 109:022429, Feb 2024. DOI: 10.1103/PhysRevA.109.022429. URL https://link.aps.org/doi/10.1103/PhysRevA.109. 022429. [32] Lorenzo Leone, Salvatore F. E. Oliviero, and Alioscia Hamma. Learning t-doped stabilizer states. Quantum, 8:1361, May 2024. ISSN 2521-327X. DOI: 10.22331/q-2024-05-27-1361. URL https://doi.org/10.22331/q-2024-05-27-1361. [33] Zong-Yue Hou, ChunJun Cao, and Zhi-Cheng Yang. Stabilizer entanglement as a magic highway, 2025. URL https://arxiv.org/abs/2503.20873. [34] Andi Gu, Salvatore F. E. Oliviero, and Lorenzo Leone. Magic-induced computational separation in entanglement theory, 2024. URL https://arxiv.org/abs/2403.19610. [35] Yiran Wang and Yongming Li. Stabilizer Rényi entropy on qudits. Quantum Information Processing, 22(12):444, 2023. ISSN 1573-1332. DOI: 10.1007/s11128-023-04186-9. URL https: //doi.org/10.1007/s11128-023-04186-9. [36] Zhi-Cheng Yang, Alioscia Hamma, Salvatore M. Giampaolo, Eduardo R. Mucciolo, and Claudio Chamon. Entanglement complexity in quantum many-body dynamics, thermalization, and localization. Phys. Rev. B, 96:020408, Jul 2017. DOI: 10.1103/PhysRevB.96.020408. URL https://link.aps.org/doi/10.1103/PhysRevB.96.020408. [37] Emanuele Tirrito, Poetri Sonya Tarabunga, Gugliemo Lami, Titas Chanda, Lorenzo Leone, Salvatore F. E. Oliviero, Marcello Dalmonte, Mario Collura, and Alioscia Hamma. Quantifying nonstabilizerness through entanglement spectrum flatness. Phys. Rev. A, 109:L040401, Apr 2024. DOI: 10.1103/PhysRevA.109.L040401. URL https://link.aps.org/doi/10. 1103/PhysRevA.109.L040401. [38] Daniele Iannotti, Gianluca Esposito, Lorenzo Campos Venuti, and Alioscia Hamma. Entanglement and stabilizer entropies of random bipartite pure quantum states, 2025. URL https://arxiv.org/abs/2501.19261. [39] Salvatore F. E. Oliviero, Lorenzo Leone, and Alioscia Hamma. Magic-state resource theory for the ground state of the transverse-field ising model. Phys. Rev. A, 106:042426, Oct 2022. DOI: 10.1103/PhysRevA.106.042426. URL https://link.aps.org/doi/10.1103/ PhysRevA.106.042426. [40] Jovan Odavi´c, Tobias Haug, Gianpaolo Torre, Alioscia Hamma, Fabio Franchini, and Salvatore Marco Giampaolo. Complexity of frustration: A new source of non-local nonstabilizerness. SciPost Phys., 15:131, 2023. DOI: 10.21468/SciPostPhys.15.4.131. URL https://scipost.org/10.21468/SciPostPhys.15.4.131. [41] Davide Rattacaso, Lorenzo Leone, Salvatore F. E. Oliviero, and Alioscia Hamma. Stabilizer entropy dynamics after a quantum quench. Phys. Rev. A, 108:042407, Oct 2023. DOI: 10.1103/PhysRevA.108.042407. URL https://link.aps.org/doi/10.1103/PhysRevA.108. 042407. [42] Poetri Sonya Tarabunga, Emanuele Tirrito, Titas Chanda, and Marcello Dalmonte. Manybody magic via pauli-markov chains—from criticality to gauge theories. PRX Quantum, 4: 040317, Oct 2023. DOI: 10.1103/PRXQuantum.4.040317. URL https://link.aps.org/doi/ 10.1103/PRXQuantum.4.040317. [43] Zi-Wen Liu and Andreas Winter. Many-body quantum magic. PRX Quantum, 3:020333, May 2022. DOI: 10.1103/PRXQuantum.3.020333. URL https://link.aps.org/doi/10.1103/ PRXQuantum.3.020333. [44] Fuchuan Wei and Zi-Wen Liu. Long-range nonstabilizerness from topology and correlation, 2025. URL https://arxiv.org/abs/2503.04566. [45] Simone Cepollaro, Goffredo Chirco, Gianluca Cuffaro, Gianluca Esposito, and Alioscia Hamma. Stabilizer entropy of quantum tetrahedra. Phys. Rev. D, 109:126008, Jun 2024. DOI: 10.1103/PhysRevD.109.126008. URL https://link.aps.org/doi/10.1103/PhysRevD.109. 126008.

[46] S. Cepollaro, S. Cusumano, A. Hamma, G. Lo Giudice, and J. Odavic. Harvesting stabilizer entropy and non-locality from a quantum field, 2025. URL https://arxiv.org/abs/2412. 11918. [47] Pedro R. Nicácio Falcão, Piotr Sierant, Jakub Zakrzewski, and Emanuele Tirrito. Magic dynamics in many-body localized systems, 2025. URL https://arxiv.org/abs/2503.07468. [48] Xhek Turkeshi, Anatoly Dymarsky, and Piotr Sierant. Pauli spectrum and nonstabilizerness of typical quantum many-body states. Phys. Rev. B, 111:054301, Feb 2025. DOI: 10.1103/PhysRevB.111.054301. URL https://link.aps.org/doi/10.1103/PhysRevB.111. 054301. [49] Yi-Ming Ding, Zhe Wang, and Zheng Yan. Evaluating many-body stabilizer rényi entropy by sampling reduced pauli strings: singularities, volume law, and nonlocal magic, 2025. URL https://arxiv.org/abs/2501.12146. [50] Masahiro Hoshino, Masaki Oshikawa, and Yuto Ashida. Stabilizer rényi entropy and conformal field theory, 2025. URL https://arxiv.org/abs/2503.13599.