Quantum Contextuality

Quantum contextual sets have been recognized as resources for universal quantum computation, quantum steering and quantum communication. Therefore, we focus on engineering the sets that support those resources and on determining their structures and properties. Such engineering and subsequent implementation rely on discrimination between statistics of measurement data of quantum states and those of their classical counterparts. The discriminators considered are inequalities defined for hypergraphs whose structure and generation are determined by their basic properties. The generation is inherently random but with the predetermined quantum probabilities of obtainable data. Two kinds of statistics of the data are defined for the hypergraphs and six kinds of inequalities. One kind of statistics, often applied in the literature, turn out to be inappropriate and two kinds of inequalities turn out not to be noncontextuality inequalities. Results are obtained by making use of universal automated algorithms which generate hypergraphs with both odd and even numbers of hyperedges in any odd and even dimensional space - in this paper, from the smallest contextual set with just three hyperedges and three vertices to arbitrarily many contextual sets in up to 8-dimensional spaces. Higher dimensions are computationally demanding although feasible.

These experiments pave the road for applications of contextual sets in quantum computation [12,13], quantum steering [14], and quantum communication [15] by measuring yes-no outputs of quantum systems and contrasting them with predetermined 0-1 values of the corresponding classical systems. Such systems might be organized in contextual sets represented by graphs or hypergraphs and their properties and features are the main subject of the present paper.
Intuitively speaking, a (hyper)graph is a set of points and a set of subsets of these points. The points are called the vertices of the (hyper)graph and the subsets are called the (hyper)edges of the (hyper)graph. Vertices might be represented by vectors, operators, subsets, or other objects, and (hyper)edges by a relation between vertices contained in them such as orthogonality, inclusion, or geometry. We follow Berge [16,17], Bretto [18], and Voloshin [19] in all details except in several restrictions needed for hypergraph description of contextual sets which we introduce in Sec. 2. Historically, representations used to describe and depict contextual sets appeared in several different forms and definitions, e.g., partial Boolean algebra [20], operator and projectors [21,22], lists or tables of vectors and their orthogonalities [23,24], Greechie diagrams [25,26,27,28,29,30], Kochen-Specker (KS) proofs [31], parity proofs [32], MMP diagrams [33,34], graphs with cliques [35], nodecontext graphs [36,30], etc. However, as shown in this paper, when some discrepancies between these definitions as well as their possible inner limitations are smoothed out, all of them boil down to hypergraphs and in this paper we provide a hypergraph platform for major results and achievements in the field of quantum contextual sets.
Connections between contextuality and universal quantum computation [12] and steering [14] that have recently been established ask for a quantification of properties of contextual sets, e.g., robustness to noise [37], size of maximal independent sets of stabilizer states [12], or suitability for implementation in general. It has been shown that inequalities are an efficient tool for the purpose [35,1,38,39,40,41,42,43]. Yu, Guo, and Tong prove [43] that operator formulations of KS contextual sets can always be converted to state-independent noncontextuality inequalities. The problem with the inequalities in these references is that either no definite inequality is given or that they were given for chosen particular contextual sets previously specified via sets of vectors/rays, or that they have not been formulated for probabilities applicable to genuine YES-NO quantum experiments. As a consequence, while billions of hypergraph-defined contextual sets are known, a straightforward automated way of generation of operator-based inequalities from them is missing. On the other hand, there are operator-defined sets, e.g., the Peres-Mermin square [44,45], for which a proper underlying vector set awaits to be defined.
Therefore we broaden the scope of the contextuality so as to cover both operators and hypergraphs. We compare their features and their inequalities. We define and/or reconsider six different kinds of hypergraph inequalities that correspond to the aforementioned operator inequalities: two are based on hyperedges, two on vertices, and two are mixed; we compare them with the known operator inequalities.
Hyperedge-based inequalities are well-known (it stems directly from the Kochen-Specker theorem) and, essentially, they boil down to our impossibility of assigning exactly one '1' to vertices in each hyperedge of a contextual hypergraph. So, there are always fewer such hyperedges than there are hyperedges altogether in the set, and the inequalities just confirms this discrepancy [21,22,43]. They correspond to the operator noncontextuality inequalities.
Some vertex and mixed inequalities rely on two different kinds of statistics of the outcomes of quantum YES-NO measurements: raw data statistics and postprocessed data statistics. These yield four different kinds of inequalities: the original Grötschel-Lovász-Schrijver (GLS) inequality, the quantum forms of the GLS inequality, and inequalities that we call v-and e-inequalities. The original GLS inequality holds for any graph or hypergraph for variable probabilities within each clique or hyperedge, respectively. However, these probabilities are not variable but constant within any quantum YES-NO measurements and under them arbitrary many contextual graphs and hypergraphs violate the GLS inequality, i.e., the GLS inequality is not a noncontextuality inequality. The v-and e-inequalities are satisfied for all contextual (hyper)graphs and violated for all noncontextual ones and unlike the GLS-like inequalities they correspond to the existing operator-based inequalities.
The aforementioned types of inequalities are determined by structural properties of the hypergraphs that define them. Structural properties we obtain characterize contextual as well as noncontextual hypergraphs and are relevant for application of contextual sets in quantum computation and quantum communication. The properties serve us to (a) characterize the hypergraphs themselves; (b) analyze hypergraphs probability and randomness characteristic for obtaining small contextual sets from big master sets; (c) obtain hypergraphs from elementary vector components in any odd or even dimensional space (in this paper in 3-to 8-dim spaces); (d) obtain contextual hypergraphs from noncontextual ones by deleting a certain number of vertices from them; (e) establish a correspondence between hypergraph and operator approaches; (f) obtain state independent hypergraph inequalities where operator approach gives state dependent ones; (g) introduce new hypergraph-defined measurements based on multiplicity of vertices and postprocessing of multiple detection at the ports of the gates; (h) obtain the smallest critical contextual hypergraph with just 3 edges and 3 vertices; (i) prove that one of the graphs which are considered to be a source of quantum computer's power is a subhypergraph of a non-critical KS hypergraph; (j) derive a vector-hypergraph underlying the 3x3 Peres-Mermin operator square.
An outline of the paper is given by the following organisational flow. In Sec. 2 we give the definitions of a general hypergraph and of its McKay-Megill-Pavičić (MMP) hypergraph restriction; then we introduce notation, language, algorithms, and programs for MMP hypergraphs and compare them with other notations and formalisms of contextual sets from the literature.
In Sec. 3.1, we state the Kochen-Specker and Bell theorems and introduce several generalizations of theirs.
In Sec. 3.2, we present three methods of MMP hypergraph generation we make use of in this paper.
In Sec. 4.1, we review the operator-based inequalities from the literature some of which we correlate with our results in subsequent sections.
In Sec. 4.2, we compare the MMP hypergraph and operator approaches to contextual sets using the example of a 3-dim pentagon set.
In Sec. 4.3, we analyze the structure of MMP hypergraphs and introduce notions and theorems and lemmas that characterize them; we consider two kinds of quantum statistics: the raw data and postprocessed data statistics and six kinds of inequality: GLS-like-, v-, e M ax -, and e min -inequalities; we also compare operator and hypergraph approach to the introduced notions and features.
In Sec. 4.4, we present several examples of MMP hypergraph structure introduced in Sec. 4.3.
In Sec. 5, we apply the results and notions obtained in the previous sections to the MMP hypergraph multiplicity in Sec. 5.1, to the 3-dim MMP hypergraphs in Sec. 5.2, to chosen 4-dim MMPs in Sec. 5.3, to Γ set that has recently been used to prove that contextuality is the source of quantum computer's power in Sec. 5.4, to the Peres-Mermin square Sec. 5.5, and to the 5-to 8-dim contextual MMP hypergraphs in Secs. 5.6, 5.7, and 5.8, respectively.
In Sec. 6 we consider possible general implementation schemes. In Sec. 7 we discuss the obtained results. In the Appendices we give a comparison of historical as well as contemporary hypergraph formalisms from the literature with the MMP hypergraphs language as well as strings and coordinatizations of bigger MMP hypergraphs to avoid visual clutters in the main body of the paper.

