Quantum Contextuality with Stabilizer States

The Pauli groups are ubiquitous in quantum information theory because of their usefulness in describing quantum states and operations and their readily understood symmetry properties. In addition, the most well-understood quantum error correcting codes -- stabilizer codes -- are built using Pauli operators. The eigenstates of these operators -- stabilizer states -- display a structure (e.g., mutual orthogonality relationships) that has made them useful in examples of multi-qubit non-locality and contextuality. Here, we apply the graph-theoretical contextuality formalism of Cabello, Severini and Winter to sets of stabilizer states, with particular attention to the effect of generalizing two-level qubit systems to odd prime d-level qudit systems. While state-independent contextuality using two-qubit states does not generalize to qudits, we show explicitly how state-dependent contextuality associated with a Bell inequality does generalize. Along the way we note various structural properties of stabilizer states, with respect to their orthogonality relationships, which may be of independent interest.


Introduction
The Pauli operators are ubiquitous in quantum information theory, typically used as an operator basis to decompose multi-particle states or circuits. There are many combinatorial and geometrical structures that arise in finite-dimensional quantum mechanics that are intimately related with Pauli operators, and these structures are known to have favourable properties for use in quantum information processing.
Examples include Mutually Unbiased Bases (MUBs [1,2]), Weyl-Heisenberg covariant Symmetric Informationally-Complete Positive Operator Value Measures (SIC-POVMs [3]) and spherical/unitary designs [4,5]. While the qubit (two-level system) versions of thePauli operators are the most familiar, the generalization to qudit (d-level systems) Pauli operators is mathematically straightforward. What is not straightforward, however, is whether construction techniques, like those in the works listed above, will generalize and retain their desirable properties when we switch to general qudit systems.
With regard to fault-tolerant universal quantum computation (UQC), Pauli operators arise naturally within the context of stabilizer error-correcting codes and so they are intimately related to this task too. On the other hand, the Gottesman-Knill theorem tells us we cannot see better-than-classical computational performance using quantum circuits restricted to (i) operating on Pauli eigenstates, (ii) using Pauli measurements; and (iii) using gates that inter-convert Pauli operators (Clifford gates). In this model of fault-tolerant computation, the use of qudits appears to offer an advantage over qubits in terms of the efficiency associated with a magic state distillation routine [6].
In this work we examine whether sets of stabilizer states (i.e., Pauli eigenstates) exhibit quantum contextuality. More precisely, we examine whether known instances of quantum contextuality for two-qubit states generalize to two-qudit states when d is an odd prime. The most directly comparable work is by Planat [7] although he restricts his search for contextuality to the subset of stabilizer states that can be represented as real vectors and allows non-power-of-prime dimensions.
Because d = 2 is the only even prime dimension, we sometimes see striking dissimilarities in combinatorial or geometrical structures, depending on whether the prime Hilbert space dimension is d = 2 or d > 2. An example of this difference can be seen in the context of a discrete Wigner function (DWF) where the associated geometrical structure is simplified in (power-of-) odd prime dimensions [8,9]. We will see a similar distinction when we seek to find instances of state-independent contextuality; such instances are fairly easy to concoct using multiple qubits but seem impossible to find using multiple odd-prime dimensional qudits.
Nonlocality can be understood as a special type of contextuality, and so Bell inequalities can be recast in the graph-based contextuality formalism. We derive such a decomposition for a family of two-qudit Bell inequalities and discuss the related orthogonality graphs, graph parameters and state-dependent noncontextuality inequalities.
We begin by providing the necessary definitions and mathematical background along with a discussion of quantum contextuality. The subsequent results section is partitioned into three main sections. The first two subsections relate to state-independent and state-dependent contextuality respectively. The remaining subsection provides some additional considerations related to graph-based contextuality that should be borne in mind, and discusses how these apply to our current investigation.

Mathematical Preliminaries
In order to appreciate the results of Section 3 we will first need to provide the necessary mathematical background and definitions. We begin by discussing the generalized Pauli group, the associated stabilizer states and the unitary operations that inter-convert them. In the next subsection we introduce quantum contextuality and its graph-theoretical interpretation. This latter aspect of our work requires a dedicated subsection that lists all the purely graph-theoretical relationships and results that are used elsewhere in the paper.

