# Resource-Theoretic Hierarchy of Contextuality for
General Probabilistic Theories

Lorenzo Catani<EMAIL_ADDRESS>International Iberian Nanotechnology
Laboratory, Av. Mestre José Veiga s/n, 4715-330 Braga, Portugal  Thomas D.
Galley<EMAIL_ADDRESS>Institute for Quantum Optics and Quantum
Information, Austrian Academy of Sciences, Boltzmanngasse 3, A-1090 Vienna,
Austria  Vienna Center for Quantum Science and Technology (VCQ), Faculty of
Physics, University of Vienna, Vienna, Austria  Tomáš Gonda
<EMAIL_ADDRESS>Institute for Theoretical Physics, University of
Innsbruck, Austria

###### Abstract

In this work we present a hierarchy of generalized contextuality. It refines
the traditional binary distinction between contextual and noncontextual
theories, and facilitates their comparison based on how contextual they are.
Our approach focuses on the contextuality of prepare-and-measure scenarios,
described by general probabilistic theories (GPTs). To motivate the hierarchy,
we define it as the resource ordering of a novel resource theory of GPT-
contextuality. The building blocks of its free operations are classical
systems and GPT-embeddings. The latter are simulations of one GPT by another,
which preserve the operational equivalences and thus cannot generate
contextuality. Noncontextual theories can be recovered as least elements in
the hierarchy. We then define a new contextuality monotone, called classical
excess, given by the minimal error of embedding a GPT within an infinite
classical system. In addition, we show that the optimal success probability in
the parity oblivious multiplexing game also defines a monotone in our resource
theory. We end with a discussion of a potential interpretation of the non-free
operations of the resource theory of GPT-contextuality as expressing a kind of
information erasure.

##  1 Introduction

#### Generalized (non)contextuality.

A crucial research question in the foundations of quantum theory is to
identify those features of quantum theory that constitute a true departure
from the classical worldview. Addressing this question requires one to first
establish a good notion of classicality, which adequately captures the
classical worldview. We believe that a good notion of classicality should
satisfy the following desiderata (see also [1]): (1) it endorses a principle
that defines a clear boundary between aspects that pose interpretational
issues and those that do not, (2) it is of broad range of applicability, (3)
it is empirically testable, and (4) its violation constitutes a resource for
practical applications, in particular in quantum information
processing.111This last desideratum is motivated by the belief that
identifying the true nonclassicality of quantum theory will ultimately provide
the answer to the question about the origin of the alleged quantum
computational speed-up. Motivated by these desiderata, a leading notion of
classicality is _generalized noncontextuality_ [2].222In what follows we will
often omit “generalized” and just talk of “(non)contextuality”. A
noncontextual theory is one that is compatible with a classical realist
explanation of its operational predictions — it admits of a _noncontextual
ontological model_. In such a model, any two experimental procedures that the
theory predicts to be operationally indistinguishable also have the same
ontological representation (see Section 2 for a precise definition ).

Noncontextuality satisfies (1), in that it is an instance of a methodological
principle inspired by Leibniz’s principle of the identity of indiscernibles
[3] (also formulated as a no fine-tuning principle [4]). A violation of such
principle would indeed entail an interpretational problem, as it would
attribute a conspiratorial connotation to the realist explanation of the
theory: why should experimental procedures predicted by the theory to be
indistinguishable in principle be represented by different distributions in
the ontological model? Noncontextuality also satisfies (2), as it applies to a
wide range of scenarios including prepare-and-measure experiments of a single
system, unlike Bell’s local causality — another leading notion of
classicality. Moreover, in situations where these are applicable, it coincides
with notions of classicality such as non-negativity of quasi-probability
representations [5, 6] and Bell’s local causality [7]. It satisfies (3), as
witnessed by the experiments performed to test quantum violations of
generalized noncontextuality [8, 9]. Finally, desideratum (4) has been argued
by the numerous works showing that contextuality is a resource for information
processing tasks [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21].

#### Hierarchy of contextuality.

In relation to the last point, contextuality can be used to witness and
characterize the advantage of using _quantum_ physical systems in practical
applications. In such contexts, it is important to know not just whether a
theory is contextual, but also to quantify how contextual it is. Our article
aims to address this by introducing a _hierarchy of contextuality_ , in which
not all contextual phenomena are equivalent. In particular, it allows us to
make more fine-grained distinctions and to quantify the amount of
contextuality present in a theory.

To motivate the hierarchy we propose, we take inspiration from the framework
of resource theories [22, 23, 24]. There, a resource object $r$ (such as a
quantum state) is deemed more valuable than a resource object $s$, denoted
$s\preceq r$, if there is a _free operation_ that transforms $r$ to $s$. The
preorder relation333A preorder is a relation that is both reflexive and
transitive. It is a partial order if it is also anti-symmetric. If, in
addition, any two elements are related, then it is a total order.  $\preceq$
is called the _resource ordering_. A paradigmatic example is that of
entanglement ordering of bipartite quantum states, where the free channels
consist of local operations and classical communication [25]. In this sense, a
resource theory (and its associated resource ordering) is defined by a choice
of resource objects and of free operations [26]. For instance, if the resource
objects studied are quantum states, then the set of free operations is
typically a subset of quantum channels closed under composition.

In our case, resource objects are instead physical theories, since
(non)contextuality is a property of theories rather than states. However, as
contextuality can be witnessed by individual systems within the theory, we
restrict our investigation to individual systems. That is, we identify each
resource object as a system in a general probabilistic theory (GPT) [27, 28,
29, 30], such as classical probability theory, quantum theory, or a subtheory
thereof like the stabilizer subtheory [31]. The GPT system specifies all
possible probabilistic behaviours of this physical system and thus
characterizes its information-theoretic properties.

Since our resources are not states of a physical system, but rather physical
theories, this implies that the transformations that we consider cannot be
standard physical operations, as is the case for traditional resource theories
of quantum states. Our operations of interest are _simulations_ , which are
transformations between theories that faithfully encode the information of one
theory within another. Simulations that preserve indistinguishability have
been introduced in [32] as _univalent_ simulations. Since noncontextuality of
an ontological model means that the model corresponds to a univalent
simulation, one can show [32] that a GPT system is noncontextual if and only
if it can be simulated in a univalent way by a classical GPT system — one,
whose states form a simplex of probability distributions on a finite sample
space. Classical GPT systems thus cannot generate contextuality under
univalent simulations. Therefore, we propose the following hierarchy of
(generalized) contextuality:

> A GPT system $\mathsf{B}$ is said to be at least as contextual as a GPT
> system $\mathsf{A}$ is if there exists a univalent simulation of
> $\mathsf{A}$ by a composite of $\mathsf{B}$ and a classical GPT system.

It is the resource ordering of a resource theory with objects given by GPT
systems and free operations given by univalent simulations with free access to
classical systems. In Section 5.1, we discuss a possible interpretation of
(non-univalent) simulations as expressing a particular kind of information
erasure.

#### Contextuality monotones.

As is common in resource theories, the hierarchy of contextuality is not a
total order — there are GPT systems such that neither is at least as
contextual as the other one. It is not even a partial order, because there
exist distinct GPT systems which are equivalent. For example, this is the case
for all noncontextual systems, such as the classical bit and the classical
trit. Therefore, the hierarchy is given by a preorder and it cannot be fully
represented by a single numerical value — the “amount of contextuality” —
assigned to each GPT system. However, in order to capture certain aspects of
the hierarchy it is useful to define quantities which are order-preserving
assignments of a number to each resource object. These are called resource
monotones.

We define a new contextuality monotone that we call _classical excess_. It
expresses the minimal error of a univalent simulation of a given GPT system by
any classical system. In addition, we show that the optimal success
probability for the parity-oblivious-multiplexing (POM) protocol [6] with free
classical systems is a monotone.

#### Previous works on the matter.

Resource-theoretic perspective on contextuality has been developed in several
works in the past. Most of these focus on the Kochen–Specker notion of
contextuality [33]. Despite being related to the generalized notion of
contextuality (Kochen–Specker noncontextuality is the conjunction of
measurement noncontextuality and outcome determinism for sharp measurements),
Kochen–Specker contextuality favors certain frameworks that, instead, are not
appropriate for developing a resource theory of generalized noncontextuality.
The work of Abramsky, Barbosa, and Mansfield [34] uses a framework whose main
objects are empirical models — tables of data, specifying probability
distributions over the joint outcomes of sets of compatible measurements. This
framework is further developed in [35] and [36] and is based on the sheaf
theoretic approach to contextuality introduced in [37]. Existing
quantifications of Kochen–Specker contextuality are based on the memory cost
[38], the ratio of contextual assignments [39], the relative entropy and
contextual cost [40], the contextual robustness [41], the contextual fraction
[34], and the rank of contextuality [42]. In [43] a review of several of the
previous approaches towards a resource theory of Kochen–Specker contextuality
is presented.

The first work on a resource theory of generalized contextuality in prepare-
and-measure scenarios was presented by Duarte and Amaral in [44]. They use the
generalized-noncontextual polytope characterizing the contextual set of
prepared-and-measured statistics defined in [45] to motivate the set of free
operations and then define monotones based on known resource quantifiers for
contextuality and nonlocality. As an application of such a resource theory,
[46] uses it to simplify and robustify proofs of contextuality.

#### On the use of general probabilistic theories.

Unlike Duarte and Amaral, we use the framework of GPTs. A GPT system consists
of a collection of states, effects and a probability assigned to each pair of
a state and an effect. The so-called _simplex embeddability condition_ [47]
states that a GPT system is noncontextual if and only if the associated GPT
system can be embedded within a classical GPT system. This makes the GPT
framework a suitable one to study generalized contextuality. The simplex
embeddability condition thus characterizes the qualitative divide between
contextual and noncontextual GPT systems. Our hierarchy of contextuality can
be seen as a refinement thereof. It makes distinctions between contextual
systems based on how (and how much) they violate simplex embeddability. In
practice, this is achieved employing the notion of simulations of GPT systems
from other GPT systems, as defined in [32]. We dedicate Section 5.2 to the
discussion of the relation with other works that study contextuality in GPTs,
namely [32, 44, 47, 48, 49, 50, 51, 52].

#### Structure of the paper.

In Section 2, we recall the standard treatment of generalized noncontextuality
in the framework of operational theories and ontological models. This is
connected to the language of general probabilistic theories in Section 3.
There, we also describe (univalent) simulations of GPT systems and the excess
measure. The hierarchy of contextuality is introduced in Section 4, where we
prove that the classical excess is a resource monotone (Theorem 26) and
construct a monotone from the parity-oblivious-multiplexing protocol. In
Section 5, we discuss a possible interpretation of the non-free operations as
involving information erasure and the relation to previous works on
contextuality and GPTs. We conclude with a summary of the results and an
outline of possible future research directions in Section 6.

##  2 Operational theories, ontological models and contextuality

In this work we consider prepare-and-measure scenarios associated with a
single system. An operational theory associated with a prepare-and-measure
scenario is defined by a list of possible preparations, measurements and the
probabilities $\mathcal{P}(k|P,M)$ of obtaining the outcome $k$ of the
measurement $M$ given that the system is prepared in the preparation $P$. An
ontological model of an operational theory provides a realist explanation of
the operational predictions of the theory [53]. It does so by stipulating the
existence of an ontic state space for each given system, denoted with
$\Lambda$, which is mathematically represented by a (standard Borel)
measurable set. Each point $\lambda\in\Lambda$ represents an ontic state that
describes all the physical properties of the system. The ontological model
associates each preparation $P$ in the operational theory with a conditional
probability distribution $\mu_{P}(\lambda)\equiv\mu(\lambda|P)$ over ontic
states. We call these epistemic states as they represent states of knowledge
about the underlying ontic states. Each outcome $k$ given a measurement $M$,
denoted by $[k|M]$, is associated with a conditional probability distribution
$\xi(k|\lambda,M)$. The latter corresponds to the probability of obtaining
outcome $k$ given that measurement $M$ is implemented on a system in the ontic
state $\lambda$. An ontological model of an operational theory reproduces the
predictions of the theory via the classical law of total probability,

$\displaystyle\mathcal{P}(k|P,M)$
$\displaystyle=\sum_{\lambda\in\Lambda}\xi(k|\lambda,M)\mu(\lambda|P).$ (1)

An ontological model is preparation noncontextual if operationally equivalent
preparation procedures are represented by identical probability distributions
in the ontological model [2]. More formally, two preparation procedures $P$
and $P^{\prime}$ are operationally equivalent if they provide the same
operational statistics for all possible measurements, i.e., $\forall
M:\mathcal{P}(k|P,M)=\mathcal{P}(k|P^{\prime},M)$. In this case, we write
$P\simeq P^{\prime}$. An ontological model is preparation noncontextual if any
two such preparations are represented by the same epistemic states:

$P\simeq P^{\prime}\implies\mu_{P}=\mu_{P^{\prime}}.$ (2)

Similarly, two measurement outcomes $[k|M]$ and $[k^{\prime}|M^{\prime}]$ are
operationally equivalent if they give the same statistics for all possible
preparations: $\mathcal{P}(k|M,P)=\mathcal{P}(k^{\prime}|M^{\prime},P)$ for
all preparations $P$. In this case, we write
$[k|M]\simeq[k^{\prime}|M^{\prime}]$. An ontological model is measurement
noncontextual if any two such measurement outcomes are represented by the same
response functions:

$[k|M]\simeq[k^{\prime}|M^{\prime}]\implies\xi_{[k|M]}=\xi_{[k^{\prime}|M^{\prime}]}.$
(3)

An operational theory is termed preparation noncontextual (resp. _measurement
noncontextual_) if there exists a preparation noncontextual (resp. measurement
noncontextual) ontological model for the theory, while it is termed
preparation contextual (resp. _measurement contextual_) if it does not admit
of a preparation noncontextual (resp. measurement noncontextual) ontological
model. It was first proven in [2] that quantum theory is preparation
contextual and measurement noncontextual when outcome determinism is not
assumed.

We note that the notion of generalised contextuality extends to
transformations also [2]. In the present work we will be concerned only with
prepare-and-measure scenarios and as such we will ignore transformation
contextuality.

##  3 Contextuality for general probabilistic theories

One can often prove contextuality of a theory by studying statistical
behaviours of an individual system $\mathsf{A}$ (such as a qubit) in prepare-
and-measure scenarios. The information that suffices to describe the possible
behaviours constitutes of

  * •

a set $\Omega$ of possible states that $\mathsf{A}$ can be prepared in,
according to the theory in question,

  * •

a set of possible measurements that can be applied to $\mathsf{A}$, each
consisting of a collection of effects associated with the measurement
outcomes, and

  * •

for every state $\omega\in\Omega$ and every effect $e$ the probability of
obtaining $e$ when measurement $M$ is applied to system $\mathsf{A}$ prepared
in state $\omega$.

This information is commonly expressed as a system in a general probabilistic
theory — a GPT system.

In the following we omit any mention of dynamics that the system may undergo.
This simplification has no consequence on our discussion of preparation and
measurement contextuality.

###  3.1 GPT systems

Let us now discuss the mathematical description of GPT systems [54, 55, 56,
57] and the definition of contextuality in this context.

######  Definition 1.

A GPT system $\mathsf{A}$ is specified by two non-empty convex sets

$\Omega_{\mathsf{A}}\subseteq V_{\mathsf{A}},\qquad E_{\mathsf{A}}\subseteq
V_{\mathsf{A}}^{*},$ (4)

where $V_{\mathsf{A}}$ is a normed vector space and $V_{\mathsf{A}}^{*}$ is
the topological dual of $V_{\mathsf{A}}$. The spaces $\Omega_{\mathsf{A}}$ and
$E_{\mathsf{A}}$ are called the state space and effect space, respectively,
while their elements are states and effects of $\mathsf{A}$. We require that
$E_{\mathsf{A}}$ contains the null effect $0\in E_{\mathsf{A}}$ and the unit
effect $1\in E_{\mathsf{A}}$, which are the 0 and 1 constant functionals,
respectively, in $V_{\mathsf{A}}^{*}$.