MMP hypergraph language
In this section, we start with a general definition of a hypergraph, which we then narrow down to the MMP hypergraph. After giving specifics of the MMP hypergraph language which will be the language of our presentation) we review other formalisms that have been used for generation of contextual sets in the literature and show that they all reduce to the MMP hypergraph formalism.
A general hypergraph is defined as follows [16,17,19,18]. Let V = {v 1 , v 2 , . . . , v k } be a finite set of elements called vertices and let E = {e 1 , e 2 , . . . , e l } be a family of subsets of V called hyperedges. The pair H = (V, E) is called a hypergraph with vertex set V also denoted by V (H), and hyperedge set E also denoted by E(H). A hypergraph H may be drawn as a set of points representing the vertices subsets of which represent hyperedges as follows: a hyperedge e j is represented by a continuous curve joining two elements if the cardinality (number of elements, vertices) within the hyperedge is |e j | = 2, by a loop if |e j | = 1, and by a closed curve enclosing the elements if |e j | > 2. Numerically they are represented by the incidence matrices [17, p. 2, Fig. 1] in which columns are hyperedges and rows are vertices. Intersection of hyperedge columns with vertex rows contained in hyperedges are assigned '1' and those not contained are assigned '0'.
The number of vertices within a hypergraph (k), i.e., the cardinality of V (|V |), is called the order of a hypergraph, and the number of hyperedges within a hypergraph (l), i.e., the cardinality of E (|E|), is called the size of a hypergraph.
To arrive at MMP hypergraphs we restrict the general hypergraphs numerically and graphically. Numerically, we substitute ASCII characters for vectors, operators, or elements within tables and matrices from the literature and attach these ASCII characters to vertices. Mutually related vertices are collected in one-line strings representing hyperedges. The relation might be orthogonality, inclusion, geometry, etc. Thus, numerically, an MMP hypergraph, defined in Def. 2.1, is a string of characters corresponding to vertices which are organized in substrings separated by commas (",") corresponding to hyperedges; the string ends with a period ("."). Graphically, vertices are dots and hyperedges are lines or curves connecting vertices by passing through them; we dispense with hyperedges of cardinality 0 and 1 (|e j | = 0, 1) and since each contextuality contradiction occurs within a single connected set we do not have unconnected subhypergraphs and we do not have hyperedges attached to the main body of an MMP hypergraph at only one vertex. Also, because the Hilbert space in which contextual sets reside when equipped with a coordinatization must have at least 3 dimensions (3-dim), we introduce the hypergraph-dimensionality n ≥ 3. Thus we arrive at the following formal definition of an MMP hypergraph. This is operationally requested for any implementation since a full coordinatization of vertices turn hypergraph-dimension n into a dimension of a Hilbert space determined by vectors each vertex is assigned to. But until we invoke a coordinatization of an MMP hypergraph we can handle it solely by means of Defs. 2.1 and 2.2.
Notice that in our previous papers we did not have the condition 3 in the definition of the MMP hypergraph but all our results in that papers were obtained by excluding the corresponding hyperedges from the calculations explicitly or implicitly. Therefore, we need not introduce a different name for the MMP hypergraph from Def. 2.1 and from now on we shall assume that the condition 3 holds in the definition of the MMP hypergraph. Another formulation of the condition would be that all hyperedges of an MMP hypergraph with two or more of hyperedges must share at least two vertices, i.e., that no hyperedge should be attached to the main body of the MMP hypergraph at just one vertex. A single hyperedge is therefore an MMP hypergraph, as well as two hyperedges that share two or more vertices.
In Fig. 1 we illustrate the difference between the standard and the MMP hypergraph formalism. In the standard hypergraph formalism, hyperedges between two vertices are represented by straight lines as taken over from the graph theory (e 3 , e 7 ). Hyperedges containing three or more vertices encircle the vertices (e 1 , e 2 , e 4 , e 8 ). Hyperedges containing only one vertex have two representations: e 5 [19,18] and e 6 [16,17]. In the MMP hypergraph formalism e 3 hyperedge is represented as the line (or curve) connecting vertices 1 and 6: E 3 = 16. Hyperedges e 1 , e 2 and e 4 are represented as curves (or lines) passing through vertices they contain: E 1 = 2345, E 2 = 1236, and E 4 = 1456, respectively. Vertex corresponding to vertex 10 in Fig. 1(a) does not exist in an MMP representation due to Def. 2.1.1; the same is with e 5 ,e 6 ,e 9 due to Def. 2.1.2., and with hyperedges e 7 ,e 8  Taken together, an MMP hypergraph is a special kind of a general hypergraph in which none of the aforementioned points (1.-5.) holds within its definition.
Graph ↔ MMP Hypergraph 2.3. We turn a graph whose every edge contains just two vertices into an MMP hypergraph so as to substitute hyperedges for (interwoven) cliques of related vertices and for isolated edges. Conversely, we turn an MMP hypergraph into a graph so as to substitute a cliques of edges for MMP hyperedges, where vertices within a clique correspond to three related vertices within a hyperedge, until we exhaust all related  Figure 1: (a) Representation of a general hypergraph [16,17,19,18]; (b) representation of a corresponding MMP hypergraph whose ASCII string is 16,1236,6541,2354. triples within the hyperedge; isolated graph edges are substituted for the hypergraphs of cardinality 2.
We generate, deal with, and handle MMP hypergraphs by means of automated algorithms implemented into the programs One, Mmpstrip, Vecfind, States01, and others which have MMP strings as their inputs and outputs. In contrast, there are no such automated algorithms and programs for incidence matrices of the general hypergraph formalisms known to us. We stress here, that for a k-l n-dim KS hypergraph in a general hypergraph representation, its incidence matrix contains k vertex rows each l columns long, while an MMP hypergraph is represented by a single line containing l n-tuples of vertices. E.g., the incidence matrix of the original 4-dim 192-118 Kochen-Specker hypergraph contains 118 hyperedge columns and 192 vertex rows/lines (192 × 118 matrix), while its single MMP string (one line) contains 118 triples of ASCII characters [46,Supp. Material].
MMP hypergraph language has been developed over the last 20 years with the goal of making handling and generation of contextual sets as efficient as possible. Here we give a comparison of historical as well as contemporary formalisms with the MMP language.
• Partial Boolean algebra used in [20] generates graphs with cliques whose edges contain only two vertices and whose computer and graphical processing is therefore more demanding than those of MMP hypergraphs to which they can be straightforwardly reduced; the same problem applies to all other graphs with clique approaches [35,47]. Graphical representations of such graphs, especially big ones, are often unintelligible-compare Figs. 2(b) and 2(c) and Figs. 15(e) and 15(g).
• Operators or projectors used to generate contextual inequalities are mostly constructed manually by means of states/vectors/vertices of chosen contextual hypergraphs, meaning that they make use of already known hypergraphs [21,22] which can serve us to obtain those operators and their inequalities in an automated way.
• A direct treatment of lists or tables of vectors and their orthogonalities [23,24] as well as the diagrams of KS-proofs [31] are notoriously cumbersome. A paradigmatic example is Peres' 24-24 set [23]. Peres himself tried to obtain smaller sets via a computer program but failed [48, p. 199]. It took three years until Kernaghan obtained one smaller set [49] and two more years until Cabello, Estebaranz, and García-Alcaine obtained a second one [50]; a straightforward translation of Peres' 24-24 set into an MMP 24-24 hypergraph string [51] immediately enables one to obtain all 1,233 KS MMP subhypergraphs on any laptop in seconds [52], [53,22:00]; a graphical representation of the MMP 24-24 [51] even enables one to obtain desired subhypergraphs by hand hand in minutes [53,24:00].
• Parity proofs, developed by Aravind and Waegell and applied to contextual sets, read off particular polytopes [32]. However, they exist only for sets with an odd number of hyperedges. Still, they are very efficient and fast. Their data lists and tables, for both even and odd number of hyperedges, can be straightforwardly and automatically mapped to MMP hypergraph strings via our programs to enable further processing. Notice that for sets with even number of hyperedges the MMP hypergraph algorithms remain the only tool.
• MMP diagrams [33,34] are predecessors of MMP hypergraphs; they required that all hyperedges have the cardinality equal to the dimension of the space in which the hypergraph vertices reside.
• Nodes, rays, tests, or vertices in contexts, bases, or edges within set or graph approaches are introduced in a series of papers but they are vaguely defined and are at odds with the standard terminology. In 2014 Lisoněk, Badziag, Portillo, and Cabello defined a context as a "subset of jointly measurable tests;" then as a "number of bases" [36]. They graphically present their set in [36, Fig. 1], and we can recognize that a context is a (hyper)edge and that a node or a test [4] or a ray is a vertex. They do make use of the term vertex, but not of the term (hyper)edge. In [21, Fig. 1] MMP hypergraph (diagram) representation from [33,34] is being used but not cited. In [54, Fig. 1] MMP hypergraph (diagram) representation from [33,34] are being used but are called a "simplified representation of a graph" where "events are represented by vertices" and instead of making use of the term hyperedge, they just write that "sets of pairwise exclusive events are represented by vertices in the same straight line or circumference rather than by cliques." Amaral and Cuncha even mix up graph and MMP hypergraph representations in the same figure [55,  hypergraph is called a "simplified version" of a graph and an MMP hyperedge is said to "correspond to a clique of size 6" but the term MMP hyperedges is neither mentioned nor cited. Budroni, Cabello, Gühne, Kleinmann and Larsson [30] make use of both terms, graphs and hypergraphs, interchangeably. They state that "contexts can be represented as graphs, or more generally hypergraphs" [30, p. 30]. Still, they do not mention any contextual MMP hypergraph paper published in the last ten years [56,52,57,58,59,41,60] where billions of contextual 3-to 32-dim MMP hypergraphs were generated. Such an approach is deleterious since most known contextual vector sets in whatever other formalism turn out to be definable by and reducible to MMP hypergraphs or generated by them and since nothing comparable has been achieved by any other formalism apart from the parity proofs for the KS sets with an odd number of hyperedges by Aravind and Waegell in the 4-dim Hilbert spaces as derived from polytopes and Lie algebras [61,62,63,64,65]. Disadvantageously, less than 5% of all known MMP hypergraphs have parity proofs [58].
• Greechie diagrams have recently been used as a name for what are actually MMP hypergraphs [27,28,29,30]. This is a misnomer since Greechie diagrams-connected Hasse diagrams-belong to the field of partially ordered sets and can represent neither graphs, nor general hypergraphs, nor MMP hypergraphs. A Hasse diagram is a graphical representation of a poset (partially ordered set)-a collection of whose elements is called a block-where an element y is drawn above an element x if and only if y > x (y covers x). In a poset with the least element 0 an atom is an element that covers it. The orthogonality x ⊥ y is defined as y > x, where y is an orthocomplement of y; in a 3-atom poset y = x ∨ z; y ∨ y = x ∨ y ∨ z = 1; y ∧ y = x ∧ y ∧ z = 0. A Greechie diagram is a shorthand notation for a collection of connected Hasse diagrams in which atoms within each block are represented as dots and blocks as lines or smooth curves connecting them. The following conditions must be satisfied: (α) All blocks share common 0 and 1; (β) If an atom x belongs to an intersection of blocks and, therefore, to both of them, then the blocks also share x ; (δ) Blocks contain three or more atoms; ( ) Two blocks may not share more than one atom; (ζ) Diagrams cannot contain loops of order 2 or 3 [66,67,57]. In Fig. 3 Fig. 2(a)] is not a Greechie diagram since it violates condition δ-e.g., block 12 contains only two atoms; (c) some 3-dim KS sets with vertices that belong to only one hyperedge dropped [25,26,30], are not Greechie diagrams because they violate condition δ; (d) [28, Fig. 4(a)] is not a Greechie diagram since it violates conditions δ and ζ-e.g., block 5B contains only two atoms and loop 1-A-7 is of order 3; similarly, the "orthogonality hypergraph" [68, Fig. 1] cannot be said to represent a "hypergraph introduced by Greechie" [68, Sec. II] for the same δ and ζ reasons; (e) [28, Fig. 5(a)] violates conditions δ, , and ζ-e.g., block 5B contains only two atoms, blocks 57138 and 72648 share two atoms (7 and 8), and loops 2-7-A, 1-A-7, and 3-8-4 are of order 3. • The term graph of orthogonality has recently been used to rename the MMP hy-pergraph or to avoid using it [69,Supp. Material,Figs. 3,7,8,9], while the term orthogonality hypergraph has been used to denote the MMP hypergraph arguing that the latter kind of a hypergraph is actually a general hypergraph [18,Sec. 2.4] "introduced by Greechie" [70,Sec. 2.3]. For instance, the KS 10-5 MMP critical hypergraph shown in [33, 34, Fig. 2 Fig. 4(c)-which is equivalent to the graph Fig. 4(a,b) given in [69, Supp. Material, Fig. 7]-is not referred to in [69]. This set apparently does not have a coordinatization in the 4-dim space. An overcomplicated 6-dim coordinatization from {0, ±1, 2, ± √ 2, ± √ 3} components for just 10 vertices in Fig. 4 On the other hand, the graphics presented in [69, Supp. Material, Fig. 3] is called a "graph of orthogonality" but it is neither a graph nor a hypergraph as explained in Sec. 7.3.2 and Fig. 11. Finally, in [69,Supp. Material,Figs. 8,9] the 21-7 MMP hypergraph is shown (Fig 4(e)) but improperly called a "graph of orthogonality." Its proper graph is shown in Fig 4(f). The 21-7 is in [69] recognized to be equivalent to the Johnson graph J(7, 2), but it is not clear what is the relevance of this recognition, since the graph is only one of many from the 216-153 and 834-1609 KS classes [59], none of which, apart from the 21-7 itself, is a Johnson graph.
As for the "orthogonality hypergraph," the term unfolds in [68, Secs. II,III] where a graphical appearance of Greechie diagrams is offered as a vindication for calling MMP diagrams "orthogonality hypergraphs" and the MMP language the "hypergraph nomenclature." We have already shown in the previous bulleted item above that not all MMP hypergraphs correspond to Greechie diagrams and that therefore the Greechie diagrams cannot be used as their substitutes or transliterations.
The most important aspect of MMP hypergraph representation is not its striking visualization, but its encoding together with its algorithms and programs that enable their automated generation, handling, and manipulation. The results obtained with their help gives the MMP hypergraph language a favorable margin over competitive formalisms.

Objectification and generation of contextual sets
As we pointed out in the Introduction, the contextual sets juxtapose measurement outputs of quantum systems with those of classical ones. We consider them as represented by MMP hypergraphs and such a representation can be given several different objectifications starting with the well known Kochen-Specker one, that in turn can be generated by several methods in any n-dim space as abundant as needed.

The Kochen-Specker theorem and its Extensions
In this section we consider the Kochen-Specker (KS) theorem, its equivalent operatordefined Bell theorem, and its three extensions: the KS MMP hypergraph theorem, the Weakened Bell theorem, and the Non-Binary MMP hypergraph definition. [20,72,73]. In H n , n ≥ 3, there are sets of n-tuples of mutually orthogonal vectors to which it is impossible to assign 1s and 0s in such a way that (i) No two orthogonal vectors are both assigned the value 1;

Theorem 3.1. Kochen-Specker (KS)
(ii) In no n-tuple of mutually orthogonal vectors, all of the vectors are assigned the value 0.
These sets are called KS sets and the vectors KS vectors. Since KS sets are constructive counterexamples that prove the KS theorem, some authors in the literature call them KS proofs, e.g., [74,62,65,43].
The first extension of the KS theorem and KS sets is the one which makes use of MMP hypergraphs whose vertices are not represented by vectors.  Fig. 1]. It is not a KS set because vectors that would represent its vertices do not exist, i.e., this KS MMP hypergraph does not have a coordinatization (vector representation). Our algorithms and programs are partly based on Theorem 3.2 meaning that they can detect the contextuality of an MMP hypergraph no matter whether its coordinatization is given (or even existent) or not. Handling KS MMP hypergraphs without taking their coordinatization into account give us a computational advantage over handling them with a coordinatization because processing bare hypergraphs is faster than processing them via vectors assigned to their vertices.
In Refs. [35,37,41] n-dim contextual sets with hyperedges containing less than n vertices that still violate the rules (i) and (ii) above are considered. They are not KS sets [58], though, since the KS theorem 3.1 assumes that each hyperedge contains n vertices. We call such sets non-binary MMP hypergraphs (see Def. 3.5).
The original KS theorem holds for vectors and defines a KS set as its constructive proof. On the other hand, Bell proved the so-called Bell theorem [75] as a corollary to the Gleason theorem [76] which is a projector formulation of the KS theorem [73,77]. Fine and Teller gave the following extensions of the Bell theorem for general observables A and B instead of projectors via the following rules [73]. Therefore, the statement by Yu, Guo, and Tong that the rules "are usually called the KS theorem" [43] seems to be incorrect. On the other hand, they do claim that the operator formulation of the Kochen-Specker theorem via sum and product rules is more general than the vector/ray/hypergraph one but they do not give a rigorous proof of the claim, such as providing us with a sum-or product-rule KS set that cannot be obtained from the standard KS theorem. In any case, if the Bell theorem were "weakened" by the rules, then it would cease to be equivalent to the KS theorem and we would possibly lose the universal 0-1 valuation of the valuation function for arbitrary observables of considered contextual sets.
Since we want to keep the 0-1 valuations for computational purposes, we shall not pursue the Bell sum/product extension further. Instead, we introduce another extension of KS sets and MMP hypergraphs based on hypergraph vertices and their 0-1 valuation. That circumvents the eigenvalue problem and gives us structural properties of MMP hypergraphs as well as their measures, valuations, and inequalities via automated procedures, in contrast to many other valuations and inequalities obtained in the literature, mostly by hand, for particular vectors and projectors.
Our hypergraph extension applies to the MMP hypergraph conditions (i ) and (ii ) from Theorem 3.2. It simply consists in allowing particular hyperedges to contain less than n vertices, as, e.g., those in [78,35,41]. Notice that the extension covers both KS and non-KS MMP hypergraphs. In such extended n-dim MMP hypergraphs, hyperedges need not always contain n vertices but they might still satisfy or violate the two rules (i ) and (ii ) from Theorem 3.2. However, then we cannot call them the KS rules. Equally so, we cannot call their inequalities the KS inequalities. Instead, we consider hypergraphs with truncated vertices in the following way (cf. [41]).

