Measurement Contextuality and Planck's Constant

Contextuality is a necessary resource for universal quantum computation and non-contextual quantum mechanics can be simulated efficiently by classical computers in many cases. Orders of Planck's constant, $\hbar$, can also be used to characterize the classical-quantum divide by expanding quantities of interest in powers of $\hbar$---all orders higher than $\hbar^0$ can be interpreted as quantum corrections to the order $\hbar^0$ term. We show that contextual measurements in finite-dimensional systems have formulations within the Wigner-Weyl-Moyal (WWM) formalism that require higher than order $\hbar^0$ terms to be included in order to violate the classical bounds on their expectation values. As a result, we show that contextuality as a resource is equivalent to orders of $\hbar$ as a resource within the WWM formalism. This explains why qubits can only exhibit state-independent contextuality under Pauli observables as in the Peres-Mermin square while odd-dimensional qudits can also exhibit state-dependent contextuality. In particular, we find that qubit Pauli observables lack an order $\hbar^0$ contribution in their Weyl symbol and so exhibit contextuality regardless of the state being measured. On the other hand, odd-dimensional qudit observables generally possess non-zero order $\hbar^0$ terms, and higher, in their WWM formulation, and so exhibit contextuality depending on the state measured: odd-dimensional qudit states that exhibit measurement contextuality have an order $\hbar^1$ contribution that allows for the violation of classical bounds while states that do not exhibit measurement contextuality have insufficiently large order $\hbar^1$ contributions.

Contextuality is a quantum resource whose presence in an experiment has been shown to be equivalent to negativity in the associated discrete Wigner functions and Weyl symbols of the states, operations, and measurements that are involved [9,10]. Preparation contextuality [20] has been shown to be equivalent to the necessity of including higher than order 0 terms in path integral expansions of unitary operators in the WWM formalism for proper computation of propagation [21,22]. As a result, stabilizer state propagation under Clifford gates can be shown to be non-contextual since it does not require higher than 0 terms within WWM, or equivalently, the Wigner function of stabilizer states are nonnegative and the Weyl symbols of Clifford gates are positive maps [5,13,23].
Here we complete the characterization of the relationship between orders of in WWM and contextuality by showing that measurement contextuality [20,24] is also equivalent to non-classicality as dictated by powers of . Specifically, contextuality requires us to include higher than order 0 terms in the expansion of observables within the WWM formalism to obtain expectation values that violate classical bounds. Moreover, this equivalency explains why qubits exhibit stateindependent contextuality while odd-dimensional qudits also exhibit state-dependent contextuality. Furthermore, this confirms the result that any quasi-probability representation that defines a set of complete experimental configurations, such as the WWM, must either exhibit negativity in the quasiprobability functions for either states or measurements, or make use of a deformed probability calculus [14] (defined below).
Let us begin by defining the context of a measurement. A projection of a quantum state onto a rank n ≥ 2 subspace of its Hilbert space can be decomposed into a sum of smaller rank projectors in many ways. Fixing a subset of the terms in a sum of such projectors, there are many choices for the remaining terms. Each non-commuting decomposition of the remaining terms corresponds to a "context" of the measurement.
Instead of projectors we may speak instead about observables. The rank n ≥ 2 subspace is then a degenerate eigenspace of some observable. The different contexts correspond to different choices of complete sets of commuting observables whose eigenstates are the projectors onto the different contexts. Again, different choices of complete sets of commuting observables do not commute with each other, for otherwise they would share the same eigenstates and so correspond to the same context.
For instance, considering two qubits, the measurement ofXÎ corresponds to a projection onto a subspace of rank two. It can be performed in the context of {XÎ,ÎX} or {XÎ,ÎẐ}. The operators in each set commute with each other. However, the two operators that distinguish these contexts,ÎX andÎẐ anticommute, and the product of the operators in each set anticommute with each other [25]. Hence the outcome of a measurement ofXÎ is not independent of the choice of context. Each set corresponds to a projection onto the full rank four Hilbert space and is a separate context forXÎ. These two sets correspond to the first row and column of the Peres-Mermin square shown in Table I (the third element in the row and/or column is redundant-its outcome is determined by the first two measurements) [25]. Every element in the table contains a Pauli observable. The operators in the same row or column commute and so can be performed independently of each other. However, operators in a particular row or column do not commute with operators in other rows and columns. While every observable in the table has ±1 as possible outcomes, the row and columns are completely-commuting sets of operators (CCSOs) whose product have +1 as their only possible outcomes due to the Pauli operator relationσ jσkσl = i jkl + δ jkσl . The exception is the third column, which has −1 as its product's only possible outcome as can be seen from the same identity relation.