For every state $\omega$ and every effect $e$, the function
$\mathord{\rule[-0.50003pt]{6.00006pt}{0.50003pt}}\cdot\mathord{\rule[-0.50003pt]{6.00006pt}{0.50003pt}}:V_{\mathsf{A}}^{*}\times
V_{\mathsf{A}}\to\mathbb{R}$ denotes the canonical pairing
$e\cdot\omega\coloneqq e(\omega)$. In order for this pairing to have a
probabilistic interpretation (see Equation 20), we also require that

$e\cdot\omega\in[0,1],$ (5)

for all effects $e$ and all states $\omega$. Finally, to avoid complications
arising from degenerate systems, we require that

$V_{\mathsf{A}}=\mathrm{span}(\Omega_{\mathsf{A}})\qquad\text{and}\qquad
V_{\mathsf{A}}^{*}=\mathrm{span}(E_{\mathsf{A}})$ (6)

hold, so that states can be distinguished by effects:

$e\cdot\omega=e\cdot\omega^{\prime}\quad\forall\,e\in
E_{A}\qquad\implies\qquad\omega=\omega^{\prime},$ (7)

and similarly that effects can be distinguished by states.

The set of all GPT systems is denoted by $\mathfrak{G}$ and the subset of
finite-dimensional ones by $\mathfrak{G}_{\mathrm{fin}}$.

A GPT system encodes all the information about the statistical behaviour of a
physical system in prepare-and-measure scenarios. Let us give a few examples
of GPT systems.

######  Example 2 (Finite-dimensional quantum system as a GPT system).

To each Hilbert space $\mathbb{C}^{n}$ with $n\in\mathbb{N}$, one can
associate a quantum GPT system $\mathsf{Q}_{n}$. The real vector space
$V_{\mathsf{Q}_{n}}\simeq\mathbb{R}^{n^{2}}$ is the space of Hermitian
operators on the underlying Hilbert space. The state space is the set of
density operators and the effect space is the set of quantum effects, which
are positive semi-definite operators $e$ that satisfy

$0\leq e\leq 1,$ (8)

where $1$ is the identity operator. The pairing is nothing but the
Hilbert–Schmidt inner product:

$e\cdot\omega=\tr(e^{\dagger}\omega).$ (9)

Likewise, every classical probabilistic system is a GPT system [54, §4].

######  Example 3 (Finite classical GPT systems).

We denote the finite $n$-level classical system (as well as its state space)
by $\Delta_{n}$, with underlying vector space $\mathbb{R}^{n}$ and state space
given by the simplex

$\Delta_{n}\coloneqq\mathrm{Conv}\big{\\{}\delta_{i}\nonscript\;\,\big{|}\allowbreak\nonscript\;\,\mathopen{}i\in\\{1,\ldots,n\\}\big{\\}},$
(10)

where $\\{\delta_{i}\\}_{i}$ is a chosen orthonormal basis of $\mathbb{R}^{n}$
and $\mathrm{Conv}$ denotes the convex hull operation. The effect space
consists of all the linear functionals $\xi$ that satisfy

$\xi\cdot\mu\in[0,1]$ (11)

for every distribution $\mu\in\Delta_{n}$. If we think of $\mu$ as a column
vector, then the possible effects are all the associated row vectors with
entries in the unit interval $[0,1]$. In other words, the effect space is

$\Delta^{*}_{n}\coloneqq\mathrm{Conv}\big{\\{}\uprho_{\alpha}\nonscript\;\,\big{|}\allowbreak\nonscript\;\,\mathopen{}\alpha\in\\{0,1\\}^{n}\big{\\}},$
(12)

where

$\uprho_{\alpha}\coloneqq\sum_{i=1}^{n}\alpha_{i}\delta^{*}_{i}$ (13)

and $\\{\delta^{*}_{i}\\}_{i}$ is the dual basis to the one above.

Besides finite classical systems, we will also need the notion of a countably
infinite one.

######  Example 4 (Countable classical GPT system).

The countable classical system $\Delta_{\mathbb{N}}$ has associated vector
space $\ell^{1}$, the Banach space of sequences whose series are absolutely
convergent. The state space, also denoted by $\Delta_{\mathbb{N}}$, consists
of all probability measures on $\mathbb{N}$. The effect space
$\Delta_{\mathbb{N}}^{*}$ consists of arbitrary sequences in
$[0,1]^{\mathbb{N}}$ and forms a convex subset of $\ell^{\infty}$, the space
of bounded sequences, which is the dual of $\ell^{1}$.

Besides individual systems, we will occasionally also need to refer to
composite ones. In general, the composite of two GPT systems is not unique –
see [58, Section 5] for an in-depth discussion of tensor products of GPT
systems. However, among all the possible choices, there is a ‘minimal
composite’ of two GPT systems $\mathsf{A}$ and $\mathsf{B}$, whose state and
effect space merely contain the separable ones. Any meaningful composite of
two GPT systems necessarily contains their minimal composite as a subsystem.

######  Definition 5.

Given two GPT systems
$\mathsf{A}=(\Omega_{\mathsf{A}},E_{\mathsf{A}},V_{\mathsf{A}})$ and
$\mathsf{B}=(\Omega_{\mathsf{B}},E_{\mathsf{B}},V_{\mathsf{B}})$ we define the
minimal composite system $\mathsf{A}\otimes\mathsf{B}$ to be given by the
separable states and separable effects on $\mathsf{A}$ and $\mathsf{B}$.
Formally
$\mathsf{A}\otimes\mathsf{B}:=(\Omega_{\mathsf{A}\otimes\mathsf{B}},E_{\mathsf{A}\otimes\mathsf{B}},V_{\mathsf{A}\otimes\mathsf{B}})$
where,

$\displaystyle V_{\mathsf{A}\otimes\mathsf{B}}$ $\displaystyle\coloneqq
V_{\mathsf{A}}\otimes V_{\mathsf{B}},$ (14)
$\displaystyle\Omega_{\mathsf{A}\otimes\mathsf{B}}$
$\displaystyle\coloneqq\mathrm{Conv}\big{\\{}\omega_{\mathsf{A}}\otimes\omega_{\mathsf{B}}\nonscript\;\,\big{|}\allowbreak\nonscript\;\,\mathopen{}\omega_{\mathsf{A}}\in\Omega_{\mathsf{A}}\text{
and }\omega_{\mathsf{B}}\in\Omega_{\mathsf{B}}\big{\\}},$ (15) $\displaystyle
E_{\mathsf{A}\otimes\mathsf{B}}$
$\displaystyle\coloneqq\mathrm{Conv}\big{\\{}e_{\mathsf{A}}\otimes
e_{\mathsf{B}}\nonscript\;\,\big{|}\allowbreak\nonscript\;\,\mathopen{}e_{\mathsf{A}}\in
E_{\mathsf{A}}\text{ and }e_{\mathsf{B}}\in E_{\mathsf{B}}\big{\\}},$ (16)

Of particular interest is the tensor product of an arbitrary GPT system and a
classical GPT system, in which case there is a unique choice of a sensible
tensor product corresponding to the minimal composite of GPT systems.

###  3.2 Operational theory associated to a GPT system

As we articulate in Section 2, proofs of (preparation) contextuality involve
_distinct_ preparation procedures, which are nevertheless operationally
_equivalent_. Since any two distinct states of a GPT system are operationally
_inequivalent_ , we cannot identify GPT states with preparation procedures.
Instead, we think of a preparation procedure as an ensemble of GPT states
$\omega_{i}$, each occurring with a specified probability $\lambda_{i}$.

######  Definition 6.

A preparation $P$ of a GPT system is a finite ensemble

$\bigl{(}\lambda_{i},\omega_{i}\bigr{)}_{i},$ (17)

where $(\lambda_{i})_{i}$ is a probability distribution. It has the same
statistical behaviour as the GPT state

$\omega_{P}=\sum_{i}\lambda_{i}\omega_{i},$ (18)

which is called the mean of the preparation. Two preparations,
$P=(\lambda_{i},\omega_{i})_{i}$ and
$P^{\prime}=(\lambda^{\prime}_{i},\omega^{\prime}_{i})_{i}$, are said to be
equivalent, denoted $P\sim P^{\prime}$, if their means are equal as GPT
states. We denote the set of all preparations of a GPT system $\mathsf{A}$ by
$\mathrm{Prep}(\mathsf{A})$.

Similarly, proofs of measurement contextuality require the notion of distinct
measurement outcomes which are operationally equivalent. Let us now give the
definition of measurements and measurement outcomes for GPT systems.

######  Definition 7.

A measurement $M$ of a GPT system $\mathsf{A}$ is a finite collection
$\\{e_{1},\ldots,e_{n}\\}$ of effects that is normalized, i.e. it satisfies

$\sum_{k=1}^{n}e_{k}=1.$ (19)

The set of all finite ensembles of measurements of $\mathsf{A}$ is denoted by
$\mathrm{Meas}(\mathsf{A})$, which has elements $(\lambda_{i},M_{i})_{i}$
where $(\lambda_{i})_{i}$ is a probability distribution.

Given such a measurement, the probability of observing outcome $k$ provided
that system $\mathsf{A}$ is prepared in state $\omega$ is given by

$\mathrm{Pr}(k|M,\omega)=e_{k}\cdot\omega.$ (20)

######  Definition 8.

A measurement outcome $[k|M]$ of a GPT system is a pair of an effect $e_{k}$
and a measurement $M=\\{e_{1},\ldots,e_{n}\\}$ which contains $e_{k}$. To
stress that the effect $e_{k}$ is thought of as part of the measurement $M$,
we denote it by $e_{k|M}$. Two measurement outcomes $[k|M]$ and
$[k^{\prime}|M^{\prime}]$ are equivalent, denoted
$[k|M]\sim[k^{\prime}|M^{\prime}]$, whenever they are equal as GPT effects:

$\displaystyle e_{k|M}=e_{k^{\prime}|M^{\prime}}.$ (21)

The set of all ensembles of measurement outcomes of a GPT system $\mathsf{A}$
has elements $(\lambda_{i},e_{i})_{i}$, with $(\lambda)_{i}$ a probability
distribution, and is denoted by $\mathrm{Out}(\mathsf{A})$.444An ensemble of
outcomes
$\bigl{\\{}\bigl{(}\lambda,[k|M]\bigr{)},\bigl{(}1-\lambda,[k^{\prime}|M^{\prime}]\bigr{)}\bigr{\\}}$
is constructed by considering the ensemble of measurements
$\\{(\lambda,M),(1-\lambda,M^{\prime})\\}$ and identifying the outcomes
$[k|M]$ and $[k^{\prime}|M^{\prime}]$. The effect corresponding to this new
outcome is $\lambda e_{k|M}+(1-\lambda)e_{k^{\prime}|M^{\prime}}$. The
operational equivalences of the set can be defined in analogy to Definition 6.

######  Remark 9 (GPT system defined by an operational theory).

State and effect spaces defining a GPT system can be constructed from an
operational theory specified by a collection of preparation and measurement
procedures [59], which are list of instructions to be carried out in the lab,
as well as a set of all possible conditional probabilities of a measurement
outcome given a preparation. In this approach, states are defined to be
equivalence classes of preparation procedures, where two preparation
procedures are equivalent if they cannot be distinguished using any available
measurement procedure. Similarly effects are defined as equivalence classes of
measurement outcomes. While this construction is more general (for instance it
might include preparation procedures with extraneous information), the only
preparations considered in proofs of preparation contextuality are those that
correspond to preparations as introduced in Definition 6 and similarly for
proofs of measurement contextuality and measurement outcomes as defined in
Definition 8.

One is often particularly interested in preparations supported on the extremal
points of the convex set of states $\Omega$. For classical systems, extremal
states are point distributions. For quantum systems, they are the rank 1
density operators. While in the classical case there are no non-trivial
equivalences among preparations of extremal states, in quantum theory they do
arise.

###  3.3 Simulations of GPT systems

Recall from Section 2 that a physical system is noncontextual if it admits of
a noncontextual ontological model. An ontological model is traditionally
defined for an operational theory, from which the GPT system can be derived,
as we discussed in Remark 9. In this article, we associate a canonical
operational theory to every GPT system, by endowing it with the space
$\mathrm{Prep}(\mathsf{A})$ of preparation procedures,
$\mathrm{Meas}(\mathsf{A})$ of measurement procedures and
$\mathrm{Out}(\mathsf{A})$ of measurement outcomes.

This allows us to define an ontological model for a GPT system.

######  Definition 10.

Given a GPT system
$\mathsf{A}=(\Omega_{\mathsf{A}},E_{\mathsf{A}},V_{\mathsf{A}})$ a discrete
ontological model of $\mathsf{A}$ is given by a finite classical system
$\Delta_{n}$ and maps

$\begin{split}\mu:\mathrm{Prep}(\mathsf{A})&\to\Delta_{n},\\\
\mu:P&\mapsto\mu_{\mathcal{P}},\end{split}\qquad\qquad\begin{split}\chi:\mathrm{Out}(\mathsf{A})&\to\Delta_{n}^{*},\\\
\chi:[k|M]&\mapsto\chi_{k|M_{j}}\end{split}$ (22)

satisfying

$\chi_{k|M}\cdot\mu_{P}=e_{k|M}\cdot\omega_{P}$ (23)

for any preparation $P\in\mathrm{Prep}(\mathsf{A})$ and any measurement
outcome $[k|M]\in\mathrm{Out}(\mathsf{A})$, where $\omega_{P}$ is the mean of
$P$. The ontological model is called preparation noncontextual if for any pair
of equivalent preparations $P$ and $P^{\prime}$, we have

$\mu_{P}=\mu_{P^{\prime}}.$ (24)

Similarly the ontological model is called measurement noncontextual if for any
pair of equaivalent outcomes $[k|M]$ and $[k^{\prime}|M^{\prime}]$ we have

$\chi_{k|M}=\chi_{k^{\prime}|M^{\prime}}.$ (25)

A model which is both measurement and preparation noncontextual is a
noncontextual model.

######  Definition 11.

If $\mathsf{A}$ admits of a discrete noncontextual ontological model, we say
that it is a noncontextual GPT system. We denote the collection of all such
systems by $\mathfrak{G}_{\mathtt{NC}}$. A system for which all ontological
models are contextual is called a contextual system.

A noncontextual ontological model represents the behaviour of the chosen
system by the behaviour of a classical system, while preserving operational
equivalences (Definitions 6 and 8). It is, in fact, a special case of the
following notion of simulation [32].

######  Definition 12.

Given two GPT systems $\mathsf{A}$ and $\mathsf{B}$, an $\epsilon$-simulation
of $\mathsf{A}$ by $\mathsf{B}$ is a pair of

  * •

a multi-valued function $\Gamma:\Omega_{\mathsf{A}}\to\Omega_{\mathsf{B}}$
called state simulation and

  * •

a multi-valued function $\Theta:E_{\mathsf{A}}\to E_{\mathsf{B}}$ called
effect simulation,

which is empirically adequate up to an error $\epsilon\in[0,\infty)$:

$\big{\lvert}e\cdot\omega-f\cdot\gamma\big{\rvert}\leq\epsilon\qquad\forall\,f\in\Theta(e),\;\forall\,\gamma\in\Gamma(\omega),$
(26)

and which preserves convex mixtures:555Analogously, we require that the same
holds for mixtures of effects rather than states, just as in [32].

$\lambda\Gamma(\omega)+(1-\lambda)\Gamma(\omega^{\prime})\subseteq\Gamma\bigl{(}\lambda\omega+(1-\lambda)\omega^{\prime}\bigr{)}\qquad\lambda\in[0,1]\text{
and }\omega,\omega^{\prime}\in\Omega_{\mathsf{A}},$ (27)

and the $0$ effect:

$\displaystyle 0_{\mathsf{B}}\in\Theta(0_{\mathsf{A}}).$ (28)

A $0$-simulation is called an exact simulation.

######  Proposition 13 (Theorem 1 from [32]).

A discrete ontological model of a GPT system $\mathsf{A}$ provides an exact
simulation of $\mathsf{A}$ by a finite classical GPT system (and vice versa).

We note that continuous ontological models of GPT systems correspond to
simulations by infinite dimensional systems. However, for the purposes of this
work and in keeping with the related approaches of [47, 32], we restrict
ourselves to discrete ontological models.