Definition 3.5. Non-binary MMP hypergraph.
A k-l MMP hypergraph of hypergraphdimension n ≥ 3 with k vertices and l hyperedges, whose i-th hyperedge contains κ(i) vertices (2 ≤ κ(i) ≤ n, i = 1, . . . , l) to which it is impossible to assign 1s and 0s in such a way that the following hypergraph rules hold (i) No two vertices within any of its hyperedges are both assigned the value 1; (ii) In any of its hyperedges, not all of the vertices are assigned the value 0.
The MMP hypergraph above is defined without a coordinatization, i,e., neither their vertices nor their hyperedges are related to either vectors or operators. We say that an MMP hypergraph is in an MMP-hypergraph-n-dim space (we call it an MMP hypergraph space) when either all its hyperedges contain n vertices or when we add vertices to hyperedges so that each contains n vertices. Many of our programs handle MMP hypergraphs without any reference to either vectors or projectors. In an MMP hypergraph with a coordinatization an n-dim MMP hypergraph space becomes an n-dim Hilbert space spanned by a maximal number of vectors within hyperedges. Whether we speak about an MMP hypergraph with or without a coordinatization will be clear from the context. Definition 3.6. Binary MMP hypergraph An MMP hypergraph to which it is possible to assign 1s and 0s so as to satisfy the rules (i) and (ii) of Def. 3.5 is called a binary hypergraph (BMMP hypergraph).

Definition 3.7. Critical MMP hypergraph is a non-binary MMP hypergraph which is minimal in the sense that removing any of its hyperedges turns it into a binary MMP hypergraph.
Critical MMP hypergraphs represent non-redundant blueprints for their implementation since bigger MMPs that contain them only add orthogonalities that do not change their non-binary property.
An n-dim non-binary k-l MMP hypergraph H need not have a coordinatization, but when it does, the vertices in every hyperedge have definite mutually orthogonal vectors assigned to them. That means that each hyperedge E j , j = 1, . . . , l should have not only κ(j) vectors corresponding to its κ(i) vertices specified, but also n − κ(j) ones that must exist by the virtue of orthogonality in the n-dim space so as to form an orthogonal basis of the space. Such an extended H we call a filled H.
In order to handle the pentagon hypergraph 12,23,34,45,51. we first have to assign a coordinatization of the filled pentagon 162,273,384,495,5A1. so as to be able to implement the pentagon. Once we determined all its vectors/states we can discard the vertices 6,7,8,9,A from further consideration and processing.
The following Lemma follows straightforwardly. In other words, a standard Kochen-Specker set is a non-binary MMP hypergraph in which the size of each hyperedge is n and in which every one of k vertices corresponds to a vector/state.

Methods of MMP hypergraph generations
To generate NBMMPHs in n-dim spaces we mostly rely on three methods-M1-M3 which make use of algorithms and programs developed in [58,41,60,46]. M1 consists in an automated dropping of vertices contained in single hyperedges (multiplicity m = 1; see Def. 4.3) of BMMPHs and a possible subsequent stripping of their hyperedges. The obtained smaller MMPHs are often NBMMPH although never KS. M2 consists in an automated random addition of hyperedges to MMPHs so as to obtain larger ones which then serve us to generate smaller KS MMPHs by stripping hyperedges randomly again; M3 consists in combining simple vector components so as to exhaust all possible collections of n mutually orthogonal n-dim vectors. These collections form big master MMPHs which consist of single or multiple MMPHs of different sizes. Master MMPHs may or may not be NBMMPH, what we find out by applying filters to them. NBMMPHs serve us to massively generate a class of smaller MMPHs via our algorithms and programs.
The algorithms the methods employ are applicable to any n-dim space but the computational barrier of the present day supercomputers allowed our programs based on these algorithms to reach no further than a 32-dim space. In this paper we limit ourselves to 6-dim spaces.

Discriminators of the contextuality: Noncontextuality inequalities
In general, the noncontextuality inequality as a distinguisher between contextual and noncontextual MMP hypergraphs is defined as follows: where A and Ω are some terms defined on H, is an inequality whose satisfaction implies that H is a contextual non-binary MMP hypergraph (Def. 3.5), and whose violation: implies that H is a noncontextual binary MMP hypergraph (Def. 3.6).
Noncontextuality inequalities exist in operator-and hypergraph-based forms.

Operator-based inequalities
Before we dwell on our hypergraph-and vector-evaluation-based MMP structures and their inequalities let us first briefly present how the operator-based ones are defined in the literature. There are three approaches: (i) hyperedge-based approach considers the operators defined via vertices organized within hyperedges of MMP hypergraphs; such are the majority of operators in the present section; noncontextuality inequalities generated by these operators correspond to the KS MMP hypergraph hyperedge inequalities, abbreviated e-inequalities and defined by Defs. 4.14 and 4.15 in Sec. 4.3; (ii) vertex-based approach considers the operators defined via vertices of an MMP hypergraph by particular algorithms and independently of the organization of vertices within hyperedges; see Yu-Oh's operators below; their contextuality corresponds to the contextuality of the underlying MMP hypergraph; the inequalities generated by these operators correspond to the KS MMP hypergraph the α * r -inequality given by Eq. (24); (iii) direct approach considers operators defined without a reference to either vertices or their coordinatization; see Peres-Mermin's operators below; we design a vertexhyperedge structure for them in Sec. 5.5.
Most of the operators are defined so as to have eigenvalues ±1; their classical counterparts are classical observables with noncontextual values ±1. Thus, in the conditions (i) and (ii) of the KS theorem, the value 1 assigned to vertices/vectors of a KS set corresponds to an operator-defined variable value 1 (or -1) and value 0 corresponds to value -1 (or 1), meaning that in (i) and (ii) we would have 1 (or -1) assigned to one of the vertices and -1 (or 1) to all the others.
Cabello defines 4-dim operators by means of KS states/vectors A ij [21,Eq. (2)] via vector coordinatization of the 4-dim KS 18-9 hypergraph shown in [21, Fig. 1] and then he shows that the inequality defined in [21, Eq. (1)] defined on the smallest 4-dim KS set 18-9 [50], is violated by probabilities of the outcomes of quantum measurements which give 9 at the right hand side of the inequality. Value 7 in the inequality is the maximum value we obtain when we interpret the observables A ij as classical variables. Yu and Oh use a similar operator defined for 13 vectors from a 25-16 non-binary MMP hypergraph (which is a non-KS set, though) and define the following inequality for them [35,Eq. (4)] where Γ is a weight function. It is violated by quantum measurements which yield 25/3 = 8.3 for the left hand side of the inequality. Badziág, Bengtsson, Cabello, and Pitowsky define n-dim operators by means of states/vectors of a k-l KS hypergraph (with k vertices and l hyperedges).
Peres and Mermin's [44,45] set was used [21] to yield noncontextuality inequalities for operators which are not constructed with the help of vectors/states that might underlie them. Instead, one makes use of the tensor products of the 2-dim Pauli operators given by Eq. (32) and defines the noncontextuality inequality as follows. The operators Σ i , i = 1, . . . 9, satisfy the equation while their classical counterparts S i , i = 1, . . . 9 (observables with two possible results ±1) satisfy Thus, the noncontextuality inequality should read Taken together, most operator-based inequalities in the literature rely on coordinatizations of vertices/states of MMP hypergraphs by means of which the operators are defined and then measured through an application on arbitrary states. In contrast, in the next sections, we consider the inequalities which are defined directly by means of the coordinatizations of vertices of hypergraphs which are measured directly.

Hypergraph-based inequalities; Hypergraphs vs. operators
The approaches in Sec. 4.1 consider vertices either directly (Yu and Oh), or via their inclusion in hyperedges (other approaches). In Sec. 4.3 we connect the operator-based approach vertex structure of contextual sets with a hypergraph-based approach. But in order to introduce particular vertex-based features of the latter approach, in this section we reconsider a simple set-Klyachko, Can, Binicioğlu, and Shumovsky's pentagon [78,79]to pinpoint the required features and to serve us as an introduction to Sec. 4.3.
Operator vs. hypergraph approaches to the pentagon will serve us to introduce a distinction between operator-based measurements and direct measurements of quantum systems exiting quantum ports determined via vertices within each hyperedge of an MMP hypergraph.
We can assign vectors to the pentagon vertices in many ways. Fig. 5(b) shows that 5-5 cannot be a regular planar pentagon, irrespective of chosen vectors, since the mutually orthogonal vectors which would span its hyperedges, cannot reach it from the z-axis (left magenta pair). The green diagonals do allow for such vectors (blue ones at the bottom) and Klyachko et al. [78, Fig. 1] attempted to use the star-shaped pentagon (Fig. 5(c)) instead and called it a pentagram. However, since the pentagon is a 3-dim one, the vectors that belong to just one hyperedge should also be taken into account, what makes the pentagram contained in a plane inconsistent as it is obvious from Fig. 5(c). The proper pentagon with curved hyperedges is given in Fig. 5(d). Together with vectors that span them it is shown in Fig. 5(e) and vectors themselves are given above Fig. 4. The need to take all the states into account experimentally was also stressed in [78]. Since vectors/states belong to the spin-1 system all three ports of each gate should be measured even if only two of the outcomes are postprocessed. Now, Klyachko et al. [78] consider the states corresponding to vectors 1,. . . ,5 in classical vs. quantum representations. Assumed classical measurements demand that each vertex within an hyperedge either receives an experimental detection or not, i.e., that it is assigned a value 1 or 0 (a preassigned truth value), in such a way that the above hypergraph rules (i) and (ii) from Def. 3.5 hold. "When the same assignments are carried over to the projectors in the pentagram operator [A]. . . at most two of them can be assigned the value 1 [in our notation below HI cM = 2; Def. 4.4]. In a noncontextual reality an experimenter. . . will therefore always find that [80, p. 415 In the quantum representation, the operators are |i i| and the maximum of the mean value for Ψ = (0, 0, 1) is: Its minimum value 5− √ 5 2 ≈ 1.382 we obtain for Ψ m = (1, 0, 0) and these dependencies of mean values of the measured observable on the chosen states render the pentagram setup state-dependent in the operator approach.
Second, the 5-5 pentagon is a NBMMP hypergraph and we can make it hypergraph-stateindependent in the following sense. It can be implemented via a generalised Stern-Gerlach experiment which makes use of both magnetic and electric fields [81], or via photonic triplets [82], or via photon orbital angular momentum [4]. From each gate represented by pentagon hyperedges, a particle or a photon will exit through one of the three ports and will be detected by a corresponding detector. We postprocess the data so as to keep the records of the "clicks" triggered by 1,2,...,5 events and discard those triggered by 6,7,...,A events. After a recalibration of data, the probability of obtaining a click triggered by 1 or by 2 while measuring the 162 hyperedge is 1/2. Additionally, the probability of obtaining a click while measuring 1 within the 5A1 hyperedge is also 1/2 as well as the probability of obtaining a click while measuring 2 within the 273 hyperedge, and so on for all other ports/vertices. Therefore, the sum of probabilities of registering any of the 1,2,...,5 events in pairs of hyperedges they belong to is 5. In notation of Sec. 4.3 HI q = 5; Def. 4.9. Since we can assign at most two classical 1s (satisfying the conditions (i) and (ii)) from Def. 3.5 to pentagon vertices and since each of them share two hyperedges we have HI m cM = 2 × 2 = 4 and we obtain the following v-inequality (Def. 4.11): Notice that the non-KS filled 10-5 pentagon violates it: The violation occurs because the sum of probabilities for 1,2,...,5 is 10/3 and for 6,7,...,A it is 5/3 which together make 5. The maximum number of classical 1s is 5 (each positioned in one of 6,7,...,A). So, a pentagon hypergraph inequality is hypergraph-stateindependent in the sense that it relies on the MMP hypergraph structure and not on its coordinatization. Thus, there are three things we take from here.
1. While the operator-based representation of the pentagon is state dependent, the hypergraph one is not.
2. In the operator-based representation each state contributes just once in the measurements, i.e., via projections to Ψ, while in the MMP hypergraph representation each state/vertex contributes twice, once through a measurement of a port contained in a chosen hyperedge/gate and then through a measurement of the same port contained in the next hyperedge/gate it shares. In Sec. 4.3 we formalize the hypergraph notions we introduced here.
3. The non-binary MMP hypergraph 5-5 pentagon is not a subhypergraph of the binary MMP hypergraph pentagon 10-5. In order to obtain 5-5 from 10-5 we discard vertices that are contained in just one hyperedge while making use of the full coordinatization of 10-5 to assign vectors to remaining vertices. We denote such a subset as a subhypergraph.