. Stabilizer States
Throughout, we always assume the dimension, d, of a single qudit to be a prime number. Because of the mathematics involved, most of the subscripts, superscripts and arithmetic will use elements from Z d -the set of integers modulo d. Occasionally we will also need to use Z * d -the set of non-zero integers modulo d. Define the generalized Pauli "shift" and "phase" operators, respectively, as so that in the d = 2 case these reduce to the familiar σ x and σ z operators. Taking all products and powers of these X and Z operators produces the set of Pauli operators where we have introduced a phase in the d = 2 case that ensures P (1|1) coincides with our normal definition of the Pauli Y = σ y operator. The Pauli group G for a single particle is comprised of the Pauli operators along with a set of global phases, Using so-called symplectic notation, the general form for an n-particle Pauli operator is where x and z are now vectors of length n i.e., x, z ∈ Z n d , where each x i or z j is an element of Z d . Two operators P (x|z) and P (x |z ) commute if and only if the symplectic inner product between their vector descriptions vanishes i.e., if and only if i ( Because of the graph-based contextuality formalism, we are particularly interested in the projectors associated with the Pauli operators. The ω k eigenspace of a single-qudit operator P (x 1 |z 1 ) corresponds to the projector which is clearly a qudit stabilizer state i.e., it is a rank-1 stabilizer projector. There are a total of d(d + 1) distinct single-qudit stabilizer states [10] in a Hilbert space of dimension d, and they can be identified as the eigenstates of the following set of operators MUB operators: Measuring a two-qudit Pauli operator corresponds to projecting with the following rank-d operator This projector can be decomposed into a sum of d rank-1 projectors via, where there are d solutions (a, b) for a given k in the summation. To prove this last identity, one must insert the definitions given in Equation (5) and Equation (7) and use the fact that m,n, a+b=k The number of distinct two-qudit stabilizer states (see e.g., [8]) is Of these states, the number of separable two-qudit states is which implies that the number of entangled two-qudit states is Later, we will be interested in whether these sets of stabilizer states exhibit state-independent contextuality.

. The Clifford Group
The set of unitary operators that map the qudit Pauli group onto itself under conjugation is called the Clifford group, C d , where the proportionality symbol denotes equality up to a phase of the form ω k (or i k in the case of qubits). The number of distinct Clifford gates for a single qudit system is |C d | = d 3 (d 2 − 1), and this can be seen by noting the isomorphism established by Appleby [11]. If we specify the elements of SL(2, Z d ) and Z 2 d as then [11] provides an explicit description of the unitary matrix C (F |u) ∈ C d in terms of these elements i.e., The canonical two-qudit Bell state, is the unique +1 eigenstate of d 2 mutually commuting Pauli operators, powers and products of X ⊗ X and Z ⊗ Z −1 i.e., A Jamiołkowski state, |J U ∈ C d 2 , corresponding to a unitary operation U ∈ U(d) is defined by This correspondence between operations and higher-dimensional states is known as the Jamiołkowski isomorphism. If the unitary, U , used in Equation (19) is a Clifford operation, then the resulting Jamiołkowski state is a bipartite entangled stabilizer (BES) state. In fact, any BES state must be a Jamiołkowski isomorph of a Clifford gate so that the number of BES states is We will use this group structure associated with BES states later, when we discuss whether the set |{Π} ent | exhibits contextuality.

Quantum Contextuality and Graph Theory
The following argument, as put forward by Mermin [12], helps illustrate the counterintuitive nature of quantum contextuality. Consider a set of mutually commuting operators {A, B, C, . . .} and attempt to ascribe to each measurement a value {ν(A) ∈ λ(A), ν(B) ∈ λ(B), ν(C) ∈ λ(C), . . .} respectively, where λ(A) denotes the spectrum of A and so on. If some functional relation f exists, such that is an operator identity, then we should also have that Explicitly providing sets of operators for which this is not true shows that our assumption of assigning ν(A) as the outcome of measurement A etc. was unjustified. In other words, we cannot assume that quantum measurement is a process that just reveals pre-existing properties of a state, independently of any other compatible measurements that are being performed. Arguably, the canonical example of quantum contextuality is provided by the Peres-Mermin magic square [12,13]. Here, the mutually commuting sets of operators are triples of two-qubit Pauli operators. There are 6 sets of commuting operators, where each set corresponds to a row or column of Table 1. Define the operator comprised of the product of all three operators in Row i or Column j as R i and C j respectively. Each individual two-qubit Pauli operator has eigenvalue ±1, whereas it can be verified that R i = I 4 = −C j for all i, j ∈ {1, 2, 3}. This forces us to accept that ν(R i ) = 1 = −ν(C j ). The only way ν(R i ) = 1 could hold is to have an even number of −1 assignments in each row. The only way ν(C j ) = −1 could hold is to have an odd number of −1 assignments in each column. These last two statements are mutually contradictory-no such assignment can be found. Table 1. One example of a Peres-Mermin (PM) magic square construction provided by Aravind [14]. The operators in each cell of this table are two-qubit Pauli operators. If we try to assign ±1 values (i.e., measurement outcomes) to each operator in a consistent way, we are forced into a contradiction.
Cabello, Severini and Winter [15] have recently introduced a graph-theoretical generalization of these Kochen-Specker type constructions, inspired by an earlier result of Klyachko et al. [16]. Consider a set of binary yes-no tests, which we quantum mechanically represent by a set of rank-one projectors, Π, with eigenvalues λ(Π) ∈ {1, 0}. Compatible tests are those whose representative projectors commute, and a context is a set of mutually compatible tests. Contradictions can be found if we try to assign outcomes to these tests independently of their context.
Non-locality is a special instance of contextuality wherein compatibility of tests is enforced by spatial separation. The two-qubit CHSH inequality provides an example of a non-contextuality inequality, which in this case rules out a local non-contextual hidden variable theory. If we drop the requirement of spatial separation, then a single qutrit suffices to rule out non-contextual hidden variable theories, as we now discuss.
Take a set of five yes-no questions where addition is performed modulo 5. We further impose, as usual, that commuting rank-1 projectors cannot both take on the value +1 i.e., the respective propositions are mutually exclusive and cannot both be answered in the affirmative.Graphically, we can represent this scenario as a pentagonal graph Γ (i.e., a 5-cycle) where vertices correspond to tests, and adjacent (connected) vertices correspond to compatible and exclusive tests. Define the operator Σ Γ to be so that in the classical (non-contextual) case Σ Γ counts the number of yes (i.e., +1) answers to the tests. The maximum number consistent with the rules outlined above is Quantum mechanically we can achieve an orthogonal representation of this graph using five vectors |ψ i ∈ C 3 (see Figure 1 [15,16] that the maximum value of Σ Γ achievable by this qutrit representation is equal to the maximal achievable by arbitrary-dimensional quantum systems, i.e., To see this, take the maximizing eigenvector |ψ Γ max of the Hermitian operator Σ Γ and note that The operator Σ Γ can be interpreted as a witness for contextuality, in the same way that Bell inequalities are witnesses for nonlocality i.e., in the preceding 5-cycle example. Figure 1. The KCBS contextuality construction [16] involves five projectors of the form where the un-normalized versions of |ψ i and their mutual orthogonality relations are given in the graph depicted (connected vertices correspond to compatible and exclusive tests). The state |ψ Γ max is maximally contextual, insofar as it maximally violates the noncontextuality inequality Σ Γ NCHV max In the same way that nonlocality can be generalized to a general non-signalling theory (the most famous example being the non-local (Popescu-Rohrlich [17]) box construction), contextuality can be broadened to include generalized probabilistic theories (GPT). Once again, the quantity Σ Γ can be maximized in a meaningful way e.g., in the preceding 5-cycle example we have The remarkable result of [15] is that the quantities Σ Γ X max for X ∈ {NCHV,QM,GPT} and for a general orthogonality graph correspond to well-known graph-theoretical quantities i.e., {α(Γ), ϑ(Γ), α * (Γ)} respectively. In the 5-cycle example these quantities equate to values given in Equations (24), (25) and (28). We can use the many relationships between these and other graph-theoretical quantities e.g., which is true for all graphs, and this implies which makes intuitive sense. Graphs for which α(Γ) < ϑ(Γ) indicate that appropriately chosen projectors Π can reveal quantum contextuality. It is important to note that not all realizations of Γ using a set of projectors will reach the maximum value ϑ(Γ). Instead, ϑ(Γ) is an upper bound that can always be reached, by optimizing over the set of projectors used and by optimizing the state ρ whose expectation value is Σ Γ QM = Tr(ρΣ Γ ) with respect to the operator Σ Γ . Sadiq et al. [18] discuss this non-optimality in the context of nonlocality, where they argue that spacelike separation is not fully captured by the orthogonality graphs as we have described. We will see similar manifestations of this non-optimality in Section 3.2 where the expectation value Σ Γ is significantly less than the most general upper bound given by ϑ(Γ). One significant difference between nonlocality and general contextuality is that arbitrary (even maximally mixed) states can exhibit contextuality when the set of tests comprise an example of state-independent contextuality (SIC), e.g., the projectors associated with the Peres-Mermin magic square [12,13]. A necessary but not sufficient condition [19] for a collection of tests {Π} to exhibit SIC is that χ(Γ) > D, where χ(Γ) is the chromatic number (explained in Section 2.2.1. ) of the orthogonality graph Γ and D is dimensionality of the Hilbert space projectors i.e., Π ∈ H D .

. Graph Theoretical Prerequisites
In order to prove most of our claims we will need to appeal to some well-known facts and results from graph theory. Here we provide the necessary background. A graph, Γ, is a mathematical structure consisting of a set of vertices, and a set of edges connecting the vertices. If two vertices g and h are adjacent (connected) then we denote that as g ∼ h. Since we only ever consider undirected graphs, this is equivalent to h ∼ g. The graph complement Γ of a graph Γ is obtained by replacing edges with non-edges and vice-versa. An independent set of a graph is a set of vertices, no two of which are adjacent. The independence number α(Γ) ∈ N is the size of the largest such set. The clique number ω(Γ) ∈ N is the size of largest set of vertices in which every member is connected to every other member. The clique number of any graph is equal to the independence number of its complement and vice versa i.e., ω(Γ) = α(Γ). The Lovasz theta number ϑ(Γ) ∈ R is the solution of a certain semi-definite programming problem while the fractional packing number α * (Γ) ∈ Q is the solution of a certain linear program (see [15] for details). The integerχ(Γ) ∈ N-the so-called clique cover number-represents the minimum number of cliques needed to cover every vertex of Γ. It is well-known that this serves as an upper bound for the fractional packing number i.e., α * (Γ) ≤χ(Γ). The vertex coloring problem for a graph involves assigning a color to every vertex in such a way that adjacent vertices cannot be assigned the same color. The minimum number of colors required to do this is the chromatic number χ(Γ). A little thought reveals that the chromatic number is bound below by the clique number i.e., ω(Γ) ≤ χ(Γ).
An undirected Cayley graph Γ(G, T ) with an associated finite group G and set T ⊂ G is the graph whose vertices are the elements of G and whose set of edges is {g ∼ h|g −1 h ∈ T }. For an undirected Cayley graph without self-loops we must have I ∈ T and T −1 = T . The resulting graph Γ(G, T ) is regular i.e., each vertex is adjacent to |T | other vertices.
Given two graphs G and H with respective vertex sets {g, g , . . .} and {h, h , . . .}, we can define various graph products whose vertex set is the Cartesian product of {g, g , . . .} and {h, h , . . .} but where the condition (g, h) ∼ (g , h ) can be defined in a number of different ways. For example the OR product was already used in [20] in the context of quantum contextuality There are also distinct notions of graph addition, the simplest being the disjoint union whereby the total vertex set is the union of vertex sets and the total edge set is the union of edge sets. We denote the disjoint union of m copies of the complete graph K n as mK n 3. Results

State-Independent Contextuality Using Stabilizer States
In this section, we will apply graph-theoretical techniques to sets of stabilizer states to see whether they are sufficient to exhibit state-independent contextuality (SIC). We begin by concentrating on the set of bipartite separable stabilizer states, {Π} sep , and show that they are insufficient for exhibiting SIC. We next concentrate on the subset of two-qudit stabilizer states that are maximally entangled, {Π} ent . As we discuss below, this subset is isomorphic to the Clifford group, hence powerful group-theoretical techniques can be used to examine the associated orthogonality graph Γ ent . Finally, we examine the total (separable plus entangled) set of bipartite stabilizer states, {Π} tot , and show that it cannot exhibit SIC for qudits of small odd prime dimension. Tables 2-4 summarize our results concerning the structure of sets of projectors and whether they display contextuality. It seems clear that state-independent contextuality is much easier to achieve using qubits as opposed to qudits with odd prime d > 2. At a superficial level, one could attribute this phenomenon to structural differences in the Pauli group as outlined in Equation (3). Because the multi-qubit Pauli group necessitates a d 2 -th i.e., 4-th root of unity in its phases, the structure is somewhat richer and non-contextual contradictions are easy to find. The simpler structure of the multi-qudit Pauli group for prime d > 2 appears to make state-independent contextuality more difficult, if not impossible, to find. We shall see in Section 3.1.3. that the local hidden variable model provided by an appropriate discretized Wigner function provides a deeper and more general reason that forbids state-independent contextuality using stabilizer projectors in certain dimensions.  Table 3. The independence number α of the orthogonality graphs associated with separable, entangled and all two-qudit stabilizer states. The quantities with asterisks are those for which we do not have a graph-theoretical proof, but which the more general results referenced in Section 3.1.3. support. The contextuality formalism of [15] tells us that maximum value of Σ Γ in a non-contextual hidden variable theory is given by α(Γ). The values in bold font are those that differ with the corresponding quantum expectation value given in Table 4, and therefore the associated projectors exhibit contextuality. Table 4. The achievable values of Σ Γ in quantum mechanics, for each of the relevant sets of stabilizer projectors. This happens to coincide with the clique cover number χ(Γ) of the related orthogonality graph. Comparing with the previous Table 3, we see that the only situations for which quantum contextuality appears, because α(Γ) < Σ Γ QM , is when we include the set of entangled two-qubit states.

. Separable Stabilizer States
Associated with each of the d + 1 MUB operators in Equation (6) is a complete orthonormal basis of d states. Furthermore, states from different bases always have the same overlap. To identify individual states and bases we introduce the following notation and the overlap between any two states is given by Two stabilizer states B a b and B a b are orthogonal if and only if they are distinct members of the same basis In order to examine the orthogonality graph Γ single of these single-qudit stabilizer states, we associate so that Γ single is isomorphic to d + 1 copies of the complete graph on d vertices, Maximum independent sets and maximum cliques are easy to write in this notation; Maximum independent set: e.g., {v(a, 1)| a ∈ {1, 2, . . . , d + 1}} Maximum clique: e.g., {v(1, b)| b ∈ {1, 2, . . . , d}} Next consider what happens if we take tensor products of single-qudit stabilizer states with each other. There are [d(d + 1)] 2 separable two-qudit stabilizer states of the form B a 1 b 1 ⊗ B a 2 b 2 , indexed by a 1 , a 2 ∈ {1, 2, . . . , d + 1} and b 1 , b 2 ∈ {1, 2, . . . , d}. The orthogonality of these two-qudit states is determined by Note that this is exactly the graph that one would obtain by taking the graph product [see Equation (31) This implies that α(Γ sep ) = (d + 1) 2 whereas ω(Γ sep ) = d 2 . Furthermore, we can cover all [d(d + 1)] 2 vertices of Γ sep using (d + 1) 2 distinct, non-overlapping maximum cliques-simply by letting a 1 and a 2 vary over all possible values in {1, 2, . . . , d + 1} (in our example clique of Equation (43) we have set a 1 = a 2 = 1). This last fact tell us that the clique cover number (see Section 2.2.1. ) is exactly χ(Γ sep ) = (d + 1) 2 . The following chain of inequalities holds for any graph Γ, Combining this with the preceding discussion, we see that the orthogonality graph for separable states has parameters which implies that the separable subset on their own are insufficient to manifest contextuality.

. Entangled Stabilizer States
Here we will argue, using purely graph-theoretical techniques, that the set of entangled two-qudit stabilizer states {Π} ent does not exhibit state-independent contextuality, when d is an odd prime. We have only shown this to be true for primes up to 11 because one part of our argument still relies on brute force computation. What follows is not necessarily the easiest way of proving our claim, but our recognition of the orthogonality graph Γ ent as a Cayley graph is novel, and may be of independent interest.
A Jamiołkowski state, |J U , [see Equation (19)] for which U ∈ C d must be a maximally entangled, bipartite stabilizer state. Since the set of bipartite entangled stabilizer (BES) states is isomorphic to the Clifford group, we can hope to find some group-theoretical structure underpinning the orthogonality relationship between these BES states. Two BES states are orthogonal if and only if their isomorphic Clifford gates are trace orthogonal Note that, by definition, C † C must itself be an element of the Clifford group. Define T as the subset of Clifford operators having trace zero, Two bipartite entangled states |J C and |J C are adjacent in Γ ent if and only if the product C † C ∈ T . Crucially, this is exactly the structure given to us by a Cayley graph introduced in Section 2.2.1. . Note that similar Cayley graphs have also been used in the creation of MUBs [5].
To exploit this relationship we should first examine the structure of the subset T . We begin by defining the Legendre Symbol, d , as where a quadratic residue is an integer in Z d that is of the form x 2 mod d for some x ∈ Z d . Next we quote a result from Appleby [11] that relates the trace of the unitary operator C (F |u) to its constituents F and u ( Case 1: By examining Equations (48) and (49), with particular attention to the three relevant cases satisfying Tr(F ) = 2, we find that there are exactly such C (F |u) with Tr C (F |u) = 0. The structure of the traceless subset of Clifford gates is further simplified by using a result of Zhu [21] that decomposes the Clifford group into conjugacy classes. Using the notation that the class C (F |u) with a representative element C (F |u) has size C (F |u) , we have where ν is a quadratic non-residue i.e., x ∈ Z d such that ν = x 2 mod d. By using these conjugacy classes to enumerate the number of traceless Clifford gates we find which confirms our previous counting argument. The connection set T is closed under conjugation so that Γ(G, T ) is a normal Cayley graph. This implies [22] that Clearly, {Π} ent contains a complete orthonormal basis of d 2 vectors, which implies that ω(Γ ent ) = d 2 .
In our case, the implication of finding α(Γ) = p(p − 1) is that χ(Γ) = D = d 2 and therefore the set {Π} ent does not exhibit state-independent contextuality. As is well known, the problem of finding a maximum independent set or the chromatic number of a graph is NP-hard in both cases. However, currently available implementations for clique-finding, e.g., Cliquer [23,24], seem to perform much better than algorithms for vertex coloring, e.g., Mathematica [25]. For all odd primes p ∈ {3, 5, 7, 11} that we have checked we can find [23,24] independent sets of size so that the set {Π ent } does not satisfy the χ(Γ) > D criterion [19] for state-independent contextuality.
Only for the qubit case does {Π ent } exhibit state independent contextuality i.e., Given these results, it seems natural to conjecture that d = 2 is the only prime qudit dimension for which the entangled set {Π ent } displays state-independent contextuality. It would be nice to find a purely graph-theoretical proof that state-independent contextuality is impossible for all odd prime dimensions, i.e., without resorting to numerics. Associated with each row or column of the Peres-Mermin square in Table 1 is a complete orthonormal basis of four entangled stabilizer states. For example, the basis associated with Row 1 can be decomposed as the following four projectors Row 1: and similarly for all other rows and columns, eventually producing a set of 24 projectors {Π 1 , . . . , Π 24 }, which provide a proof of the Kochen-Specker theorem. That the Peres-Mermin square can be recast as a statement about 24 projectors is well known [13]. It seems to have gone unnoticed, however, that the particular choice of Peres-Mermin magic square in Table 1 is completely equivalent to Γ ent in the way we have just described.

. Generic Impossibility of Qudit State-Independent Contextuality
With reference to Tables 3 and 4 we see that the condition for contextuality, α(Γ tot ) < Σ Γtot QM , holds for the two-qubit case, but not for the two-qudit case when d = 3 or d = 5. The proofs are purely computational so we omit any further details. The results obtained so far prompt the question whether state-independent contextuality is ever possible using odd prime dimensional qudits. In fact this question has already been answered in previous works that dealt with a discrete quasi-probabilistic representation of odd-dimensional quantum operators. Implicit in the discrete Wigner function (DWF) construction of Gross [8] is a local hidden variable model of a sub-theory of quantum mechanics, which was made explicit in a more recent work [9]. This sub-theory is defined by restricting the available states and effects (i.e., operations corresponding to either measurements or transformations) to those that are positively represented within the DWF. Most relevant for our discussion is the fact that this sub-theory includes all stabilizer measurements and all (mixtures of) stabilizer states. In particular, a set of odd-dimensional stabilizer measurements applied to the completely mixed state always has a local hidden variable model. Viewed another way, this tells us that state-independent contextuality is impossible whenever qudit (with odd d) stabilizer measurements are used. State-dependent contextuality using odd d-dimensional stabilizer projectors is still possible, however, so long as the measured state is not positively represented. This is the case in the examples presented in the next section.

State-Dependent Contextuality Using Bell Inequalities
In the previous section we sought cases for which a sum of projectors Σ Γ had an expectation value Tr(ρΣ Γ ) > α(Γ), regardless of the state ρ that was used. In this section we will construct non-contextuality inequalities that are violated by only some quantum states, i.e., only some states are contextual with respect to this inequality. We will convert qudit Bell inequalities into orthogonality graphs, creating non-contextuality inequalities that can only be violated by entangled states. Starting from the famous two-qubit CHSH inequality [26] e.g., we will show how this corresponds to a non-contextuality inequality in the sense outlined in Section 2.2.
A similar analysis has already been done numerous times in the literature (see e.g., [15,18]). Subsequently, we describe the resulting graphs and non-contextuality inequalities that arise when a qudit (for odd prime d) version of the CHSH inequality is used. This is our novel contribution. In order to see the graph theoretic interpretation of Equation (58), first rewrite B as follows; where the second equality is a consequence of the definition Equation (7), while the final equality is a consequence of Equation (8). Combining B ≤ 2 with Equation (61) and denoting the sum of eight projectors as Σ Γ CHSH returns the following inequality where the latter is of the correct form for a non-contextuality inequality. Each of the resulting eight projector terms in Equation (61) is a stabilizer projector of rank one [27]. By checking the commutation relations between projectors {Π 1 , . . . , Π 8 } we get a orthogonality graph Γ CHSH as depicted in Figure 2. The relevant graph-theoretic quantities are α(Γ CHSH ) = 3, ϑ(Γ CHSH ) = 2 + √ 2 and α * (Γ CHSH ) = 4. The first of these quantities tells us that the relevant non-contextuality inequality is which is exactly what our rewriting of the Bell inequality in Equation (64) told us.
In order to generalize the above example to qudits, we first rewrite the d = 2 CHSH inequality in the following form, where as usual ω = e 2πi d ,  Breaking up this expression even further into 27 distinct rank-one projectors, via Equation (8), we get a 10-regular graph Γ CHSH of order 27 [30], with α(Γ CHSH ) = 6 and ϑ(Γ CHSH ) ≈ 7.098. The corresponding non-contextuality inequality is thus which is easily seen to be completely equivalent to the original inequality B ≤ 9 in Equation (68). By looking at the spectrum of the operator Σ Γ CHSH , we see that the maximum achievable using these projectors is λ max (Σ Γ CHSH ) = 6.4115, which falls some way short of the Σ Γ CHSH QM max = 7.0981 that is achievable if we are allowed complete generality in our set of projectors {Π 1 , Π 2 , . . . , Π 27 }.
For d = 5 we get a CHSH inequality of the form where the Bell operator B eventually produces 125 distinct rank-one projectors leading to a 36-regular graph Γ CHSH of order 125, with parameters α = 12, ϑ ≈ 18.09 and λ max ≈ 13.09. For d = 7 we get an operator of the form which eventually produces 343 distinct rank-one projectors leading to a 78-regular graph with parameters α = 19 and λ max ≈ 19.4112. We were unable to calculate ϑ(Γ CHSH ) for d = 7 due to memory constraints. All these quantities are summarized in Table 5.
Observe that for all d ∈ {2, 3, 5, 7} that we have discussed, we see some structure in the graphs Γ CHSH obtained from qudit CHSH inequalities. Whereas it is quite easy to see that all graphs will have order |Γ CHSH | = d 3 , we conjecture based on the examples here that In the qubit case, the graph Γ CHSH is known to be a member of some well-studied families of graphs i.e., Γ CHSH is a (1, 4)-circulant graph and a 4-Möbius ladder [20]. It would be nice to see if Γ CHSH is expressible in a similar fashion for odd qudit dimensions. Table 5.
Properties of the orthogonality graphs Γ CHSH that we have constructed by decomposing a two-qudit Bell inequality into stabilizer projectors. Applying Σ Γ NCHV max = α(Γ) to these graphs gives the maximum achievable value of Σ Γ over all local hidden variable theories. If we are allowed complete freedom in our choice of projectors then the maximum value of Σ Γ achievable in quantum mechanics is given by ϑ(Γ). The maximum achievable value of Σ Γ CHSH using stabilizer projectors is denoted by λ max (Σ Γ CHSH ). We do not know of any general solution for these parameters, nor were we able to calculate the Lovasz theta number of Γ CHSH for d = 7, and so these quantities are denoted by question marks. The final column concerns subgraphs that can be found within Γ CHSH , as discussed in Section 3.3.

Induced Subgraphs and Equivalence of Non-Isomorphic Graphs
In this section we discuss two additional features related to orthogonality graphs that display contextuality.
Firstly, we note a result due to Cabello et al.
[31], which says that any graph displaying quantum contextuality must contain (as an induced subgraph) an odd cycle C 2k+1 or its complement C 2k+1 for some integer value of k > 1. This is a necessary, but not sufficient, condition for a given graph Γ to exhibit contextuality. In Table II of [31] the induced C 2k+1 or C 2k+1 associated with well-known Kochen-Specker sets are tabulated. Since the generalized CHSH graphs that we have discussed are new, we have performed a similar calculation and summarized the results in the final column of Table 5. All relevant subgraphs associated with the qubit CHSH inequality (and its corresponding graph Γ CHSH ) are depicted in Figure 3.
The second aspect of graph-based contextuality that we would like to note is the possibility of degeneracy or non-uniqueness in orthogonality graphs. We provide an example of two non-isomorphic orthogonality graphs that are both equivalent to the same Bell inequality. This non-unique association between inequalities and orthogonality graphs is a general feature, and has already been noted elsewhere in the literature, e.g., [18], but we find it instructive to provide an explicit example using the qubit CHSH inequality. All graphs that exhibit contextuality contain odd cycles C 2k+1 or their complements C 2k+1 [31]. For the case of the qubit CHSH graph, the only such subgraph that can be found is the pentagon C 5 . There are 8 distinct induced pentagons within the qubit CHSH graph, as depicted.

Summary
We have applied the graph-based contextuality formalism of Cabello, Severini and Winter [15] to sets of two-qudit stabilizer states. Sets of states that arise naturally because of structural or group-theoretical significance are seen to display state-independent contextuality only if the particles are qubits, as opposed to qudits with prime dimension d > 2. While our use of graph-theoretical techniques was insufficient to prove that this should always hold for particles of prime dimension d, we noted a more general result based on the discrete Wigner function that implied that this is indeed the case. It was already known that the two-qubit Bell CHSH inequality could be recast as a non-contextuality inequality with a related orthogonality graph [15]. Here we have transformed a qudit analogue of Bell CHSH inequality into an orthogonality graph and derived the related non-contextuality inequality and graph parameters. Along the way we have highlighted various structural properties of the orthogonality graphs under consideration. distinct