Given a preparation $P=(\lambda_{i},\omega_{i})_{i}$ of the GPT system
$\mathsf{A}$ and a simulation as above, preparations of $\mathsf{B}$
consistent with $P$ are the elements of the following subset of
$\Omega_{\mathsf{B}}$:

$\Gamma(P)\coloneqq\big{\\{}\bigl{(}\lambda_{i},\gamma_{i}\bigr{)}\nonscript\;\,\big{|}\allowbreak\nonscript\;\,\mathopen{}\gamma_{i}\in\Gamma(\omega_{i})\big{\\}}.$
(29)

Given an outcome $[k|M]=(\lambda_{i},e_{i})_{i}$ of the GPT system
$\mathsf{A}$ and a simulation as above, outcomes of $\mathsf{B}$ consistent
with $[k|M]$ are the elements of the following subset of $E_{\mathsf{B}}$:

$\Theta\bigl{(}[k|M]\bigr{)}\coloneqq\big{\\{}\bigl{(}\lambda_{i},f_{i}\bigr{)}\nonscript\;\,\big{|}\allowbreak\nonscript\;\,\mathopen{}f_{i}\in\Theta(e_{i})\big{\\}}.$
(30)

We can use this notion to generalize the noncontextuality property of
ontological models to the case of simulations following [32].

######  Definition 14.

A simulation of GPT systems is termed preparation univalent if for any two
equivalent preparations $P$ and $P^{\prime}$, we have

$Q\sim Q^{\prime}$ (31)

for all $Q\in\Gamma(P)$ and all $Q^{\prime}\in\Gamma(P^{\prime})$.

A simulation of GPT systems is termed measurement univalent if for any two
equivalent measurement outcomes $[k|M]$ and $k^{\prime}|M^{\prime}$, we have

$[q|W]\sim[q^{\prime}|W^{\prime}]$ (32)

for all $[q|W]\in\Theta([k|M])$ and all
$[q^{\prime}|W^{\prime}]\in\Theta([k^{\prime}|M^{\prime}])$.

A simulation which is both preparation and measurement univalent is a
univalent simulation.

######  Example 15 (Simulations of a bit by a trit).

Given a bit $\Delta_{2}$ and a trit $\Delta_{3}$ one can define a univalent
simulation $(\Gamma,\Theta)$ of $\Delta_{2}$ by $\Delta_{3}$ via a direct
embedding. Namely, the state and effect simulations act on the bases of
$\mathbb{R}^{2}$ and its dual (see Example 3) via

$\Gamma\left(\delta_{i}\right)=\left\\{\delta_{i}\right\\},\qquad\Theta\left(\delta_{i}^{*}\right)=\left\\{\delta_{i}^{*}\right\\}$
(33)

and can be extended to all states and effects by linearity. This simulation is
univalent since both $\Gamma$ and $\Theta$ are single-valued, a connection
shown below in Proposition 18.

One can also adapt it to a simulation that is not preparation univalent while
still being measurement univalent. For instance, we can keep the action on
$\delta_{1}$, $\delta_{1}^{*}$ and adjust the simulation of the other
deterministic state and effect to be

$\Gamma\left(\delta_{2}\right)=\big{\\{}\lambda\delta_{2}+(1-\lambda)\delta_{3}\nonscript\;\,\big{|}\allowbreak\nonscript\;\,\mathopen{}\lambda\in[0,1]\big{\\}},\qquad\Theta\left(\delta_{2}^{*}\right)=\left\\{\delta_{2}^{*}+\delta_{3}^{*}\right\\}$
(34)

Once we require that $\Theta$ also preserves the unit effect, we can extend
both to $\Delta_{2}$ and $\Delta_{2}^{*}$ by convex-linearity (and using
Minkowski sum for the state simulation).

######  Example 16 (Holevo-Beltrametti-Bugasjki model [60, 59]).

Given a GPT system
$\mathsf{A}=(\Omega_{\mathsf{A}},E_{\mathsf{A}},V_{\mathsf{A}})$ with
$n\in\mathbb{N}$ extremal states, the Holevo-Beltrametti-Bugasjki model is
given by the following simulation $(\Gamma,\Theta):\mathsf{A}\to\Delta_{n}$
where

$\Gamma\left(\omega_{i}\right)=\left\\{\delta_{i}\right\\},\qquad\Theta\left(e\right)=\left\\{\sum_{i=1}^{n}(e\cdot\omega_{i})\delta_{i}^{*}\right\\}$
(35)

where $\omega_{i}$ is the $i$-th extremal state of $\Omega_{\mathsf{A}}$ and
$e$ is an arbitrary effect in $E_{\mathsf{A}}$. However, it is not a univalent
simulation unless $\Omega_{\mathsf{A}}$ is a simplex. While the effect
simulation is clearly single-valued, to extend the state simulation to all
states of $\Omega_{\mathsf{A}}$ we need to ensure that property (27) holds.
That is, for a given state $\omega$, its simulation $\Gamma(\omega)$ is given
by the set of all convex decompositions of $\omega$ into extremal states (and
applying $\Gamma$ to each extremal state to land within $\Delta_{n}$).

In [32] Müller and Garner define a univalent simulation to be single-valued.
Our opinion is that Definition 14, stipulating preservation of operational
equivalence, is more directly connected to generalized contextuality.
Nevertheless, the two definitions are equivalent by Proposition 18 below. As a
result, univalent $\epsilon$-simulations can be identified with the notion of
$\epsilon$-embeddings [32, Definition 2], for which both the state and effect
simulations are (single-valued) _linear maps_. Indeed, one can show that every
univalent $\epsilon$-simulation extends to an essentially unique
$\epsilon$-embedding and vice versa [32, Lemma 2].

######  Definition 17.

Given a pair of GPT systems $(\mathsf{A},\mathsf{B})$, we say that
$\mathsf{A}$ is embeddable within $\mathsf{B}$, denoted by
$\mathsf{A}\hookrightarrow\mathsf{B}$, if there exists an exact univalent
simulation (equivalently a $0$-embedding) of type $\mathsf{A}\to\mathsf{B}$.
The relation $\hookrightarrow$ is called the embeddability preorder.

Indeed, one can easily show that $\hookrightarrow$ is a preorder relation.
Specifically, the identity maps provide embeddings of type
$\mathsf{A}\hookrightarrow\mathsf{A}$, which proves its reflexivity. To prove
that it is a transitive relation, one can use the triangle inequality (see
Proposition 21).

######  Proposition 18 (Theorem 1 [32]).

A simulation is preparation univalent if and only if its state simulation is
single-valued. Similarly, a simulation is measurement univalent if and only if
its effect simulation is single valued.

###### Proof.

First, assume that $\Gamma$ is single-valued. Then, for every preparation $P$,
the set $\Gamma(P)$ has exactly one element, which is

$\bigl{(}\lambda_{i},\Gamma(\omega_{i})\bigr{)}.$ (36)

The simulation thus preserves preparation means by Equation 27, and is
therefore preparation univalent.

On the other hand, consider any simulation that is not single-valued. That is,
there is a state $\omega\in\Omega_{\mathsf{A}}$ such that there are two
distinct states $\sigma_{1},\sigma_{2}\in\Omega_{\mathsf{B}}$ satisfying

$\\{\sigma_{1},\sigma_{2}\\}\subseteq\Gamma(\omega).$ (37)

Applying the state simulation to the preparation given by the delta
distribution on $\omega$ gives

$\\{\delta_{\sigma_{1}},\delta_{\sigma_{2}}\\}\subseteq\Gamma(\delta_{\omega}).$
(38)

However, the means of the two preparations on the left are distinct — they are
given by $\sigma_{1}$ and $\sigma_{2}$ respectively. Thus, the simulation is
not preparation univalent.

An analogous proof holds for measurement univalence and single-valuedness of
the effect simulation. ∎

###  3.4 Properties of univalent simulations

The following proposition, which stresses how the composition with a classical
system does not affect the univalency of a simulation, is relevant for
motivating our notion of contextuality preorder further on (Definition 23) as
well as for quantifying contextuality.

######  Proposition 19.

Let $n$ and $k$ be arbitrary natural numbers. If there is a univalent
$\epsilon$-simulation
$(\Gamma,\Theta):\mathsf{A}\otimes\Delta_{n}\to\mathsf{B}$, then there is also
a univalent $\epsilon$-simulation $\mathsf{A}\to\mathsf{B}\otimes\Delta_{k}$.

###### Proof.

We show this for $\epsilon=0$, the general case is analogous. In particular,
we define maps
$\Gamma_{1}:\Omega_{\mathsf{A}}\to\Omega_{\mathsf{B}}\otimes\Delta_{k}$ and
$\Theta_{1}:E_{\mathsf{A}}\to E_{\mathsf{B}}\otimes\Delta_{k}^{*}$ via

$\Gamma_{1}(\omega)\coloneqq\Gamma(\omega\otimes\delta_{1})\otimes\delta_{1},\qquad\qquad\Theta_{1}(e)\coloneqq\Theta(e\otimes\delta^{*}_{1})\otimes\delta^{*}_{1}.$
(39)

It follows that this is an exact univalent simulation by the assumption that
$(\Gamma,\Theta)$ is. Specifically, we have

$\Theta(e\otimes\delta^{*}_{j})\cdot\Gamma(\omega\otimes\delta_{i})=(e\cdot\omega)(\delta^{*}_{j}\cdot\delta_{i})=\begin{dcases}e\cdot\omega&\text{if
}i=j\\\ 0&\text{otherwise,}\end{dcases}$ (40)

which implies $\Theta_{1}(e)\cdot\Gamma_{1}(\omega)=e\cdot\omega$. ∎

By determining the smallest error $\epsilon$ for which there is a univalent
$\epsilon$-simulation of type $\mathsf{A}\to\mathsf{B}$, we obtain a
meaningful notion of how far $\mathsf{A}$ is from being embeddable within
$\mathsf{B}$.

######  Definition 20.

The excess is the function
$\varepsilon:\mathfrak{G}\times\mathfrak{G}\to\mathbb{R}$ defined by

$\varepsilon(A,B)\coloneqq\inf\big{\\{}\epsilon\in[0,\infty)\nonscript\;\,\big{|}\allowbreak\nonscript\;\,\mathopen{}\text{there
is a univalent $\epsilon$-simulation $A\to B$}\big{\\}},$ (41)

We call $\varepsilon(A,B)$ the $A$-excess within $B$.

Note that the value of excess is always in the interval $[0,1]$. One can show
that it cannot exceed $1$ by observing that there is always a univalent
$1$-simulation of type $\mathsf{A}\to\Delta_{1}$ and a univalent
$0$-simulation of type $\Delta_{1}\to\mathsf{B}$, and using the following
proposition.

######  Proposition 21.

For any three GPT systems $A$, $B$, and $C$, we have the triangle inequality
for excess

$\varepsilon(A,C)\leq\varepsilon(A,B)+\varepsilon(B,C).$ (42)

###### Proof.

Consider an arbitrary univalent $\epsilon$-simulation $(\Gamma,\Theta):A\to B$
and an arbitrary univalent $\gamma$-simulation $(\alpha,\beta):B\to C$. We
prove the statement by showing that $(\alpha\,\Gamma,\beta\,\Theta)$ is a
univalent simulation of type $A\to C$ with error $\epsilon+\gamma$, a result
stated as Lemma 3 in [32].

To show that the composite simulation is empirically adequate as expressed by
Inequality (26), we can use the triangle inequality. In particular, for all
$e_{\mathsf{A}}\in E_{A}$ and all $\omega_{\mathsf{A}}\in\Omega_{\mathsf{A}}$,
we have

$\displaystyle\big{\lvert}e_{\mathsf{A}}\cdot\omega_{\mathsf{A}}$
$\displaystyle-\beta\,\Theta(e_{\mathsf{A}})\cdot\alpha\,\Gamma(\omega_{\mathsf{A}})\big{\rvert}\leq$
(43)
$\displaystyle\leq\big{\lvert}e_{\mathsf{A}}\cdot\omega_{\mathsf{A}}-\Theta(e_{\mathsf{A}})\cdot\Gamma(\omega_{\mathsf{A}})\big{\rvert}+\big{\lvert}\Theta(e_{\mathsf{A}})\cdot\Gamma(\omega_{\mathsf{A}})-\beta\,\Theta(e_{\mathsf{A}})\cdot\alpha\,\Gamma(\omega_{\mathsf{A}})\big{\rvert}$
$\displaystyle\leq\epsilon+\gamma,$

where the second inequality follows because $\Theta(e_{\mathsf{A}})$ is an
effect of $B$ and $\Gamma(\omega_{\mathsf{A}})$ is a state of $B$, by
assumption. ∎

Note that whenever $\mathsf{B}$ is embeddable within $\mathsf{C}$, we have
$\varepsilon(\mathsf{B},\mathsf{C})=0$ and the triangle inequality reads

$\varepsilon(\mathsf{A},\mathsf{C})\leq\varepsilon(\mathsf{A},\mathsf{B})$
(44)

for any GPT system $\mathsf{A}$. A similar statement follows by setting the
first term on the right-hand side of inequality (42) to zero. These two
statements can be summarized as the following corollary of Proposition 21.

######  Corollary 22.

Let $\mathsf{A}$ and $\mathsf{C}$ be arbitrary GPT systems. With respect to
the embeddability preorder among GPT systems, we have the following order-
preserving functions:

$\displaystyle\varepsilon(\mathsf{A},\mathord{\rule[-0.50003pt]{6.00006pt}{0.50003pt}})$
$\displaystyle:(\mathfrak{G},\hookrightarrow)\to(\mathbb{R},\geq),$ (45)
$\displaystyle\varepsilon(\mathord{\rule[-0.50003pt]{6.00006pt}{0.50003pt}},\mathsf{C})$
$\displaystyle:(\mathfrak{G},\hookrightarrow)\to(\mathbb{R},\leq).$ (46)

In other words, the monotonicity of
$\varepsilon(\mathord{\rule[-0.50003pt]{6.00006pt}{0.50003pt}},\mathsf{C})$
from (46) says that if

$\varepsilon(\mathsf{A},\mathsf{C})>\varepsilon(\mathsf{B},\mathsf{C})$ (47)

holds (i.e. the minimal error of simulation by $C$ is strictly higher for
$\mathsf{A}$ than for $\mathsf{B}$), then there cannot be an exact univalent
simulation of type $\mathsf{A}\to\mathsf{B}$. We can thus use the excess
within $\mathsf{C}$, for any GPT system $\mathsf{C}$, as a witness of the
impossibility to construct an exact univalent simulation.

While simulations are crucial to express a binary division between
noncontextual and contextual GPT systems, the embeddability preorder
$\hookrightarrow$ is not a satisfactory refinement of this binary division.
The simplest argument to see this is that all classical GPT systems (which are
trivially noncontextual) should be equivalent in a resource theory of
contextuality. However, for any integer $m$ greater than $k$, the classical
GPT system $\Delta_{m}$ _is not_ embeddable within $\Delta_{k}$. Therefore, we
cannot think of the embeddability preorder $\hookrightarrow$ as a resource
ordering of some resource theory of contextuality. In the following section,
we motivate a preorder that further refines the embeddability relation
$\hookrightarrow$ and addresses the issue above by stipulating classical GPT
systems to be ‘free resources’.

##  4 Hierarchy of contextuality

Recall that our interest in a hierarchy of contextuality of GPT systems stems
from the wish to measure how useful contextuality is as a resource in
information-theoretic applications. How can one decide whether a given measure
of interest is indeed a well-motivated _measure of contextuality_? The
resource-theoretic perspective [61, 26], fruitfully applied to studies of
entanglement and many other resources in the past, suggests to first motivate
a preorder $\succeq$ among the objects of interest. Importantly, some objects
may be incomparable according to $\succeq$. In our case, the resource objects
are GPT systems and the resource ordering is the advertised hierarchy of
contextuality. The interpretation of such an ordering is that the relation
$\mathsf{A}\succeq\mathsf{B}$ expresses the statement ‘$\mathsf{A}$ is at
least as contextual as $\mathsf{B}$ is’. Given a good motivation for such a
hierarchy, one can answer the above question as follows:

> A (real-valued) function on the set $\mathfrak{G}$ of all GPT systems is a
> measure of contextuality if and only if it is order-preserving with respect
> to the hierarchy of contextuality $\succeq$.

###  4.1 Motivation and the resource theory

Let us now list and discuss our desiderata for a sensible hierarchy of
contextuality among GPT systems. They are:

  1. 1.

Access to classical GPT systems is free. That is, we have

$\mathsf{A}\preceq\mathsf{A}\otimes\Delta_{n}\quad\text{ and
}\quad\mathsf{A}\otimes\Delta_{n}\preceq\mathsf{A}$ (48)

for every GPT system $\mathsf{A}$ and every classical GPT system $\Delta_{n}$.
Here, $\otimes$ denotes the minimal composite from Definition 5.

  2. 2.

Exact univalent simulations are free. That is, if $\mathsf{A}$ is embeddable
within $\mathsf{B}$, then we have $\mathsf{A}\preceq\mathsf{B}$.

Notice that the first condition in Equation 48, i.e.
$\mathsf{A}\preceq\mathsf{A}\otimes\Delta_{n}$, follows from desideratum 2
because every GPT system $\mathsf{A}$ is embeddable within
$\mathsf{A}\otimes\Delta_{n}$ (see Proposition 19).

There are several consequences of desiderata 1 and 2 which we want to point
the reader’s attention to, before we discuss our motivation to introduce these
desiderata.

  1. (i)

Desideratum 2 implies that the trivial GPT system $\Delta_{1}$ is least
contextual in the sense that it is the bottom element of $\preceq$. That is,
we have $\Delta_{1}\preceq\mathsf{A}$ for every GPT system $\mathsf{A}$.

  2. (ii)

Consequently, using the fact that $\Delta_{1}\otimes\Delta_{n}$ is the same
GPT system as $\Delta_{n}$, every classical GPT system is also at the bottom
by Property (1).

  3. (iii)

Using definition 11 and desideratum 2, we thus get that all noncontextual GPT
systems are equivalent to each other and lie at the bottom of the hierarchy.

#### Motivation for Requirement 1.

Contextuality, as we are thinking of it, is a property that expresses the
degree to which a system’s behaviour escapes a purely classical explanation.
In this sense, considering additional classical systems should not affect this
property. An important point to note is that within the tensor product
$\mathsf{A}\otimes\Delta_{n}$ (Definition 5), only correlations involving
separable states between the generic GPT system $\mathsf{A}$ and the classical
system are allowed. We can think of behaviours of
$\mathsf{A}\otimes\Delta_{n}$ as dilations of those of $\mathsf{A}$ [62],
given a classical environment variable $\Delta_{n}$.

If there were classical environmental variables, whose knowledge reduces the
contextuality present in $\mathsf{A}$, then the contextuality of $\mathsf{A}$
would not be an authentic feature of $\mathsf{A}$, rather a consequence of
one’s too narrow focus on $\mathsf{A}$ as opposed to its dilation
$\mathsf{A}\otimes\Delta_{n}$. We can also support this argument on the
technical side. Indeed, by Proposition 19, any noncontextual model of
$\mathsf{A}\otimes\Delta_{n}$ provides also a noncontextual model of
$\mathsf{A}$. In other words, $\mathsf{A}$ is noncontextual if and only if
$\mathsf{A}\otimes\Delta_{n}$ is.666Note that under the minimal tensor product
of Definition 5 allowing access to arbitrary noncontextual systems (and not
just classical systems) would lead to the same hierarchy, which follows from
the fact that access to classical systems already places all noncontextual
systems at the bottom of the hierarchy. The hierarchy of contextuality ought
to capture this fact.

#### Motivation for Requirement 2.

We can also think of contextuality (of a GPT system) as the inability to
provide a noncontextual model (Definition 11) for its statistical behaviours.
If a GPT system $\mathsf{A}$ can be exactly simulated by a GPT system
$\mathsf{B}$ via a univalent simulation, then any obstruction to constructing
such a noncontextual model for $\mathsf{A}$ must already be present in
$\mathsf{B}$. In this sense, we think of $\mathsf{B}$ as being “at least as
contextual” as $\mathsf{A}$ is. Indeed, provided with a noncontextual model of
$\mathsf{B}$, i.e. an exact univalent simulation of $\mathsf{B}$ by a
classical GPT system, one can construct a noncontextual model of $\mathsf{A}$
by composition with the simulation of $\mathsf{A}$ by $\mathsf{B}$.

The preorder relation among finite-dimensional GPT systems in
$\mathfrak{G}_{\mathrm{fin}}$ that satisfies precisely these requirements is
the following one.

######  Definition 23.

We say that $\mathsf{B}$ is at least as contextual as $\mathsf{A}$, denoted
$\mathsf{A}\preceq\mathsf{B}$, whenever there is an exact univalent simulation
of $\mathsf{A}$ by $\mathsf{B}\otimes\Delta_{n}$ for some finite-dimensional
classical GPT system $\Delta_{n}$. The preordered set
$(\mathfrak{G}_{\mathrm{fin}},\succeq)$ is called the hierarchy of
contextuality.

In other words, we define the hierarchy via embeddability given an additional
classical system:

$\mathsf{A}\preceq\mathsf{B}\quad\iff\quad\exists\,n\in\mathbb{N}\text{ such
that }\mathsf{A}\hookrightarrow\mathsf{B}\otimes\Delta_{n}\text{ holds.}$ (49)

To show that the hierarchy $\preceq$ is a preorder relation, we can use a
resource-theoretic perspective, i.e. we can show that the set of free
operations in the following resource theory is closed under composition.

######  Definition 24.

The resource theory of GPT-contextuality is defined as follows. Its objects
are finite-dimensional GPT systems and each transformation is an exact
simulation ${(\Gamma,\Theta):\mathsf{A}\to\mathsf{B}\otimes\Delta_{n}}$ for
some $\mathsf{A},\mathsf{B}\in\mathfrak{G}_{\mathrm{fin}}$. It acts on objects
by transforming $\mathsf{B}$ to $\mathsf{A}$ and is undefined for any GPT
system other than $\mathsf{A}$. Transformations

$(\Gamma,\Theta):\mathsf{A}\to\mathsf{B}\otimes\Delta_{m}\quad\text{and}\quad(\alpha,\beta):\mathsf{B}\to\mathsf{C}\otimes\Delta_{k}$
(50)

can be composed (sequentially) to produce a transformation

$(\Gamma\,\alpha,\Theta\,\beta):\mathsf{A}\to\mathsf{C}\otimes\Delta_{m\cdot
k}$ (51)

by using the isomorphism between $\Delta_{m}\otimes\Delta_{k}$ and
$\Delta_{m\cdot k}$. Free transformations are those ones that are also
_univalent_ simulations.

This gives rise to a concrete resource theory in the sense of [26, Definition
3.10]. Moreover, the resulting resource ordering coincides with our hierarchy
of contextuality. Note that in a resource theory the existence of a free
operation transforming a resource object $r$ to a resource object $s$ defines
the resource ordering denoted by $s\preceq r$. Thus, to match our definition
of the hierarchy of contextuality, the transformation as in (50) has to be
understood as a free operation from $\mathsf{B}$ to $\mathsf{A}$ (and not from
$\mathsf{A}$ to $\mathsf{B}$ as the notation might suggest). This is
consistent with the interpretation of a simulation of $\mathsf{A}$ by
$\mathsf{B}$ whereby an experimenter has access to $\mathsf{B}$ and uses it to
simulate $\mathsf{A}$, hence transforming their access to system $\mathsf{B}$
to their effective access to system $\mathsf{A}$.

###  4.2 Contextuality of composite systems

When studying a resource theory, it is often also important to specify how
resource objects are composed to obtain a joint resource. As discussed in
Section 3.1, GPT systems do not have a canonical tensor product. However, any
sensible choice of a tensor product $\mathbin{\tilde{\otimes}}$ should give
rise to a symmetric monoidal category with exact simulations as morphisms [58,
Section 5.2]. Since the transformations in our resource theory of GPT-
contextuality are not merely simulations of GPT systems, but also involve
additional classical systems, it takes a bit more work to show that they (and
the free transformations) are closed under parallel composition. We prove this
in the rest of this section for the case of free operations.

Consider two exact univalent simulations of types
$\mathsf{A}_{1}\to\mathsf{B}_{1}\otimes\Delta_{m}$ and
$\mathsf{A}_{2}\to\mathsf{B}_{2}\otimes\Delta_{k}$ respectively. The
assumption that $\mathbin{\tilde{\otimes}}$ is the monoidal product of a
symmetric monoidal category then means that there is also an exact univalent
simulation of type

$\mathsf{A}_{1}\mathbin{\tilde{\otimes}}\mathsf{A}_{2}\to\left(\mathsf{B}_{1}\otimes\Delta_{m}\right)\mathbin{\tilde{\otimes}}\left(\mathsf{B}_{2}\otimes\Delta_{k}\right).$
(52)

Assuming that there is a unique composite of any GPT system with a classical
one given by the canonical composite of Definition 5 (see [63] for an
alternative composition of classical systems) and that
$\mathbin{\tilde{\otimes}}$ is associative, the codomain can be expressed as

$\begin{split}\left(\mathsf{B}_{1}\otimes\Delta_{m}\right)\mathbin{\tilde{\otimes}}\left(\mathsf{B}_{2}\otimes\Delta_{k}\right)&=\left(\mathsf{B}_{1}\mathbin{\tilde{\otimes}}\Delta_{m}\right)\mathbin{\tilde{\otimes}}\left(\mathsf{B}_{2}\mathbin{\tilde{\otimes}}\Delta_{k}\right)\\\
&\cong\left(\mathsf{B}_{1}\mathbin{\tilde{\otimes}}\mathsf{B}_{2}\right)\mathbin{\tilde{\otimes}}\left(\Delta_{m}\mathbin{\tilde{\otimes}}\Delta_{k}\right)\\\
&\cong\left(\mathsf{B}_{1}\mathbin{\tilde{\otimes}}\mathsf{B}_{2}\right)\mathbin{\tilde{\otimes}}\Delta_{m\cdot
k}\\\
&=\left(\mathsf{B}_{1}\mathbin{\tilde{\otimes}}\mathsf{B}_{2}\right)\otimes\Delta_{m\cdot
k},\end{split}$ (53)

where the third equality uses the standard isomorphism between
$\Delta_{m}\otimes\Delta_{k}$ and $\Delta_{m\cdot k}$. In the first and final
steps we also use the assumption that composition with a classical system is
unique. Consequently, we get a parallel composite of the two free
transformations as an exact univalent simulation of type

$\mathsf{A}_{1}\mathbin{\tilde{\otimes}}\mathsf{A}_{2}\to\left(\mathsf{B}_{1}\mathbin{\tilde{\otimes}}\mathsf{B}_{2}\right)\otimes\Delta_{m\cdot
k}.$ (54)

As a consequence, the parallel composition of resources (i.e. GPT systems) via
$\mathbin{\tilde{\otimes}}$ respects the hierarchy of contextuality in the
sense that we have

$\mathsf{A}_{1}\preceq\mathsf{B}_{1}\;\land\;\mathsf{A}_{2}\preceq\mathsf{B}_{2}\quad\implies\quad\mathsf{A}_{1}\mathbin{\tilde{\otimes}}\mathsf{A}_{2}\preceq\mathsf{B}_{1}\mathbin{\tilde{\otimes}}\mathsf{B}_{2},$
(55)

for arbitrary GPT systems $\mathsf{A}_{i}$ and $\mathsf{B}_{i}$. Condition
(55) is part of the definition of a resource theory via ordered commutative
monoids in [64]. It means that we can consistently apply the hierarchy of
contextuality also to express the contextuality of composite GPT systems, as
long as their composition satisfies a few basic properties as described above.

###  4.3 Quantifying contextuality via the classical excess

As is common in resource theories [65], we can use monotones — i.e. order-
preserving functions from resources to numbers — to study the hierarchy of
contextuality. On the one hand, these can provide a lens through which to
extract properties of the preorder. On the other hand, they can be used as
quantitative measures of contextuality. The latter perspective is particularly
useful when the monotones come equipped with an (operational) interpretation
that allows one to identify which aspect of contextuality they are measuring.

In order to construct a specific contextuality monotone, we will make use of
the excess function from Definition 20. Of particular interest is
$\varepsilon(\mathsf{A},\Delta_{\mathbb{N}})$, the $\mathsf{A}$-excess within
the countable classical GPT system (Example 4). For brevity, we call it the
classical excess of $\mathsf{A}$. A crucial ingredient in the following proof
is that $\Delta_{\mathbb{N}}$ is isomorphic to
$\Delta_{\mathbb{N}}\otimes\Delta_{n}$ for any finite $n$.

######  Lemma 25.

For any GPT system $\mathsf{A}$ and any finite-dimensional classical GPT
system $\Delta_{n}$, we have

$\varepsilon(\mathsf{A}\otimes\Delta_{n},\Delta_{\mathbb{N}})=\varepsilon(\mathsf{A},\Delta_{\mathbb{N}})$
(56)

###### Proof.

Firstly, the inequality

$\varepsilon(\mathsf{A}\otimes\Delta_{n},\Delta_{\mathbb{N}})\geq\varepsilon(\mathsf{A},\Delta_{\mathbb{N}})$
(57)

is a direct consequence of Proposition 19 and the definition of excess.

For the converse inequality, note that any $\epsilon$-embedding
$(\phi,\psi):\mathsf{A}\to\Delta_{\mathbb{N}}$ can be extended to an
$\epsilon$-embedding

$(\phi\otimes\mathrm{id},\psi\otimes\mathrm{id})\;:\;\mathsf{A}\otimes\Delta_{n}\to\Delta_{\mathbb{N}}\otimes\Delta_{n},$
(58)

so that we get

$\varepsilon(\mathsf{A},\Delta_{\mathbb{N}})\geq\varepsilon(\mathsf{A}\otimes\Delta_{n},\Delta_{\mathbb{N}}\otimes\Delta_{n}).$
(59)

Furthermore, there is a $0$-embedding
$\Delta_{\mathbb{N}}\otimes\Delta_{n}\to\Delta_{\mathbb{N}}$ given by the
linear map

$\displaystyle\ell^{1}\otimes\mathbb{R}^{n}$ $\displaystyle\to\ell^{1}$ (60)
$\displaystyle(\omega_{i})_{i\in\mathbb{N}}\otimes\delta_{j}$
$\displaystyle\mapsto\bigl{(}\omega_{i/j}\delta_{j|i}\bigr{)}_{i\in\mathbb{N}},$

where $(\omega_{i})_{i\in\mathbb{N}}$ is an element of $\ell^{1}$,
$\delta_{j}$ is a basis vector in $\mathbb{R}^{n}$, and $\delta_{j|i}$ returns
$1$ if $j$ divides $i$ and $0$ otherwise. Using basically the same linear map
for effects, merely extended to
$\ell^{\infty}\otimes\mathbb{R}^{n}\to\ell^{\infty}$, gives the required
embedding. Consequently, we have

$\varepsilon(\Delta_{\mathbb{N}}\otimes\Delta_{n},\Delta_{\mathbb{N}})=0,$
(61)

so that by inequality (59) and Proposition 21 we get

$\displaystyle\varepsilon(\mathsf{A},\Delta_{\mathbb{N}})$
$\displaystyle\geq\varepsilon(\mathsf{A}\otimes\Delta_{n},\Delta_{\mathbb{N}}\otimes\Delta_{n})+\varepsilon(\Delta_{\mathbb{N}}\otimes\Delta_{n},\Delta_{\mathbb{N}})$
(62)
$\displaystyle\geq\varepsilon(\mathsf{A}\otimes\Delta_{n},\Delta_{\mathbb{N}})$

as required. ∎

######  Theorem 26.

The function
$\varepsilon(\mathord{\rule[-0.50003pt]{6.00006pt}{0.50003pt}},\Delta_{\mathbb{N}}):\mathfrak{G}\to\mathbb{R}$,
which maps a GPT system to its excess within $\Delta_{\mathbb{N}}$, is order-
preserving. That is, we have