Hypergraph structure and inequalities
In this section we elaborate on MMP hypergraph vertices and the MMP hypergraph structure and properties based on them. We start with the following definitions. (Notice that in [41] some values of HI c are wrongly calculated due to an application problem of our previous algorithm and program; program One used in this paper is a substitute for that ones.) We obtain HI c and HI m c by an algorithm and its program One which assign 1s to vertices of an MMP hypergraph. The algorithm randomly searches for a distribution of 1s satisfying the conditions (i) and (ii) from Def. 3.5. It starts with a randomly chosen hyperedge whose one vertex is assigned 1 and the others 0s and continues with connected hyperedges until all permitted vertices are assigned 1. Multiplicities for found 1s accumulated in the process are taken into account. For contextual non-binary MMPs that means until a contradiction is reached (although not necessarily a KS contradiction), i.e., a point at which no vertex from the remaining hyperedges can be assigned 1; vertices within these hyperedges are all assigned 0s. The maximal number of 1s (HI cM , HI m cM ) is obtained by (up to 50,000) parallel runs with reshuffled vertices and hyperedges. Because we do not make use of backtracking search algorithm resolve conflicts, the procedure does not exponentially increase the CPU time with increasing number of vertices. KS sets with several thousand vertices and hyperedges are processed within seconds on each CPU of a cluster or a supercomputer.
The probability of not finding correct minimal or maximal HI c and HI m c after so many runs is extremely small but nevertheless that slight probability restrains our results meaning that slightly bigger maximums and smaller minimums might be found in the future computations for a chosen hypergraph. We stress that, in most cases, l cM hyperedges do not contain HI cM vertices but a smaller number of them. Also, l cm hyperedges usually do not contain HI cm vertices but a bigger number of them.
The classical vertex index HI cM of a hypergraph H is related to the independence number of H introduced by Grötschel, Lovász, and Schrijver (GLS) [83, p. 192]. They introduced the definition for graphs but it holds for hypergraphs as well, with graph cliques transliterated into hyperedges.

Definition 4.7. GLS α. The independence number of H denoted by α(H) is the maximum number of pairwise non-adjacent vertices.
The independence number α has been given several definitions and names in the literature. For instance, "α(H) is the size of the largest set of vertices of H such that no two elements of the set are adjacent" [12]. Such a set is called an independent or a stable set [55,Def. 2.13], [16, p. 272,428] and α is also called a stability number [16, p. 272,428]. In such a set no two vertices are connected by a hyperedge. Definitions of these notions given by Voloshin differ, since his sets might include two or more vertices from the same hyperedge [19, p. 151]. The reason for distinguishing the two terms H cM (H) and α(H) that are numerically equal is methodological. Finding α(H) is an NP complete, i.e., it is nondeterministic polynomialtime complete procedure [83, p. 195] applied to the vertex structure of a hypergraph while our algorithm for finding H cM (H) relies on repeated (sequential) non-exhaustive linear searches for 0s and 1s from given lists so as to satisfy conditions from Def. 4.4. Hence, while the definition of H cM (H) in Def. 4.4 is exact, the algorithm and program (One) approximate it to an arbitrary precision. Each run takes 10 ms or less. We obtained H cM (H) for over 1,000 MMP hypergraphs and verified (via other methods) that H cM (H) = α(H) for all small MMP hypergraphs we considered. In this paper we present 43 MMP hypergraphs for which H cM (H) = α(H) holds and one which might not hold (we were not able to independently verify whether H cM (192-118) = 75 is the maximum). In the literature we found only three explicitly calculated α(H)'s: two in [54] and one in [12].
To arrive at our noncontextuality inequality we introduce the following definition and lemma. Definition 4.9. MMP Quantum Hypergraph Index HI q is the sum of weighted probabilities of all vertices of an n-dim k-l MMP hypergraph measured in all hyperedges/gates, i.e., repeatedly whenever they share more than one hyperedge (multiplicity being greater than 1).

Lemma 4.10. Vertex-Hyperedge Lemma. For any n-dim k-l MMP hypergraph in which each hyperedge contains n vertices the following holds
In general, any n-dim k-l MMP hypergraph with κ(j) considered vertices in j-th hyperedge, j = 1, . . . , l, the following holds where κ(j) is the number of vertices in a hyperedge j and p(j, λ) = 1 κ(j) is the probability that a state of a system corresponding to one of the vertices would be detected when the hyperedge/gate j is being measured.
Proof. To prove Eq. (17) we take a constructive approach of building non-isomorphic hypergraphs. For any loop of two or more hyperedges Eq. (17) obviously holds. E.g., a loop of 3-dim hyperedges (pentagon) contains 10 vertices 5 of which share one hyperedge and the other 5 two. Therefore 5 × 1 + 5 × 2 = 3 × 5. When we add a hyperedge at two vertex connections the m numbers of these vertices rise by one so that the total number of vertices increase by n and Eq. (17) holds. By weaving hyperedges so as to obtain the so-called δ-feature [58], i.e., by making pairs of them to intersect each other twice (at two vertices) in a 4-dim space, or up to n − 2 times in an n-dim space (Def. 2.1(4.)), the number of vertices lowers, but m proportionally rises at the vertices at which the hyperedges intersect and Eq. (17) again holds. With this we exhaust constructive steps of generating MMP hypergraphs [33,34].
To prove Eq. (18), we just note that (17) is equivalent to a generalized Handshake Lemma for Hypergraphs given as a Solution to Exercise 11.1.3.a in [84]. No proof of the lemma is given in [84].

Lemma 4.12. All n-dim NBMMP hypergraphs satisfy the v-inequality, i.e., any v-inequality is a noncontextuality inequality (1).
Proof. In an NBMMP hypergraph a maximal number of hyperedges that contain '1' must be smaller than the total number of hyperedges l and in a BMMP hypergraph every hyperedge must allow assignment of one '1', as follows from Defs. 3.5 and 3.6.
Measurements of a k-l set are carried out on gates, i.e., hyperedges-hyperedge by hyperedge-and each hyperedge/gate yields a single detection (click) corresponding to one of n vertices (vectors, states) contained in the hyperedges with a probability of 1 n . This means that for MMP hypergraphs whose all hyperedges contain n vertices, we can build the statistics of the obtained data in two ways: Hypergraph Statistics 4.13. Hence, we collect data from κ(j) ≤ n vertices in each hyperedge j. The probability of getting measurement data for each vertex within the hyperedge, after discarding data for n − κ(j) dropped vertices, is 1 κ(j) . The sum of all probabilities is, according, to Eq. (18), equal to the size of the hypergraph, i.e., to the number of its hyperedges l.
As for hyperedges, several additional definitions are due for a further analysis of the aforementioned structure in the next sections. Definition 4.14. An MMP hypergraph maximum hyperedge inequality or simply e M axinequality is defined as As for l cm , it satisfies the noncontextuality e min -inequality Definition 4.15. An MMP hypergraph minimum hyperedge inequality or simply e mininequality is defined as They are the noncontextuality inequalities simply because l cm = l cM = l for all binary MMP hypergraphs. The inequality Eq. (21) has a bigger span between the terms than the inequality (4.14) (because l cm ≤ l cM ) and therefore it is more viable for an implementation.
It seems to us that l cm is the "rank of contextuality" Horodecki at al. [85] introduced as a quantifier of contextuality for hypergraphs, although it is rather difficult to establish a correspondence between their formalism and the MMP hypergraph language, in particular because they keep using several different names for vertices and hyperedges throughout their paper. Whenever we refer to both e M ax -and e min -inequalities we invoke them as e-inequalities. Proof. For KS MMP hypergraphs it follows directly from the KS theorem 3.1 since both a maximal and a minimal number of hyperedges that contain '1' must be smaller than the total number of hyperedges l. For non-KS NBMMP hypergraphs it follows from Def. 3.5 and its conditions (i) and (ii) in the same way.
Here we stress that the raw data statistics cause a problem with the application of the maximum of total probabilities to obtain measurement outcomes that served some authors in the literature to establish noncontextual inequalities which should single out contextual sets. The maximum in question is derived from the fractional independence number defined in the graph and hypergraph theories by the following definition [83, p. 192].

