- Open Access
Typicality of contextuality
Phys. Rev. A 114, 022207 – Published 13 August, 2026
DOI: https://doi.org/10.1103/6dqp-5s74
Abstract
Identifying when observed statistics cannot be explained by any reasonable classical model is a central problem in quantum foundations. A principled and universally applicable approach to defining and identifying nonclassicality is given by the notion of generalized noncontextuality. Here, we study the typicality of contextuality, namely, the likelihood that randomly chosen quantum preparations and measurements produce nonclassical statistics. Using numerical linear programs to test for the existence of a generalized-noncontextual model, we find that contextuality is fairly common: even in experiments with only a modest number of random preparations and measurements, contextuality arises with probability over . We also show that while typicality of contextuality decreases as the purity (sharpness) of the preparations (measurements) decreases, this dependence is not especially pronounced, so contextuality is fairly typical even in settings with realistic noise. Finally, we show that although nonzero contextuality is quite typical, quantitatively high degrees of contextuality are not as typical, and so large quantum advantages (like for parity-oblivious multiplexing, which we take as a case study) are not as typical. We provide an open-source toolbox that outputs the typicality of contextuality as a function of tunable parameters (such as lower and upper bounds on purity and other constraints on states and measurements). This toolbox can inform the design of experiments that achieve the desired typicality of contextuality for specified experimental constraints.
Physics Subject Headings (PhySH)
Article Text
References (74)
- J. S. Bell, On the Einstein Podolsky Rosen paradox, Phys. Phys. Fiz. 1, 195 (1964).
- S. Kochen and E. P. Specker, The problem of hidden variables in quantum mechanics, Indiana Univ. Math. J. 17, 59 (1967).
- R. W. Spekkens, Contextuality for preparations, transformations, and unsharp measurements, Phys. Rev. A 71, 052108 (2005).
- K.-W. Bong, A. Utreras-Alarcón, F. Ghafari, Y.-C. Liang, N. Tischler, E. G. Cavalcanti, G. J. Pryde, and H. M. Wiseman, A strong no-go theorem on the Wigner's friend paradox, Nat. Phys. 16, 1199 (2020).
- R. W. Spekkens, D. H. Buzacott, A. J. Keehn, B. Toner, and G. J. Pryde, Preparation contextuality powers parity-oblivious multiplexing, Phys. Rev. Lett. 102, 010401 (2009).
- D. Saha and A. Chaturvedi, Preparation contextuality as an essential feature underlying quantum communication advantage, Phys. Rev. A 100, 022108 (2019).
- A. S. S., S. Mukherjee, and A. K. Pan, Robust certification of unsharp instruments through sequential quantum advantages in a prepare-measure communication game, Phys. Rev. A 107, 012411 (2023).
- C. Roch i Carceller, K. Flatt, H. Lee, J. Bae, and J. B. Brask, Quantum vs noncontextual semi-device-independent randomness certification, Phys. Rev. Lett. 129, 050501 (2022).
- A. M. Fonseca, V. P. Rossi, R. D. Baldijão, J. H. Selby, and A. B. Sainz, Robustness of contextuality under different types of noise as quantifiers for parity-oblivious multiplexing tasks, Phys. Rev. A 111, 022217 (2025).
- D. Schmid, H. Du, J. H. Selby, and M. F. Pusey, Uniqueness of noncontextual models for stabilizer subtheories, Phys. Rev. Lett. 129, 120403 (2022).
- J. Bowles, V. J. Wright, M. Farkas, N. Killoran, and M. Schuld, Contextuality and inductive bias in quantum machine learning, arXiv:2302.01365.
- A. Ambainis, M. Banik, A. Chaturvedi, D. Kravchenko, and A. Rai, Parity oblivious -level random access codes and class of noncontextuality inequalities, Quantum Inf. Process. 18, 111 (2019).
- A. Chailloux, I. Kerenidis, S. Kundu, and J. Sikora, Optimal bounds for parity-oblivious random access codes, New J. Phys. 18, 045003 (2016).
- S. A. Yadavalli and R. Kunjwal, Contextuality in entanglement-assisted one-shot classical communication, Quantum 6, 839 (2022).
- M. Lostaglio, Certifying quantum signatures in thermodynamics and metrology via contextuality of quantum linear response, Phys. Rev. Lett. 125, 230603 (2020).
- M. Lostaglio and G. Senno, Contextual advantage for state-dependent cloning, Quantum 4, 258 (2020).
- D. Schmid and R. W. Spekkens, Contextual advantage for state discrimination, Phys. Rev. X 8, 011015 (2018).
- J. Shin, D. Ha, and Y. Kwon, Quantum contextual advantage depending on nonzero prior probabilities in state discrimination of mixed qubit states, Entropy 23, 1583 (2021).
- K. Flatt, H. Lee, C. R. I. Carceller, J. B. Brask, and J. Bae, Contextual advantages and certification for maximum-confidence discrimination, PRX Quantum 3, 030337 (2022).
- S. Mukherjee, S. Naonit, and A. K. Pan, Discriminating three mirror-symmetric states with a restricted contextual advantage, Phys. Rev. A 106, 012216 (2022).
- Y. C. Liang, R. W. Spekkens, and H. M. Wiseman, Specker's parable of the overprotective seer: A road to contextuality, nonlocality and complementarity, Phys. Rep. 506, 1 (2011).
- D. Schmid, R. W. Spekkens, and E. Wolfe, All the noncontextuality inequalities for arbitrary prepare-and-measure experiments with respect to any fixed set of operational equivalences, Phys. Rev. A 97, 062103 (2018).
- V. J. Wright and M. Farkas, Invertible map between Bell nonlocal and contextuality scenarios, Phys. Rev. Lett. 131, 220202 (2023).
- R. Kunjwal, M. Lostaglio, and M. F. Pusey, Anomalous weak values and contextuality: Robustness, tightness, and imaginary parts, Phys. Rev. A 100, 042116 (2019).
- N. E. Comar, D. Cius, L. F. Santos, R. Wagner, and B. Amaral, Contextuality in anomalous heat flow, PRX Quantum 6, 030359 (2025).
- R. W. Spekkens, Negativity and contextuality are equivalent notions of nonclassicality, Phys. Rev. Lett. 101, 020401 (2008).
- D. Schmid, J. H. Selby, M. F. Pusey, and R. W. Spekkens, A structure theorem for generalized-noncontextual ontological models, Quantum 8, 1283 (2024).
- R. W. Spekkens, The ontological identity of empirical indiscernibles: Leibniz's methodological principle and its significance in the work of Einstein, arXiv:1909.04628.
- D. Schmid, J. H. Selby, E. Wolfe, R. Kunjwal, and R. W. Spekkens, Characterization of noncontextuality in the framework of generalized probabilistic theories, PRX Quantum 2, 010331 (2021).
- R. D. Baldijão, R. Wagner, C. Duarte, B. Amaral, and M. T. Cunha, Emergence of noncontextuality under quantum Darwinism, PRX Quantum 2, 030351 (2021).
- D. Schmid, A review and reformulation of macroscopic realism: Resolving its deficiencies using the framework of generalized probabilistic theories, Quantum 8, 1217 (2024).
- J. H. Selby, E. Wolfe, D. Schmid, A. B. Sainz, and V. P. Rossi, Linear program for testing nonclassicality and an open-source implementation, Phys. Rev. Lett. 132, 050202 (2024).
- Y. Zhang, D. Schmid, Y. Yīng, and R. W. Spekkens, Reassessing the boundary between classical and nonclassical for individual quantum processes, Phys. Rev. X 16, 021050 (2026).
- Y. Zhang, D. Schmid, Y. Yīng, and R. W. Spekkens, Quantifiers and witnesses for the nonclassicality of measurements and of states, arXiv:2504.02944.
- A. Acín, T. Fritz, A. Leverrier, and A. B. Sainz, A combinatorial approach to nonlocality and contextuality, Commun. Math. Phys. 334, 533 (2015).
- L. Hardy, Quantum theory from five reasonable axioms, arXiv:quant-ph/0101012.
- J. Barrett, Information processing in generalized probabilistic theories, Phys. Rev. A 75, 032304 (2007).
- G. M. D'Ariano, G. Chiribella, and P. Perinotti, Quantum Theory from First Principles: An Informational Approach (Cambridge University Press, Cambridge, 2017).
- D. Schmid, J. H. Selby, and R. W. Spekkens, Unscrambling the omelette of causation and inference: The framework of causal-inferential theories, arXiv:2009.03297.
- E. Wolfe, eliewolfe/SimplexEmbedding: Initial release, GitHub repository, 2023, https://zenodo.org/record/7709974.
- P. Cavalcanti, V. P. Rossi, and J. H. Selby, pjcavalcanti/SimplexEmbeddingGPT: Release 1.0.0 [Computer software], Zenodo, 2023, https://zenodo.org/record/10955995.
- E. B. Wilson, Probable inference, the law of succession, and statistical inference, J. Am. Stat. Assoc. 22, 209 (1927).
- N. Lambert, E. Giguère, P. Menczel, B. Li, P. Hopf, G. Suárez, M. Gali, J. Lishman, R. Gadhvi, R. Agarwal, A. Galicia, N. Shammah, P. Nation, J. Johansson, S. Ahmed, S. Cross, A. Pitchford, and F. Nori, QuTiP 5: The quantum toolbox in Python, Phys. Rep. 1153, 1 (2026).
- W. Bruzda, V. Cappellini, H. Sommers, and K. Życzkowski, Random quantum operations, Phys. Lett. A 373, 320 (2009).
- I. Bengtsson and K. Życzkowski, Geometry of Quantum States: An Introduction to Quantum Entanglement, 2nd ed. (Cambridge University Press, Cambridge, 2017).
- R. Kukulski, I. Nechita, Ł. Pawela, Z. Puchała, and K. Życzkowski, Generating random quantum channels, J. Math. Phys. 62, 062201 (2021).
- M. F. Pusey, Robust preparation noncontextuality inequalities in the simplest scenario, Phys. Rev. A 98, 022112 (2018).
- M. Khoshbin, L. Catani, and M. Leifer, Alternative robust ways of witnessing nonclassicality in the simplest scenario, Phys. Rev. A 109, 032212 (2024).
- J. H. Selby, D. Schmid, E. Wolfe, A. B. Sainz, R. Kunjwal, and R. W. Spekkens, Contextuality without incompatibility, Phys. Rev. Lett. 130, 230201 (2023).
- I. Marvian, Inaccessible information in probabilistic models of quantum systems, non-contextuality inequalities and noise thresholds for contextuality, arXiv:2003.05984.
- R. Kunjwal and R. W. Spekkens, From the Kochen-Specker theorem to noncontextuality inequalities without assuming determinism, Phys. Rev. Lett. 115, 110403 (2015).
- D. Girolami, How difficult is it to prepare a quantum state? Phys. Rev. Lett. 122, 010505 (2019).
- Y. Guryanova, N. Friis, and M. Huber, Ideal projective measurements have infinite resource costs, Quantum 4, 222 (2020).
- V. P. Rossi, RossiVinicius/TypicalityOfContextuality v2.0.0 [Computer software], Zenodo, 2026, doi: 10.5281/zenodo.21218507.
- N. Brunner, D. Cavalcanti, S. Pironio, V. Scarani, and S. Wehner, Bell nonlocality, Rev. Mod. Phys. 86, 419 (2014).
- R. C. Drumond and R. I. Oliveira, Small violations of full-correlation Bell inequalities for multipartite pure random states, Phys. Rev. A 86, 012117 (2012).
- A. de Rosier, J. Gruca, F. Parisio, T. Vértesi, and W. Laskowski, Multipartite nonlocality and random measurements, Phys. Rev. A 96, 012101 (2017).
- V. Lipinska, F. J. Curchod, A. Máttar, and A. Acín, Towards an equivalence between maximal entanglement and maximal quantum nonlocality, New J. Phys. 20, 063043 (2018).
- R. C. Drumond, C. Duarte, and R. I. Oliveira, Small violations of Bell inequalities for multipartite pure random states, J. Math. Phys. 59, 052202 (2018).
- A. de Rosier, J. Gruca, F. Parisio, T. Vértesi, and W. Laskowski, Strength and typicality of nonlocality in multisetting and multipartite Bell scenarios, Phys. Rev. A 101, 012116 (2020).
- H. Li, P. Mironowicz, M. Pawłowski, Z. Yin, Y. Wu, S. Wang, W. Chen, H. Hu, G. Guo, and Z. Han, Relationship between semi- and fully-device-independent protocols Phys. Rev. A 87, 020302(R) (2013).
- D. Schmid, J. H. Selby, V. P. Rossi, R. D. Baldijão, and A. B. Sainz, Shadows and subsystems of generalized probabilistic theories: When tomographic incompleteness is not a loophole for contextuality proofs, Quantum 9, 1880 (2025).
- P. Janotta and H. Hinrichsen, Generalized probability theories: What determines the structure of quantum theory? J. Phys. A: Math. Theor. 47, 323001 (2014).
- J. H. Selby, D. Schmid, E. Wolfe, A. B. Sainz, R. Kunjwal, and R. W. Spekkens, Accessible fragments of generalized probabilistic theories, cone equivalence, and applications to witnessing nonclassicality, Phys. Rev. A 107, 062203 (2023).
- K. Fukuda and A. Prodon, Double description method revisited, Combinatorics and Computer Science (Springer, Berlin, Heidelberg, 1996), pp. 91–111.
- K. Fukuda, Cddlib Reference Manual, cddlib version 0.94m, ETH Zurich, Zurich, Switzerland, 2021, https://people.inf.ethz.ch/fukudak/cdd_home/cddlibman2021.pdf.
- F. Mezzadri, How to generate random matrices from the classical compact groups, Not. Am. Math. Soc. 54, 592 (2007).
- K. Zyczkowski and M. Kus, Random unitary matrices, J. Phys. A: Math. Gen. 27, 4235 (1994).
- J. Ginibre, Statistical ensembles of complex, quaternion, and real matrices, J. Math. Phys. 6, 440 (1965).
- C. P. Robert and G. Casella, Monte Carlo Statistical Methods (Springer, New York, 2004).
- M. Salehi, S. J. Akhtarshenas, M. Sarbishaei, and H. Jaghouri, Mutually unbiased measurements with arbitrary purity, Quantum Inf. Process 20, 401 (2021).
- M. J. Grabowecky, C. A. J. Pollack, A. R. Cameron, R. W. Spekkens, and K. J. Resch, Experimentally bounding deviations from quantum theory for a photonic three-level system using theory-agnostic tomography, Phys. Rev. A 105, 032204 (2022).
- T. Giordani, R. Wagner, C. Esposito, A. Camillini, F. Hoch, G. Carvacho, C. Pentangelo, F. Ceccarelli, S. Piacentini, A. Crespi, N. Spagnolo, R. Osellame, E. F. Galvão, and F. Sciarrino, Experimental certification of contextuality, coherence, and dimension in a programmable universal photonic processor, Sci. Adv. 9, eadj4249 (2023).
- A. Aloy, M. Fadel, T. D. Galley, C. L. Jones, and M. P. Müller, Theory-independent monitoring of the decoherence of a superconducting qubit with generalized contextuality, Nat. Commun. 17, 2474 (2026).