$\mathsf{A}\preceq\mathsf{B}\quad\implies\quad\varepsilon(\mathsf{A},\Delta_{\mathbb{N}})\leq\varepsilon(\mathsf{B},\Delta_{\mathbb{N}}).$
(63)

###### Proof.

By Definition 23, Corollary 22 (specialized to
$\mathsf{C}=\Delta_{\mathbb{N}}$), and Lemma 25 respectively, we have

$\displaystyle\mathsf{A}\preceq\mathsf{B}$
$\displaystyle\iff\quad\exists\,n\;\text{ such that
}\;\mathsf{A}\hookrightarrow\mathsf{B}\otimes\Delta_{n},$ (64)
$\displaystyle\;\implies\quad\exists\,n\;\text{ such that
}\;\varepsilon(\mathsf{A},\Delta_{\mathbb{N}})\leq\varepsilon(\mathsf{B}\otimes\Delta_{n},\Delta_{\mathbb{N}})$
$\displaystyle\iff\quad\varepsilon(\mathsf{A},\Delta_{\mathbb{N}})\leq\varepsilon(\mathsf{B},\Delta_{\mathbb{N}}).$

This gives us the statement of the theorem. ∎

######  Remark 27 (Excess within a finite simplex).

An important feature of the monotone
$\varepsilon(\mathsf{A},\Delta_{\mathbb{N}})$ is that it can sometimes be
computed by considering the $\mathsf{A}$-excess within $\Delta_{k}$ for a
finite $k$. This happens whenever its value
$\varepsilon(\mathsf{A},\Delta_{m})$ remains constant for all classical
systems with $m$ larger than $k$. For instance, the noncontextual GPT system
corresponding to the toy bit in Spekkens toy theory [66] is embedabble within
$\Delta_{4}$ with vanishing error, and hence for any larger $m$ its excess
within $\Delta_{m}$ has to remain $0$.

###  4.4 Parity oblivious multiplexing success probability with free classical
resources as a measure of contextuality

Having introduced the hierarchy of contextuality as well as a new
contextuality measure in the form of the classical excess, we now build a
measure of generalised contextuality based on the parity oblivious
multiplexing (POM) [10] game. The latter is a protocol that is powered by
preparation contextuality and has raised significant attention in recent years
[67, 68, 69, 70, 71, 72, 73, 74].

In the $\bm{n}$-bit Parity Oblivious Multiplexing (POM) game, Alice is given
an $n$-bit string, whose possible values she encodes in a GPT system
$\mathsf{A}$. In particular she chooses a state $\omega_{x}$ for possible
string value $x$. The system is then transmitted to Bob is additionally given
an integer $y\in\\{1,2,\ldots,n\\}$. Bob’s task is to guess the value $x_{y}$
of the yth bit of $x$ by performing a two-outcome measurement $M_{y}$. His
guess is denoted by $b\in\\{0,1\\}$.

The task has a supplementary constraint called parity obliviousness (PO).
Namely, Alice cannot communicate the parity of the string, denoted by $p(x)$,
to Bob. The PO condition can be phrased in terms of Alice’s chosen states as

$\sum_{x|p(x)=0}\omega_{x}=\sum_{x|p(x)=1}\omega_{x}.$ (65)

Note that the string ${x}$ is assumed to be uniformly distributed, so that the
left-hand side of Equation 65 can be interpreted (up to a factor of $2^{n-1}$)
as the average state sent by Alice given that the characters of ${x}$ add up
to $0$ modulo $2$ and similarly for the right-hand side.

The average success probability is given by

$\sum_{x,y}\frac{1}{2^{n}n}p(b=x_{y}\,|\,\omega_{x},M_{y}),$ (66)

where $2^{-n}$ is the probability of Alice receiving string $x$, $1/n$ is the
probability of Bob receiving $y$, and ${p(b=x_{y}\,|\,\omega_{x},M_{y})}$ is
the probability that Bob’s guess is correct in a given run.

It is shown in [10, Theorem 2] that if a system $\mathsf{A}$ is noncontextual,
then the optimal (i.e. maximal) success probability for the $n$-bit POM,
denoted by $\mathfrak{p}_{n}$, is upper bounded by

$\mathfrak{p}_{n}(\mathsf{A})\leq\frac{n+1}{2n}=\mathfrak{p}_{n}(\Delta_{\infty}).$
(67)

The success probability for POM can be thus used as a witness of
contextuality.

We now prove that for the embeddability preorder the POM success probability
is also order-preserving.

######  Lemma 28.

Let $n$ be any integer. If $\mathsf{A}$ is embeddable within $\mathsf{B}$,
then we have $\mathfrak{p}_{n}(\mathsf{A})\leq\mathfrak{p}_{n}(\mathsf{B})$.

###### Proof.

Let us consider any choice of states $\omega_{x}$ (for $x\in\\{0,1\\}^{n}$)
which obey the parity obliviousness constraint (65). Since we have
$\mathsf{A}\hookrightarrow\mathsf{B}$, for any choice of effects $e_{y}$ and
states $\omega_{x}$ on $\mathsf{A}$ obeying the parity obliviousness
constraint, the states $\Gamma(\omega_{x})$ on $\mathsf{B}$ also obey it by
the linearity of the single-valued state simulation $\Gamma$. Moreover, the
empirical adequacy (Equation 26) of the exact simulation implies
$e_{y}\cdot\omega_{x}=\Gamma(e_{y})\cdot\Gamma(\omega_{x})$. Thus, any
strategy on $\mathsf{A}$ can be implemented on $\mathsf{B}$ with equal success
probability. This implies
$\mathfrak{p}_{n}(\mathsf{A})\leq\mathfrak{p}_{n}(\mathsf{B})$. ∎

However, it is not a resource monotone in our resource theory of GPT-
contextuality.

######  Lemma 29.

The optimal success probability for POM is not a monotone with respect to the
hierarchy of contextuality $\preceq$.

###### Proof.

We define a noisy bit to be any system with the same states as the classical
bit $\Delta_{2}$, but whose effects form a proper subset of $\Delta_{2}^{*}$.
In particular, a noisy bit has no measurement that distinguishes the two
extremal states $\delta_{1}$ and $\delta_{2}$ with certainty. Noisy bits can
be parametrized by a noise parameter $\alpha\in(0,1/2]$, giving rise to a GPT
system $\Delta_{2}^{\alpha}$ whose extremal effects $\chi_{1}$ and $\chi_{2}$
satisfy

$\chi_{i}\cdot\delta_{j}=\begin{cases}1-\alpha&\text{if }i=j\\\
\alpha&\text{if }i\neq j.\end{cases}$ (68)

By the desiderata 1 and 2, a noisy bit $\Delta_{2}^{\alpha}$ and a bit
$\Delta_{2}$ must satisfy $\Delta_{2}^{\alpha}\preceq\Delta_{2}$ and
$\Delta_{2}\preceq\Delta_{2}^{\alpha}$ since they are both noncontextual. The
optimal strategy for POM given a (noisy) bit consists of encoding the first
bit $x_{1}$ of the string $x$ in its extremal states $\delta_{1}$ and
$\delta_{2}$ [10, Lemma 1]. With probability $1/n$ Bob is asked to guess this
specific bit, which he can do successfully with probability $(1-\alpha)$. With
probability $(n-1)/{n}$ Bob is asked to guess any of the remaining bits from
$x$, for which he can do no better than a uniformly random guess, i.e. the
success probability is $1/2$. Hence, the optimal success probability is

$\mathfrak{p}_{n}(\Delta_{2}^{\alpha})=\frac{1-\alpha}{n}+\frac{n-1}{2n}=\frac{n+1-2\alpha}{2n},$
(69)

which is strictly smaller than $\mathfrak{p}_{n}(\Delta_{2})=(n+1)/2n$
whenever the noise parameter $\alpha$ is greater than $0$. This means that
$\Delta_{2}\preceq\Delta_{2}^{\alpha}$ does not imply
$\mathfrak{p}_{n}(\Delta_{2}^{\alpha})\geq\mathfrak{p}_{n}(\Delta_{2})$. ∎

We can see that the POM success probability cannot serve as a monotone because
the POM game does not allow the use of classical systems for free. This can be
remedied by the so-called generalized yield construction [65, Section 3.1].

######  Definition 30.

Given a GPT system $\mathsf{A}$ we define the optimal POM success probability
with free classical resources as:

$\displaystyle\mathfrak{p}_{n}{\textrm{-}}\mathrm{yield}(\mathsf{A})\coloneqq\sup_{d\in\mathbb{N}}\mathfrak{p}_{n}(\mathsf{A}\otimes\Delta_{d}).$
(70)

######  Proposition 31.

$\mathfrak{p}_{n}{\textrm{-}}\mathrm{yield}$ is a monotone on the resource
theory of GPT-contextuality.

###### Proof.

Let us assume $\mathsf{A}\preceq\mathsf{B}$, which implies that there is an
$m\in\mathbb{N}$ such that there is a $0$-embedding
$\mathsf{A}\otimes\Delta_{d}\to\mathsf{B}\otimes\Delta_{d\cdot m}$ for every
$d\in\mathbb{N}$. By Lemma 28, we obtain
$\mathfrak{p}_{n}(\mathsf{A}\otimes\Delta_{d})\leq\mathfrak{p}_{n}(\mathsf{B}\otimes\Delta_{d\cdot
m})$ for every $d\in\mathbb{N}$, which yields the inequality below:

$\sup_{d\in\mathbb{N}}\mathfrak{p}_{n}(\mathsf{A}\otimes\Delta_{d})\leq\sup_{d\in\mathbb{N}}\mathfrak{p}_{n}(\mathsf{B}\otimes\Delta_{d\cdot
m}).$ (71)

Moreover,

$\displaystyle\sup_{d\in\mathbb{N}}\mathfrak{p}_{n}(\mathsf{B}\otimes\Delta_{d\cdot
m})=\sup_{d\in\mathbb{N}}\mathfrak{p}_{n}(\mathsf{B}\otimes\Delta_{d}),$ (72)

which implies

$\mathfrak{p}_{n}{\textrm{-}}\mathrm{yield}(\mathsf{A})\leq\mathfrak{p}_{n}{\textrm{-}}\mathrm{yield}(\mathsf{B}),$
(73)

using Definition 30. ∎

This proof is an instance of the proof of the generalized yield construction
in [26, Theorem 4.21], so that $\mathfrak{p}_{n}{\textrm{-}}\mathrm{yield}$
can be meaningfully interpreted as a (generalized) yield monotone.

##  5 Discussion

###  5.1 Contextuality and information erasure

#### The fine-tuning problem of contextuality.

Contextuality of a theory implies the existence of distinctions at the
ontological level which are not present at the operational level. If a
contextual ontological model truly describes the physical reality underlying
the observed behaviours predicted by the theory, then there are operationally
indistinguishable behaviours that have distinct ontological origins. In other
words, such operational equivalences would result from a fine-tuning of the
corresponding distinct ontological representations [4]. How do these
distinctions disappear between the ontological and operational descriptions of
the physical system, though? The presence of such fine-tunings provides a
conspiratorial connotation to the realist explanation of the theory and we
believe that it requires an explanation. In this section, we explore the
possibility that the fine-tuning associated with contextuality can be
explained as emergent from a yet undiscovered physical mechanism that
supplements the description provided by the ontological model.

#### Explaining fine-tunings as emergent from yet undiscovered physical
mechanisms.

Explaining the origin of fine-tunings of this kind by searching for new
physical mechanisms dates back to Valentini’s veriant of Bohmian mechanics
[75]. There, he introduces a notion of quantum equilibrium as the reason why
superluminal signaling does not manifest in quantum theory, despite the
nonlocality of its underlying ontological model. This picture predicts that
outside of the quantum equilibrium, it is possible to observe faster than
light signaling. Therefore, the fine-tuned nature of no-signaling in Bohmian
mechanics is explained just as an emergent feature of the quantum equilibrium
and it is not universally valid. We cannot avoid noticing how radical such
explanations of fine-tunings rooted in undiscovered physical mechanisms are.
They imply that an established physical principle, such as the principle of
no-signaling, is violated at the fundamental level. In the case of
contextuality, the physical mechanism explaining the emergence of the
operational equivalences would entail the existence of measurements that can
distinguish behaviours that are deemed indistinguishable by quantum theory.

#### Explaining contextuality through information erasure.

In Valentini’s work the quantum equilibration process is responsible for the
emergence of no-signalling — the fine-tuned feature associated with
nonlocality. What hypothetical physical mechanism could be responsible for the
emergence of operational equivalences — the fine-tuned feature associated with
contextuality?

It would have to be a process that involves a kind of information erasure. The
information erased is the information about distinctions at the ontological
(e.g. fundamental) level, which cannot be stored in systems of the operational
(e.g. effective) theory that lacks these distinctions. By Landauer’s
principle, we can then associate an increase in entropy between the
fundamental and effective levels. Such a process of information erasure would
not only provide an explanation for the problematic fine-tuning associated
with contextuality but would also be associated to a potentially detectable
heat dissipation. This heat would signify that, indeed, there are distinctions
at the fundamental level which are not present at the effective level. One
could even hypothesise that the information erasure is a physical process
occuring over time. That is, during the preparation of a quantum system there
may be a timescale before which the system is described by the fundamental
(and noncontextual) theory. At longer timescales, once the erasure has
occured, the system can only be described by the effective (contextual)
theory.

#### Ontological model as a fundamental theory.

The above account treats an ontological model as specifying a yet unfalsified
fundamental theory, in accordance with [32]. This departs from the standard
use of ontological models to study contextuality [2]. In the latter, the
ontological distinctions (which are not present in the operational theory) are
in principle indistinguishable. On the other hand, the fundamental theory we
posit here contains no such requirement. In particular, the in-principle-
indistinguishability of its distinctions would also mean that there is no
entropy increase and no heat resulting from erasure to be detected. Examples
of effective theories arising from more fundamental ones include
thermodynamics, which emerges from statistical mechanics via coarse-graining,
and classical information theory, which emerges from quantum information
theory via decoherence. The difference between the two interpretations of
ontological models does not prevent us from using the approach of [32] to
provide an explanation of generalized contextuality as defined in [2]. If the
fine-tuning associated with generalized contextuality is explained through a
process information erasure, then the problematic aspect of contextuality in
quantum theory disappears. Instead, one is then led to search for an in
principle accessible more fundamental theory, from which quantum theory
emerges.

#### Resource theory of GPT-contextuality and physical erasure processes.

In our work, both the effective and fundamental theory are associated with GPT
systems. Consider $\mathsf{A}$ as the effective description of a physical
system and $\mathsf{B}$ the fundamental one. A simulation
$\mathsf{A}\to\mathsf{B}$ can be then interpreted as specifying, for each
behaviour of the effective theory, all behaviours of the fundamental theory
that would give rise to it. For example, if the effective description arises
from the fundamental one due to a physical erasure process given by some many-
to-one function $f:\mathsf{B}\to\mathsf{A}$, then the associated simulation
would be given by preimages under $f$. This point of view is consonant with
the use of GPT simulations in [32] where they were introduced. However, not
every simulation can be associated with a physical map (in the opposite
direction) in such a way. Here, a physical map $\mathsf{B}\to\mathsf{A}$ would
be a linear map $f:V_{\mathsf{B}}\to V_{\mathsf{A}}$ satisfying
$f(\Omega_{\mathsf{B}})\subseteq\Omega_{\mathsf{A}}$,
$f^{*}(E_{\mathsf{A}})\subseteq E_{\mathsf{B}}$ and
$f^{*}(e_{\mathsf{A}})\cdot\omega_{\mathsf{B}}=e_{\mathsf{A}}\cdot
f(\omega_{\mathsf{B}})$. For instance, while the Spekkens toy bit [66] has a
noncontextual ontological model (and thus a univalent simulation) defined on
the tetrahedron $\Delta_{4}$, there is no physical map from $\Delta_{4}$ to
the toy bit. Some ontological models do correspond to physical maps, though.
For any GPT system $\mathsf{A}$ with $n$ extremal states $\omega_{i}$ there
exists a Holevo-Beltrametti-Bugasjki (HBB) model of $\mathsf{A}$ by
$\Delta_{n}$, as shown in Example 16. The HBB simulation corresponds to a
linear map $M:\mathbb{R}^{n}\to V_{\mathsf{A}}$ whose action on the extremal
states of $\Delta_{n}$ is given by: $\delta_{i}\mapsto\omega_{i}$. See
Appendix A for a proof that $M$ is a physical map.

