Available via license: CC BY 4.0
Content may be subject to copyright.
An open-source linear program for testing nonclassicality
John H. Selby,
1, ∗
Elie Wolfe,
2, †
David Schmid,
1, ‡
and Ana Bel´en Sainz
1, §
1
International Centre for Theory of Quantum Technologies, University of Gda´nsk, 80-309 Gda´nsk, Poland
2
Perimeter Institute for Theoretical Physics, 31 Caroline Street North, Waterloo, Ontario Canada N2L 2Y5
(Dated: April 27, 2022)
The gold standard for demonstrating that an experiment resists any classical explanation is to show
that its statistics violate generalized noncontextuality. We here provide an open-source linear program
for testing whether or not any given prepare-measure experiment is classically-explainable in this sense.
The input to the program is simply an arbitrary set of quantum states and an arbitrary set of quantum
effects; the program then determines if the Born rule statistics generated by all pairs of these can
be explained by a classical (noncontextual) model. If a classical model exists, it provides an explicit
model. If it does not, then it computes the minimal amount of noise that must be added such that a
model does exist, and then provides this model. We generalize all these results to arbitrary generalized
probabilistic theories (and accessible fragments thereof) as well; indeed, our linear program is a test of
simplex-embeddability as introduced in Ref. [1] and generalized in Ref. [2].
I. INTRODUCTION
A rigorous method for demonstrating that a theory or
a set of data is genuinely nonclassical is to prove that it
cannot be reproduced in any generalized noncontextual
model [
3
]. Generalized noncontextuality was first
introduced as an improvement on Kochen-Specker’s
assumption of noncontextuality [
4
], making it more
operationally accessible and providing stronger motivations
for it, as a form of Leibniz’s principle [
5
]. Since its inception,
the list of motivations for taking it as one’s notion of
classicality has grown greatly. Notably, the existence
of a generalized-noncontextual ontological model for an
operational theory coincides with two independent notions
of classicality: one that arises in the study of generalized
probabilistic theories [
1
,
6
,
7
], and another that arises in
quantum optics [
1
,
7
,
8
]. Generalized noncontextuality
has been used as an indicator of classicality in the
quantum Darwinist program [
9
], and any sufficiently
noisy theory satisfies generalized noncontextuality [
10
,
11
].
Furthermore, violations of local causality [
12
], violations
of Kochen-Specker noncontextuality [
10
,
13
], and some
observations of anomalous weak values [
14
,
15
], are also
instances of generalized contextuality. Finally, generalized
contextuality is a resource for information processing [
16
–
20
], computation [
21
], state discrimination [
22
–
25
],
cloning [
26
], and metrology [
27
]. Herein, we use the term
noncontextuality to refer to the concept of generalized
noncontextuality.
How, then, does one determine in practice whether a
given theory or a given set of experimental data admits of
∗john.h.selby@gmail.com
†ewolfe@perimeterinstitute.ca
‡davidschmid10@gmail.com
§ana.sainz@ug.edu.pl
a classical explanation of this sort? We here provide the
most direct algorithm to date for answering this question
in arbitrary prepare-and-measure experiments, and we
provide open-access Mathematica code for answering it
in practice.
One need only give a set of quantum
states and a set of quantum POVM elements as
input, and the code determines if the statistics
these generate by the Born rule can be explained
classically—i.e., by a noncontextual ontological
model for the operational scenario.
It furthermore
returns an explicit noncontextual model, if one exists. If
there is no such model, the code determines an operational
measure of nonclassicality, namely, the minimum amount
of noise which would be required until a noncontextual
model would become possible.
In the Supplemental Material, we generalize these ideas
beyond quantum theory to the case of arbitrary generalized
probabilistic theories (GPTs) [
28
,
29
] or fragments thereof,
leveraging the fact that an operational scenario admits of
a noncontextual model if and only if the corresponding
GPT admits of a simplex-embedding [
1
]. Indeed, the
linear program we derive is simply a test of whether
any valid simplex-embedding (of any dimension) can be
found, answering the challenge first posed in Ref. [
1
]. We
furthermore prove an upper bound on the number of ontic
states needed in any such a classical explanation, namely,
the square of the GPT dimension.
The Supplemental Material also explains how our
open-source code implements the linear program we
develop herein.
A large number of previous works have studied the
question of when a set of data admits of a generalized
noncontextual model [
1
,
2
,
6
,
7
,
30
–
35
]. Most closely related
to our work are Refs. [
6
,
30
,
31
,
33
]. We elaborate on the
relationships between these works in our conclusion and in
our Supplemental Material.
For now, we simply note that the linear program (and
dimension bound) that we derive here is in many cases an
arXiv:2204.11905v1 [quant-ph] 25 Apr 2022
II A LINEAR PROGRAM FOR DECIDING CLASSICALITY
instance of an algorithm introduced in Ref. [
33
]. However,
Ref. [
33
] focuses on a proposed modification of generalized
noncontextuality (which we criticize below), and so the
two algorithms do not always return the same result.
Our manuscript aims to be accessible and self-contained,
in order to provide a tool for the quantum information and
foundations communities to directly test for nonclassicality
in their own research problems.
II. A LINEAR PROGRAM FOR DECIDING
CLASSICALITY
We now set up the preliminaries required to state our
linear program for testing whether the quantum statistics
generated by given sets of quantum states and effects can
be explained classically—i.e., by a noncontextual model
for the operational scenario. The Supplemental Material
generalizes these ideas and results to arbitrary GPTs.
Consider any set of (possibly subnormalized
1
) quantum
states, Ω, and any set of quantum effects,
E
, living in the
real vector space
Herm
[
H
] of Hermitian operators on some
Hilbert space
H
. In general, neither the set of states nor the
set of effects need span the full vector space
Herm
[
H
], nor
need the two sets span the same subspace of
Herm
[
H
]. Next,
we introduce some useful mathematical objects related to
Ω and E.
Let us first focus on the case of states. We denote the
subspace of
Herm
[
H
] spanned by the states Ω by
SΩ
. The
inclusion map from
SΩ
to
Herm
[
H
] is denoted by
IΩ
. In
addition, we define the cone of positive operators that arises
from Ω by
Cone[Ω]= (ρρ=X
α
rαρα,ρα∈Ω,rα∈R+)⊂SΩ.(1)
This cone can also be characterized by its facet inequalities,
indexed by
i
=
{
1
,...,n}
. These inequalities are specified by
Hermitian operators hΩ
i∈SΩsuch that
tr(hΩ
iv)≥0∀i⇐⇒ v∈Cone[Ω].(2)
From these facet inequalities, one can define a linear map
HΩ:SΩ→Rn, such that
HΩ(v)= tr(hΩ
1v),...,tr(hΩ
nv)T∀v∈SΩ.(3)
Note that the matrix elements of
HΩ
(
v
) are all non-negative
if and only if
v∈Cone
[Ω]. We denote entrywise
non-negativity by
HΩ
(
v
)
≥e
0 (to disambiguate from using
≥
0 to represent positive semi-definiteness). Succinctly, we
have
HΩ(v)≥e0⇐⇒ v∈Cone[Ω],(4)
1
This allows one to describe states which are not prepared
deterministically, as happens, e.g., when the preparation is part of
a probabilistic source or is the result of remote steering.
and so
HΩ
is simply an equivalent characterisation of the
cone.
Consider now the set of effects
E
. We denote the subspace
of
Herm
[
H
] spanned by
E
by
SE
, and the inclusion map
from
SE
to
Herm
[
H
] by
IE
. In addition, we define the cone
of positive operators that arises from Eas
Cone[E]=
γγ=X
β
rβγβ,γβ∈E,rβ∈R+
⊂SE(5)
This cone can also be characterised by its facet inequalities,
indexed by
j
=
{
1
,...,m}
. These inequalities are specified
by Hermitian operators hE
jsuch that
tr(hE
jw)≥0∀j⇐⇒ w∈Cone[E].(6)
From these facet inequalities one can define a linear map
HE:SE→Rm, such that
HE(w)= tr(whE
1),...,tr(whE
m)T∀w∈SE.(7)
This fully characterises Cone[E], since
HE(w)≥e0⇐⇒ w∈Cone[E].(8)
One can also pick an arbitrary basis of Hermitian
operators for each of the spaces
Herm
[
H
],
SΩ
, and
SE
, and
represent
IΩ
,
IE
,
HE
, and
HΩ
as matrices with respect to
these.
With these defined, we can now present the linear
program which tests for classical explainability (i.e.,
simplex-embeddability) of any set of quantum states and
any set of quantum effects in terms of the matrices
IΩ
,
IE
,
HΩ
, and
HE
, defined above and computed from the set of
states and set of effects.
Linear Program 1.
The Born rule statistics obtained
by composing any state-effect pair from Ωand
E
is
classically-explainable if and only if the fol lowing linear
program is satisfiable:
∃σ≥e0, an m×nmatrix such that (9a)
IT
E·IΩ=HT
E·σ·HΩ.(9b)
Note that if Ω and
E
span the full vector space of
Hermitian operators, then the linear program simplifies
somewhat, as the LHS of Eq.
(9b)
reduces to the identity
map on
Herm
[
H
]. Note that satisfiability is only a function
of the cones defined by Ω and by
E
, and so no other features
of the states and effects are relevant to their nonclassicality,
as was also shown in Ref. [
2
,
34
]. A useful consequence of
this fact is that Ω and
E
are classically-explainable if and
only if their convex hulls are also classically-explainable.
Testing for the existence of such a
σ
is a linear program. In
the repository [
36
], we give open-source Mathematica code
for computing the relevant preliminaries and implementing
this linear program. The input to the code is simply a set
of density matrices and a set of POVM elements (or, more
generally, GPT state and effect vectors).
2
A Example 1 III EXAMPLES
In the case that a classical explanation does exist,
the linear program will output a specification of an
ontological model which represents the operational
scenario in a noncontextual manner. This model can
be straightforwardly computed from the matrix
σ
, as
described in the Supplemental Material, Section B 1. In
particular, every density matrix in Ω is represented in
the ontological model by a probability distribution over
some set of ontic states, while every POVM element in
E
is
represented by a response function—that is, a [0
,
1]
−
valued
function over the set of ontic states.
In the case that no solution exists, one can ask how
much depolarising noise must be added to one’s experiment
until a solution becomes possible. This constitutes an
operational measure of nonclassicality which we refer to
as the robustness of nonclassicality. Finding the minimal
amount rof noise is also a linear program:
Linear Program 2.
Let
r
be the minimum depolarising
noise that must be added in order for the statistics obtained
by composing any state-effect pair from Ωand
E
to be
classically-explainable. It can be computed by the linear
program:
minimise rsuch that
∃σ≥e0, an m×nmatrix such that (10a)
rIT
E·D·IΩ+(1−r)IT
E·IΩ=HT
E·σ·HΩ,(10b)
where
D
is the completely depolarising channel for the
quantum system.
Again, the corresponding ontological model can be
straightforwardly computed from the matrix
σ
found for
the minimal value of
r
, and we give open-source code that
returns both the value of rand the associated model.
We also discuss in the Supplemental Material how one
can easily adapt one’s definition of robustness and the
linear program for it to an arbitrary noise model.
III. EXAMPLES
Here we present three examples of sets of states and
effects, and we assess the classical-explainability of their
statistics using our linear program. In the case where
the statistics are not classical, we also compute the noise
robustness. A fully detailed analysis of these examples
(including the explicit calculation of the matrices
HΩ
,
HE
,
IΩ
, and
IE
), is given in the Supplemental Material. These
specific examples are chosen to illustrate particular features
of our approach, as we discuss therein.
A. Example 1
Consider the set of four quantum states
Ω= {|0ih0|,|1ih1|,|+ih+|,|−ih−|} (11)
on a qubit. In addition, consider the set of six effects
E={|0ih0|,|1ih1|,|+ih+|,|−ih−|,1,0}.(12)
Next, consider the observable statistics—thatis, the data
that can be generated from any measurement constructed
with these effects, when applied to any of these states.
Our linear program finds that these statistics admit of
a classical explanation. This is to be expected, as this
scenario is a subtheory of the noncontextual toy theory
of Ref. [
37
] (namely, that given by restricting to the real
plane). Indeed, this is the model which our code returns,
and is depicted in Figure 1.
(a) Embedding of states
|0i
|+i
|1i
|−i
|−i
|+i
|1i
|0i
1
0
(b) Embedding of effects
FIG. 1: Classical explanation for Example 1
(a)
Depiction of the states in Ω (green dots), embedded in a
3-dimensional slice of a 4-dimensional simplex. (b) Depiction of
the effects in
E
(blue dots), embedded in a 3-dimensional slice
of the 4-dimensional hypercube that is dual to the simplex in
(a). Note that the convex hull of the effects happens to cover
the entire hypercube in this particular slice. The simplex in
(a) can be viewed as the set of probability distributions over a
4-element set Λ of ontic states (black dots), while the hypercube
in (b) can be viewed as the set of logically possible response
functions for Λ. Hence, this simplex embedding corresponds to
a noncontextual ontological model for—and hence [
1
] a classical
explanation of—the operational scenario.
B. Example 2
Consider the set of four quantum states
Ω= {|0ih0|,|1ih1|,|2ih2|,|3ih3|} (13)
on a four-dimensional quantum system. In addition,
consider the set of six effects
E={|0ih0|+|1ih1|,|1ih1|+|2ih2|,|2ih2|+|3ih3|,(14)
|3ih3|+|0ih0|,14,0}.
Notably, the states and effects in this example do not
span the same vector space. Still, our linear program also
finds that the statistical data that arises from this admits
of a classical explanation. This is a useful sanity check,
since all the states and effects are diagonal in the same
basis. We provide a depiction of the classical model which
our code returns for this scenario in Figure 2.
3
C Example 3 IV RELATED ALGORITHMS
(a) Embedding of states
|0i
|1i
|2i
|3iE4
E2
E1
E3
1
0
(b) Embedding of effects
FIG. 2: Classical explanation for Example 2.
(a)
Depiction of the states in Ω (green dots), embedded in a
3-dimensional slice of a 4-dimensional simplex. (b) Depiction of
the effects in
E
(blue dots), embedded in a 3-dimensional slice of
the 4-dimensional hypercube that is dual to the simplex in (a).
Note that the convex hull of the states (effects) happens to cover
the entire simplex (hypercube) in this particular slice. Exactly
as in the last example, this simplex embedding corresponds to a
noncontextual ontological model for—and hence [
1
] a classical
explanation of—the operational scenario.
C. Example 3
Our final example cannot in fact be described within
quantum theory, but rather involves states and effects
living in the generalised probabilistic theory known as
Boxworld [
38
]. More details on this example, and on
generalized probabilistic theories in general, are given in
the Supplemental Material. We also discuss therein the
interesting connections this example exhibits with the other
two examples—these connections are the reason we choose
to present this postquantum example.
Consider the four states
Ω= {[1,1,0]T,[1,0,1]T,[1,−1,0]T,[1,0,−1]T},(15)
on a single Boxworld system. Similarly, consider the six
effects
E={1
2[1,−1,−1]T,1
2[1,1,−1]T,1
2[1,1,1]T,1
2[1,−1,1]T,
(16)
[1,0,0]T,[0,0,0]T}.
In this case, our linear program finds that there is no
classical explanation of the observable statistics. Moreover,
it finds that the depolarizing-noise robustness for these
states and effects is r=0.5.
(a) Embedding of states
s1
s2
s3
s4
(b) LACK of embedding of effects
1
0
E1
E2
E3
E4
FIG. 3: LACK of a classical explanation for Example
3.
(a) Depiction of the states in Ω (green dots), embedded in
a 3-dimensional slice of a 4-dimensional simplex. Notice that
the geometry happens to be identical to that for the states in
Example 1. Depiction of the effects in
E
(red dots), together with
a 3-dimensional slice (grey lines) of the 4-dimensional hypercube
that is dual to the simplex in (a). Notice that for this particular
choice of embedding of states, the effects must be represented
outside of the dual hypercube, and so this does not constitute
a simplex embedding. Because this is true for all possible
embeddings of the states, there is no possible noncontextual
ontological model for—and hence classical explanation of—the
operational scenario.
IV. RELATED ALGORITHMS
We reiterate that the core of our algorithm is a special
case of the linear program introduced in Section IV.C of
Ref. [
33
]. However, the approach of Ref. [
33
] differs from
ours in a critical preprocessing step, and so its assessment
of classicality differs from ours in some examples. Indeed,
their proposal deems Example 2 nonclassical, while our
approach deems it classical. But, the ‘nonclassical’ verdict
is clearly mistaken, since all the states and effects in
that example are simultaneously diagonalizable. Still, we
emphasize that the mathematical tools of Ref. [
33
] are
quite useful and applicable to our notion of classicality, and
indeed even extend some results to non-polytopic GPTs
(although in this case, testing for nonclassicality is likely
not a linear program).
Ref. [
31
] also presented a linear programming approach
which could determine ifa prepare-measure scenario admits
of a noncontextual model or not. In that work, however,
the input to the linear program required the specification of
a set of operational equivalences for the states and another
set for the effects. In contrast, in the current work, the input
to the algorithm is simply a set of quantum (or GPT) states
and effects. The full set of operational equivalences that
hold among states and among effects are derivable from
this input; however, one need not consider them explicitly.
The linear program we present here determines if there is a
noncontextual model with respect to all of the operational
equivalences that hold in quantum theory (or within the
given GPT).
Ref. [
30
] provided another linear programming approach
4
V CLOSING REMARKS
to testing noncontextuality in the context of a particular
class of prepare-measure scenarios, namely those wherein
all operational equivalences arise from different ensembles
of preparation procedures, all of which define the same
average state. Using the flag-convexification technique of
Ref. [
2
,
34
], we suspect that all prepare-measure scenarios
can be transformed into prepare-measure scenarios of this
particular type, in which case the linear program from
Ref. [
30
] would be as general as the approach we have
discussed herein. However, this remains to be proven.
An interesting open question is to determine the relative
efficiency of these algorithms.
V. CLOSING REMARKS
Our arguments in the Supplemental Material
demonstrate that if a noncontextual model exists for a
scenario, then there also exists a model with
d2
ontic
states (or less). This bound was first proven in Ref. [
33
] by
similar arguments. It is not yet clear if this bound is tight.
Additionally, our arguments in the Supplemental
Material hinge on the existence of a particular kind of
decomposition of the identity channel. The arguments
proving a structure theorem for noncontextual models in
Ref. [
7
] hinged on a similar decomposition of the identity
channel, and it would be interesting to investigate this
connection further. We hope that a synthesis of the
algorithmic techniques herein with the compositional
techniques of Refs. [
7
,
39
] might lead to algorithms
for testing nonclassicality in prepare-transform-measure
scenarios and eventually in arbitrary circuits.
In Ref. [
35
], the definition of simplex-embedding was
generalized to embeddings into arbitrary GPTs. It would be
interesting to investigate whether similar programs (albeit
most likely not linear ones) could be developed for testing
for such embeddings.
Finally, we note that our linear program is ideally
suited for proving nonclassicality in real experiments [
40
],
especially when coupled with theory-agnostic tomography
techniques [41,42].
ACKNOWLEDGEMENTS
We acknowledge useful feedback from Rob Spekkens.
JHS was supported by the National Science Centre,
Poland (Opus project, Categorical Foundations
of the Non-Classicality of Nature, project no.
2021/41/B/ST2/03149). ABS and DS were supported
by the Foundation for Polish Science (IRAP project,
ICTQT, contract no. MAB/2018/5, co-financed by EU
within Smart Growth Operational Programme). EW was
supported by Perimeter Institute for Theoretical Physics.
Research at Perimeter Institute is supported in part by
the Government of Canada through the Department of
Innovation, Science and Economic Development Canada
and by the Province of Ontario through the Ministry of
Colleges and Universities. All diagrams were made using
TikZiT. All figures were made using tikz.
[1]
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).
[2]
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,” arXiv preprint
arXiv:2112.04521 (2021).
[3]
R. W. Spekkens, “Contextuality for preparations,
transformations, and unsharp measurements,” Phys. Rev.
A71, 052108 (2005).
[4]
S. Kochen and E. Specker, “The problem of hidden variables
in quantum mechanics,” J. Math. & Mech.
17
, 59 (1967),
also available from the Indiana Univ. Math. J.
[5]
R. W. Spekkens, “The ontological identity of empirical
indiscernibles: Leibniz’s methodological principle and
its significance in the work of Einstein,” (2019),
arXiv:1909.04628 [physics.hist-ph].
[6]
F. Shahandeh, “Contextuality of general probabilistic
theories,” PRX Quantum 2, 010330 (2021).
[7]
D. Schmid, J. H. Selby, M. F. Pusey, and R. W. Spekkens,
“A structure theorem for generalized-noncontextual
ontological models,” (2020), arXiv:2005.07161 [quant-ph].
[8]
R. W. Spekkens, “Negativity and Contextuality are
Equivalent Notions of Nonclassicality,” Phys. Rev. Lett.
101, 020401 (2008).
[9]
R. D. Baldij˜ao, R. Wagner, C. Duarte, B. Amaral, and
M. T. Cunha, “Emergence of Noncontextuality under
Quantum Darwinism,” PRX Quantum 2, 030351 (2021).
[10]
R. Kunjwal and R. W. Spekkens, “From the
Kochen-Specker Theorem to Noncontextuality Inequalities
without Assuming Determinism,” Phys. Rev. Lett.
115
,
110403 (2015).
[11]
I. Marvian, “Inaccessible information in probabilistic
models of quantum systems, non-contextuality inequalities
and noise thresholds for contextuality,” (2020),
arXiv:2003.05984 [quant-ph].
[12]
J. S. Bell, “On the Einstein Podolsky Rosen paradox,”
Physics 1, 195 (1964).
[13]
R. Kunjwal and R. W. Spekkens, “From statistical
proofs of the kochen-specker theorem to noise-robust
noncontextuality inequalities,” Phys. Rev. A
97
, 052110
(2018).
[14]
M. F. Pusey, “Anomalous Weak Values Are Proofs of
Contextuality,” Phys. Rev. Lett. 113, 200401 (2014).
[15]
R. Kunjwal, M. Lostaglio, and M. F. Pusey, “Anomalous
weak values and contextuality: Robustness, tightness, and
imaginary parts,” Phys. Rev. A 100, 042116 (2019).
5
V CLOSING REMARKS
[16]
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).
[17]
A. Chailloux, I. Kerenidis, S. Kundu, and J. Sikora,
“Optimal bounds for parity-oblivious random access codes,”
New J. Phys. 18, 045003 (2016).
[18]
A. Ambainis, M. Banik, A. Chaturvedi, D. Kravchenko,
and A. Rai, “Parity oblivious d-level random access codes
and class of noncontextuality inequalities,” Quantum Inf.
Process. 18, 111 (2019).
[19]
D. Saha, P. Horodecki, and M. Paw lowski, “State
independent contextuality advances one-way
communication,” New J. Phys. 21, 093057 (2019).
[20]
S. A. Yadavalli and R. Kunjwal, “Contextuality in
entanglement-assisted one-shot classical communication,”
(2021), arXiv:2006.00469 [quant-ph].
[21]
D. Schmid, H. Du, J. H. Selby, and M. F. Pusey, “The
stabilizer subtheory has a unique noncontextual model,”
(2021), arXiv:2101.06263 [quant-ph].
[22]
D. Schmid and R. W. Spekkens, “Contextual advantage
for state discrimination,” Phys. Rev. X 8, 011015 (2018).
[23]
K. Flatt, H. Lee, J. B. Brask, J. Bae, et al., “Contextual
advantages and certification for maximum confidence
discrimination,” arXiv preprint arXiv:2112.09626 (2021).
[24]
S. Mukherjee, S. Naonit, and A. Pan, “Discriminating
mirror symmetric states with restricted contextual
advantage,” arXiv preprint arXiv:2112.15452 (2021).
[25]
J. Shin, D. Ha, and Y. Kwon, “Quantum contextual
advantage depending on nonzero prior probabilities in
state discrimination of mixed qubit states,” Entropy
23
,
10.3390/e23121583 (2021).
[26]
M. Lostaglio and G. Senno, “Contextual advantage for
state-dependent cloning,” Quantum 4, 258 (2020).
[27]
M. Lostaglio, “Certifying Quantum Signatures in
Thermodynamics and Metrology via Contextuality of
Quantum Linear Response,” Phys. Rev. Lett.
125
, 230603
(2020).
[28]
L. Hardy, “Quantum theory from five reasonable axioms,”
arXiv preprint quant-ph/0101012 (2001).
[29]
J. Barrett, “Information processing in generalized
probabilistic theories,” Phys. Rev. A 75, 032304 (2007).
[30]
A. Krishna, R. W. Spekkens, and E. Wolfe, “Deriving
robust noncontextuality inequalities from algebraic proofs
of the Kochen-Specker theorem: the Peres-Mermin square,”
arXiv:1704.01153 (2017).
[31]
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).
[32]
M. F. Pusey, “The robust noncontextuality inequalities in
the simplest scenario,” arXiv:1506.04178 (2015).
[33]
V. Gitton and M. P. Woods, “Solvable criterion for the
contextuality of any prepare-and-measure scenario,” arXiv
preprint arXiv:2003.06426 (2020).
[34]
J. H. Selby, D. Schmid, E. Wolfe, A. B. Sainz,
R. Kunjwal, and R. W. Spekkens, “Contextuality without
incompatibility,” (2021), arXiv:2106.09045 [quant-ph].
[35]
M. P. Mueller and A. J. Garner, “Testing quantum
theory with generalized noncontextuality,” arXiv preprint
arXiv:2112.09719 (2021).
[36] https://github.com/eliewolfe/SimplexEmbedding
(2022), open-source Mathematica code for implementing
the linear program introduced in this manuscript.
[37]
R. W. Spekkens, “Evidence for the epistemic view of
quantum states: A toy theory,” Phys. Rev. A
75
, 032110
(2007).
[38]
J. Barrett, N. Linden, S. Massar, S. Pironio,
S. Popescu, and D. Roberts, “Nonlocal correlations as an
information-theoretic resource,” Physical Review A
71
,
022101 (2005).
[39]
D. Schmid, J. H. Selby, and R. W. Spekkens,
“Unscrambling the omelette of causation and inference:
The framework of causal-inferential theories,” (2021),
arXiv:2009.03297 [quant-ph].
[40]
M. D. Mazurek, M. F. Pusey, R. Kunjwal, K. J. Resch, and
R. W. Spekkens, “An exp erimental test of noncontextuality
without unphysical idealizations,” Nature communications
7, 1 (2016).
[41]
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).
[42]
M. D. Mazurek, M. F. Pusey, K. J. Resch, and
R. W. Spekkens, “Experimentally bounding deviations
from quantum theory in the landscape of generalized
probabilistic theories,” arXiv:1710.05948
2
, 020302 (2017).
[43]
M. M¨uller, “Probabilistic theories and reconstructions of
quantum theory,” SciPost Physics Lecture Notes , 028
(2021).
[44]
L. Lami, “Non-classical correlations in quantum mechanics
and beyond,” arXiv preprint arXiv:1803.02902 (2018).
[45]
M. Pl´avala, “General probabilistic theories: An
introduction,” (2021), arXiv:2103.07469 [quant-ph].
[46]
G. Chiribella, G. M. D’Ariano, and P. Perinotti, “Quantum
from Principles,” in Fundamental Theories of Physics
(Springer Netherlands, 2015) pp. 171–221.
[47]
L. Hardy, “Reformulating and reconstructing quantum
theory,” arXiv:1104.2066 (2011).
[48]
L. Hardy, “Quantum Theory From Five Reasonable
Axioms,” arXiv:quant-ph/0101012 (2001).
[49]
G. Chiribella, G. M. D’Ariano, and P. Perinotti,
“Probabilistic theories with purification,” Phys. Rev. A
81
,
062348 (2010).
[50]
B. Coecke, T. Fritz, and R. W. Spekkens, “A mathematical
theory of resources,” Info. Comp. 250, 59 (2016).
[51]
T. Gonda and R. W. Spekkens, “Monotones in general
resource theories,” (2021), arXiv:1912.07085 [quant-ph].
[52]
F. Shahandeh, M. J. W. Hall, and T. C.
Ralph, “Measurement-Device-Independent Approach to
Entanglement Measures,” Physical Review Letters
118
,
150505 (2017).
[53]
M. F. Pusey, L. Del Rio, and B. Meyer, “Contextuality
without access to a tomographically complete set,”
arXiv:1904.08699 (2019).
[54]
G. Kimura, “The bloch vector for n-level systems,” Physics
Letters A 314, 339 (2003).
6
1 Generalized probabilistic theories A FORMAL DEFINITIONS
Appendix
Table of Contents ................... 7
A Formal definitions . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1 Generalized probabilistic theories . . . . . . . . . . . . . . . . . 7
2 GPT fragments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3 Accessible GPT fragments . . . . . . . . . . . . . . . . . . . . . . . 9
4 Classical explainability of accessible GPT fragments. 11
B Derivation of the linear program . . . . . . . . . . . . . 11
1
From simplicial-cone embeddings to simplex
embeddings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2 From simplex embeddings to ontological models . . . . 15
C An operational measure of nonclassicality . . . . 15
D Bounding the number of ontic states . . . . . . . . . 16
E Worked Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2 Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3 Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
F Comparison with other purported notions of
classicality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1 Shahandeh’s purported notion of classicality . . . . . . . 20
2 Gitton-Woods’s purported notion of classicality . . . . 20
G Open-source code . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1 How to use the code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2 Useful matrix formulations . . . . . . . . . . . . . . . . . . . . . . 21
3 Internals of the code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Supplemental Material A: Formal definitions
1. Generalized probabilistic theories
In the main text, we presented our results using the
formalism of quantum theory. In the following, we state and
prove our results in a more general manner which does not
assume the validity of quantum theory. We do this within
the framework of generalized probabilistic theories (GPTs).
Ref. [
2
] contains a comprehensive introduction to the
particular formalization of GPTs which we use here. In
addition, see Refs. [
43
–
45
] for reviews of GPTs more broadly,
and Refs. [
46
,
47
] for the diagrammatic formalism for GPTs
that we use here. In brief, a GPT describes a possible
theory of the world, as characterized by its operational
statistics [
29
,
48
]. By ranging overdifferent GPTs, then, one
ranges over a landscape of possible ways the world might be.
We now briefly review the GPT description of
prepare-measure scenarios, which are the focus of our
manuscript. In this context, a GPT is formally defined by
a quadruple
G=
s
S
s∈ΩG
,
e
S
e∈EG
,
S
S
,S
,(A1)
where Ω
G
is a convex set of GPT states which span a real
vector space
S
, and
EG
is a convex set of GPT effects
which span the dual space
S∗
. Each GPT state represents
an operational preparation procedure—possibly one that
occurs with non-unit probability
2
, and each GPT effect
represents an operational measurement procedure together
with the observation of a particular outcome. We follow
the standard convention of assuming that the sets Ω
G
and EGare finite-dimensional, convex, and compact. The
quadruple also specifies a probability rule (via the identity
map
1S
—see Eq.
(A2)
), and a unit effect
S∈EG
. These are
in fact both redundant in the case of standard GPTs, but we
have included them here to highlight the fact that standard
GPTs are special cases of accessible GPT fragments, a
concept we introduce in the next section.
A measurement in a GPT is a set of effects (one for
each possible outcome) summing to the privileged unit
effect,
S
. In any measurement containing a GPT effect
e∈ EG
, the probability of the outcome corresponding to
that effect arising, given a preparation of the system in a
state described by the GPT state s∈ΩG, is given by
Prob
e
S
,s
S
:=
e
S
s
S
.(A2)
The set of states and effects in any valid GPT must satisfy
a number of constraints, three of which we highlight here:
1.
The principle of tomography [
29
,
48
] must be satisfied.
This means that all states and effects can be uniquely
identified by the predictions they generate. Formally,
for GPT states it means that
e
(
s1
) =
e
(
s2
) for all
e∈EG
if and only if
s1
=
s2
; for GPT effects, it means
that e1(s)= e2(s) for all s∈ΩGif and only if e1=e2.
2.
For every state
s∈
Ω
G
, it holds that
1
S(s)s∈
Ω
G
.
That is, for every state in the GPT, the normalised
counterpart is also in the GPT. This is an important
constraint first highlighted in Ref. [49].
3.
For all
e∈EG
, there exists
e⊥∈EG
such that
e
+
e⊥
=
S.
We highlight these in particular as they are relevant for this
manuscript. Notably, we will relax the first two conditions
in the following section.
In this paper we are interested in whether or not a given
GPT, or an experiment performed within a given GPT,
is classically explainable. In Refs. [
1
,
2
], it was shown
that the appropriate notion of classical-explainability is
2
That is, we take Ω
G
to include subnormalised states, representing
preparation procedures which fail with some nonzero probability,
as this will be convenient later in the paper.
7
1 Generalized probabilistic theories A FORMAL DEFINITIONS
the notion of simplex-embeddability. This geometric
criterion deems a GPT classically-explainable if its state
space can be embedded into a simplex (of any dimension)
and its effect space can be embedded into the dual to
the simplex, such that probabilities are preserved. This
notion is motivated by the fact that the existence of a
simplex embedding for a GPT is equivalent to the existence
of a generalized noncontextual ontological model for any
operational scenario which leads (through quotienting
by operational equivalences) to the GPT. In turn,
recall (e.g., from our introduction) that there are many
motivations for taking generalized noncontextuality as
one’s notion of classical explainability for operational
scenarios. Simplex-embeddability can also be motivated
as a notion of classical-explainability by the independent
consideration that simplicial GPTs are the standard way
of capturing strictly classical theories—i.e., those wherein
all possible measurements are compatible. We refer the
reader to Refs. [
1
,
2
] for more details on this and on the
closely related notion of simplicial-cone embedding.
Definition 1
(Simplicial-cone embeddings and simplex
embeddings of a GPT)
.
Asimplicial-cone embedding,
τG
,
of a GPT,
G
, is defined by a set of ontic states Λand a pair
of linear maps
τΩG
RΛ
S
and τEG
RΛ
S
(A3)
such that for all s∈ΩGand for al l e∈ EGwe have
s
S
τΩG
RΛ
≥e0,
e
S
τEG
RΛ
≥e0 (A4)
and such that
e
S
s
S
=
τEG
e
RΛ
S
τΩG
s
S
.(A5)
A simplicial-cone embedding is said to be a simplex
embedding if it moreover satisfies
τEG
RΛ
S
=
RΛ
.(A6)
Although a simplex embedding must satisfy this
additional constraint, we proved in Ref. [
2
] that a
simplicial-cone embedding exists if and only if a simplex
embedding exists. We expand on this in Section B 1.
We note also that a simplex-embedding of a GPT is
equivalent to an ontological model of a GPT [
1
,
7
]. It
follows, then, that an operational theory (or scenario or
experiment) admits of a noncontextual ontological model
if and only if the associated GPT (or GPT fragment, see
next subsection) admits of an ontological model.
Here and throughout, we will denote physical processes
in white, and mathematical processes (like embedding,
projection, and inclusion maps) in black.
Note that since states are spanning for
S
and effects
are spanning for
S∗
, we can equivalently write Eq.
(A5)
,
which expresses the constraint that the operational data is
reproduced by the embedding, as
S
S
=
τEG
RΛ
S
τΩG
S
.(A7)
2. GPT fragments
In a standard GPT (as defined in the previous section),
all states and effects which are taken to be physically
possible given one’s theory of the world are required to
be included in the sets Ω
G
and
EG
. When applying the
framework of GPTs to describe particular experiments
rather than possible theories of the world, however, one
must drop this requirement.
From a practical perspective, a specific prepare-measure
experiment can be described simply as a subset Ω
F⊆
Ω
G
representing the preparation procedures in the experiment
and a subset
EF⊆ EG
of effects representing the
measurement outcomes in the experiment. We will refer
to this object as a GPT fragment. More formally:
Definition 2
(GPT fragment)
.
A GPT fragment,
F
,
is specified by the underlying GPT,
G
, together with a
designated subset of states Ω
F⊆
Ω
G
and of effects
EF⊆EG
.
Critically, the sets of states and effects in a GPT fragment
(Ω
F
and
EF
) need not satisfy all the constraints that
a GPT must satisfy. In particular, (i) the set of state
vectors and effect covectors in a GPT fragment need not be
tomographically complete for each other (i.e., they need not
span the same vector space and its dual, respectively), and
(ii) the set of state vectors in a GPT fragment may contain
subnormalized states whose normalised counterparts are
not in the GPT fragment.
One can then ask whether the fragment (as opposed
to the underlying GPT) is classically-explainable. The
appropriate notion of classical-explainability for GPT
fragments follows immediately from the notion for the
underlying GPT, namely Definition 1:
Definition 3
(Simplicial-cone embeddings and simplex
embeddings of GPT fragments)
.
Definition 1, but where
one replaces ΩGwith ΩFand replaces EGwith EF.
8
2 GPT fragments A FORMAL DEFINITIONS
Note that any fragment
F
of a classically-explainable
underlying GPT
G
is necessarily also
classically-explainable; contrapositively, if a fragment is not
classically-explainable, then neither is the underlying GPT.
Note that Ω
F
and
EF
are not necessarily spanning
for the underlying GPT vector space
S
and dual space
S∗
, respectively. As such, one can no longer derive
Eq.
(A7)
as an equivalent way to capture the constraint
that the operational predictions be reproduced (as in
Eq.
(A5)
). However, we can derive an analogous condition
by introducing some projection maps. Although this is not
necessary at this stage, these maps will be useful in the
next section.
Define a particular pair of idempotent linear maps
S
ΠΩF
S
and
S
ΠEF
S
,(A8)
where idempotence means that
S
ΠΩF
S
=
S
ΠΩF
ΠΩF
S
and
S
ΠEF
S
=
S
ΠEF
ΠEF
S
.(A9)
The defining feature of these idempotents is that they
characterize the subspaces of states and effects in the
fragment via
S
ΠΩF
s
S
=
s
⇐⇒ s∈Span[ΩF] (A10)
and
e
S
ΠEF
S
=
e
⇐⇒ e∈Span[EF].(A11)
Although more than one idempotent map may satisfy these
constraints, they are related by reversible linear maps
relating two different choices of bases for
S
, and so we will
see that the results hold for any choice satisfying these
conditions. Then, Eq.
(A7)
can be more generally expressed
as
S
ΠΩF
ΠEF
S
=
S
τEF
RΛ
S
τΩF
S
S
ΠΩF
ΠEF
,(A12)
which now directly applies to GPT fragments as well.
These idempotents and this equivalent characterisation of
Eq. (A5) will be useful in the following section.
3. Accessible GPT fragments
As one can see from Definition 2, a GPT fragment is
explicitly defined with respect to an underlying GPT.
From a theorist’s perspective, however, it can be
convenient to work with an ‘intrinsic’ characterisation of
an experiment, rather than viewing it as a fragment living
inside an underlying GPT. That is, it is often useful to view
one’s subsets of states and effects as living in the vector
spaces which they span, rather than the vector space of the
underlying GPT (a vector space that will generally be of
larger dimension). This resulting object has been termed
an accessible GPT fragment [2].
The definition of an accessible GPT fragment in Ref. [
2
]
also incorporates a closure of the state space and of the
effect space under classical processings—convex mixtures,
coarse-grainings of outcomes, and so on.
3
Thus, they
represent all states and effects that are accessible given
the laboratory devices in question (but, like with GPT
fragments, they need not represent all states and effects
that are physically possible in the underlying theory). As a
consequence of this closure under classical processings, all
accessible GPT fragments share some geometric structure;
however, this additional structure is not needed for proving
our results, so we simply refer the reader to Ref. [
2
] for
more discussion of this.
In summary, accessible GPT fragments are simply GPT
fragments, but represented in their native vector spaces,
and closed under classical processing. As with GPT
fragments, the set of state vectors and effect covectors in
an accessible GPT fragment need not be tomographically
complete for each other (i.e., they need not span the same
vector space and its dual), and the set of state vectors
may contain subnormalized states whose normalised
counterparts are not in the accessible GPT fragment.
In order to formalize this move from the GPT fragments
of the previous section to accessible GPT fragments, we will
make use of the idempotent maps that we introduced. In
particular, let us define a “splitting” of these idempotents
as follows. In the case of Π
ΩF
, this means finding a vector
space SΩAand a pair of linear maps
SΩA
PΩF
S
:S→SΩAand IΩF
SΩA
S
:SΩA→S(A13)
3
Note that the choice to incorporate this closure is in some
sense optional; one could also study objects like accessible GPT
fragments, but without this closure.
9
3 Accessible GPT fragments A FORMAL DEFINITIONS
such that
S
ΠΩF
S
=
IΩA
SΩA
S
PΩA
S
and
IΩA
PΩA
SΩA
SΩA
S=SΩA.(A14)
In particular, these conditions mean that
SΩA∼
=Span
[Ω
F
],
so we will think of
SΩA
as the vector space of states for the
accessible GPT fragment. The map
PΩA
is then a projector
mapping states viewed as vectors within the underlying
GPT to states viewed as vectors in the accessible GPT
fragment. Meanwhile, the map
IΩA
is an inclusion map
taking states viewed as vectors within the accessible GPT
fragment to states viewed as vectors within the GPT. Note
that splitting an idempotent into a projector and inclusion
map is unique up to some reversible transformation relating
two different bases for SΩA.
The case of effects is handled in the same way, up to
the caveat that we are thinking of all of the linear maps as
acting contravariantly—that is, on the dual spaces, where
the effects naturally live. That is, to split Π
EF
, one finds a
vector space SEAand a pair of linear maps
SEA
S
PEA:S∗→S∗
EAand IEA
SEA
S
:S∗
EA→S∗(A15)
such that
S
ΠEF
S
=
IEA
SEA
S
PEA
S
and
IEA
PEA
SEA
SEA
S=SEA.(A16)
Here we find that
S∗
EA∼
=Span
[
EF
] and so we think of
this as the dual vector space of effects for the accessible
GPT fragment. The map
PEA
can then be though of as
a projector mapping effects, viewed as covectors in the
GPT, to effects, viewed as covectors in the accessible GPT
fragment, and
IEA
as an inclusion mapping effects, viewed
as covectors in the accessible GPT fragment, to effects,
viewed as covectors in the GPT. The choice of which
idempotents to split, and which projector and inclusion
map to split them into, then amounts to nothing more
than picking a particular basis with which to represent the
states and effects (one basis for the underlying GPT, and
another for the accessible GPT fragment). That is, all of
these choices simply result in equivalent accessible GPT
fragments, as discussed in Ref. [2].
We can then define all of the components of the accessible
GPT fragment in terms of the GPT fragment together with
these projector and inclusion maps. In particular, we define
the states and effects in the accessible GPT fragment as
s
SΩA
:= PΩA
SΩA
s
Sand e
SEA
:=
e
S
SEA
PEA
,(A17)
and so the unit effect for the accessible GPT fragment is
given by
SEA:=
PEA
S
SEA
.(A18)
Finally, we define the probability rule for the accessible
GPT fragment by including the states and effects in the
accessible GPT fragment into the underlying GPT and
computing the probability within the underlying GPT via
Eq. (A2). That is, we define a linear probability rule
SEA
B
SΩA
:=
IEA
SEA
S
IΩA
SΩA
,(A19)
and use this to compute probabilities via
Prob
e
SEA
,s
SΩA
:=
e
SEA
B
s
SΩA
.(A20)
Succinctly, then, an accessible GPT fragment is specified
by a quadruple
A=
s
SΩA
s∈ΩA
,
e
SEA
e∈E A
,
SEA
B
SΩA
,SEA
.(A21)
In this paper, we will assume that the number of extreme
points in Ω
A
and
EA
are finite, as will be the case in any
real experiment.
In short, from the GPT fragment characterising a given
experiment, one can construct the associated accessible
GPT fragment as follows. First, one closes Ω
F
and
EF
under classical processings. Then, one reconceptualizes the
states and effects as living in their native subspaces, namely
in
SΩA∼
=Span
[Ω
F
] and
SEA∼
=Span
[
EF
] rather than in the
underlying GPT’s vector space S.
The notion of classical explainability for accessible GPT
fragments is very closely related to that introduced above
for GPTs and for GPT fragments. Since it is the main
notion we use in this work, we discuss it in detail in the
10
4 Classical explainability of accessible GPT fragments B DERIVATION OF THE LINEAR PROGRAM
next section. It is straightforward to show (directly from
the definitions and Eq.
(A12)
) that classical explainability
of a GPT fragment is equivalent to classical explainability
of the associated accessible GPT fragment. This implies
that one can work equally well with either the practical or
the theoretical perspectives introduced above. Moreover,
it implies that the particular choices that were made for
the projection maps are irrelevant to the assessment of
classicality (as one would expect).
4. Classical explainability of accessible GPT
fragments
One can now ask whether a given accessible GPT
fragment is classically-explainable. The appropriate notion
of classical-explainability for accessible GPT fragments,
first introduced in Ref. [
2
], is again a natural extension of
the notion for standard GPTs:
Definition 4
(Simplicial-cone embeddings and simplex
embeddings of an accessible GPT fragment)
.
A
simplicial-cone embedding,
τA
, of an accessible GPT
fragment,
A
, is defined by a set of ontic states Λand a pair
of linear maps
τΩA
RΛ
SΩA
and τEA
RΛ
SEA
(A22)
such that for all s∈ΩAand for all e∈ EAwe have
s
SΩA
τΩA
RΛ
≥e0,
e
SEA
τEA
RΛ
≥e0 (A23)
and such that
SEA
B
SΩA
=
τEA
RΛ
SEA
τΩA
SΩA
.(A24)
A simplicial-cone embedding is said to be a simplex
embedding if it moreover satisfies
τEA
RΛ
SEA
=
RΛ
.(A25)
With these definitions in place it is straightforward to
show an equivalence between classical-explainability of a
GPT fragment and classical-explainability of the associated
accessible GPT fragment.
Proposition 1.
Any simplex embedding for a GPT
fragment
F
(Def. 3) can be converted into a simplex
embedding for the associated accessible GPT fragment
A
(Def. 4), and vice versa.
Proof.
Given a simplex embedding (
τΩF,τEF
) for the GPT
fragment, one can construct a simplex embedding for the
associated accessible GPT fragment by taking
τΩA
RΛ
SΩA
:=
τΩF
IΩA
RΛ
SΩA
Sand τEA
RΛ
SEA
:=
τEF
IEA
RΛ
SEA
S(A26)
The fact that this is a valid simplex embedding can be
verified immediately from the definitions.
Similarly, given a simplex embedding (
τΩA,τEA
) for the
accessible GPT fragment, one can construct a simplex
embedding for the GPT fragment by
τΩF
RΛ
S
:=
τΩA
PΩA
RΛ
SΩA
S
and τEF
RΛ
S
:=
τEA
PEA
RΛ
SEA
S
.(A27)
Again, the fact that this is a valid simplex embedding can
be verified immediately from the definitions.
Next, we show that the existence of a simplicial-cone
embedding (or a simplex embedding) can be checked via a
linear program; see Section B.
Supplemental Material B: Derivation of the linear
program
In this section we will show that, for any accessible GPT
fragment, simplicial cone embeddability can be tested with
a linear program. Note that the linear program discussed in
the main text is simply the special case where the accessible
GPT fragment lives inside quantum theory, that is, when
SΩA⊆Herm[H] and SEA⊆Herm[H] for some H.
Let
hi
be representative covectors for the extreme rays of
the logical effect cone
Cone
[Ω
A
]
∗
, and let
n
be the number
of these extreme rays. By definition, each of these
hi
constitutes an inequality which defines a facet of the state
cone
Cone
[Ω
A
]; conversely, every such facet is represented
by some hi. Then, one can define a map
Rn
HΩA
SΩA
:=
n
X
i=1 hi
SΩA
Rn
i
(B1)
which takes any given state to the vector of
n
values which
it obtains on these
n
facet inequalities. It follows that every
11
B DERIVATION OF THE LINEAR PROGRAM
vector
v
is in the state cone if and only if it is mapped by
HΩAto a vector of positive values, i.e.,
Rn
HΩA
v
SΩA
≥e0⇐⇒ v
SΩA∈Cone[ΩA].(B2)
Furthermore, any valid inequality satisfied by all vectors
in the logical effect cone can be written as a positive linear
sum of facet inequalities. Equivalently, one has that for
any w∈Cone[Ω]∗, there exists ˆw≥e0 such that
w
SΩA=Rn
HΩA
ˆw
SΩA
.(B3)
Similarly, let
gj
be representative vectors for the extreme
rays of
Cone
[
EA
]
∗
. Let the number of such extreme rays be
m, and define
Rm
HEA
SEA
:=
m
X
j=1
gj
SEA
Rm
j
.(B4)
Then one has that
Rm
HEA
w
SEA≥e0⇐⇒
w
SEA∈Cone[EA] (B5)
and that for any
v∈Cone
[
EA
]
∗
, there exists
ˆv≥e
0 such that
v
SEA=
Rm
HEA
ˆv
SEA
.(B6)
Recall that a simplicial-cone embedding is defined in
terms of linear maps
τΩA
and
τEA
. We now prove a useful
lemma relating HΩAwith τΩAand HEAwith τEA.
Lemma 5.
In any simplicial-cone embedding defined by
linear maps
τΩA
and
τEA
, the map
τΩA
factors through
HΩAas
τΩA
RΛ
SΩA
=
HΩA
SΩA
α
RΛ
Rn(B7)
and τEAfactors through HEAas
τEA
RΛ
SEA
=
HEA
SEA
β
RΛ
Rm,(B8)
where
α
:
Rn→RΛ
and
β
:
RΛ→Rm
are matrices with
nonnegative entries.
Proof.
Since
τΩA
maps vectors in the state cone to points
in the simplicial cone, it follows that for all
λ∈
Λ, one has
τΩA
λ
SΩA
RΛ
∈Cone[ΩA]∗.(B9)
To see that this is the indeed the case, note that Eq.
(B9)
asserts that the process on its LHS is in the dual cone—i.e.,
it evaluates to a non-negative number on arbitrary vectors
in the state cone. This is indeed the case, because if one
composes an arbitrary vector in the state cone with
τΩA
,
one gets a vector in the simplicial cone by assumption; then,
the effect
λ
simply picks out the (necessarily non-negative)
relevant coefficient corresponding to the λbasis element.
Hence, Eq.
(B3)
implies that there exists a non-negative
covector vλsuch that
τΩA
λ
SΩA
RΛ
=HΩA
vλ
SΩA
Rn
.(B10)
Now, one simply inserts a resolution of the identity on the
system coming out of
τΩA
and uses the above result to
obtain the desired factorisation:
τΩA
SΩA
RΛ
=τΩA
λ
SΩA
RΛ
λ
RΛ
X
λ∈Λ
=
λ
RΛ
X
λ∈Λ
HΩA
vλ
SΩA
Rn
=:
RΛ
HΩA
α
SΩA
Rn
.
(B11)
The proof for the factorisation of
τEA
is almost identical,
except that one inserts a resolution of the identity for the
ingoing system rather than the outgoing system.
With this in place, our main theorem is simple to prove.
Linear Program 1in the main text is a special case of this
where the underlying GPT is taken to be quantum.
Theorem 6.
Consider any accessible GPT fragment
A:={ΩA,EA,B,u}
with state cone characterized by a
matrix
HΩA
(whose codomain is dimension
n
) and effect
cone characterized by matrix
HEA
(whose domain is
dimension
m
). Then the accessible GPT fragment
A
is
classically explainable if and only if
∃
Rn
σ
Rm
≥e0such that (B12)
12
B DERIVATION OF THE LINEAR PROGRAM
SEA
B
SΩA
=
HEA
Rn
SEA
HΩA
σ
SΩA
Rm
.(B13)
Proof.
A simplicial-cone embedding is given by a
τEA
and
τΩAsatisfying
SEA
B
SΩA
=
τEA
RΛ
SEA
τΩA
SΩA
.(B14)
If these exist, one can apply Lemma 5to write
SEA
B
SΩA
=
τEA
RΛ
SEA
τΩA
SΩA
=
Rn
HΩA
α
SΩA
HEA
SEA
β
Rm
RΛ=:
HEA
Rn
SEA
HΩA
σ
SΩA
Rm
.
(B15)
Hence, we arrive at a decomposition of the form of
Eq.
(B13)
, where furthermore
σ≥e
0, since
α
and
β
are
both entry-wise positive.
Conversely, if there is a decomposition of the form given
by Eq. (B13), then we can define τEAand τΩAas
SEA
B
SΩA
=
HEA
Rn
SEA
HΩA
σ
SΩA
Rm
=:
τEA
RΛ
SEA
τΩA
SΩA
(B16)
to yield a valid simplicial-cone embedding. In particular,
(i)
τEA
and
τΩA
are clearly linear; (ii)
τΩA
maps states into
the simplicial cone, since
HΩA
satisfies Eq.
(B2)
; and (iii)
τEA
maps effects into the dual of the simplicial cone, since
HEAsatisfies Eq. (B5) and σ≥e0.
The condition expressed in the statement of Theorem 6
provides us with our linear program for testing for
classical-explainability of an accessible GPT fragment, or
equivalently, classical-explainability of a GPT fragment
from which it came. The core of the linear program is
finding a suitable matrix
σ≥e
0. From a solution
σ
, one
can construct a simplicial-cone embedding via Eq.
(B16)
.
From this, one can construct a simplex embedding, which
we do in the next section. In the section after that, we
explicitly construct the ontological model for the GPT
which is equivalent to the simplex-embedding.
1. From simplicial-cone embeddings to simplex
embeddings
In Ref. [
2
], we showed that if a simplicial-cone embedding
exists then so too does a simplex embedding. Recall that
the latter is just a simplicial-cone embedding satisfying an
additional constraint on τEA, namely, that:
τEA
RΛ
SEA
=
RΛ
.(B17)
We will now show how, given any simplicial-cone embedding
given by
τ0
ΩA
and
τ0
EA
and ontic state space Λ
0
, we can
construct a simplex embedding. This construction is
useful because, by the results of Ref. [
2
], it is equivalent to
constructing an ontological model for the GPT fragment.
The construction essentially removes superfluous ontic
states and then rescales the maps
τ0
ΩA
and
τ0
EA
(in a manner
that can depend on the ontic state) to ensure that the
representation of the ignoring operation is given by the
all-ones vector, as Eq.
(B17)
states. In what follows, we
explain how this works.
First, let us define Λ :=
Supp
[
˜u
]
⊆
Λ
0
—this will be the
ontic state space for the simplex embedding—where
˜u
is
defined as
˜u
RΛ0:= κ0
RΛ0
SM
.(B18)
We can define a projection and inclusion map into this
subspace, which we denote as:
RΛ0
RΛ
and
RΛ0
RΛ
,(B19)
respectively. Within this subspace, we can define an inverse
of
˜u
, which we denote by
˜u−1
, as the covector that satisfies:
˜u
RΛ0˜u−1
RΛ
RΛ
RΛ=
RΛ
.(B20)
With these, we define the map
τEA
(which describes the
13
1 From simplicial-cone embeddings to simplex embeddings B DERIVATION OF THE LINEAR PROGRAM
embedding of the effects) as
τEA
RΛ
SEA
:=
RΛ
˜u−1
τ0
EA
RΛ0
SEA
RΛRΛ.(B21)
This is just the required removal of ontic states (as dictated
by the inclusion map) rescaling of
τ0
EA
by the appropriate
real values (as dictated by
˜u−1
). These values are chosen to
ensure that Eq.
(B17)
is satisfied (as one can easily verify,
as a direct consequence of Eq.
(B20)
) and to ensure that it
maps effects to entrywise-positive covectors.
Then, we can define the map
τΩA
(that describes the
simplex embedding of the states) as:
τΩA
RΛ
SΩA
:=
τ0
ΩA
RΛ0
SΩA
RΛ
˜u
RΛ0
RΛ
RΛ
.(B22)
It is simple to verify that
τΩA
maps states to
entrywise-positive vectors. All that then remains to be
shown is that when
τΩA
and
τEA
are composed that we
reproduce the probability rule B.
To see this, first note that
˜u−1
τ0
EA
RΛ0
SEA
RΛRΛ
τ0
ΩA
RΛ0
SΩA
RΛ
˜u
RΛ0
RΛ
RΛ
=
τ0
EA
RΛ0
SEA
τ0
ΩA
RΛ0
SΩA
RΛ
˜u
RΛ0
RΛ
˜u−1
RΛ
RΛ
(B23)
=
τ0
EA
RΛ0
SEA
τ0
ΩA
RΛ0
SΩA
RΛ
RΛ
RΛ
=
τ0
EA
RΛ0
SEA
τ0
ΩA
RΛ0
SΩA
RΛ.(B24)
Notice that the right-hand-side of Eq.
(B24)
would be
precisely equal to
B
if it were not for the projection and
inclusion maps in between
τΩA
and
τEA
. Hence, as a final
step we need to show that these maps are redundant in this
expression.
To see this, first recall that for all
e∈EA
, there exists
e⊥∈
EA
such that
e
+
e⊥
=
SEA
. Since
e
and
e⊥
are both mapped
to entrywise nonnegative covectors by
τ0
EA
, and because the
sum of these covectors must be the vector
˜u
, it follows that
τ0
EA
e
RΛ0
SEA
∈Supp[˜u]=Λ ∀e∈ EA.(B25)
Hence,
τ0
EA
e
RΛ0
SEA
=
τ0
EA
e
RΛ0
SEA
RΛ0
RΛ
(B26)
for all e∈EA. As EAspans SEAwe therefore have that:
τ0
EA
RΛ0
SEA
=
τ0
EA
RΛ0
SEA
RΛ0
RΛ
.(B27)
Putting this all together, we therefore have that
τEA
RΛ
SEA
τΩA
SΩA
=
τ0
EA
RΛ0
SEA
τ0
ΩA
SΩA
=
SEA
B
SΩA
(B28)
which completes the result.
14
C AN OPERATIONAL MEASURE OF NONCLASSICALITY
2. From simplex embeddings to ontological models
We have therefore seen how to transform a solution (
σ
)
to the linear program into a simplicial-cone embedding, and
from that to a simplex embedding. An explicit ontological
model can be stated directly in terms of this embedding.
Specifically, one defines the epistemic states and response
functions in the ontological model as
µs(λ):= τΩA
s
λ
RΛ
SΩA
and ξe(λ):= τEA
e
λ
RΛ
SEA
(B29)
for all
λ∈
Λ,
s∈
Ω
A
,
e∈EA
. That this is a valid ontological
model follows from the results of Refs. [1,2].
Supplemental Material C: An operational measure of
nonclassicality
Thus far, we have only discussed the qualitative question
of whether or not a classical explanation exists for a
given scenario. A natural next question is to introduce
quantitative measures of the degree of nonclassicality in
one’s scenario. A particularly useful approach to doing this
would be to introduce a resource theory [
50
] of generalized
noncontextuality and finding monotones [
51
] therein.
However, such an approach has not yet been developed.
Therefore, here we take an approach motivated by the fact
that every experiment admits of a classical explanation
when subject to sufficient depolarizing noise [
10
,
11
].
Hence, our approach is to quantify the robustness of one’s
nonclassicality—that is, the amount of noise which must
be applied to one’s data until it admits of a classical
explanation. This is by no means a uniquely privileged
measure, but it is operationally well-motivated.
There are many reasonable noise models, and which of
these is most suitable depends on one’s physical scenario. In
this section, we show how one can adapt our linear program
to quantify robustness of nonclassicality with respect to
any noise model which treats noise as the probabilistic
application of a channel to all states in the experiment.
That is, we consider arbitrary noise models of the form
S
S
Nr:=r
S
S
N+(1−r)
S
S
,(C1)
where
N
is an arbitrary channel (representing the noise).
Note that Eq.
(C1)
describes the noise as a channel in
the full underlying GPT space
S
. One could alternatively
describe noise as a channel acting on the spaces in which
accessible GPT fragment lives (namely, a channel from
SΩA
to
SEA
); this is simply a further freedom in one’s choice
of noise model, and the techniques of this section apply to
either approach.
Each different noise model leads to a distinct measure of
robustness of nonclassicality. Perhaps the most common
quantum noise models are those of this form and where
N
is chosen to be either the completely depolarizing channel
or the completely dephasing channel in a particular basis.
For concreteness, in the quantum case, our open-source
code is implemented assuming depolarizing noise, as we
detail below. For arbitrary GPTs, however, there is not
necessarily a unique, well-defined maximally mixed state,
and so the completely dep olarising channelis not necessarily
well-defined. In the GPT case, our open-source code
therefore asks the user to specify a state to act as the
maximally mixed state, which is then used to construct a
completely depolarising channel, and the robustness to this
noise channel is then computed and output by the program.
Suppose the linear program discussed in Theorem 6
determines that a particular accessible GPT fragment
does not admit of a simplex embedding. The natural
next question tackled in this section is then rephrased
as how much noise must one’s experiment be subject to
until it becomes simplex-embeddable. That is, what is the
minimum value of
r
for which one’s experiment becomes
classically-explainable?
To address this question, we first translate Eq.
(C1)
into
its description at the level of the accessible GPT fragment,
simply by applying the appropriate inclusion maps (and
applying linearity of the inclusion map on the RHS):
IEA
SEA
IΩA
SΩA
Nr:=r
IEA
SEA
IΩA
SΩA
N+(1−r)
IEA
SEA
S
IΩA
SΩA
.(C2)
Then, we define
SEA
BNr
SΩA
:=
IEA
SEA
IΩA
SΩA
Nrand
SEA
BN
SΩA
:=
IEA
SEA
IΩA
SΩA
N,(C3)
to write
SEA
BNr
SΩA
=r
SEA
BN
SΩA
+(1−r)
SEA
B
SΩA
.(C4)
Hence, we see that the effect of the noise is simply to modify
the linear map which captures the probability rule.
Clearly then, for a particular value of
r
, we can ask
whether the new accessible GPT fragment, defined by
replacing the old probability rule
B
with this new one
BNr
, is simplex embeddable, simply by running the linear
program. However, what is more interesting is to allow
for
r
to be an additional variable, and to ask: what is the
15
D BOUNDING THE NUMBER OF ONTIC STATES
minimal value of
r
such that the associated accessible GPT
fragment is simplex embeddable?
This is formulated as the following optimization problem:
inf
r
r
SEA
BN
SΩA
+(1−r)
SEA
B
SΩA
=
HEA
Rn
SEA
HΩA
σ
SΩA
Rm
Rn
σ
Rm
≥e0
r∈[0,1]
,(C5)
which is also a linear program, since the only unknown
quantities are the elements of σand r.
This linear program tells us the minimal amount of the
noise channel
N
which needs to be added to the experiment
in order that it admit of a classical explanation. Similarly to
before, the particular
σ
that is found for the minimal value
of
r
, can then be used to construct an explicit
τΩA
and
τEA
which define the simplex embedding of the accessible GPT
fragment that results after this amount of noise is applied.
Supplemental Material D: Bounding the number of
ontic states
Let us assume that an accessible GPT fragment
G
satisfies
Theorem 6, and hence we have a decomposition of the linear
map Bas
SEA
B
SΩA
=
HEA
Rn
SEA
HΩA
σ
SΩA
Rm
=
n,m
X
i,j=1
σij
hi
SΩA
gj
SEA
,(D1)
where σij ≥0.
It follows that
B
belongs to a particular convex cone
C ⊂ L
(
SΩA,SEA
) living inside the real vector space of linear
maps from
SΩA
to
SEA
; namely, the convex cone
C
given
by the conic closure of a particular set of linear maps:
hi
SΩA
gj
SEA
n,m
i,j=1
.(D2)
In other words, Bbelongs to the cone
C:=
SEA
L
SΩA
SEA
L
SΩA
=
n,m
X
i,j=1
γij
hi
SΩA
gj
SEA
, γij ≥0
,
(D3)
which is clear from Eq.<