Definition 4.17. Fractional independence number
Since α * (H) is the optimum of a linear programming (LP) problem, it can also be given the following equivalent definition [86].
The fractional independence number α * has recently been renamed to the fractional packing number and used for obtaining noncontextuality inequalities for measured contextual quantum systems [54,12,55]. However, the properties of probabilities of quantum contextual measurements in these references have not been fully used in applications of the fractional independence number to them, as follows from the following postulate and theorem which dispense with variable probabilities x(v) used in Defs. 4.17 and 4.18.
Quantum Indeterminacy Postulate. 4.19. A quantum system generated in an unknown (unprepared) pure state in an apparatus (e.g., a generalized Stern-Gerlach one), when exiting from it through one of the out-ports (channels) of its gate, has equal probability of being detected [87, Sec. 5-1] on its exit.
That means that in an n-dim k-l MMP hypergraph with n vertices within each hyperedge the probability of detecting the system at one of the ports is p(v) = 1 n for any vertex v within each hyperedge E j , j = 1, . . . , l and that the condition v∈E j p(v) ≤ 1 for each hyperedge E j ∈ E, j = 1, . . . , l is satisfied. Later on we might decide to drop particular vertices and apply postprocessed data statistics 4.13.
That also means that assuming that one can manipulate the generated pure states before measuring them is not plausible. For instance, an unprepared spin-1 system can be projected to one of three subspaces with equal probabilities of 1/3 and this inherent quantum randomness is what builds up the contextuality of the whole set. Any filtering of the systems before measurements, i.e., any other set of probabilities that do not amount to 1/3 each, ruins the contextuality since then the sum of probabilities is less than 1 per a hyperedge and we loose data.
As an example, take Eq. (17) which gives the sum of probabilities of detecting vertex states over all multiple appearances of vertices in hyperedges/gates obtained by postprocessing of measurement data. The sum takes into account multiple detections of systems corresponding to the same vertices exiting through different hyperedges/gates the vertices/ports share. For instance, take the 18-9 MMP 1234,4567,789A,ABCD,DEFG,GHI1, 35CE,29BI,68FH. and carry out measurements on all 9 hyperedges of them. Then, the probability of detecting a system determined by any of the vertices in any hyperedge/gate is 1 4 . But every vertex appears in two gates, so the sum of probabilities of the system being detected in each such pair is 1 2 and the overall sum of probabilities is 18 1 2 = 9, i.e., HI q = l = 9. This is a consequence of measuring each of the 9 hyperedges separately and obtaining outcomes for each tetrads of vertices per hyperedge with the probability of They also satisfy the following: (a) Under the raw data statistics 4.13(a) assumption, i.e., under the assumption that every vertex within an MMP hypergraph has 1 n probability of being detected [54], [12], [55], the sum of all probabilities is: where α * r is the raw quantum fractional independence number. This implies that, in general, the α * r -inequality (compare it with free probability GLS inequality [83, p. 192]) does not always hold for quantum mechanical measurements whose probabilities of detection within each hyperedge satisfy the condition given by Eq.   5.7. It is, therefore, not a reliable discriminator of contextual sets. This is only to be expected since the raw data statistics is, as we pointed out above, not a consistent elaboration of measurement data.    n probability of being detected, the sum of all probabilities is: where α * p is called the postprocessed quantum fractional independence number. This implies that the α * p -inequality [83, p. 192], which follows from the Vertex-Hyperedge Lemma 18, is another form of the v-inequality (19) and is therefore a noncontextuality inequality and a reliable discriminator of contextual sets.
Proof. Quantum YES-NO measurements of states determined by MMP hypergraphs are carried out either by letting the quantum system through gates, e.g., Stern-Gerlach devices or via projecting their states on unit vectors. According to the quantum indeterminacy postulate 4.19 that makes the probabilities of their detection constant.  (17)). This gives Eq. (25) and the inequality (26). Examples of such an approach are given for a pentagon in Sec. 4 (18,9) = HI q [18,9] = 9.
Notice that since the theorem asserts that a contextual non-binary MMP hypergraph might or might not satisfy the raw quantum fractional independence number inequality given by Eq. (24) and which is therefore not a noncontextuality inequality, the only known unequivocal noncontextuality inequalities that hold for every MMP hypergraph are v-and e-inequalities (and hence also α p inequalities). Still, for a contextual k-l MMP hypergraph the α * r -inequality has had a greater span (smaller α) than for a noncontextual k-l MMP hypergraph for roughly 1,000 randomly chosen k-l MMP hypergraphs.
If v-and e-inequalities were satisfied, an MMP hypergraph would be contextual. If not, it wouldn't. So, the v-and e-inequalities are noncontextuality inequalities. On the other hand, as we stressed above, α * r -inequalities, are not such direct measures of the quantum contextuality since many contextual MMP hypergraphs do not satisfy them. All contextual MMP hypergraphs satisfy the inequality l cm ≤ l cM < l, while the noncontextual MMP hypergraphs satisfy l cm = l cM = l. That means that a noncontextual MMP hypergraph is structurally different from a contextual MMP hypergraph.
Note that both α * r -and α * p -inequalities given by Eqs. (24) and (26), respectively, assume the validity of the quantum indeterminacy postulate 4.19. Notwithstanding the plausibility of the postulate, some authors apply the original GLS inequality [54, Result 1] (27) is a noncontextuality inequality. In [54] there is also the weight of the probabilities at each hyperedge which, according to the indeterminacy postulate 4.19, should be equal to 1.
The discrepancy comes from the fact that the inequality Eq. (27) is correct provided p is not a constant (as it would be under the assumption of the quantum indeterminacy postulate) but a free variable which is determined as a solution of the linear programming problem given in Def. 4.18. In [54] it is even stated that finding α * is NP hard, what is correct for the GLS inequality.
For a pentagon, the raw data statistics and LP approaches give the same result α * = 5 2 . A difference emerges already for a very simple MMP hypergraph 9-3 given in Fig. 6(e), though. For a free p we have: , α * = 9 4 = 2.25, which violates inequality (27) as well as (24) (α * r = 9 4 ). Hence, α * = α * r , meaning that α * r is a special case of α * ; the former α applies to variable probabilities and the latter to fixed probabilities of YES-NO quantum measurements implying that Eq. (27) fails for arbitrary many quantum measurements and that the probabilities must be equal and constant at all ports of a quantum gate as a consequence of quantum indeterminacy postulate 4.19, i.e., of a genuine quantum randomness.  1 4 . The same is with the 7891 in the 9-3 MMP, but in the 7-3 MMP we discard two outcomes-those at 8 and those 9. After the dismissal of 8 and 9 data, the 7-and 1-detection have the probability of 1 2 each. But the question remains about the overall probability of detections at 7 and 1 within the 7-3 MMP hypergraph. In [41] we proposed that the probability be the arithmetic mean of the probabilities the vertex has in all hyperedges it shares. For instance, vertex 7 within the 4567 hyperedge would have the probability 1 4 and within the 71 hyperedge it would have the probability of 1 2 . The overall probability for 7 to occur, i.e., the arithmetic mean of these probabilities, would be ( 1 (Notice also that it would be plausible to assume twice as many measurements for the 7891 than for the other two hyperedges, if we wanted to drop data for 8 and 9 and claim the probability 1 2 for 1 and 7.) We provide some further examples and a discussion in Secs. 5.2 and 5.4.

Hypergraph structure exemplified
To get a better insight into the introduced notions and features, we consider two examples: a complex 4-dim 21-11 KS MMP hypergraph, shown in Fig. 7, that is not a subset of Peres' 24-24 KS set [23] unlike the real 4-dim KS 18-9 that is [21] and Yu-Oh's 3-dim 13-16 non-binary non-KS MMP hypergraph, shown in Fig. 8, that is a subhypergraph of a binary 25-16 which is itself a subhypergraph of Peres' 57-40 KS MMP hypergraph. We establish a relation between the hypergraph-based features introduced in the previous section and the operator-based features introduced in Sec. 4.1, in particular with respect to inequalities (4) and (5).
We can implement the 21-11 set by means of two qubits mounted on single photons via spin and angular momentum [88,89] states defined as follows where H, V are horizontal, vertical, D, A diagonal, anti-diagonal, and R, L right, left circular polarizations, while ±2 are Laguerre-Gauss modes carrying ±2 units of orbital angular momentum (OAM) and h, v are their ± superposition, respectively. Indices '1' and '2' refer to the 1st and 2nd qubit mounted on the system, respectively. Four states building the hyperedge ABCL are given in Fig. 7. Other states have similar expressions and they enable us to obtain the analogues of Cabello's states defined by Eq. (3). Since our vectors are complex, our bras are hermitian conjugates of our kets: O i = 2|i i| † − I. The matrix forms of the operators of our four states read: where1 stands for −1 andī for −i.
We can verify that any of |A ,|B ,|C ,|L is an eigenvector of any of O A,B,C,L with eigenvalues ±1, and that We can also verify that these relations hold for any hyperedge. Actually, we conjecture that they hold for any hyperedge of any critical KS MMP hypergraph in any dimension. That yields:   [18,9] = 7 < P q [18,9] = 9) referred to by Eqs. (3) and (4) above.
Now, let us establish the correspondence of these operator-based results with our hypergraph-based approach. P q [k, l] = l given by Eq. (28) in the operator-based approach is equivalent to HI q [k, l] = l given by Eq. (17) of the hypergraph-based approach. In accordance with this, Cabello [21, p. 2, top] obtains P c [18,9] = 7, P q [18,9] = 9, and the noncontextuality inequality 7 < 9. In other words, in [21] he adopts the postprocessed data statistics while in [4,Eqs. (2)] the authors adopt the raw data statistics and have P q [18,9] = 4.5 (with operators |i >< i|, not 2|i >< i| − I, but the result should be the same). In the former approach each vertex state shares two hyperedges (has multiplicity m = 2) and is therefore measured twice, once within measurements carried out on the first hyperedge and the second time within those carried out on the second hyperedge. Since all vertices in the 18-9 MMP share two hyperedges one is tempted to apply the raw data approach, but in the 21-11 MMP the vertex 7 shares four hyperedges, i.e., its multiplicity is m(7) = 4 and we should take into account that it is measured four times while all the other vertices are measured only twice when we measure all hyperedges in turn.
Yu-Oh's operator approach is different [35]. They make use of the inequality given by Eq. (5) to prove the operator contextuality, but the underlying MMP hypergraph is itself contextual. See Fig. 8.
More specifically, they build their operators A i in Eq. (5) by means of vectors/states assigned to vertices of their 13-16 MMP hypergraph; e.g., (1) and Appendix]. All 13 vectors are eigenvectors of A i , i = 1, . . . , 13. Therefore "the outcomes for observables A i are either +1 or −1, depending on whether there is a photon click (or no click) in the corresponding photon detector" [82,Supp. Material]. The operators violate inequality (5) for any state, i.e., the violation is state independent.
Before we proceed with a further analysis of Yu-Oh's set we would like to point out that there is the following problem with the violation of inequality (5). In [41] we tested it on 50 different non-binary MMP hypergraphs and found no violation. That means that the inequality is unsuitable for application on an arbitrary MMP hypergraph.
On the other hand, Yu-Oh's MMP hypergraph does satisfy the v-(HI cM = α = 5 < HI m cM = 14 < l = 16), e-(l cM = 14 < l = 16), and even α * r -inequality (5 = α < α * r = 5.6). Taken together, operator-based measurements of contextual states differ from hypergraphbased ones in the following way. To measure the mean values of observables/operators we have to first measure correlations between observables/operators defined by vertices/vectors of an MMP hypergraph. To prove the state independence we have to carry out measurements with different input states. Thus, the number of measurements grows exponentially with the size and with the dimension of the set.
In the hypergraph-based approach the input states are the states from the coordinatization of an MMP, as in Fig. 7, and we verify them by detecting output states at the ports of each gate/hyperedge. The number of measurements grows linearly with the size of MMP hypergraphs and with their dimension.
Of course, each approach has its own application. When an MMP hypergraph is a part of a quantum network which requires projections to specified states, then we use the operator-based approach, and when it is a part of a quantum computation which has to distinguish contextual loops from noncontextual ones, then we use a hypergraph approach.