#### Erasure associated with ontological models.

By analyzing physical maps like the one of the HBB simulation we can
understand why information erasure in the context of ontological models and
contextuality cannot be the same as the standard thermodynamic one. While the
latter can be understood as a coarse-graining operation, the physical maps
associated to contextual ontological models are not of this kind. To see this,
consider a contextual GPT system $\mathsf{A}$ and a classical system
$\Delta_{d}$ such that a physical map $f:\Delta_{d}\to\mathsf{A}$ exists.
Since $\mathsf{A}$ is contextual, by Lemma 11 of [32], there is no coarse-
graining (i.e. idempotent) process on $\Delta_{d}$ whose image is
$\mathsf{A}$. Hence, the physical GPT map $f$ cannot be understood simply as a
coarse-graining operation, such as the erasure that occurs between fundamental
and effective levels in statistical mechanics. A more concrete perspective is
offered by the HBB map $M$ which explicitly models the preparation of the
system $\mathsf{A}$ via the classical control $\Delta_{n}$. The classical
degree of freedom is used to select the extremal state of $\mathsf{A}$ to be
prepared. Thus, while $M$ can be used to model a physical process in the
laboratory (e.g. the preparation of $\mathsf{A}$ conditioned on a classical
variable), it does not correspond to a simple coarse-graining process applied
to the classical degree of freedom.

###  5.2 Relation with previous works on contextuality and GPTs

#### On the framework of Müller and Garner.

On the technical level, our work makes use of the tools developed in [32]. For
instance, the concept of univalent simulations of GPT systems plays an
especially important role. Even though we use similar tools, our goal is quite
different. Müller and Garner use the concept of univalent simulations to
formulate a notion of generalized noncontextuality that applies to generic
effective and corresponding fundamental theories. The effective theory is the
theory emerging from the operational statistics of the experiment and the
fundamental theory is a fine-grained theory of the effective ones (so, not
just the simplicial theory, as in the case of standard noncontextuality).

They use such noncontextuality as a plausibility criterion for testing the
validity of the fundamental theory given the effective theory. This approach
becomes particularly meaningful when the fundamental theory is assumed to be
quantum theory, since it allows the authors to provide experimental tests of
quantum theory. Related works which employ an alternative definition of
noncontextuality are the ones of Gitton and Woods [48] and [49]. For ongoing
debate on the merits of the different approaches see [49] and [76].

#### On simplex embeddability.

Other influential sources of inspiration for our work are [47, 51, 52]. As we
already mentioned in the introduction, [47] introduces the notion of simplex
embeddability as the geometrical criterion to assess whether a GPT system is
noncontextual.777Another work that is closely related to [47] is that of
Shahandeh [50]. However, the criterion of classicality introduced there
additionally requires the simplex to have the same dimension of the GPT
system. We do not adopt this approach. For example, it deems the rebit
stabilizer theory to be nonclassical. However, the rebit stabilizer theory, in
the prepare-and-measure scenario, admits a noncontextual ontological model
given by the Spekkens toy theory [66], as has been shown in several works [77,
78, 79]. The criterion is extended to accessible GPT fragments in [51], where
the latter correspond to more general mathematical objects than GPTs and
characterize generic prepare-and-measure experimental setups. The work of [52]
provides an algorithm for testing contextuality in any prepare-and-measure
scenario. In particular, if it exists, it returns an explicit noncontextual
model for the scenario and, if not, it provides the minimum amount of
(depolarizing) noise which would be required until a noncontextual model would
become possible. They call this measure of contextuality the robustness of
nonclassicality. The latter is related to our notion of error of univalent
simulation, but it is different insofar as it requires a specific noise
channel (e.g. depolarizing noise channel), whereas the error of univalent
simulation does not require that. Moreover, the robustness of nonclassicality
is not defined as a measure within a well defined resource theory.

#### On accessible GPT fragments.

It has been argued in [51] that in realistic experiments GPT systems are
generally not appropriate to study contextuality. In particular, the following
discrepancy arises: A GPT system obtained from an operational description of
the experiment, as in Remark 9, provides states and effects observable _in
practice_ in this experiment, but does not limit the _in principle_
implementable ones. However, the preparation equivalences preserved by a
preparation-noncontextual ontological model (see Section 2 and Definition 10)
are _in principle_ operational equivalences.

When studying preparation contextuality only, this discrepancy can be dealt
with. Namely, one can first set-up the effect space $E_{\mathsf{A}}$ in a non-
operational way, as a hypothesized set of in principle possible effects.
Importantly, one has to identify each actual measurement outcome arising in
the experiment with a (distribution over) the elements of $E_{\mathsf{A}}$.
Their means specify a subset $\tilde{E}_{\mathsf{A}}\subseteq E_{\mathsf{A}}$
of the so-called _accessible_ effects, which however _play no role_ in the
study of preparation contextuality. The state space $\Omega_{\mathsf{A}}$ is
the set of equivalence classes of preparation procedures as in Remark 9, but
only with respect to in principle operational equivalence. That is, states
that are indistinguishable by accessible effects, but could be distinguished
by a hypothesized effect in $E_{\mathsf{A}}\setminus\tilde{E}_{\mathsf{A}}$
ought not be identified in $\Omega_{\mathsf{A}}$. With this set-up, one can
study preparation contextuality as we discuss shortly in Section 3.3 in terms
of the GPT system $(\Omega_{\mathsf{A}},E_{\mathsf{A}})$.

Such a treatment is not possible when studying both preparation and
measurement contextuality simultaneously. One has to replace the notion of a
GPT system by the notion of an _accessible fragment_ of a GPT system
introduced in [51]. Simply put, this is a pair of a GPT system
$(\Omega_{\mathsf{A}},E_{\mathsf{A}})$ together with a subsystem
$(\tilde{\Omega}_{\mathsf{A}},\tilde{E}_{\mathsf{A}})$ thereof, which
importantly can violate the non-degeneracy condition (7), and therefore are
not necessarily GPT system. The enveloping system describes states and effects
that can arise in principle, while the subsystem describe those that are
achievable in the particular experiment, whose contextuality we are interested
in.

While it would be arguably more appropriate to develop our hierarchy of
contextuality for accessible fragments instead of plain GPT systems, we chose
against this option for two reasons. Firstly, this would make the approach
superficially more complicated, even though all the key ideas can be presented
in the simpler framework of GPT systems. Secondly, one can easily accommodate
our approach to the case of accessible fragments. The only difference is that
the preparation (and outcome) equivalences have to be adjusted. For example,
two preparations (i.e. distributions over $\tilde{\Omega}_{\mathsf{A}}$) would
be deemed equivalent if their means cannot be distinguished by any effect in
$E_{\mathsf{A}}$.

#### On the resource theory of contextuality due to Duarte and Amaral.

Another related work is [44], where the authors also provide a resource theory
of generalized contextuality in prepare-and-measure scenarios using a ‘black
box’ framework. In [44] the basic object consists of a _prepare-and-measure
scenario_ $\mathcal{S}$ together with a _behaviour_ $B$. A scenario is a set
$\mathcal{S}=\\{\mathcal{P},\mathcal{M},\mathcal{D},\mathcal{E}_{P},\mathcal{E}_{M}\\}$
where $\mathcal{P}$ is a set of preparations, $\mathcal{M}$ a set of
measurements, $\mathcal{D}$ a set of outcomes, $\mathcal{E}_{P}$ the
operational equivalences for preparations and $\mathcal{E}_{M}$ the
operational equivalences for measurements.

A behaviour $B$ is a set of conditional probabilities:

$\displaystyle
B=\\{p(k|j,i)\\}_{i\in\mathcal{I},j\in\mathcal{J},k\in\mathcal{K}}$ (74)

corresponding to the probability of outcome $d_{k}$ given preparation $P_{i}$
and measurement $M_{j}$. $\mathcal{I},\mathcal{J}$ and $\mathcal{K}$ are sets
of labels for the preparations, measurements and outcomes, respectively.

We note that the sets of operational equivalences $\mathcal{E}_{P}$ and
$\mathcal{E}_{M}$ of a given object are defined independently of the
probability distributions. As such an object (scenario + behaviour) may
contain operational equivalences which are not implied by the behaviour.
Alternatively, there may be operational equivalences present in the behaviour
which are not included in the scenario. In the cases where all ensembles of
procedures are valid procedures in the scenario, and where the operational
equivalences implied by behaviour are those of the scenario, then the object
defined is equivalent to a GPT system.

The free objects of [44] are the noncontextual behaviours, namely those which
admit of a generalized noncontextual model.

The operations of [44] are given by pre- and post-processing on the
preparations, measurements and outcomes and correspond to channel simulations.
The free operations correspond to channel simulations such that all the
operational equivalences of the simulated system are images of operational
equivalences of the simulating system through the simulation map.

Let us consider an example where both resource theories can be applied to
highlight the differences between the resource theory of [44] and the one
presented in this work.

We consider a scenario
$\mathcal{S}=\\{\mathcal{P},\mathcal{M},\mathcal{D},\mathcal{E}_{P},\mathcal{E}_{M}\\}$
and a scenario
$\tilde{\mathcal{S}}=\\{\tilde{\mathcal{P}},\tilde{\mathcal{M}},\tilde{\mathcal{D}},\tilde{\mathcal{E}}_{P},\tilde{\mathcal{E}}_{M}\\}$
where,

$\displaystyle\mathcal{P}=\\{0,1\\},\quad$
$\displaystyle\mathcal{M}=\\{0\\},\quad$ $\displaystyle\mathcal{D}=\\{0,1\\},\
$ $\displaystyle\mathcal{E}_{P}=\emptyset,\ $
$\displaystyle\mathcal{E}_{M}=\emptyset,$ (75)
$\displaystyle\mathcal{P}=\\{0,1,2\\},\quad$
$\displaystyle\mathcal{M}=\\{0\\},\quad$
$\displaystyle\mathcal{D}=\\{0,1,2\\},\quad$
$\displaystyle\mathcal{E}_{P}=\emptyset,\quad$
$\displaystyle\mathcal{E}_{M}=\emptyset.$ (76)

The behaviours on $\mathcal{S}$ and $\tilde{\mathcal{S}}$ are $B$ and
$\tilde{B}$ respectively:

$\displaystyle p(k|j=1,i)$ $\displaystyle=\delta_{i,k},\ i,k\in\\{0,1\\},$
(77) $\displaystyle p(\tilde{k}|\tilde{j}=1,\tilde{i})$
$\displaystyle=\delta_{\tilde{i},\tilde{k}},\
\tilde{i},\tilde{k}\in\\{0,1,2\\}.$ (78)

These are the behaviours obtained by preparing a bit (resp. trit) in one of
its extremal states and then implementing the canonical two outcome (resp.
three outcome) measurement which returns one of the outcomes with certainty.

In the framework of GPTs $(\mathcal{S},B)$ corresponds to a bit and
$(\tilde{\mathcal{S}},\tilde{B})$ to a trit (assuming one also allows all
ensembles of preparations and measurements).

In the resource theory of GPT contextuality presented in this work we have
that the bit and the trit are equivalent as resources:
$\Delta_{2}\succeq\Delta_{3}$ and $\Delta_{3}\succeq\Delta_{2}$.

However in the resource theory of [44] this is not the case. We now show
explicitly that there is no free operation $T$ taking $(\mathcal{S},B)$ to
$(\tilde{\mathcal{S}},\tilde{B})$. Since there is only one measurement in both
scenarios we drop the indices $j$ and $\tilde{j}$. Let us assume the existence
of stochastic maps $q_{O}(\tilde{k}|k)$ and $q_{P}(i|\tilde{i})$ which map
$B\to\tilde{B}$:

$\displaystyle
p(\tilde{k}|\tilde{i})=\sum_{i,k=0}^{1}q_{O}(\tilde{k}|k)p(k|i)q_{P}(i|\tilde{i})$
(79)

Now using the definitions of $B$ and $\tilde{B}$ of Equation 77 we obtain:

$\displaystyle\delta_{\tilde{i},\tilde{k}}=\sum_{i=0}^{1}q_{O}(\tilde{k}|i)q_{P}(i|\tilde{i}).$
(80)

Let us denote by $Q_{O}$ the $3\times 2$ matrix with entries
$[Q_{O}]_{\tilde{k},i}=q_{O}(\tilde{k}|i)$ and $Q_{P}$ the $2\times 3$ matrix
with entries $[Q_{P}]_{i,\tilde{i}}=q_{P}(i|\tilde{i})$. Then the previous
equation is equivalent to the matrix equation:

$\displaystyle\mathbb{I}_{3}=Q_{O}\cdot Q_{P}$ (81)

This yields a contradiction since the decomposition of a $3\times 3$ matrix
$A$ into matrix product $A=B\cdot C$ with $B$ a $3\times 2$ matrix and $C$ a
$2\times 3$ matrix implies $C$ has rank at most 2. However $\mathbb{I}_{3}$ is
a rank 3 matrix. This shows that there is no free operation
$(\mathcal{S},B)\mapsto(\tilde{\mathcal{S}},\tilde{B})$ in the resource theory
of [44]. Notice that the reason why in our resource theory the bit and the
trit — and any other noncontextual theory — are equivalent is that our free
operations include the access to the classical system. This is the origin of
the difference with the resource theory of [44].

An additional contribution of the present work is the following. In [44] the
authors define a notion of composite of two behaviours which is equivalent to
the minimal composite of Definition 5 in our framework. They then show that
this composite is consistent with their resource theory, in the sense that the
free objects are closed under this composite. In the present work we show that
any consistent composite of GPT systems, not just the minimal composite of
Definition 5 is compatible with the resource theory of contextuality.

##  6 Conclusion

Generalized contextuality, a leading notion of nonclassicality, is of crucial
importance both in the foundations of quantum theory and in quantum
information processing. Despite this, there is no complete characterisation of
generalised contextuality as a resource. In this work we address this
shortcoming.

Based on recent developments formulating noncontextuality of GPT systems via
simplex embeddability, we have defined a resource theory of contextuality of
GPT systems in prepare-and-measure scenarios. The free resources are the
noncontextual systems and the free operations are univalent simulations with
free access to classical systems. Using these notions, we motivate a hierarchy
of contextuality for GPT systems. A new contextuality monotone arises
naturally from our considerations — the classical excess, which expresses the
minimum error of a univalent simulation by the countably-infinite classical
system. We have also shown how a standard witness of contextuality, in the
form of the POM success probability, can be used to define a contextuality
monotone.

A key feature of the resource theory presented is this work is that the free
operations include access to classical systems. Since every noncontextual
system can be univalently simulated by a classical system this entails that
all noncontextual systems are equivalent in the hierarchy. Without access to
free classical systems the preorder which emerges is the embeddability
preorder, for which generic noncontextual systems are inequivalent. Moreover
we show, by assuming that the only way of composing GPT systems with classical
ones is the standard one, that any consistent composition of GPT systems is
consistent with the hierarchy: if $\mathsf{A}_{1}\preceq\mathsf{B}_{1}$ and
$\mathsf{A}_{2}\preceq\mathsf{B}_{2}$ then
$\mathsf{A}_{1}\mathbin{\tilde{\otimes}}\mathsf{A}_{2}\preceq\mathsf{B}_{1}\mathbin{\tilde{\otimes}}\mathsf{B}_{2}$.

We have also discussed how GPT simulations could describe a physical process
of information erasure that would explain the fine-tuning associated with
contextuality888A recent work that connects preparation contextuality and
information erasure is [80], where the authors show that any ontological model
reproducing the statistics of a sequential protocol involving incompatible
projective measurements involves more information erasure than what
operational quantum theory predicts. This fact is strictly related to the
presence of preparation contextuality, as the same final quantum state in the
protocol is represented by two different ontic distributions. This result can
be seen as an example of fine-tuning of information erasure (i.e. more erasure
at the ontological level than at the operational level), which, despite being
interesting, differs from our idea of viewing contextuality as arising from a
process of information erasure that explains the operational equivalences of
distinct ontological representations. in a similar way to how the quantum
equilibration process proposed by Valentini explains the fine-tuning
associated with nonlocality in Bohmian mechanics. We have argued that the
information erasure in this case would be different than a simple coarse-
graining. An interesting avenue for future research would be to further
characterize this kind of information erasure and propose a test to detect
heat dissipation in experiments manifesting contextuality. Even though such a
proposal is undoubtedly radical, we believe that it could explain the fine-
tuning associated with contextuality without abandoning the ontological models
framework.