XÎÎXXX IẐẐÎẐẐ XẐẐXŶŶ
As a result, the different contexts of a particular observable in the Peres-Mermin square correspond to its row and column. Assigning classical ±1 outcomes to the measurement of the operators in the table such that their product satisfies the constraints on the outcomes of the rows and columns is impossible. Given one of the measurements in the Peres-Mermin square, it is impossible to assign an outcome without specifying the context of the full rank observables, i.e. whether the measurement is taken column-wise or row-wise.
In this way, the Peres-Mermin square demonstrates that qubits exhibit measurement contextuality with Pauli operators [25][26][27]. Furthermore, the Peres-Mermin square shows that qubits exhibit state-independent contextuality; no matter what qubit state the Peres-Mermin measurements are performed on, their outcome will always depend on the context or which other measurements are co-performed [28].
On the other hand, higher-dimensional qudits can also exhibit measurement contextuality that is statedependent. For odd d-dimensional qudits, it is possible to exhibit contextuality for a single qudit. In particular, Klyachko et al. [29] developed a scheme (called KCSB after the four authors) for a single qutrit (d = 3) that exhibits state-dependent contextuality [30]. KCSB and other constructions are all different demonstrations of the Kochen-Specker theorem [26], which was also originally proposed for a qutrit, and exclude any hidden variable theory (HVT) that is non-contextual from reproducing quantum mechanics for d ≥ 3.
The KCSB scheme is defined as follows. Consider a set Γ of five rank-1 projectors, Γ = {Π i } i=1,...,5 , which commute with neighboring pairs ([Π i ,Π i⊕1 ] = 0, where i ⊕ 1 denotes addition performed modulo 5). We further impose that commuting projectors are also orthogonal to each other, i.e. they both cannot take on the value +1. Such a realization is illustrated in Fig. 1, where the five projectors are placed along the points of a pentagon such that projectors that share an edge commute. The two contexts for a measurement on any vertex of the pentagon corresponds to its two adjoining edges; i.e.Π 1 can be measured in the context of Finally, we define,Σ These five projectors obeyΠ iΠi⊕1 = 0. By Mermin's argument, any classical outcome {0, +1} one preassigns to the measurement must obey the same relationship [28]. Adjacent vertices therefore cannot both be assigned the outcome +1, and so the maximum expectation value for Σ Γ is two: This upper bound is higher if the above expectation value is evaluated quantum mechanically. Namely, of the three eigenstates ofΣ Γ , |φ 1 , |φ 2 , and |φ 3 , with eigenvalues (5 − √ 5)/2 ≈ 1.382, 1.382 and √ 5 ≈ 2.236 respectively, the last state can be shown to saturate the quantum bound [29]: As a result,Σ Γ can be interpreted as a witness for contextuality; any state Ψ with expectation value Ψ Σ Γ Ψ > 2 exhibits measurement contextuality. The states |φ 1 and |φ 2 don't exhibit contextuality within the KCSB construction while |φ 3 does.
An equivalent witness for contextuality that will be more useful for us later is the sum of products of noncommuting pairs of observables. Defining this set as Γ 2 , where this witness for contextuality can be written aŝ Following the conclusion from the Σ Γ witness for contextuality-that a maximum of two non-adjacent observables can be assigned outcomes of +1-it follows that the maximum classical expectation value forΣ Γ 2 is also two: Again, the upper bound is higher in quantum mechanics. While |φ 1 and |φ 2 have expectation values witĥ Σ Γ 2 of 0.263932 < 1, |φ 3 saturates the quantum bound: As a result,Σ Γ 2 also exhibits measurement contextuality with the state |φ 3 . Just as for the Peres-Mermin square, any effort to assign more than two classical +1 outcomes to the measurements in the KCSB pentagon, while satisfying the constraint that the neighbors have different outcomes, is impossible. The outcome of any measurement on a vertex depends on whether it is taken in the context of its left or right neighboring observable. However, unlike for the Peres-Mermin square, this dependence on context only holds for certain quantum states. The state dependence of measurement contextuality for qutrits is not limited to the KCSB scheme. In general, odd-dimensional qudits can exhibit state-dependent contextuality under Pauli measurements, while qubits can only exhibit state-independent contextuality. This is a curious dichotomy. It has been found that (preparation) contextuality is a necessary resource for universal quantum computation [19] and so is of great interest for the development of quantum computers. Does this suggest that qubits are somehow harder to simulate classically compared to odd d > 2 qudits? This is certainly not the case for the simulation of qubit stabilizer states. Preparation and evolution of these states is efficient using the Aaronson-Gottesmann algorithm and these operations are also noncontextual for qubits [22]. This is the puzzle we examine in the present paper.
Another way to characterize a divide between the quantum characteristics of an observable in its different contexts and its classical limit is to consider the observable expressed as products of other observables that define a particular context. It is then instructive to examine these expressions' expansions in terms of Planck's constant . Since the classical limit is reached as → 0, the leading order 0 term, which is independent of the magnitude of , can be interpreted as the classical term while higher order terms act as quantum corrections [31].
Applying such an approach requires a path integral formulation of discrete quantum systems. We will use the Wigner-Weyl-Moyal (WWM) formalism which has been developed for odd d-dimensional qudits [1,5,13,23] and was recently extended to qubits (d = 2) [22]. The WWM formalism is particularly useful for finite-dimensional systems because it uses the conjugate degrees of freedom of "chords" and "centers" to define Hamiltonian phase space, instead of momentum and position as is the traditional approach for infinite-dimensional continuous Hilbert spaces. The former are associated with translation and reflection operators that retain their role in a well-defined Lie group in a finite-dimensional Hilbert space, while the latter are associated with momentum and position operators which no longer form a simple Lie algebra in finite-dimensional spaces.
The WWM formalism allows for a semiclassical expansion of unitary operations in discrete systems in powers of through the van Vleck propagator approach [32]. It is also possible to semiclassically expand Hermitian operators (observables) in powers of using the Groenewold Rule [33], and we will show that this also holds true for the discrete WWM formalism for both d = 2 and odd d. By considering observables that are also products of observables (corresponding to different contexts), we show that the WWM formalism can be used to formulate an equivalent statement of measurement contextuality with regards to orders of .
This can be restated in the somewhat more general language of quasi-probability distributions and frame representations of quantum mechanics. Given a measurable space Γ (a phase space) endowed with a positive measure µ and a measurement that is represented by a set of conditional properties {M k (α) ∈ R} that all satisfy some natural properties [14], the probability of obtaining outcome k is P , whereÊ is any frame dual toF (defined in [14]). This quantity is a deformation of the classical probability function: We shall see that the WWM formalism reduces to such a simpler classical form for non-contextual mea-surements. In this case, the WWM formalism is readily seen to be a non-contextual HVT where every state has an associated ensemble of ontic states that are deterministically measured independently of their context. Observables on states that produce non-contextual outcomes can be found to reduce to indicator functions of an associated ensemble of ontic states that do not rely on a deformed probability calculus in the sense of [14] to violate their classical bounds, while states that produce contextual outcomes do rely on a deformed probability calculus introduced by the higher than order 0 corrections.