MMP hypergraph multiplicity
So far we have seen that the multiplicity of vertices plays significant roles in determining the features of MMP hypergraphs. Here we consider two such features shown in Fig. 9 and Table 1 (odd number of hyperedges) and in the Appendix A (even number of hyperedges).  First, for thousands of 4-dim MMP hypergraphs we checked, it turns out that those with odd number of hyperedges predominantly have vertices with even multiplicities. The program One gives vertex multiplicities m. For smaller sets, they can be verified by hand (see, e.g., figures in [58]), but for the bigger ones, it would be a really demanding endeavour. So, as an example we consider a subclass with 17 hyperedges from the 4-dim class 156-249 [27] shown in Fig. 9. We also contrast it with a subclass with 18 hyperedges from the same class shown in the Appendix A which exhibits a prevalent number of odd multiplicities, once m = 2 (dominant in all MMPs) is excluded. Notice that any KS MMP with a parity proof must have an odd number of edges.
Second, multiplicities of vertices uniquely characterize master MMP hypergraphs we use to generate all known MMP hypergraphs classes from. Master sets that are generated from symmetric geometry or from symmetric polytopes or from symmetric vector-generated MMPs exhibit large and unique multiplicities m, while with asymmetric vector-generated ones we have n (=dimension) bigger m's followed by multiple occurrences of one or two smaller m's, as shown in Table 1. We can see that 4-dim master 24-24 consist of 24 vertices all of which have multiplicity m = 4, 60-75 of 60 vertices with m = 5, 60-105 of 60 vertices with m = 7, etc. The bigger the asymmetric vector-generated MMP hypergraphs are, the more m's they contain. E.g., 4-dim the KS MMP hypergraph master 1132-2460 (not shown in Table 1
Their HI cM , HI cm , l cm , l cM , and m M are given in Table 2. The e M ax -inequalities are trivial for the critical MMP hypergraphs for which we have l cM = l−1. For the KS 192-118, in 100,000 runs on a supercomputer, we obtained l cM = l −2 = 116. But our program One for finding l c is probabilistic and an exhaustive search would not allow parallel computation what means too lengthy a computation. Their e min -inequalities read 24 < 36, 26 < 37, . . . , 99 < 118. They would allow for a more robust implementation. Cf. 7-dim case at the end of Sec. 5.8.
In    Fig. 11(a) should be an MMP hypergraph, but it is not. To see this, let us look at two red hyperedges in Fig. 11(b)) 2-10-9 and 2-12-13. The caption of [30, Fig. 1] (here: Fig. 11(a)), in effect, reads: "node 2 is orthogonal to all nodes connected to the red edges. Similarly for the green and [blue] nodes." Nodes are hypergraph vertices, but that what the nodes (e.g., the node 2) are "connected" to (e.g., 9-10 or 12-13 in Fig. 11(a)) are neither graph "edges" nor hypergraph "hyperedges." They are just lines connecting dot 9 with dot 10, etc. All that confuses the reader who, after more than 50 years of the first appearance of the iconic KS set, deserves references to its unambiguous hypergraph presentation as given in [26,33,34,58] and here in Fig. 11(b).
three vertices in every hyperedge/triple must be realisable via 3-dim mutually orthogonal vectors, irrespective of whether we make use of all three of them (while postprocessing measurement data) or not. They do live in a 3-dim space and must be there, virtual or actual.
We also stress here that the caption of [30, Table 1] is incorrect and misleading in the following sense. Still, excluding the m = 1 vertices in a postprocessing of data generated by measurements provide us with an important method of obtaining arbitrary many smaller contextual nonbinary MMP hypergraphs from both non-binary and binary MMP hypergraphs. This is due to an important structural difference between the MMP hypergraphs with hyperedges containing the maximal number of vertices per hyperedge and those with less vertices in some hyperedges. If the former MMPs are critical (as, e.g., all MMPs from the figure from Appendix B, then no stripping of their hyperedges would lead to another non-binary MMP. However, stripping of their m = 1 vertices may yield non-critical MMPs which may generate smaller non-binary critical MMPs which may be stripped again and may yield even smaller criticals. Of course, because of the stripping, none of the obtained smaller MMPs is a proper subhypergraph of an MMP we start with. They are all subhypergraphs.
In [41] we generated thousands of smaller non-binary MMP critical hypergraphs from all four bigger MMPs given in the figure in Appendix B, the smallest of which are shown in Fig. 12. As a rule, all small critical non-binary MMP hypergraphs do satisfy the α * rinequality. Notice that the 14-12 MMP hypergraph which does not satisfy it, is not critical and that the critical 13-11 which it contains does satisfy the inequality.

Small 4-dim MMP hypergraphs and the smallest MMP hypergraph that exists
In Sec. 5.2 we obtained small 3-dim critical non-binary MMP hypergraphs from big critical non-binary MMP hypergraphs. In this section we consider small 4-dim critical nonbinary MMP hypergraphs we generate from big non-binary MMP hypergraphs by the same method we used in Sec. 5.2.
In Table 4 we present HI cM , HI cm , l cM and l cm values for chosen MMP subhypergraphs of the KS master MMP hypergraph 636-1657 [60]. Among billions of them that we generated in an automated fashion from the 636-1657, we have chosen a number of MMP hypergraphs some of which were also previously obtained in the literature via other methods.
None of them contain vertices with multiplicity m = 1, i.e., they are structurally dense. Since one can easily assign ASCII characters to the vertices we do not show them in Fig. 13. An MMP hypergraph is characterized by its structure, not by a specification of characters assigned to its vertices.
All MMP hypergraphs shown in Fig. 13 exhibit the maximal level of the so-called δ feature (pairs of them to intersect each other twice, at two vertices) which characterizes most of the KS MMP hypergraphs from the 636-1657 class. Notice that the δ feature characterizes all MMP hypergraphs-due to their definition (Def. 2.1(4.))-and not just KS ones (cf. Fig. 13(a,c)).
The 636-1657 class, whose critical KS sets overwhelmingly exhibits the δ feature, is completely disjoint from two other 4-dim classes of KS criticals 300-675 and 148-265, which do not exhibit the δ feature at all, and which are in turn completely disjoint from each other. Moreover, the non-KS sets and the non-critical KS sets from the 636-1657 class also possess the δ feature. That means that the δ feature characterises classes of hypergraphs although it does not determine the contextuality-both, classes that possess it as well as those that do not are contextual. The δ feature determines MMP classes through their structure and coordinatization, though. For instance: (i) it is absent in 3-dim MMP hypergraphs due to their definition; 3-dim MMP hypergraphs are equivalent to Greechie diagrams [41], but n-dim, n ≥ 4 MMP hypergraphs are not, exactly due to the δ-feature which is not permitted to any Greechie diagram due to its definition; also the smallest loops in any Greechie diagram in dimension are pentagons by its definition [57]; the smallest loops in 3-dim MMP hypergraphs are pentagons due to their geometry and that is the reason why they are equivalent only in the 3-dim space [33,34]; (ii) it allows the smallest hypergraphs in the 636-1657 MMP hypergraph class to be smaller than the smallest ones in the 300-675 and 148-265 MMP hypergraph classes that do not exhibit the δ feature; (iii) it is present in the MMP hypergraph which represents the exclusivity graph [12] and plays an essential role in the quantum computation theory (See Sec. 5.4); (iv) it characterizes all higher dimensional MMP hypergraphs; (v) in the 4-dim Hilbert space it resides in the complex spaces, while it is absent in the real ones [58,60].
Apart from these characteristics, parameters obtained for the MMPs from the 300-675 and 148-265 classes do not fundamentally differ from those obtained for the 636-1657 class and therefore we do not give equivalent set of examples for the former classes.
We confirmed this feature on thousands of binary MMP hypergraphs. It enables us to obtain a much greater varieties of contextual sets than via the KS or the operator generation, including obtaining a plethora of small sets in any dimension. For the time being, we have carried out a massive generation neither of binary MMP hypergraphs nor of non-binary MMP hypergraphs that would follow from the binary ones via the 5.2 feature (noncontextual −→ contextual). We leave that for a future project.
In Fig. 2 we see that the graph representation (c) of the 18-9 KS set has three times as many edges as its MMP hypergraph representation (b). In higher dimensions and for more vertices and edges the graph representation gets more and more complicated and graphically unintelligible. Matrix graph representation also becomes hardly manageable in comparison with the MMP string representation. That is why Cabello [21, Fig. 1] first adopted the general hypergraph representation [33, 34, Fig. 3(a)] for the 18-9 KS. However, in [4, Fig. 1(a)] the authors, surprisingly, abandoned the hypergraph language and adopted the graph representation shown in Fig. 15(e) that caused the following inconsistencies.
In [4, Fig. 1(a)] 9 edges were added to the 18-9 KS graph from Fig. 15(d)-in Fig. 15(e) they are denoted as 3 green and 6 red ones. This turns the 18-9 set into an 18-18 set whose MMP hypergraph representation is shown in Fig. 15(g). The measurements for vertices on these additional 9 edges were carried out and provided in [4, Supp. Material, Table III]. For instance, for vertices 1,2,5,10,15,18, i.e., edges 1-10, 2-15 and 5-18, the probabilities p 1,10 , p 2,15 , and p 5,18 were obtained. However, as shown in [93,33,34,94,58,41,30] not just two but four vertices should be measured and should have a coordinatization in each green and red hyperedge even when we do not take all of them into account while postprocessing the data.
That means that the 18-vertex set from [4, Fig. 1(a)] is not a "Kochen-Specker set" as claimed in the title of the paper because all edges in a 4-dim KS set should have 4 vertices and green and red edges have only two vertices. The missing vertices should be added. In a graph representation it would be a real mess of lines and therefore we show them in the MMP hypergraph representation as gray dots in Fig. 15(f). It should have a coordinatization, but apparently this filled 36-18 MMP hypergraph (36 vertices and 18 hyperedges) has no coordinatization. We verified, that MMP 36-18 is not a subhypergraph of any known 4-dim MMP hypergraph class [58,41,60], i.e., that there are no known [59,Tables 1 & 2] vector components for any available coordinatization. Hence, not only that the considered set is not a KS set, but the measurement data themselves in [4] are inconsistent.
One way out of these inconsistencies is to merge triples of gray vertices at the intersections of hyperedges as shown in Fig. 15(h) Another way out would be to abandon green and red hyperedges and reduce the implementation to the 18-9 KS MMP hypergraph.
Our second example is the one of Howard, Wallman, Veitech, and Emerson [12]. They have shown that stabilizer operations with quantum bits initialized as magic states, i.e., superposition of states, can be used to purify quantum gates provided they exhibit contextuality. As a proof that considered sets are contextual the authors make use of the GLS inequality [83, p. 192].
However, "There are some subtleties that limit what these results can say about [qubits] as opposed to larger quantum systems. The limitation could simply be a vagary of the proof technique used by the authors" [13].
Their proof is a kind of a proof by induction and we shall focus on its first step which elaborates on a two-qubit system, a qubit being a 2-dim system (p = 2). The graph Γ they make use of for the purpose is shown in [12,Fig. 2] and its MMP hypergraph presentation in Fig. 16(a). Details on how is Γ obtained from a set of entangled projectors [12,Eq. (14)] which are in turn obtained from the set of stabilizers states [12,Eq. (14)] are not provided. A reference to [54] is given instead and we shall come back to it below.
One can verify that α(Γ) = p 3 = 8 holds (e.g., via One). How α = 8 < α * = 9 (the 2nd line of the proof of Theorem 1 in [12]) is obtained is not explained in detail but the approach the authors seem to have applied apparently runs as follows. Γ is a 30-108 non-binary MMP hypergraph whose string is given in Appendix E and whose graphical representation is given in Fig. 16(b). The MMP notation is substituted for the original clique representation of mutually orthogonal vertices in seven hyperedges which each contain four vertices (1234,5678,9ABC,DEFG,HIJK,JKLM,MLNO), altogether 24 vertices, each of which within each of the 7 hyperedges has the probability p = 1 4 of being detected, so that their sum of probabilities amounts to 6. The remaining 6 vertices (P,Q,R,S,T,U) are apparently assumed to have the probabilities p = 1 2 and it is apparently also assumed that the sum of their 1 2 probabilities amounts to 3. That yields the total sum of probabilities equal to α * (Γ) = 9 [12, Proof of Theorem 1]. But hyperedges that connect two vertices that do not both belong to the aforementioned 6 vertices, e.g., 15 or 1Q, are not taken into account in this calculation at all. Let us see how this can be amended.
The string of the 30-108 MMP given in Appendix E offers us the following probabilities. is also in the following 7 hyperedges 15, 18, 1F, 1G, 1I, 1K, and 1Q within each of which it has the probability 1 2 of being detected. The arithmetic mean of these probabilities is The question arises whether α * (Γ) = α * r (Γ) under another approach. We discus this below. In any case it does not seem correct to assign the probabilities 1 2 and 1 4 to the aforementioned 6 and 24 vertices based on their containment in the 2-vertex-and 4-vertexhyperedges, respectively, and ignore their containment in 86 hyperedges that connect vertices in the 2-vertex-hyperedges with those in the 4-vertex-hyperedges or two vertices in different 4-vertex-hyperedges via 2-vertex-hyperedges. For the time being, let us elaborate on discarding two states from a tensor product of states of two qubits.
Any two mutually orthogonal vertices from two-vertex-hyperedges in the 30-108 MMP belong to an edge and therefore to two qubits. The two-vertex-hyperedge only means that two of four states are discarded. Thus 202 of 232 vertices are excluded. Each qubit has a coordinatization and a complete measurement of each edge must involve all four vertex states, i.e., only complete states (both vertices from each hyperedges) can build up tensor products of two qubits. The quantum systems must pass out-ports no matter whether we take them into account in a later elaboration of our data or not. Related to that, the claim that α = 8 should be clarified, because, e.g., in Fig. 16 we see that the vertices 7,9,D,K,Q,N,S,U,V,n, etc., are independent and yield the independence number α ≥ 101 that violates the inequalities α < α * and α < α * r . It remains to be explained how come that vertices with m = 1 do not contribute to the independence set when they actually build up a KS MMP hypergraph 232-108. If it were a result of the construction of Γ, then the role of α = p 3 = 8 should also be explained, because there are contextual critical non-binary MMP hypergraphs with higher α which violate Eq. (24) (see Table 4).
When we take into account all vertices of all qubits we get Γ(filled) 232-108 KS MMP, whose string is given in Appendix E. Its parameters are given in Table 5. It is not critical, and the only critical set contained in it, that we obtained, is the 152-71 critical KS MMP shown in Fig. 16(d) (where we dropped m = 1 vertices) whose hypergraph string is also given in the Appendix E. It satisfies 64 ≤ α(152-71) > α * r (152-71) = 38. The string of 152-71 with dropped m = 1 vertices-24-71 MMP-is given in the Appendix E. It has 5 independent vertices: 4,8,K (m = 7) and Q,M (m = 6). Their parameters are also given in Table 5. We obtain 5 = α(24-71) < α * r (24-71) = 7.12. Table 5: Terms for the inequalities of 4-dim contextual non-binary Γ MMP hypergraphs from Fig. 16: α * r -inequality: α ≤ α * r (violated for 232-108 and 152-71), v-inequality: HI m cM < l, and e M axinequality: l cM < l; m M is the maximal m; computer search for vectors formed from simple components (0, ±1, ±i, ±ω, ±2, ± √ 2, ±3, ±5) failed; finding of HI cm , l cM , l cm for 30-180 and 24-71 requires tweaking of the program One so as to provide us with the parameters when some hyperedges (from an n-dim space) contain less than n vertices, what we have not done as of yet; note that non-critical 30- While deriving their fractional independence number inequality (Eq. (24)) for their Γ graphs, Howard, Wallman, Veitech, and Emerson [12] refer to the paper of Cabello, Severini and Winter [54] who claim that the GLS inequality is a noncontextuality inequality. In contrast, Theorem 4.20 shows that for quantum YES-NO measurements carried out on MMP hypergraphs for which the raw data statistics 4.13(a) is formed, the α *inequality (27) should reduce to the α * r -inequality (24) and therefore cannot be considered a noncontextuality inequality since arbitrarily many contextual and noncontextual MMP hypergraphs violate it, as exemplified in Figs. 6(a-e), 9(a,h), 12(d), and 13(b).
On the other hand, in order to deal with the 30-108 MMP hypergraph we first have to implement 232-108, measure all 232 vertices within their hyperedges and only then postselect 30 vertices to form 30-108 MMP hypergraph and prove the contextuality. But the 232-108 KS MMP has far too intricate a coordinatization for an implementation. We tried to generate it from simple vector components but did not get anything within months of running our programs on a supercomputer.
Besides, there are practically arbitrary many simpler non-binary contextual MMP hypergraphs that can be automatically generated and whose contextuality can be automatically verified via existing algorithms and programs which then satisfy the inequalities (19) or (20). Here, one should only answer the question of what such an inequality for an MMP hypergraph offers to a quantum computer once it has already been verified that it is contextual.

Peres-Mermin non-binary MMP hypergraphs and the smallest MMP hypergraph that exists revisited
In Sec. 4.1, Eq. (4), we referred to an operator-based inequality for the 4-dim KS 18-9 MMP hypergraph and in Sec. 4.3, Eqs. (28)-(29), we consider an analogous operator-based inequality for a general critical MMP hypergraph and for the 21-11 MMP, in particular.
In both cases the operators are defined via vectors/states/vertices of a given MMP hypergraph. In contrast, the so-called Peres-Mermin square is defined via operators alone, i.e., without a vector-defined set underlying the operator set. The operator set is defined by means of the following nine operators [45]: The Peres-Mermin square schematic is shown in the figure (a) below. The square has 9 dots and 6 lines and it is claimed that the Peres-Mermin square which is "convert[ible] . . . to KS vectors" [30, p. 8] "exhibits SIC [state independent contextuality]" [100].
Why, then, do Cabello, Kleinmann and Portillo claim that "according to quantum theory, no SIC set with less than 13 rays exists" [47]?
Do they have some particular vector-based set which one can derive from the operatorbased Peres-Mermin square in mind?
Because, it might be argued that the Peres-Mermin square is not a SIC set and even not a consistent contextual set in the following sense. Eqs. (9) and (32) show that there are three operators in each row and/or column which multiply so as to give ±I. But there is no common eigenstate or a combination of eigenstates |ψ of operators Σ j which would counterfactually enable Σ j |ψ = ±|ψ . Hence, their classical counterparts S j (Eq. (10)) cannot be assigned values ±1, either. In other words, since such counterfactually assumed clicks of nondestructive measurements carried out via each of operators Σ j cannot occur, assignments of ±1 to classical counterparts of these assumed measurements is ungrounded.
This statement is at odds with the overwhelming acceptance and acclaim of the Peres-Mermin square as a contextual set and a KS proof in the literature. Let us dissect it.

Peres-Mermin contradiction. 5.3.
(i) We have (ii) all operator/projector-based or hypergraph-based contextual or KS sets assume YES-NO measurements (counterfactual or actual) carried out on systems emerging from prepared gates; upon leaving a gate determined by operators/projectors or vectors/vertices the systems are projected to or detected in a particular state or not; so, a quantum system in state |Ψ which enters sequences of three gates, whose actions are described by operators Σ j from Eq. (32), should either counterfactually or actually emerge from each of the gates either in the state |Ψ or in the state −|Ψ ; (iii) a classical set of states of a classical system which would be a counterpart of the quantum system described in (ii) should experience predetermined actions of classical gates described by observables S j which would assign either '1' or '−1' to each state; (iv) there is no state |Ψ for which we would have for i, j ∈ {1, . . . , 9}; i = j; (

v) statements (ii) and (iv) contradict each other, so the statement (iii) cannot hold either.
To be more specific, let us consider the following case. It is generally assumed that the Peres-Mermin contradiction is state independent and Eq. (33) is offered as a support for the claim. Our point is that a quantum system in state |Ψ has to pass three gates in a succession; say first through Σ 1 , then through Σ 2 , and finally through Σ 3 so as to emerge in states ±|Ψ . But to which counterfactual (not performed) quantum measurements ("clicks") assumed valuations of classical counterparts S i might correspond? According to point (iv) eigenvalues of Σ i cannot play such a role. For an arbitrary state, say the triplet |Ψ + = | ↑↓ + | ↓↑ , we obtain: Σ 1 Ψ + = | ↑↓ − | ↓↑ and Σ 2 |Ψ + = | ↑↑ + | ↓↓ The observables change the triplet state into other states (singlet and another triplet). So, the operators do not act on the same state and this is the meaning of point (ii) above.
Our conclusion is that it is inconsistent to assume the existence of a classical observable S j which would assign ±1 to the states of a system because there is no quantum state |Ψ of a system which Σ j would project to states ±|Ψ . Since the noncontextuality cannot be formulated we cannot talk about Peres-Mermin square contextuality either.
On the other hand, Budroni, Cabello, Gühne, Kleinmann and Larsson claim [30, p. 8]: "The [Peres-Mermin] magic square can be converted into a standard proof of the KS theorem with vectors [from] [23]." This is, however, incorrect. The Peres-Mermin square cannot be converted to the vectors given in [23, Table 2]. When properly organized in hyperedges (not explicitly carried out in [23]) those hyperedges yield one of 1,233 KS MMP hypergraphs [52] contained in the master MMP hypergraph 24-24. The latter set is obtained by adding further hyperedges (not provided in [23]) to the former ones [51] "although [Peres] has most probably never tried to identify all 24 tetrads for his 24 vectors." But there exists no conversion of the Peres-Mermin square given on p. L179 of [23] to or from any of 1,233 KS MMP hypergraphs generated by vectors from Table 2 on p. L177 of [23]. They are simply independently given in the same paper.
We can get the coordinatization of these critical sets by reading it off from Appendix F for the corresponding vertices.
The obtained smallest quantum contextual MMP hypergraph 3-3, which differs from the one obtained in Sec. 5.3 (Def. 5.1) only by its coordinatization, is not a SIC set in the standard sense of the word, because it is not an operator-based set. It is state independent in the sense that its contextuality is based on its hypergraph structure, meaning that it holds for any set of states that can support it, i.e., build its coordinatization.

5-dim KS MMP hypergraphs/sets
The 5-dim hypergraph spaces are defined by spin-2 systems and cannot include qubits. So far, to our knowledge, only several MMP hypergraphs were obtained in [101], [102,Supp. Material] "by hand." By our automated generation we obtained up to 30 millions critical non-isomorphic MMP hypergraphs from the vector components {0, ±1}. Several smallest ones are shown in Fig. 18. Their structural property parameters are shown in Table 6. In Appendix G we give the ASCII strings and coordinatization for all MMP hypergraphs from Table 6 which include the four hypergraphs given in Fig. 18.

6-dim KS MMP hypergraphs/sets
In 2014 a star-like 6D 21-7 KS set was found [36] and implemented [7]. The coordinatization used was defined by the vector components from the set {0, 1, ω, ω 2 }. In [58] it was shown that the set can be given a simpler coordinatization based only on the components from {0, 1, ω} components and that the star-like graphical representation is isomorphic to the triangular representation given in [58, Fig. 11]. In the same reference, a polytope-based class 236-1216 of 6-dim KS hypergraph was generated but it did not contain the 21-7 star/triangle-like set; its vectors had components from the following set: . Also, based on many other failed attempts to generate real coordinatization of 21-7, we conjecture that it might have only complex ones.  In [59] we obtain a master KS set 216-153 from {0, 1, ω} components. It contains just three critical sets 21-7, 27-9, and 33-11 (the last one has 8 non-isomorphic instances); Fig. 19(a,b,e). The 21-7 and 33-11 strings are given in [60,Supp. Material]. In [60] we also generate two master sets 591-1123 and 81-162 and the corresponding classes (25 million non-isomorphic critical KS sets) from {0, 1, ω, ω 2 } components. The 31-11 string is given in [60,Supp. Material]. See Table 7.
In this paper, we generate the 332-1408 master from {0, ±1} components. It contains two unconnected sub-masters: a non-KS 96-192 one and a 236-1216 KS one, which turns out to be isomorphic with the aforementioned polytope based 236-1216 one.
The structure of the smaller 6-dim MMP hypergraphs from the 81-162 class is different from the 4-dim ones because the δ feature allows the 6-dim hypergraphs to be more interwoven than the 4-dim ones, as presented in [59, Fig. A2] and [60, Fig. 4] and because of the coordinatization with complex vectors. As a consequence, fewer vertices need to be assigned value 1 to satisfy the KS conditions (i) and (ii) of the KS theorem.
The KS MMP hypergraphs from the 236-1216 class [58] obtained by means of real vector components have much larger smallest hypergraphs, as shown in Table 8. The {0, ±1} components yield the 332-1408 MMP master which consists of two unconnected sub-masters: the KS 236-1216 and a non-KS (noncontextual) 96-192. Both MMP classes, 81-162 and 236-1216 exhibit the δ feature and the distinguishers which determine the sizes of minimal MMPs are complex vs. real vectors.

7-and 8-dim KS MMP hypergraphs/sets
Here we present a few examples from the 7-and 8-dim spaces. The distribution of the 7-dim KS MMP class is provided in [46] and of the 8-dim one in [58]. We give the structural properties of the examples in Table 9 and their ASCII strings and coordinatizations in Appendix I. The 8-dim MMP hypergraphs given in Fig. 20 are highly symmetrical, so the reader might easily assign ASCII symbols to vertices in the figure.
In Table 9 we obtain l cM = 94 instead of expected 96 (for a critical MMP hypergraph). This might be due to the algorithm and program One imperfections: for such highly  Table  2. An independent algorithm and program which would check on these discrepancies is needed.

Implementation
The experiments cited in Sec. 1 were all focused on proving that contextual sets really are contextual. In particular, they mostly carried out repeated measurements with operators acting on different states to prove their state-independence (SIC). However, we entered the realm of generation of arbitrary many contextual sets of any structure in any dimension via automated algorithms and programs and the next stage of their application should be a direct implementation of the sets from the data base we obtained. Instead of proving that contextual sets really are contextual, we should simply accept that they are and start using them in quantum computation and quantum communication.
For instance, generalised Stern-Gerlach experiment which makes use of both magnetic and electric fields [81] can generate any quantum state in any dimension and therefore provide us with implementation of any hypergraph which would yield these states.
On the other hand, there is a universal two-qubit quantum gate by means of which one can build any quantum network/gates in a 2 n -dim space that can be realized by QED, nuclear spins, quantum dots, trapped ions, or photon-photon coupling in an all-optical realization [103].
In a projector formulation, all KS MMP hypergraph with a coordinatization are stateindependent and for non-KS non-binary MMP hypergraphs one still has to find a general automated approach. However, in addition to numerous already known small non-KS nonbinary MMP hypergraphs [41] we do have an abundance of KS MMP hypergraphs of any size and structure in odd [46] and even [58,59,60] dimensional spaces.
Taken together, future research in the field should be focused on finding general automated algorithms and programs for implementation of arbitrary contextual sets in quantum gate networks.

Discussion
In this paper we elaborate on particular approaches to features of quantum contextual sets that determine their generation, usage, applications, implementations, and perspectives of future research.

Operator-based vs. MMP-hypergraph-based contextuality
In Secs. 2, 4.1, and 4.3 we compare operator-based and MMP-hypergraph-based approaches to contextual sets and show that the former one relies on the latter. In the literature only a handful of smallest operator-based contextual set have been analyzed while there are billions of contextual MMP hypergraphs [56,52,57,58,59,41,60]. MMP hypergraph language is introduced in Sec. 2 and contrasted with obsolete and/or inappropriate graph and general hypergraph language throughout the paper. The latter approaches are vividly graphically presented in Figs. 1,5,15,16, and 17 and their disadvantages discussed in the text surrounding them.
In Sec. 3.1 we consider several extensions of contextual Kochen-Specker (KS) vector sets. The most important is a non-binary contextual MMP hypergraph extension given by Def. 3.5 in which we dispense with vectors (coordinatization), i.e., states, and rely only on the very structure of MMP hypergraphs. In this sense they are state-independent. To make use of states/vectors or to define operators we attach a compatible coordinatization to them using simple vector components.
In Sec. 4.1 we consider three approaches to obtain operator-based contextual sets, two of which (hyperedge (i) and vertex (ii) ones) generate operators directly from MMP hypergraphs k-l, mainly via projectors P = |v i v i |, i = 1, . . . , k, where k is the number of vertices and l the number of hyperedges. We conjecture that the following rule universally holds.
Operator ↔ MMP Rule. 7.1. Every MMP hypergraph which might serve for a construction of an operator-based contextual set via its states/vectors is itself a non-binary contextual MMP hypergraph.
We give a number of examples to this rule in Secs. 4.1, 4.2, and 4.3. We would like to single out Yu-Oh's 13-16 set shown in Fig. 8; see the text above it.
An important notion we introduce in order to generate MMP hypergraphs is the multiplicity of vertices, m, given by Def. 4.3 that tells us how many hyperedges each vertex shares. In relation to it, we can induce/generate contextual MMP hypergraphs from both non-binary (contextual) and binary (noncontextual) MMP hypergraphs in two ways: • by dropping data obtained by measuring states of systems related to vertices with m = 1 as well as vertices themselves from the MMP hypergraphs; this works for non-binary MMPs hypergraphs (e.g., for 3-dim ones shown in fig. 22 and extensively elaborated on in [41]) as well as for the binary ones (e.g., Peres-Mermin's 45-18 MMP shown in Fig. 17

Raw-and postselected data statistics and their inequalities; the Grötschel-Lovász-Schrijver (GLS) α * -inequality is not a noncontextuality inequality
The role of the multiplicity m (Def. 4.3) with which vertices share hyperedges in every hypergraph is characterized by Eq. (17) and Lemma 4.10. As we explain in Secs. 4.2 and 4.3 it enables us to distinguish the standard Hypergraph Statistics based on raw measurement data (4.13(a)) from the one based on postprocessed measurement data (4.13(b)). It also determines the structure of the hypergraphs as shown in Sec. 5.1, Fig. 9, and Table 1.
A standard tool for discriminating contextual from noncontextual sets has lately been claimed to be noncontextuality inequalities (Def. 2), in particular the operator/projectorbased ones [78,21,22,1,104,105,39,40,54,42,38,43]. We review them in Secs. 4.1 and 4.2. They are mostly defined by states/vectors of contextual MMP hypergraphs what means that the MMP hypergraph structure together with its coordinatization serves us to build operator/projector structure.
Vertex multiplicity enables us to introduce a new kind of hypergraph-based vertex vinequalities (Def. 4.11) and relate the operator-based inequalities with the hypergraphbased (hyper)edge e-inequalities (Defs. 4.14, 4.15). We also consider the α * -(Eq. (27)), and α * r -(Eq. (24), and α * p -(Eq. (26)) inequalities. The α in them is the maximum number of pairwise non-adjacent vertices (Def. 4.7), i.e., the maximum number of vertices to which one can assign '1' (Lemma 4.8); it is called the independence number and also the stability number. Table 10 provides us with a list of inequalities.
• The v-inequality, relates the maximal classical multiplexed vertex indices HI cm , HI cM , HI m cM , Def. 4.5 (the total number of 1s we can assign to vertices each multiplied by its multiplicity or not) to quantum hypergraph index HI q , Def. 4.9 (the sum of the probabilities of getting quantum measurement clicks within hyperedges: HI cm ≤ HI cM ≤ HI m cM < HI q , Def. 4.11); see Tables 2, 4, 7, and 8.
• The e M ax -and e min -inequalities quantifies the KS theorem generalisation (Def. 3.5), according to which we cannot assign 1 to all hyperedges of a non-binary MMP hypergraph, i.e., they simply relate the maximum and minimum number, respectively, of hyperedges which can contain 1 (l cM , l cm ; Def. 4.6) with the actual number of hyperedges of a considered MMP hypergraph k-l containing k vertices and l hyperedges. The e M ax -inequality (20) corresponds to Badziág, Bengtsson, Cabello, and Pitowsky's β-inequality [22], given in Eq. (8), and l cM corresponds to β; e M axinequality has a trivial form l cM + 1 = l for critical KS MMP hypergraphs (except perhaps for the original KS one-see Sec. 5.2). They become relevant (l cM becomes significantly smaller than l) for non-critical and master KS MMP hypergraphs as shown in Tables 4, 7, and 8. The e min -inequality (21) is more suitable for an implementation because of its greater span between its terms. We conjecture that l cm is the "rank of contextuality" recently introduced by Horodecki at al. [85].
• The α * r -(24) and α * p -(26) inequalities, with constant/fixed probabilities of detecting (within quantum YES-NO measurements) a quantum particle in a particular state (assigned to vertices within each hyperedge), are special cases of the GLS α *inequality which, in contrast to the former ones, rely to variable/free probabilities (Defs. 4.17,4.18,and Eq. (27)): α ≤ α * (27). The latter inequality is valid for any graph or hypergraph, contextual or not, with variable/free probabilities assigned to vertices within each hyperedge. Linear programming or any other algorithms for solving linear optimization problems then determines which values must the probabilities have within each hyperedge (where their sum must be ≤ 1). The α * r -inequality is based on the Raw data statistics 4.13(1) and it is not a noncontextuality inequality. The α * p -inequality is based on the Postprocessed data statistics 4.13 (2); it is just another another form of the v-inequality (19) and is therefore a noncontextuality inequality. For example, a spin-1 particle passing through a Stern-Gerlach gate/hyperedge has the probability of 1 3 to exit from any of its ports along any of its 3 vertices/ports. But then, for arbitrary many contextual non-binary MMP hypergraphs, the α * r -inequality fails (Cf. Figs. 6(a-d), 12(d), 13(b)).
Hypergraph v-, e-, α * r , and α * p -inequalities can be generated via automated procedures directly from non-binary MMP hypergraphs. The hypergraphs themselves can be generated in automated ways from simple vector components such as {0, ±1, i} (Tables 4,8) or {0, 1, ±ω} (Table 7), etc. The operator approach is suitable for forming quantum gates which can be applied to arbitrary states to generate inequalities for evaluating the contextual measurements, while the latter automated hypergraph approach is suitable for testing a level of contextuality of hypergraph states by postprocessing measurements carried out at out-ports of gates determined by hyperedges as well as for verifying contextual properties of a chosen hypergraph.

Structure and features of particular MMP hypergraphs
The MMP hypergraph language applied to several well-known contextual sets yields the following results.

MMP vertex multiplicity
Throughout the paper we show that the multiplicity of vertices plays significant roles in determining the features of n-dim MMP hypergraphs k-l. In particular, by the Vertex-Hyperedge Lemma 4.10 we show that the sum of multiplicities is equal to nl; in Sec. 5.1 we show that MMP hypergraphs with odd number of hyperedges predominantly have vertices with even multiplicities (see Fig. 9 and the figure in Appendix A) and in Table 1 Fig. 1] "simplification" of that set is neither a graph, nor a general hypergraph, nor an MMP hypergraph.
Note that no definite vectors for the KS set 192-118 have been given prior to the ones provided in [46].
None of the 3-dim KS sets satisfies the α * r -inequality, but most of their smaller subhypergraphs do, in particular the critical ones [41]. Some are shown in Fig. 12 and Table 3.

The smallest non-binary MMP hypergraph that exists and other small 4-dim MMPs
In Sec. 5.3 we review several chosen small 4-dim MMP hypergraphs and give their parameters in Table 4 and their figures in Fig. 13. Binary 18-9, non-binary critical 22-13, and binary 22-13 shown in Figs. 13(a,b,c), respectively, violate the α * r -inequality. When the m = 1 vertices are dropped from the binary 18-9 one obtains a non-binary MMP subhypergraph 10-9 shown in Fig. 14(a). One of its critical subhypergraphs is the nonbinary 3-3 MMP hypergraph shown in Fig. 14(d)-the smallest 4-dim MMP hypergraph with coordinatization that exists. Since the 3-dim 3-3 MMP hypergraph does not have a coordinatization, the obtained 4-dim 3-3 is the smallest contextual set that exists in any dimension. This is the Result 5.1.
Another result obtained in that section is the Result 5.2.

4-dim: Graph vs. MMP hypergraph case
In Sec. 5.4 we analyze a recent experiment [4] and show how and why graph representation of contextual sets lead to wrong experimental and theoretical results. In particular they claim that all 18 vectors they consider contribute with an equal weight and that therefore their implementation is a proper KS set. We show their graph in Fig. 15(e). Their red and green edges contain only two vertices, though. For example, vertices 1,2,5,10,15,18, i.e., edges 1-10, 2-15 and 5-18, the probabilities p 1,10 , p 2,15 , and p 5,18 from measurement data were obtained. We show their set in the MMP hypergraph representation in Fig. 15(g). It is an MMP 18-18, but it should have a coordinatization, i.e., m = 1 vertices should be added while performing the experiment and they are shown in Fig. 15(f) as gray dots-we end up with an MMP with 36 vertices and 18 hyperedgesand that leads us into a contradiction: 36-18 MMP has no coordinatization. So, not only that the set is not a KS set, but the measurement data themselves are inconsistent.
There are two possible remedies for the contradiction: • merge triples of gray vertices at the intersections of red and green hyperedges as shown in Fig. 15(h); new measurements should be carried out for the additional six vertices of the new 24-18 MMP hypergraph; it is one of 1233 KS MMP hypergraphs [52] contained in Peres' 24-24 master set; • abandon green and red hyperedges altogether and reduce the implementation to the 18-9 KS MMP hypergraph (Fig. 15(c)); 7.3.5 α * -inequality vs. quantum computation and quantum indeterminacy As presented in details in Sec. 5.4 Howard, Wallman, Veitech, and Emerson have shown that stabilizer operations with quantum bits initialized superposition of states ("magic states"), can be used to purify quantum gates provided they exhibit the contextuality [12]. As a proof that considered sets are contextual the authors make use of the GLS inequality [83, p. 192] by invoking Ref. [54].
In the latter reference, two simple examples are given for inducing small contextual nonbinary MMP hypergraphs from bigger noncontextual binary ones. This is essentially the second procedure we referred to at the end of Sec. 7.1. A generalization of the procedure is offered, which would consist in a recognition of the GLS inequality [83] as a noncontextuality inequality (Def. 4.1). A similar approach is carried out by Cabello [69, Supp. Material, Sec. IV]. However, as we show in Theorem 4.20, the assumption of variable probabilities of detecting outputs from hyperedges would clash with the postulate of quantum indeterminacy 4.19 and therefore the α * r -inequality given by Eq. (24) should be used, instead. The theorem then states that α * r -inequality is not a noncontextuality inequality since arbitrary many contextual and noncontextual MMP hypergraphs violate it.
In Ref. [12] the same problem emerges. The exclusivity graph-"a source of quantum computer's power" [13,12]-is a non-binary 30-108 MMP hypergraph and a subhypergraph of a non-critical KS 232-108 MMP hypergraph as analyzed in Sec. 5.4. In Fig. 16(b) we see that we can extend the original 30-108 MMP hypergraph to the KS 232-108 one by adding m = 1 vertices to the former one. These added vertices enable us to identify additional independent vertices in addition to the original 8 thus exceeding the upper bound. We obtain 101 ≤ α > α * r = 58 (Table 5), and it is an open problem to prove that that is not relevant for the proof that the appropriate inequality is α = 2 3 = 8 < α * = 2 3 + 1 = 9 as given in Ref. [13]. On the other hand, for the 30-108 MMP hypergraph itself, a calculation which takes into account all its edges and their 30 vertices yields α * r = 14.07-see Eq. (31). Taken together, if the only reason for invoking the GLS inequality was to prove that exclusivity MMP hypergraphs suitable for quantum computation are contextual, then the more efficient approach would be to directly check the obtained measurement data on contextuality, e.g., via e-inequalities.

Peres-Mermin square: operators vs. MMP hypergraphs
The Peres-Mermin square has received a great deal of attention both theoretically and experimentally [44,45,95,21,10,98,106]. So far it has been formulated only via operators (the claim that it "can be converted into a standard proof of the KS theorem with vectors" [30, p. 8] is incorrect as explained in Sec. 5.5), and in this paper we arrive at an MMP hypergraph representation of the basic features of the Peres-Mermin operators so as to examine possible candidates for such a representation. We find that a non-KS 45-18 MMP hypergraph, shown in Fig. 17(d), serves the purpose. This is because it contains contextual 9-18 non-binary MMP hypergraph (Fig. 17(e)) which we obtain by dropping all vertices with multiplicity m = 1 from the 45-18 MMP (Fig. 17(d)). Notice that there are no states which would satisfy the conditions given by Eqs. (33) and (34), so there is no MMP contradiction which would correspond to the operator Peres-Mermin contradiction. Notice also that vertices belonging to rows and columns of the original operator-based schematics (Fig. 17(d)) are mutually orthogonal in correspondence to mutual commutations of operators in the same rows and columns.
The 9-18 MMP hypergraph is not critical. It contains 3-3, 5-5, 7-7, and 9-9 criticals as shown in Figs. 17(e-h). Their possible experimental implementations might use Peres-Mermin operators but not in the square arrangements in which systems run through triple gates as depicted in Fig. 17(a). Instead, one of the Fig. 17(c-h) arrangements might be used.
To sum up, the original operator formulation of the Peres-Mermin square is inconsistent because classical observables S j which would assign ±1 to the states have no quantum counterparts since there is no quantum state |Ψ of a system which Σ j might project to states ±|Ψ (eigenstates with ±1 eigenvalues). The fact that a correlated noncontextuality cannot be formulated and that therefore the Peres-Mermin square contextuality is void of its meaning we presented as the Peres-Mermin contradiction 5.3.

The pentagon case
In Sec. 4.2 we make use of different coordinatizations to compare hypergraph inequalities with the operator ones, on the example of Klyachko, Can, Binicioğlu, and Shumovsky's 3-dim pentagon. They consider particular coordinatization with vectors/states which an operator projects to a chosen state Ψ so as to give the maximum quantum mean value √ 5 as in Eq. (13) and the operator inequality 2 < √ 5, i.e., the inequality is state-dependent. The hypergraph approach, on the other hand, gives the quantum hypergraph index HI q = 5, the e-and v-inequalities 4 < 5 (Eq. (15)), and the α * r inequality 2 = α < α * r = 5 2 . The inequalities arise from the structure of the MMP hypergraph alone independently of the states that build its coordinatization and that makes the MMP hypergraph state independent in the sense that its contextuality holds for any set of states that can build its coordinatization and even when there are no such states. (Note that no projections of or to any states are involved.) Still, the coordinatization plays a role in the geometric representation of MMP hypergraphs; e.g., a 3-dim pentagon can never be planar even when all five of its m > 1 vectors span a plane.

Higher dimensions
In Secs. 5.6, 5.7 and 5.8 we give give figures and structural properties of the smallest MMP hypergraphs from 6-to 8-dim spaces, respectively.

Implementation and research perspectives
In Sec. 6 we presented existing general implementation schemes for implementation of arbitrary MMP hypergraphs and a broad class of a qubit gate network. This opens up a research road to possible universal automated preparation algorithms for implementation of arbitrary contextual sets in contrast to existing approach in the literature which usually limits itself to experiments with the smallest contextual sets and theoretical constructs based on them which however have not been exemplified on arbitrarily chosen contextual sets. Actually, such small-set-approach often yields inconsistent results, some of which we discussed in the paper in an attempt to purify the handling of the contextual sets and find their general features. An abundance of available contextual sets would support achieving this goal and therefore we also generated billions of them in odd (3 to 9; [46,41]) and even (4 to 32; [58,59,60]) dimensional spaces and stored them in a freely available data base wherefrom one can download sets with required structure and complexity for any application.
The programs are available at http://puh.srce.hr/s/Qegixzz2BdjYwFL Acknowledgments Computational support was provided by the cluster Isabella of the Zagreb University Computing Centre. The support of Emir Imamagić from Isabella and CRO-NGI to the technical work is gratefully acknowledged. Reading of and commenting on the paper by late Norman D. Megill was particularly appreciated.