Another direction for further investigation is to develop a solid
interpretation and establish the use-cases of the resource theory of GPT-
contextuality that we provide. It is known that a resource theory of a given
notion need not be unique. We have examples of this fact, like the resource
theories of entanglement based on LOCC [81] and LOSR [82, 83] free operations,
respectively. This does not mean that only one of them is “the correct
resource theory of entanglement”. Rather, these resource theories may be
applicable in different contexts or for different purposes. In the case of
entanglement, one can say that LOCC operations are relevant for communication
tasks in the context of quantum internet and LOSR operations are relevant for
the study of entanglement in Bell scenarios.

In this respect, we have discussed the relation of our work with other studies
of generalized contextuality for GPTs in section 5.2. One that we did not
mention is [72]. It would be interesting to find a relationship between our
classical excess and the simulation cost of contextuality defined therein.
Finally, it would be also interesting to extend the methods developed here to
the realm of resource theories of more general fine-tunings [4], such as
violations of time symmetry [84] and bounded ontological distinctness [85].

## Acknowledgments

The authors thank the participants of the PIMan workshop – Orange (CA), March
2019 – where the idea of this project originated. In particular, Luke Burns
and Justin Dressel, who were part of the initial discussions on the project.
The authors further thank Rafael Wagner for insightful explanations regarding
the approach of Duarte and Amaral [44]. LC thanks Farid Shahandeh and TGa
thanks Markus Müller for helpful discussions. This project started when LC was
supported by the Fetzer Franklin Fund of the John E. Fetzer Memorial Trust and
by the Army Research Office (ARO) (Grant No. W911NF-18-1-0178). LC also
acknowledges funding from the Einstein Research Unit “Perspectives of a
Quantum Digital Transformation” and from the Horizon Europe project FoQaCiA,
GA no.101070558. TGa acknowledges support from the Austrian Science Fund (FWF)
via project P 33730-N. TGo acknowledges support from the Austrian Science
Fund. This research was funded in whole or in part by the Austrian Science
Fund (FWF) via the START Prize Y1261-N. This research was supported in part by
Perimeter Institute for Theoretical Physics. Research at Perimeter Institute
is supported by the Government of Canada through the Department of Innovation,
Science, and Economic Development, and by the Province of Ontario through the
Ministry of Colleges and Universities.

For open access purposes, the authors have applied a CC BY public copyright
license to any accepted manuscript version arising from this submission.

## References

  * Schmid [2022] David Schmid.  Generalized noncontextuality.  _Solstice of Foundations, ETH Zurich_ , 2022.  https://www.youtube.com/watch?v=M3qn3EHWdOg.
  * Spekkens [2005] R. W. Spekkens.  Contextuality for preparations, transformations, and unsharp measurements.  _Phys. Rev. A_ , 71:052108, May 2005.  doi:10.1103/PhysRevA.71.052108.
  * Spekkens [2019] Robert Spekkens.  The ontological identity of empirical indiscernibles: Leibniz’s methodological principle and its significance in the work of einstein.  _arXiv:1909.04628_ , 2019.  doi:https://doi.org/10.48550/arXiv.1909.04628.
  * Catani and Leifer [2023] Lorenzo Catani and Matthew Leifer.  A mathematical framework for operational fine tunings.  _Quantum_ , 7:948, March 2023.  doi:10.22331/q-2023-03-16-948.
  * Ferrie and Emerson [2008] Christopher Ferrie and Joseph Emerson.  Frame representations of quantum mechanics and the necessity of negativity in quasi-probability representations.  _Journal of Physics A: Mathematical and Theoretical_ , 41(35):352001, jul 2008.  doi:10.1088/1751-8113/41/35/352001.
  * Spekkens [2008] Robert W. Spekkens.  Negativity and contextuality are equivalent notions of nonclassicality.  _Phys. Rev. Lett._ , 101:020401, Jul 2008.  doi:10.1103/PhysRevLett.101.020401.
  * Bell [1964] J. S. Bell.  On the Einstein Podolsky Rosen paradox.  _Physics Physique Fizika_ , 1(3):195–200, 1964\.  doi:10.1103/PhysicsPhysiqueFizika.1.195.
  * Mazurek et al. [2016] Michael D. Mazurek, Matthew F. Pusey, Ravi Kunjwal, Kevin J. Resch, and Robert W. Spekkens.  An experimental test of noncontextuality without unphysical idealizations.  _Nature Communications_ , 7(1):ncomms11780, 2016\.  doi:10.1038/ncomms11780.
  * Mazurek et al. [2021] Michael D. Mazurek, Matthew F. Pusey, Kevin J. Resch, and Robert W. Spekkens.  Experimentally bounding deviations from quantum theory in the landscape of generalized probabilistic theories.  _PRX Quantum_ , 2:020302, Apr 2021.  doi:10.1103/PRXQuantum.2.020302.
  * Spekkens et al. [2009] Robert W. Spekkens, D. H. Buzacott, A. J. Keehn, Ben Toner, and G. J. Pryde.  Preparation Contextuality Powers Parity-Oblivious Multiplexing.  _Phys. Rev. Lett._ , 102(1):010401, 2009.  doi:10.1103/PhysRevLett.102.010401.
  * Hameedi et al. [2017] Alley Hameedi, Armin Tavakoli, Breno Marques, and Mohamed Bourennane.  Communication games reveal preparation contextuality.  _Phys. Rev. Lett._ , 119:220402, Nov 2017.  doi:10.1103/PhysRevLett.119.220402.
  * Schmid and Spekkens [2018] David Schmid and Robert W. Spekkens.  Contextual advantage for state discrimination.  _Phys. Rev. X_ , 8:011015, Feb 2018.  doi:10.1103/PhysRevX.8.011015.
  * Saha and Chaturvedi [2019] Debashis Saha and Anubhav Chaturvedi.  Preparation contextuality as an essential feature underlying quantum communication advantage.  _Phys. Rev. A_ , 100:022108, Aug 2019.  doi:10.1103/PhysRevA.100.022108.
  * Lostaglio and Senno [2020] Matteo Lostaglio and Gabriel Senno.  Contextual advantage for state-dependent cloning.  _Quantum_ , 4:258, April 2020.  doi:10.22331/q-2020-04-27-258.
  * Lostaglio [2020] Matteo Lostaglio.  Certifying quantum signatures in thermodynamics and metrology via contextuality of quantum linear response.  _Phys. Rev. Lett._ , 125:230603, Dec 2020.  doi:10.1103/PhysRevLett.125.230603.
  * Yadavalli and Kunjwal [2022] Shiv Akshar Yadavalli and Ravi Kunjwal.  Contextuality in entanglement-assisted one-shot classical communication.  _Quantum_ , 6:839, October 2022.  doi:10.22331/q-2022-10-13-839.
  * Flatt et al. [2022] Kieran Flatt, Hanwool Lee, Carles Roch I Carceller, Jonatan Bohr Brask, and Joonwoo Bae.  Contextual advantages and certification for maximum-confidence discrimination.  _PRX Quantum_ , 3:030337, Sep 2022.  doi:10.1103/PRXQuantum.3.030337.
  * Roch i Carceller et al. [2022] Carles Roch i Carceller, Kieran Flatt, Hanwool Lee, Joonwoo Bae, and Jonatan Bohr Brask.  Quantum vs noncontextual semi-device-independent randomness certification.  _Phys. Rev. Lett._ , 129:050501, Jul 2022.  doi:10.1103/PhysRevLett.129.050501.
  * Catani et al. [2022] Lorenzo Catani, Matthew Leifer, Giovanni Scala, David Schmid, and Robert W. Spekkens.  What is nonclassical about uncertainty relations?  _Phys. Rev. Lett._ , 129:240401, Dec 2022.  doi:10.1103/PhysRevLett.129.240401.
  * Wagner et al. [2024] Rafael Wagner, Anita Camillini, and Ernesto F. Galvao.  Coherence and contextuality in a mach-zehnder interferometer.  _Quantum_ , 8:1240, February 2024.  doi:10.22331/q-2024-02-05-1240.
  * Catani et al. [2023] Lorenzo Catani, Matthew Leifer, Giovanni Scala, David Schmid, and Robert W. Spekkens.  Aspects of the phenomenology of interference that are genuinely nonclassical.  _Phys. Rev. A_ , 108:022207, Aug 2023.  doi:10.1103/PhysRevA.108.022207.
  * Coecke et al. [2016a] Bob Coecke, Tobias Fritz, and Robert W. Spekkens.  A mathematical theory of resources.  _Information and Computation_ , 250:59–86, 2016a.  doi:https://doi.org/10.1016/j.ic.2016.02.008.  Quantum Physics and Logic.
  * Chitambar and Gour [2019] Eric Chitambar and Gilad Gour.  Quantum resource theories.  _Rev. Mod. Phys._ , 91:025001, Apr 2019.  doi:10.1103/RevModPhys.91.025001.
  * Gour [2024] Gilad Gour.  Resources of the quantum world.  _arXiv preprint arXiv:2402.05474_ , 2024.  doi:https://doi.org/10.48550/arXiv.2402.05474.
  * Horodecki et al. [2009] Ryszard Horodecki, Paweł Horodecki, Michał Horodecki, and Karol Horodecki.  Quantum entanglement.  _Rev. Mod. Phys._ , 81:865–942, Jun 2009.  doi:10.1103/RevModPhys.81.865.
  * Gonda [2021] Tomáš Gonda.  Resource theories as quantale modules.  _arXiv preprint arXiv:2112.02349_ , 2021.  doi:https://doi.org/10.48550/arXiv.2112.02349.
  * Hardy [2001] Lucien Hardy.  Quantum theory from five reasonable axioms.  _arXiv:quant-ph/0101012_ , 2001.  doi:https://doi.org/10.48550/arXiv.quant-ph/0101012.
  * Barrett [2007] Jonathan Barrett.  Information processing in generalized probabilistic theories.  _Phys. Rev. A_ , 75:032304, Mar 2007.  doi:10.1103/PhysRevA.75.032304.
  * Janotta and Hinrichsen [2014] Peter Janotta and Haye Hinrichsen.  Generalized probability theories: what determines the structure of quantum theory?  _Journal of Physics A: Mathematical and Theoretical_ , 47(32):323001, jul 2014.  doi:10.1088/1751-8113/47/32/323001.
  * Plávala [2023a] Martin Plávala.  General probabilistic theories: An introduction.  _Physics Reports_ , 1033:1–64, 2023a.  doi:https://doi.org/10.1016/j.physrep.2023.09.001.  General probabilistic theories: An introduction.
  * Gottesman [1997] Daniel Gottesman.  Stabilizer codes and quantum error correction.  _PhD thesis, California Institute of Technology_ , 1997.  doi:https://doi.org/10.48550/arXiv.quant-ph/9705052.
  * Müller and Garner [2023] Markus P. Müller and Andrew J. P. Garner.  Testing quantum theory by generalizing noncontextuality.  _Phys. Rev. X_ , 13:041001, Oct 2023.  doi:10.1103/PhysRevX.13.041001.
  * Kochen and Specker [1975] Simon Kochen and E. P. Specker.  _The Problem of Hidden Variables in Quantum Mechanics_ , pages 293–328.  Springer Netherlands, Dordrecht, 1975.  doi:10.1007/978-94-010-1795-4_17.
  * Abramsky et al. [2017] Samson Abramsky, Rui Soares Barbosa, and Shane Mansfield.  Contextual fraction as a measure of contextuality.  _Phys. Rev. Lett._ , 119:050504, Aug 2017.  doi:10.1103/PhysRevLett.119.050504.
  * Barbosa et al. [2023] Rui Soares Barbosa, Martti Karvonen, and Shane Mansfield.  _Closing Bell Boxing Black Box Simulations in the Resource Theory of Contextuality_ , pages 475–529.  Springer International Publishing, Cham, 2023.  doi:10.1007/978-3-031-24117-8_13.
  * Karvonen [2021] Martti Karvonen.  Neither contextuality nor nonlocality admits catalysts.  _Phys. Rev. Lett._ , 127:160402, Oct 2021.  doi:10.1103/PhysRevLett.127.160402.
  * Abramsky and Brandenburger [2011] Samson Abramsky and Adam Brandenburger.  The sheaf-theoretic structure of non-locality and contextuality.  _New Journal of Physics_ , 13(11):113036, nov 2011\.  doi:10.1088/1367-2630/13/11/113036.
  * Kleinmann et al. [2011] Matthias Kleinmann, Otfried Gühne, José R Portillo, Jan-Åke Larsson, and Adán Cabello.  Memory cost of quantum contextuality.  _New Journal of Physics_ , 13(11):113011, nov 2011\.  doi:10.1088/1367-2630/13/11/113011.
  * Svozil [2012] Karl Svozil.  How much contextuality?  _Natural Computing_ , 11(2):261–265, 2012.  doi:10.1007/s11047-012-9318-9.
  * Grudka et al. [2014] A. Grudka, K. Horodecki, M. Horodecki, P. Horodecki, R. Horodecki, P. Joshi, W. Kłobus, and A. Wójcik.  Quantifying contextuality.  _Phys. Rev. Lett._ , 112:120401, Mar 2014.  doi:10.1103/PhysRevLett.112.120401.
  * Li et al. [2020] Lu Li, Kaifeng Bu, and Junde Wu.  Contextual robustness: An operational measure of contextuality.  _Phys. Rev. A_ , 101:012120, Jan 2020.  doi:10.1103/PhysRevA.101.012120.
  * Horodecki et al. [2023] Karol Horodecki, Jingfang Zhou, Maciej Stankiewicz, Roberto Salazar, Paweł Horodecki, Robert Raussendorf, Ryszard Horodecki, Ravishankar Ramanathan, and Emily Tyhurst.  The rank of contextuality.  _New Journal of Physics_ , 25(7):073003, jul 2023\.  doi:10.1088/1367-2630/acdf78.
  * Amaral [2019] Barbara Amaral.  Resource theory of contextuality.  _Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences_ , 377(2157):20190010, 2019.  doi:10.1098/rsta.2019.0010.
  * Duarte and Amaral [2018] Cristhiano Duarte and Barbara Amaral.  Resource theory of contextuality for arbitrary prepare-and-measure experiments.  _Journal of Mathematical Physics_ , 59(6):062202, 06 2018.  doi:10.1063/1.5018582.
  * Schmid et al. [2018] David Schmid, Robert W. Spekkens, and Elie 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, Jun 2018.  doi:10.1103/PhysRevA.97.062103.
  * Wagner et al. [2023] Rafael Wagner, Roberto D Baldijão, Alisson Tezzin, and Bárbara Amaral.  Using a resource theoretic perspective to witness and engineer quantum generalized contextuality for prepare-and-measure scenarios.  _Journal of Physics A: Mathematical and Theoretical_ , 56(50):505303, nov 2023.  doi:10.1088/1751-8121/ad0bcc.
  * Schmid et al. [2021] David Schmid, John H. Selby, Elie Wolfe, Ravi Kunjwal, and Robert W. Spekkens.  Characterization of noncontextuality in the framework of generalized probabilistic theories.  _PRX Quantum_ , 2:010331, Feb 2021.  doi:10.1103/PRXQuantum.2.010331.
  * Gitton and Woods [2022a] Victor Gitton and Mischa P. Woods.  Solvable Criterion for the Contextuality of any Prepare-and-Measure Scenario.  _Quantum_ , 6:732, June 2022a.  doi:10.22331/q-2022-06-07-732.
  * Gitton and Woods [2022b] Victor Gitton and Mischa P. Woods.  On the system loophole of generalized noncontextuality.  _arXiv:2209.04469_ , 2022b.  doi:https://doi.org/10.48550/arXiv.2209.04469.
  * Shahandeh [2021] Farid Shahandeh.  Contextuality of general probabilistic theories.  _PRX Quantum_ , 2:010330, Feb 2021.  doi:10.1103/PRXQuantum.2.010330.
  * Selby et al. [2023] John H. Selby, David Schmid, Elie Wolfe, Ana Belén Sainz, Ravi Kunjwal, and Robert W. Spekkens.  Accessible fragments of generalized probabilistic theories, cone equivalence, and applications to witnessing nonclassicality.  _Phys. Rev. A_ , 107:062203, Jun 2023.  doi:10.1103/PhysRevA.107.062203.
  * Selby et al. [2024] John H. Selby, Elie Wolfe, David Schmid, Ana Belén Sainz, and Vinicius P. Rossi.  Linear program for testing nonclassicality and an open-source implementation.  _Phys. Rev. Lett._ , 132:050202, Jan 2024.  doi:10.1103/PhysRevLett.132.050202.
  * Harrigan and Spekkens [2010] Nicholas Harrigan and Robert W. Spekkens.  Einstein, Incompleteness, and the Epistemic View of Quantum States.  _Foundations of Physics_ , 40(2):125–157, 2010\.  doi:10.1007/s10701-009-9347-0.
  * Davies and Lewis [1970] E. Brian Davies and John T. Lewis.  An operational approach to quantum probability.  _Communications in Mathematical Physics_ , 17(3):239–260, 1970.
  * Ludwig [1985] Günther Ludwig.  _An Axiomatic Basis for Quantum Mechanics: Volume 1 Derivation of Hilbert Space Structure_.  Springer Berlin Heidelberg, Berlin, Heidelberg, 1985.  OCLC: 858930098.
  * Lami [2018] Ludovico Lami.  Non-classical correlations in quantum mechanics and beyond.  _arXiv:1803.02902_ , 2018.  doi:https://doi.org/10.48550/arXiv.1803.02902.
  * Beneduci and Loveridge [2022] Roberto Beneduci and Leon Loveridge.  Incompatibility of effects in general probabilistic models.  55(25):254005, may 2022.  doi:10.1088/1751-8121/ac6f9d.
  * Plávala [2023b] Martin Plávala.  General probabilistic theories: An introduction.  _Physics Reports_ , 1033:1–64, 2023b.  doi:https://doi.org/10.1016/j.physrep.2023.09.001.  General probabilistic theories: An introduction.
  * Holevo [2011] Aleksandr S. Holevo.  _Probabilistic and statistical aspects of quantum theory_.  Number 1 in Quaderni Monographs. Edizioni della normale, Pisa, 2., english ed edition, 2011.  OCLC: 746305136.
  * Beltrametti and Bugajski [1995] E G Beltrametti and S Bugajski.  A classical extension of quantum mechanics.  _Journal of Physics A: Mathematical and General_ , 28(12):3329, jun 1995.  doi:10.1088/0305-4470/28/12/007.
  * Coecke et al. [2016b] Bob Coecke, Tobias Fritz, and Robert W. Spekkens.  A mathematical theory of resources.  _Information and Computation_ , 250:59–86, 2016b.  doi:https://doi.org/10.1016/j.ic.2016.02.008.  Quantum Physics and Logic.
  * Houghton-Larsen [2021] Nicholas Gauguin Houghton-Larsen.  A mathematical framework for causally structured dilations and its relation to quantum self-testing.  _arXiv:2103.02302_ , 2021.  doi:https://doi.org/10.48550/arXiv.2103.02302.
  * D’Ariano et al. [2020] Giacomo Mauro D’Ariano, Marco Erba, and Paolo Perinotti.  Classical theories with entanglement.  _Phys. Rev. A_ , 101:042118, Apr 2020.  doi:10.1103/PhysRevA.101.042118.
  * Fritz [2017] Tobias Fritz.  Resource convertibility and ordered commutative monoids.  _Mathematical Structures in Computer Science_ , 27(6):850–938, 2017.  doi:10.1017/S0960129515000444.
  * Gonda and Spekkens [2023] Tomáš Gonda and Robert W. Spekkens.  Monotones in General Resource Theories.  _Compositionality_ , 5, August 2023.  doi:10.32408/compositionality-5-7.
  * Spekkens [2007] Robert W. Spekkens.  Evidence for the epistemic view of quantum states: A toy theory.  _Phys. Rev. A_ , 75:032110, Mar 2007.  doi:10.1103/PhysRevA.75.032110.
  * Banik et al. [2015] Manik Banik, Some Sankar Bhattacharya, Amit Mukherjee, Arup Roy, Andris Ambainis, and Ashutosh Rai.  Limited preparation contextuality in quantum theory and its relation to the cirel’son bound.  _Phys. Rev. A_ , 92:030103, Sep 2015.  doi:10.1103/PhysRevA.92.030103.
  * Chailloux et al. [2016] André Chailloux, Iordanis Kerenidis, Srijita Kundu, and Jamie Sikora.  Optimal bounds for parity-oblivious random access codes.  _New Journal of Physics_ , 18(4):045003, apr 2016\.  doi:10.1088/1367-2630/18/4/045003.
  * Ghorai and Pan [2018] Shouvik Ghorai and A. K. Pan.  Optimal quantum preparation contextuality in an $n$-bit parity-oblivious multiplexing task.  _Phys. Rev. A_ , 98:032110, Sep 2018.  doi:10.1103/PhysRevA.98.032110.
  * Saha et al. [2019] Debashis Saha, Paweł Horodecki, and Marcin Pawłowski.  State independent contextuality advances one-way communication.  _New Journal of Physics_ , 21(9):093057, sep 2019\.  doi:10.1088/1367-2630/ab4149.
  * Ambainis et al. [2019] Andris Ambainis, Manik Banik, Anubhav Chaturvedi, Dmitry Kravchenko, and Ashutosh Rai.  Parity oblivious d-level random access codes and class of noncontextuality inequalities.  _Quantum Information Processing_ , 18(4):111, 2019\.  doi:10.1007/s11128-019-2228-3.
  * Tavakoli et al. [2021] Armin Tavakoli, Emmanuel Zambrini Cruzeiro, Roope Uola, and Alastair A. Abbott.  Bounding and simulating contextual correlations in quantum theory.  _PRX Quantum_ , 2:020334, Jun 2021.  doi:10.1103/PRXQuantum.2.020334.
  * Catani et al. [2024] Lorenzo Catani, Ricardo Faleiro, Pierre-Emmanuel Emeriau, Shane Mansfield, and Anna Pappa.  Connecting xor and xor∗ games.  _Phys. Rev. A_ , 109:012427, Jan 2024.  doi:10.1103/PhysRevA.109.012427.
  * Khoshbin et al. [2024] Massy Khoshbin, Lorenzo Catani, and Matthew Leifer.  Alternative robust ways of witnessing nonclassicality in the simplest scenario.  _Phys. Rev. A_ , 109:032212, Mar 2024.  doi:10.1103/PhysRevA.109.032212.
  * Valentini [1991] Antony Valentini.  Signal-locality, uncertainty, and the subquantum h-theorem. i.  _Physics Letters A_ , 156(1):5 – 11, 1991.  doi:https://doi.org/10.1016/0375-9601(91)90116-P.
  * Schmid et al. [2024] David Schmid, John H. Selby, and Robert W. Spekkens.  Addressing some common objections to generalized noncontextuality.  _Phys. Rev. A_ , 109:022228, Feb 2024.  doi:10.1103/PhysRevA.109.022228.
  * Spekkens [2016] Robert W. Spekkens.  _Quasi-Quantization: Classical Statistical Theories with an Epistemic Restriction_ , pages 83–135.  Springer Netherlands, Dordrecht, 2016.  doi:10.1007/978-94-017-7303-4_4.
  * Catani and Browne [2017] Lorenzo Catani and Dan E Browne.  Spekkens’ toy model in all dimensions and its relationship with stabiliser quantum mechanics.  _New Journal of Physics_ , 19(7):073035, jul 2017\.  doi:10.1088/1367-2630/aa781c.
  * Catani and Browne [2018] Lorenzo Catani and Dan E. Browne.  State-injection schemes of quantum computation in spekkens’ toy theory.  _Phys. Rev. A_ , 98:052108, Nov 2018.  doi:10.1103/PhysRevA.98.052108.
  * Montina and Wolf [2023] Alberto Montina and Stefan Wolf.  Realism and causality imply information erasure by measurements.  _arXiv:2307.03134_ , 2023.  doi:https://doi.org/10.48550/arXiv.2307.03134.
  * Bennett et al. [1996] Charles H. Bennett, Herbert J. Bernstein, Sandu Popescu, and Benjamin Schumacher.  Concentrating partial entanglement by local operations.  _Phys. Rev. A_ , 53:2046–2052, Apr 1996.  doi:10.1103/PhysRevA.53.2046.
  * Buscemi [2012] Francesco Buscemi.  All entangled quantum states are nonlocal.  _Phys. Rev. Lett._ , 108:200401, May 2012.  doi:10.1103/PhysRevLett.108.200401.
  * Schmid et al. [2023] David Schmid, Thomas C. Fraser, Ravi Kunjwal, Ana Belen Sainz, Elie Wolfe, and Robert W. Spekkens.  Understanding the interplay of entanglement and nonlocality: motivating and developing a new branch of entanglement theory.  _Quantum_ , 7:1194, December 2023.  doi:10.22331/q-2023-12-04-1194.
  * Leifer and Pusey [2017] Matthew S. Leifer and Matthew F. Pusey.  Is a time symmetric interpretation of quantum theory possible without retrocausality?  _Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences_ , 473(2202):20160607, 2017.  doi:10.1098/rspa.2016.0607.
  * Chaturvedi and Saha [2020] Anubhav Chaturvedi and Debashis Saha.  Quantum prescriptions are more ontologically distinct than they are operationally distinguishable.  _Quantum_ , 4:345, October 2020.  doi:10.22331/q-2020-10-21-345.