II. A SUMMARY OF THE WIGNER-WEYL-MOYAL FORMALISM
The WWM formalism was originally developed to try to introduce classical phase space into quantum statistical mechanics [34][35][36] but has also found much use in analyzing general quantum mechanical phenomena. The formalism's relationship with classical mechanics was formalised with the introduction of a center-chord reformulation that allowed for classical trajectories to be variationally expanded with respect to [2,[37][38][39][40][41].
Taken as whole, the WWM formalism is a faithful representation of quantum mechanics, like the position (or computational basis) matrix representation of quantum operators and states. As such, the it reproduces all of the results of quantum mechanics. OperatorsÔ are replaced by their Weyl symbols, W O (ζ), which are functions on phase space. The Weyl symbols of states |Ψ are often called Wigner functions and the expectation value of an operatorÔ in a state |Ψ is given by: The WWM formalism was originally developed for continuous infinite-dimensional systems, and has since been extended to finite-dimensional qudits [5,22,23]. This extension differs depending on whether the qudits are odd-dimensional or even-dimensional (d = 2). In the former case, the continuous WWM formalism can be periodized and discretized by setting = d/2π, so that the phase space is generated by two coordinates-momenta and positions, ζ ≡ x = (p, q), which take finite scalar values. In the latter, a Grassmann algebra needs to be used such the phase space is generated by three coordinates, ζ ≡ ξ = (ξ p , ξ q , ξ r ), which are Grassmann elements and not scalars.
Here we present a summary of the WWM formalism for odd d qudits and d = 2 qubits.

