- Open Access
Complexity of contextuality
Phys. Rev. A 113, 032215 – Published 19 March, 2026
DOI: https://doi.org/10.1103/k9ls-xyps
Abstract
Generalized contextuality is a hallmark of nonclassical theories like quantum mechanics. Yet, three fundamental computational problems concerning its decidability and complexity remain open: first, determining the complexity of deciding if a theory admits a noncontextual ontological model; second, determining the complexity of deciding if such a model is possible for a specific dimension ; and, third, efficiently computing the smallest such model when it exists, given that finding the smallest ontological model is NP-hard. We address the second problem by presenting an algorithm derived from a geometric formulation and its reduction to the intermediate simplex problem in computational geometry. We find that the complexity of deciding the existence of a noncontextual ontological model of dimension is at least exponential in the dimension of the theory and at most exponential in . This, in turn, implies that computing the smallest noncontextual ontological model is inefficient in general. Finally, we demonstrate the fundamental difference between finding the smallest noncontextual ontological model and the smallest ontological model using an explicit example wherein the respective minimum ontic sizes are five and four.
Physics Subject Headings (PhySH)
Article Text
References (36)
- S. Kochen and E. Specker, The problem of hidden variables in quantum mechanics, Indiana Univ. Math. J. 17, 59 (1967).
- N. D. Mermin, Hidden variables and the two theorems of John Bell, Rev. Mod. Phys. 65, 803 (1993).
- R. W. Spekkens, Contextuality for preparations, transformations, and unsharp measurements, Phys. Rev. A 71, 052108 (2005).
- J. Bermejo-Vega, N. Delfosse, D. E. Browne, C. Okay, and R. Raussendorf, Contextuality as a resource for models of quantum computation with qubits, Phys. Rev. Lett. 119, 120505 (2017).
- F. Shahandeh, Quantum computational advantage implies contextuality, arXiv:2112.00024.
- D. Schmid, H. Du, J. H. Selby, and M. F. Pusey, Uniqueness of noncontextual models for stabilizer subtheories, Phys. Rev. Lett. 129, 120403 (2022).
- S. Gupta, D. Saha, Z.-P. Xu, A. Cabello, and A. S. Majumdar, Quantum contextuality provides communication complexity advantage, Phys. Rev. Lett. 130, 080802 (2023).
- D. Schmid and R. W. Spekkens, Contextual advantage for state discrimination, Phys. Rev. X 8, 011015 (2018).
- F. Shahandeh, T. Yianni, and M. Doosti, Characterizing contextuality via rank separation with applications to cloning, arXiv:2406.19382.
- M. Lostaglio and G. Senno, Contextual advantage for state-dependent cloning, Quantum 4, 258 (2020).
- K. Korzekwa and M. Lostaglio, Quantum advantage in simulating stochastic processes, Phys. Rev. X 11, 021019 (2021).
- V. Havlíček and J. Barrett, Simple communication complexity separation from quantum state antidistinguishability, Phys. Rev. Res. 2, 013326 (2020).
- A. Montina, Exponential complexity and ontological theories of quantum mechanics, Phys. Rev. A 77, 022104 (2008).
- L. Hardy, Quantum ontological excess baggage, Stud. Hist. Philos. Sci. Part B: Stud. Hist. Philos. Mod. Phys. 35, 267 (2004).
- Y. Shitov, Euclidean distance matrices and separations in communication complexity theory, Discr. Comput. Geom. 61, 653 (2019).
- V. Gitton and M. P. Woods, Solvable criterion for the contextuality of any prepare-and-measure scenario, Quantum 6, 732 (2022).
- E. F. Galvão and L. Hardy, Substituting a qubit for an arbitrarily large number of classical bits, Phys. Rev. Lett. 90, 087902 (2003).
- 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).
- D. Schmid, R. D. Baldijão, J. H. Selby, A. B. Sainz, and R. W. Spekkens, Noncontextuality inequalities for prepare-transform-measure scenarios, arXiv:2407.09624.
- F. Shahandeh, T. Yianni, and M. Doosti, A unified linear algebraic framework for physical models and generalized contextuality, arXiv:2512.10000.
- A. Moitra, An almost optimal algorithm for computing nonnegative rank, SIAM J. Comput. 45, 156 (2016).
- S. A. Vavasis, On the complexity of nonnegative matrix factorization, SIAM J. Opt. 20, 1364 (2010).
- R. W. Spekkens, The ontological identity of empirical indiscernibles: Leibniz's methodological principle and its significance in the work of einstein, arXiv:1909.04628.
- F. Shahandeh, Contextuality of general probabilistic theories, PRX Quantum 2, 010330 (2021).
- S. Arora, R. Ge, R. Kannan, and A. Moitra, Computing a nonnegative matrix factorization—Provably, in Proceedings of the Forty-Fourth Annual ACM Symposium on Theory of Computing, STOC '12 (Association for Computing Machinery, New York, 2012), pp. 145–162.
- R. Impagliazzo and R. Paturi, On the complexity of k-SAT, J. Comput. Syst. Sci. 62, 367 (2001).
- B. Aspvall and R. E. Stone, Khachiyan's linear programming algorithm, J. Algorithms 1, 1 (1980).
- J. Renegar, A polynomial-time algorithm, based on Newton's method, for linear programming, Math. Program. 40, 59 (1988).
- M. E. Dyer, The complexity of vertex enumeration methods, Math. Oper. Res. 8, 381 (1983).
- L. Khachiyan, E. Boros, K. Borys, K. Elbassioni, and V. Gurvich, Generating all vertices of a polyhedron is hard, Discr. Comput. Geom. 39, 174 (2008).
- G. Das and D. Joseph, The complexity of minimum convex nested polyhedra, in The 2nd Canadian Conference on Computational Geometry (CCCG, Ottawa, 1990), pp. 296–301.
- M. G. Dobbins, A. Holmsen, and T. Miltzow, A universality theorem for nested polytopes, arXiv:1908.02213.
- A. Storjohann, On the complexity of inverting integer and polynomial matrices, Comput. Complex. 24, 777 (2015).
- 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).
- O. Lalonde, N. S. Mande, and R. de Wolf, Tight bounds for the randomized and quantum communication complexities of equality with small error, in 43rd IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, edited by P. Bouyer and S. Srinivasan (Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl, Germany, 2023), Vol. 284, pp. 32:1–32:18.
- T. Heinosaari, O. Kerppo, L. Leppäjärvi, and M. Plávala, Simple information processing tasks with unbounded quantum advantage, Phys. Rev. A 109, 032627 (2024).