##  Appendix A Physicality of the Holevo projection

In the framework of GPTs a physical map $\mathsf{A}\to\mathsf{B}$ is given by
a linear map $M:V_{\mathsf{A}}\to V_{\mathsf{B}}$ such that
$M(\Omega_{\mathsf{A}})\subset\Omega_{\mathsf{B}}$. $M$ can be viewed as part
of a preparation procedure, preparing a state of $\mathsf{B}$ by first
preparing a state $\omega_{\mathsf{A}}$ of $\mathsf{A}$ and then applying $M$
to obtain $\omega_{\mathsf{B}}=M\omega_{\mathsf{A}}$. Composing this with a
measurement $\\{e_{\mathsf{B}}^{i}\\}_{i}$ on $\mathsf{B}$ gives outcome
probabilities $e_{\mathsf{B}}^{i}(M\omega_{\mathsf{A}})$. However, one could
also view this experiment as preparing the state $\omega_{\mathsf{A}}$ on
system $\mathsf{A}$ and then measuring $\\{e_{\mathsf{B}}^{i}\circ
M\\}_{i}=\\{M^{*}e_{\mathsf{B}}^{i}\\}_{i}$ which is a measurement on
$\mathsf{A}$, hence we require that a physical map also obeys
$M^{*}e_{\mathsf{B}}\in E_{\mathsf{A}}$ for all $e_{\mathsf{B}}\in
E_{\mathsf{B}}$.

######  Definition 32 (Physical GPT map).

A physical map $M$ between two system
$\mathsf{A}=(\Omega_{\mathsf{A}},E_{\mathsf{A}},V_{\mathsf{A}})$ and
$\mathsf{B}=(\Omega_{\mathsf{B}},E_{\mathsf{B}},V_{\mathsf{B}})$ is given by a
linear map $M:V_{\mathsf{A}}\to V_{\mathsf{B}}$ such that:

$\displaystyle M(\Omega_{\mathsf{A}})\subseteq\Omega_{\mathsf{B}},$ (82)
$\displaystyle M^{*}(E_{\mathsf{B}})\subseteq E_{\mathsf{A}}.$ (83)

It turns out that a (multivalent) simulation of $\mathsf{B}$ by $\mathsf{A}$
does not, in general, define a physical transformation
$\mathsf{A}\to\mathsf{B}$. First, a simulation $(\Gamma,\Theta)$ from
$\mathsf{B}=(\Omega_{\mathsf{B}},E_{\mathsf{B}})$ to
$\mathsf{A}=(\Omega_{\mathsf{A}},E_{\mathsf{A}})$ is given by a pair of
multivalued maps. The state simulation
$\Gamma:\Omega_{\mathsf{A}}\to\Omega_{\mathsf{B}}$ is not, in general, a map
(since it does not assign a unique element of $\Omega_{\mathsf{B}}$ to each
$\Omega_{\mathsf{A}}$). The inverse $\Gamma^{-1}$:
$\Gamma(\Omega_{\mathsf{A}})\subset\Omega_{\mathsf{B}}\to\Omega_{\mathsf{A}}$
defines a map $\Gamma(\Omega_{\mathsf{A}})\to\Omega_{\mathsf{A}}$, which does
not, in general, linearly extend to a map $\Gamma^{-1}:V_{\mathsf{B}}\to
V_{\mathsf{A}}$ and hence cannot be a physical transformation.

Moreover, in the case where $\Gamma^{-1}$ does define a linear map
$V_{\mathsf{B}}\to V_{\mathsf{A}}$ it might not meet the requirement that
$(\Gamma^{-1})^{*}(E_{\mathsf{A}})\subseteq E_{\mathsf{B}}$. This shows why,
within the framework of GPTs, one cannot in general associate a physical
process from an underlying classical system to the GPT system for a generic
ontological model.

However, there is a family of simulations which do.

######  Lemma 33.

The HBB simulation (see Example 16) of a system $\mathsf{A}$ with finitely
extremal states $\delta_{\rm ext}(\Omega_{\mathsf{A}})=X$ on the classical
system $\Delta_{|X|}$ given by the multivalued maps $(\Gamma,\Theta)$ induces
a physical map $\Gamma^{-1}:\Delta_{|X|}\to\mathsf{A}$.

###### Proof.

Given a GPT system $\mathsf{A}$ with finitely many extremal states $X$ the HBB
model is given by the maps $(\Gamma,\Theta)$ as defined in Example 16. We
first show that $\Gamma^{-1}:\Gamma(\Omega_{\mathsf{A}})\to\Omega(\mathsf{A})$
defines a map $\Delta_{|X|}\to\Omega_{\mathsf{A}}$.

The map $\Gamma^{-1}$ acts on extremal states of $\Delta_{|X|}$ as:

$\displaystyle\Gamma^{-1}:\delta_{x}\mapsto\omega_{x},x\in X.$ (84)

Extending the action to mixed states gives:

$\displaystyle\bar{\Gamma}^{-1}:\sum_{x}p_{x}\delta_{x}\mapsto\omega=\sum_{x}p_{x}\omega_{x}.$
(85)

This is consistent with $\Gamma:\omega\mapsto\\{\sum_{x\in
X}p_{x}\delta_{x}|p_{x}\in[0,1],\sum_{x\in X}p_{x}=1,\omega=\sum_{x\in
X}p_{x}\omega_{x}\\}$ since $\bar{\Gamma}^{-1}(\Gamma(\omega))=\omega$ for
every $\mu\in\Gamma(\omega)$.

Since $\Delta_{|X|}$ spans $\mathbb{R}^{|X|}$ the map $\bar{\Gamma}^{-1}$
linearly extends to $\mathbb{R}^{|X|}$, defining a map $M:\mathbb{R}^{|X|}\to
V_{\mathsf{A}}$.

This map satisfies $M^{*}(E_{\mathsf{A}})\subset\Delta_{m}^{*}$ which can be
seen as follows:

$\displaystyle
M^{*}(e_{\mathsf{A}})\omega_{\Delta_{m}}=e_{\mathsf{A}}(M\omega_{\Delta_{m}})=e_{\mathsf{A}}(\omega_{\mathsf{A}})\in[0,1].$
(86)

Hence $M^{*}(e_{\mathsf{A}})$ takes $\Delta_{m}$ to $[0,1]$ and, since
$\Delta_{m}$ is unrestricted, $M^{*}(e_{\mathsf{A}})\in\Delta_{m}^{*}$. ∎