A. Odd-Dimensional Qudits
To define Weyl phase space, we begin in infinitedimensional space and define the Weyl-Heisenberg op-erators [32]: The elements of the setT are Hilbert-Schmidt orthogonal.Ẑ andX generate a Lie group and correspond to the "boost" operator: and the "shift" operator: which satisfy the Weyl relation: We defineR(x) as the symplectic Fourier transform of where for I n the n-dimensional identity. The domain of theR operators, x, can be associated with phase space. The Weyl symbol of operatorρ can be expressed as the coefficient of the operator expanded in the basis of stateŝ R(x p , x q ), which are parametrized by x: Ifρ is a state, Wρ(x) is the corresponding Wigner function.
Restricting this to finite odd d-dimensional systems involves setting = d/2π, and enforcing periodic boundary conditions [5]. The points (λ p , λ q ) and (x p , x q ) become elements in (Z/dZ) 2n and form a discrete "web" or Weyl "grid". The generalized translation operator becomeŝ where ω ≡ exp 2πi/d and (d + 1)/2 is equivalent to 1/2 in mod odd-d arithmetic, and the reflection operator becomes: (18) Again, the Weyl symbol of an operatorρ can be expressed as a (now discrete) coefficient of the density matrix expanded in the basis of statesR(x p , x q ): If we regard the points of discrete phase space as ontic states labelled by (p, q), as we do in classical mechanics, then any classical operation maps an ontic state (p, q) to a new ontic state (p , q ). Evidently, these ontic states are not allowed states of quantum mechanics. However, the set of quantum states called stabilizer states are represented by non-negative Wigner functions that faithfully represent a subset of quantum states [13] and we can interpret these non-negative states as representing an ensemble of ontic states. That is, in each realization of an experiment there is some true ontic state (p, q) present initially, but repeated measurements can only sample these states from the distribution implied by W ψ . Furthermore, Clifford gates are a subset of all quantum operations that take stabilizer states to other stabilizer states. Thus, Clifford gates can be interpreted to take ontic states to other ontic states.
This interpretation implies that in the preparation and evolution parts of an experiment utilizing only stabilizer states and Clifford gates there is a real ontic state present in each realization of the experiment. The preparation samples an ontic state from the distribution W ψ and the Clifford gates then deterministically map this ontic state to another ontic state.
Just as in Bohmian mechanics or in Bell's HVTs for a single spin one-half [42], the WWM formalism augments the wave function (which determines the Wigner function) by an ontic state-in this case of a particle in a discrete phase space. One may therefore regard the theory as ontological-there is always a real state actually present, with an epistemic restriction imposed by the set of allowed Wigner functions. The probabilistic nature of the theory therefore arises from this epistemic restriction, i.e. from our enforced ignorance of what the true ontic state actually is. This is of course the same situation as for classical probabilistic theories.
How do we regard measurement in this interpretation of the WWM formalism? Absent the epistemic restriction imposed by the wavefunction, one would simply like to measure the ontic state (p, q) as one would for a classical particle. Of course, because the WWM formalism is a faithful representation of quantum mechanics this is impossible. Let's consider measurements of p and q separately. Given W ψ (x p , x q ) there is an implied marginal distribution of x p or x q : (20) and: As usual in HVTs, we can therefore interpret measurements in terms of indicator functions on the discrete phase space. In this simple example, δ xp,x p and δ xq,x q . How do these indicator functions arise in the WWM for-malism given either a Hermitian observable or more generally a POVM for the measurement?
The POVM representation of the measurement of a (Hermitian) observable is just given by the set of orthogonal projectors onto a complete basis of distinct eigenvectors. The Weyl symbols of these projectors are of course just the Wigner functions of the corresponding state, which are normalized characteristic functions of the support of those states. In summary, the indicator functions for a general POVM for a measurement corresponds to the Weyl symbols of the associated orthogonal set of projectors.
On the other hand, the indicator functions of an ob-servableÂ in WWM is simply its Weyl symbol W A (x). In this paper, we are interested in observables that are expressed as products with other observables (e.g.ÂB) to indicate the contexts of the measurement.
In the continuous case, it can be shown by Groenewold's Rule [33] that the Weyl symbol of a product of operators is equal to the product of their Weyl symbols up to order 0 [32]: This identity remains true after discretization and periodization for an odd d dimensional system. This means that in the classical limit (when → 0 and the order 0 terms are the only ones remaining nonzero), the Weyl symbol of a product of observables is the product of the Weyl symbols of the observables. In other words, the indicator functions of the observables become independent of each other-an observation that will prove very useful when we study measurement contextuality in Section III.

B. Qubits
While the WWM formalism for odd-dimensional qudits can be made with the two generators,p andq, the WWM formalism for qubits requires three generators. This is because the translation operator forms a subgroup of SU (d) only for odd d [43], and Clifford gates in any odd prime power dimension are unitary two-designs, while multiqubit Clifford gates are also unitary threedesigns [18,44].
The three real generators can be treated as classical canonical variables: where "P. B." stands for the Poisson bracket and ∂ ∂ξj and ∂ ∂ξj are right and left derivatives respectively, as defined in [22]. To quantize our algebra, we replace the Poisson brackets for the canonical variables by the anti-commutator multiplied by −i/ [2]: Renormalizing, we get the Clifford algebra with the three generators:ξ Theseσ k are the Pauli operators. It can be shown that the operator corresponds to a translation operator and the dual to the translation operatorT is: which corresponds to a reflection (actually an inversion) operator.
As in the odd d case in Section II A, these reflections are parametrized by phase space ξ ≡ (ξ p , ξ q , ξ r ), which here is made up of elements of the Grassmann algebra G 3 instead of Z/dZ.
TheseR serve as a complete operator basis for any Hilbert space operatorĝ under Grassmann integration [22]:ĝ Therefore, any operatorĝ can be expressed as a linear combination ofR operators parametrized by ξ. We identify g(ξ) as the Weyl symbol ofĝ, or the Wigner function ifĝ is a density matrix (ρ). The Weyl symbol g(ξ) corresponding to the operatorĝ can be equivalently represented by a sum of even or odd powers of Grassmann elements. Here we choose g(ξ) to contain only even terms. Eq. 29 means that the Weyl symbol (or Wigner function) g(ξ) can be associated with the coefficients making upĝ's decomposition in theR operator basis.
It remains to define measurement in this threegenerator Grassmann WWM formalism. As in the odd d qudit case, let us begin by considering taking measurements of ξ p , ξ q and now also ξ r separately. In the odd d case we could accomplish this by tracing away the other degrees of freedom. This is not possible for d = 2 because of the Grassmann elements. Unlike its twogenerator analog, a three-generator Weyl symbol cannot generally produce scalar values after partial traces; it is a map to G 3 after all, not R. To produce a real value, a three-generator Weyl symbol must be traced over all of its three degrees of freedom.
Fortunately, we can appeal to what we discovered after taking partial traces in odd d: partial traces in p or q are the same as a full trace over the Wigner functions of the associated eigenstates ofp andq. In other words, marginals can be obtained as a special case of expectation values.
Using the Grassmann integral equations, it is easy to see that taking the trace with the odd Weyl symbols of thê q eigenstates, q ± (ξ) = 1 2 (iξ p ξ r ξ q ± ξ q ), produces These results together provide the marginal |Ψ(q)| 2 .
In general, the expectation values of the projectors onto the eigenstates of an observable simply give the marginal distribution of that observable.
As before for odd d, we can interpret measurements in terms of indicator functions on discrete phase space. In the example above, the indicator function is q ± (ξ)-the Weyl symbol of the orthogonal set of projectors ofQ. This allows us to measure the ontic state (ξ p , ξ q , ξ r ) as one would for a classical particle.
Again, as before for the odd d WWM formalism, we are interested in observables that are products of observables, and their expansion. We can begin with [2]: and let Σ = ξ 1 + ξ 2 and σ = ξ 1 − ξ 2 so that we can reexpress this equation in terms of a quadratic argument: Evaluating this integral by stationary phase, we find the stationary points of the phase φ ≡ 1 [(Σ + σ)(Σ − σ) + ξσ] to be and The resultant two Grassmann Gaussian integrals [2,22] produce the prefactor and so the order 0 term consists of the prefactor multiplied by the full equation evaluated at the stationary phase point ξ 1 = ξ 2 = ξ: We leave a more detailed development of the WWM formalism to the literature [2, 5, 21-23, 32] so as not to deviate from our focus on contextuality. To summarize, the main results of interest to us in the finite-dimensional WWM formalism are the Weyl symbol of observables which are products of observables, W AB (ζ), and serve to define the contexts of a measurement. These can be expanded with respect to to produce the leading term: for odd d, and for d = 2. W A (ζ) and W B (ζ) correspond to the Weyl symbols of the observablesÂ andB separately and W AB (ζ) is the Weyl symbol of the productÂB (wherê AB is an obervable iff. [Â,B] = 0). In the classical limit ( → 0) the Weyl symbols of the products of observables become the product of the Weyl symbols of each operator separately. These identities will prove to be very illuminating for studying measurement contextuality in the next section.

III. MEASUREMENT CONTEXTUALITY
Measurement contextuality was defined in the Introduction as the phenomenon described by a rank n ≥ 2 observable that can be measured jointly with either one of two other non-commuting observables-two contexts of measurement-and whose outcomes depend on this choice. Measurement contextuality can also be reexpressed in terms of a hidden variable theory (HVT): if the outcome of a measurement on a state computed by an HVT, which can be measured jointly with either one of two other non-commuting observables, is independent of which of the two other observables it is measured jointly with, then the measurement is non-contextual in that HVT.
The WWM formalism described for odd-dimensional qudits in Section II A and for qubits in Section II B is an example of an HVT. The "hidden variables" in this HVT are the Weyl phase space points, x p and x q in the odddimensional WWM formalism and the stabilizers in the qubit WWM formalism. Every state can be described by these hidden variables, namely by their support on these variables. Stabilizer states can be shown to have non-negative support on these hidden variables and so can be described by bona fide classical probability distributions that propagate amongst themselves under Clifford gates [21,45]. This process can be described as one requiring only the O( 0 ) terms in its path integral formalism in WWM, and so is preparation non-contextual. Here we turn our attention to measurement contextuality in the WWM formalism.
Theorem 1 (Measurement Contextuality) A pure stateρ ≡ |Ψ Ψ| exhibits measurement contextuality under measurement by some observableΣ under contextŝ ΣΣ k if the Wigner function of the operators, W ΣΣ k , must be treated at an order higher than 0 to compute the expectation values: Proof Let us consider the non-commuting observables, ΣΣ k , corresponding to the different contexts of measur-ingΣ. If the measurement is non-contextual then this means that the hidden variables predicting the expectation values ofΣ are the same whetherΣ is measured in the context withΣ k or with anotherΣ k . In other words, the indicator function forΣ must be independent of the indicator function forΣ k andΣ k : for all given contexts k. By " = non-context.
" we denote equality given non-contextual measurements; the left-hand side equals the right-hand side given that the corresponding measurements are non-contextual. (We note that this neither implies that Ψ ΣΣ k Ψ = Ψ ΣΣ k Ψ nor that Ψ ΣΣ k/k Ψ = Ψ Σ Ψ Ψ Σ k/k Ψ ).
Eq. 42 is exactly equal to the 0 limit of products of observables (Eq. 39 for odd d qudits and Eq. 40 for qubits).
Therefore, only if the expansion of W ΣΣ k must be treated at an order higher than order 0 is the associated measurement Ψ ΣΣ k Ψ contextual.
The approach used in the proof, relies on products of observables (Hermitian operators). This permits the relatively simple treatment presented here instead of using a more involved method likely involving a semiclassical treatment of the Lindblad equation to capture the nonunitary measurement process [46].

IV. EXAMPLES
The two examples of state-independent contextuality for qubits and state-dependent contextuality for qutrits examined in the Introduction have become well known because of their particular simplicity. We reexamine them here with regards to their expansion in terms of and Theorem 1.

A. Peres-Mermin Square
It is possible to see the contextuality of the qubit Pauli operators in the Peres-Mermin square from the perspective of Theorem 1. Multiplying together any of the operators in a row or column corresponding to a context requires multiplying two Pauli operatorsσ 1 andσ 2 in each qubit tensor factor. For instance, in the first column we can assignσ 1 =X andσ 2 =X for the first qubit from the entries in the first and third rows, and we can assign σ 1 =Ẑ andσ 2 =Ẑ for the second qubit from the entries in the second and third rows (the identity matrices act trivially). Examining each qubit subspace separately, we find that the corresponding Weyl symbol of these observables is zero at order 0 since the square of Grassmann elements is equal to zero: In this way, it is clear from Theorem 1 that Pauli qubit operators are contextual for all states, as they all require the order 1 term of the measurement operator.
Note that this is generally not true for odd d. The product of two odd d Weyl symbols is only equal to zero if both are equal to zero; the result for qubits is a unique property dependent on the Grassmann algebra that underpins them. This means that odd d qudit observables will always have a finite order 0 term as we shall see in the following examination of the KCSB construction.

B. KCSB
The fact thatΣ Γ 2 is a sum of products of observables allows us to directly make use of Theorem 1 by examining its Weyl expectation value: where all order 0 terms are defined to be in W 0 Σ Γ 2 (x) and all higher order terms in W Σ Γ 2 (x).
These expectation values ofΣ Γ 2 and its order 0 and parts are given in Table II, evaluated with all the qutrit stabilizer states. From this table we find that the expectation values of the two states |φ 1 and |φ 2 withΣ Γ 2 are largely captured at order 0 while the third eigenstate ofΣ Γ , |φ 3 , has an order 1 term that is dominant. Indeed, it is even greater than the classical bound and is necessary for |φ 3 's expectation value withΣ Γ 2 to surpass its classical bound. As a result, by Theorem 1, we conclude that the first two states exhibit measurement non-contextuality while the third exhibits measurement contextuality under the KCSB construction. This agrees with the conclusion reached from traditional outcome assigment argument presented in the Introduction.

V. DISCUSSION
In the example involving the Peres-Mermin square, we found that the state-dependent measurement contextuality could be attributed to the fact that qubit Pauli observables have no order 0 term. The lack of the order 0 term is unique to d = 2. By contradistinction, odddimensional qubit operators often have a finite order 0 TABLE II.Σ Γ 2 expectation values of the stabilizer states indicated by the first row. The full (exact) expectation value is given in the second column, the expectation value up to order 0 is given in the third column, and the difference ( x W φ (x)W Σ Γ 2 (x)) of the two, corresponding to the contribution of order to the expectation value is given in the fourth column. The order contribution in the third row, corresponding to the state |φ2 , is shown in bold to highlight that the contribution of order to its expectation value is greater than the classical bound on the expectation value.
term. Indeed, this is because a zero order 0 term is impossible in the WWM formalism with the algebra used for odd d qudits (for non-zero operators). It is uniquely due to the Grassmann algebra required for qubit WWM that permits the leading order 0 term to be zero. Indeed, the likely reason for why the relationship between orders of and measurement contextuality wasn't noticed, as far as we can tell from the literature, is that the qubit WWM Grassmann formalism was only recently fully formulated [2,22].
The significance of a zero order 0 term for qubit Pauli observables under WWM is clear: the (pseudo-) classical limit of qubit Pauli observables is the null operator. In other words, there are no classical analogues to qubit Pauli measurements. This should not be too surprisingit has long been noticed that there is no classical analogue to spin-1 2 [2]. This dichotomy in the possibilities of the magnitude of the order 0 term between qubits and qudits is the reason that qubits exhibit state-independent contextuality while odd d qudits exhibit state-dependent contextuality. Colloquially, it can be said that the terms that are higher order than 0 are responsible for getting a state's expectation value with an observable to be higher than its classical bound. In the qubit case, since the lower order 0 term is always zero, these higher order terms always dominate and allow qubit Pauli observables to always exhibit contextuality, regardless of the state being measured. In the odd d qudit case, constructions can be made that favor particular states with large contributions from their higher order terms such that they exhibit contextuality within that construction, whereas other states don't. However, as seen in the KCSB example, these "non-contextual" states still require their higher than order 0 terms to attain their particular "classical" expectation values. They are still quantum animals in this respect, but since they don't distinguish themselves with respect to a constructed classical bound, they are said not to exhibit contextuality with that particular measurement in that particular construction. Contextuality is present but insufficient to violate a particular inequality demonstrating non-classicality. This is analogous to the existence of entangled states that nevertheless cannot violate a Bell inequality.
Moreover, the fact that even though every observable has higher than order 0 terms that are non-zero but all states are not measurement contextual under some constructions reconciles how it is possible for a quasiprobability representation-such as the WWM-to exhibit negativity for either states or measurements or make use of a deformed probability calculus [14], while still exhibiting measurement non-contextuality in a particular construction. Though the higher order quantum corrections introduce a deformed algebra into WWM's measurement indicator functions for the KCSB construction, they are not a large enough deformation for some states to exhibit expectation values that violate their classical bounds.
Fundamentally, these results show that the measurement contextuality as a resource is the same as orders of as a resource. Contextuality is a resource that is necessary for universal quantum computation just like orders of higher than 0 are necessary for quantum phenomena that are richer than their classical counterparts. As mentioned, a similar case for preparation contextuality has also been made [19] with regard to Clifford opera-tions on stabilizer states which have been shown to only require order 0 terms in their WWM path integral treatment, while extensions that allow for universal quantum computing require order 1 terms and higher [21].
To drive this point home, let us examine one more example involving the last remaining manifestation of measurement contextuality: state-independent contextuality for a qutrit. Consider the following 13 vectors or "rays" [47]: The orthogonality of these rays is indicated in Fig. 2, where vertices that share an edge (i.e. are joined) indicate that their corresponding rays are orthogonal to each other. We let V denote the set of these rays, such that V = {y σ k , h α , z k |k = 1, 2, 3; σ = ±; α = 0, 1, 2, 3}, and Γ be the 13 × 13 symmetric adjacency matrix with vanishing diagonals, such that Γ µν = 1 if the two rays µ, ν ∈ V are neighbors and Γ µν = 0 otherwise.
It follows that for an arbitrary set of 13 dichotomic observables, {A ν |ν ∈ V }, each of which takes values (i.e. has outcomes) a λ ν = ±1 for an ontic state λ, where A ν cl ≡ dλρ λ a λ ν and A µ A ν cl ≡ dλρ λ a λ µ a λ ν for a classical density ρ λ . Converting this scenario to quantum mechanics, we de-fineÂ ν =Î − 2r ν from the projectors onto the 13 rayŝ r ν ∈ {ŷ σ k ,ĥ α ,ẑ k } (which are outer products of the vectors in Eq. 44). Observe thatÂ µ andÂ ν commute whenever their associated rays are orthogonal, i.e., Γ µν = 1. It follows that the quantum analogue of Eq. 45 is: Observe that 25 3 > 8 and so the expectation value of the above equation with any state is always greater than its classical version in Eq. 45. This inequality therefore demonstrates state-independent contextuality for one qutrit under this construction.
It is also possible to show state-independent contextuality in this system by considering the simpler inequality: where ĥ α cl = dλρ λ h λ α for h λ α ∈ R since it corresponds to a projector outcome. Unlike the previous inequality in Eq. 45, this one additionally relies on the algebraic structure of compatible observables to be preserved classically, i.e., the sum and product rules. In particular, this inequality can be shown to be satisfied based on the following two conditions [47]: 1. The value {0, 1} assigned to a ray is independent of which bases it finds itself in and 2. One and only one ray is assigned a value of 1 among all the rays in a complete orthonormal basis.
This leads to the following two conclusions which together imply the inequality in Eq. 47: 1. ifĥ 0 andĥ 1 are assigned to value 1 thenŷ ± 2 andŷ ± 3 must be assigned to 0 so that bothẑ 2 andẑ 3 must be assigned to value 1 which is impossible, and 2. ifĥ 1 andĥ 2 are assigned to 1 thenŷ ± 1 andŷ ± 2 must be zero so that bothẑ 1 andẑ 2 must be assigned to value 1, also a contradition.
However, in quantum mechanics, and so the expectation value with any quantum state is always 4 3 > 1, which is greater than the classical bound in Eq. 47, thereby demonstrating state-independent contextuality.
To use this simpler inequality with Theorem 1, we need to transform it into a sum of bilinear products of observables. This is accomplished easily enough by squaring it:Σ This remains a state-independent contextuality witness since its classical upper bound is still 1 while the quantum expectation value with any quantum state is 16 9 > 1. The order 0 contribution to the Weyl expectation value of Eq. 49 with any qutrit stabilizer state φ reveals: which is less than or equal to 1, as expected. Since all stabilizer states have the same expectation value, and any other state can be expressed as a linear combination of an orthogonal set of stabilizer states, it follows that every quantum state has the same order 0 contribution. As a result, the greater than order 0 contribution to this expectation value for all quantum states is 16 9 − 16 27 = 32 27 > 1, which is a contribution that is not only greater than the order 0 contribution, but is also larger than the largest possible classical value of 1 (the classical bound). Moreover, this contribution must be included in order for the state's Weyl expectation value to violate its classical bound. In this way, Th. 1 shows that the 13 ray construction is an illustration of state-independent measurement contextuality for a qutrit system.

VI. CONCLUSION
Using the WWM formalism to develop an expansion with respect to for products of observables, we showed that states exhibit measurement contextuality if and only if their expectation value for the measurement has a non-zero term higher than order 0 , which must be included in order for the observable to violate a classical bound. This allowed us to show that qubits exhibit state-independent measurement contextuality in the Peres-Mermin square because the associated measurements have no order 0 term. As a result, any state's expectation value with these observables' associated Weyl symbols must include terms order 1 or higher and so manifestly violate any constructed classical bound. Conversely, odd-dimensional qudit measurement operators often have have non-zero order 0 terms and so exhibit state-dependent measurement contextuality. Only if an odd-dimensional qudit state's expectation value with an observable requires the order 1 term for it to surpass its classical bounds, does it exhibits measurement contextuality.
With this last development, the formal equivalence between contextuality and order of is complete; in both the case of preparation and measurement contextuality, states exhibit contextuality under an operator (unitary or Hermitian, respectively) if it must be treated at higher than order 0 order to capture the result (an evolution and a measurement outcome respectively). Contextuality as a resource is equivalent to orders of as a resource. The often far-flung studies of contextuality and semiclassics (roughly the study of the importance of higher order expansions of ) are in fact concerned with an equivalent phenomenon.

ACKNOWLEDGMENTS
This work was supported by AFOSR award no. FA9550-12-1-0046. Parts of this manuscript are a contribution of NIST, an agency of the US government, and are not subject to US copyright.

APPENDIX: WEYL SYMBOLS FOR OPERATORS IN THE KCSB CONSTRUCTION
We list here the Weyl symbols of the projectorsΠ i and the stabilizer states |φ φ| used in Table II.     Table II.