Automated generation of Kochen-Specker sets

Quantum contextuality turns out to be a necessary resource for universal quantum computation and also has applications in quantum communication. Thus it becomes important to generate contextual sets of arbitrary structure and complexity to enable a variety of implementations. In recent years, such generation has been done for contextual sets known as Kochen-Specker sets. Up to now, two approaches have been used for massive generation of non-isomorphic Kochen-Specker sets: exhaustive generation up to a given size and downward generation from master sets and their associated coordinatizations. Master sets were obtained earlier from serendipitous or intuitive connections with polytopes or Pauli operators, and more recently from arbitrary vector components using an algorithm that generates orthogonal vector groupings from them. However, both upward and downward generation face an inherent exponential complexity barrier. In contrast, in this paper we present methods and algorithms that we apply to downward generation that can overcome the exponential barrier in many cases of interest. These involve tailoring and manipulating Kochen-Specker master sets obtained from a small number of simple vector components, filtered by the features of the sets we aim to obtain. Some of the classes of Kochen-Specker sets we generate contain all previously known ones, and others are completely novel. We provide examples of both kinds in 4- and 6-dim Hilbert spaces. We also give a brief introduction for a wider audience and a novice reader.


I. INTRODUCTION
Quantum contextuality arguably plays an important role in the field of quantum communication and quantum computation.In this paper we shall focus on the most explored and used contextuality configurations-the socalled Kochen-Specker (KS) sets.We begin with a review of some important concepts.
Imagine a system of nonlinear equations describing a relation between vectors or states.Let the vectors be 3dim (3D) ones, forming triplets: a l = a lx i + a ly j + a lz k, l = 1, 2, 3, and let the relation be the orthogonality a l • a m = 0, l, m = 1, 2, 3, l = m.Let us have many such triplets interconnected within a system, and let us ask ourselves whether we can assign 0 and 1 to them in such a way that just one vector in any triplet is assigned 1.Now we have two problems for a chosen system.One is the assignment problem of finding a 0-1 distribution (or proving its impossibility), and the other is the coordinatization problem of finding vector components.Both are of exponential complexity.All the supercomputers on Earth would take an "age of the universe" amount of and to achieve this goal, in the present paper, we elaborate on features, algorithms, and methods which not only speed up the search for KS sets almost exponentially but also enable (reasonably) arbitrary exhaustive generation of KS sets from master sets.The details and references are given below.
These experiments have been implemented either under assumption of predetermined noncontextual values or under the faithful measurement condition [15,16] meaning that they did not overcome the noise-induced finiteprecision loophole.It is, however, possible to formalize contextuality in a noise-robust manner and develop experimental tests for them [17][18][19][20].It is also possible to modify the Kochen-Specker notion by appealing to ontological faithfulness [21].
Our theoretical interest in contextual KS sets is justified by the following recent achievements.
A connection between contextuality and universal quantum computation has been established to an extent that makes contextuality a necessary resource for universal quantum computation.A pressing open question for qubits is whether a suitable operationally motivated refinement or quantification of contextuality can provide a quantum speed-up [22].Also, one can design quantum gates via operator-generated 4D complex KS sets [23].
In lattice theory, KS sets have served as generators of higher-order generalized orthoarguesian lattices [26,27].
For the above applications of KS sets, especially in quantum computation, it is important to generate sufficiently large sets to enable varieties of different implementations and to characterize their main features and information on their structure.
Advantages and disadvantages of these approaches are as follows.
(i) The smallest KS sets are of just historical relevance, because practically all of them in even dimensional (4D through 32D) Hilbert spaces are already known.Besides, all of them are but by-products of our current generation algorithms; (ii) At least for the time being, exhaustive upward hypergraph-generation of KS sets faces computational limits of supercomputers and is limited to ca. 40 hypergraph vertices in 3D, to ca. 25 ones in 4D, and so on.Still, this kind of a generation remains the only deterministic and exhaustive one.
(iii) Big master sets which serve for random downward generation of smaller sets are based on serendipitous or intuitively found connections of KS hypergraphs with polytopes or Pauli operators which we run out of and which do not generalize.
(iv) No universal constructive algorithm for arbitrary input KS sets from smaller dimensions has been proposed for a potential automated generation of sets in higher dimensions.However, the approach might be best option for big sets and dimensions where other methods face computational limits.
(v) The algorithms and programs are computationally feasible for generating master sets from the vector components that are already known to yield KS masters obtained via other methods (i-iii), even on a PC (this is what has been carried out in Ref. [43]).However, they are not computationally feasible, even on supercomputers, for random computer generated components without additional analyses, algorithms, and programs we provide in the present paper.For instance, in Ref. [43](Table 2) we were not able to obtain smaller KS sets from the 4D 2316-3052, or 6D 11808-314446, or 8D 3280-1361376, or 16D, or 32D master sets directly.The main reason is that we cannot generate smaller sets from a master set by a brute force-the programs are too slow for that.E.g., in 6D, without a new algorithm for splitting the original KS master 834-1609 (obtained from the vector components in Ref. [43]) into two smaller sub-masters (as we do here), we would not have been able to arrive at the distribution given in Fig. 5 and results in Fig. 4(e,f,g).Taken together, the main aim of Ref. [43] was to classify KS sets in even dimensions via vector-component generated master sets that would contain all known KS sets, while the main aim of the present paper is to provide a functional and feasible method of generating KS sets of chosen sizes and properties from such master sets.
In the present paper, we present an optimized method of generating KS sets from tweaked KS master sets engineered via the method outlined in Ref. [43].In the latter method, we start with random vector components and build n-tuples of mutually orthogonal vectors which results a in KS masters with a specific coordinatization.In the former method, the components are filtered by features of KS sets obtained from coordinatizations of already known KS sets as exemplified below (see figures in the main body of the paper and in the Appendices).This provides us not only with a uniform and general method of computationally feasible KS set generation, but also with a larger scope and a bigger, more thor-ough, picture of quantum contextuality than any of the previous approaches.That comes at a price of engaging supercomputers to arrive at results, but once obtained, they can be verified either by hand or via a graphical representation as given by our figures.
Experimentally, the complexity of KS set implementation grows only linearly with the complexity of their structure and, on the other hand, the simplest KS sets often do not possess features that bigger KS sets exhibit, such as the so-called δ-feature [39,43] (see Fig. 3 and defined in Subsecs.II A and II D below), absence of coordinatizations with real vectors, and the absence of parity proofs.
Since the proposed approach charts a new territory, we limit ourselves to 4D space and an example from 6D space, but we stress that the approach can be applied to any dimension.Also, we answer several recently posed open questions.
In this paper, to achieve automated generation of KS sets we rely on our hypergraph language and its algorithms and C programs first given in [29] and extended here, analogous to the recently developed algorithm and program Melvin [44] whose authors carried out an "Automated Search for New Quantum Experiments."We share their guiding principle: "In contrast to human designers of experiments, [our computer programs] do not follow intuitive reasoning about the physical system and, therefore, lead to the utilisation of many unfamiliar and unconventional techniques that are challenging to understand" [44].

II. RESULTS
The main result of the paper is that via a rather simple algorithm we can generate any class of KS sets from basic real or complex vectors.Let us consider the following example.In the last 27 years several research groups (Kochen, Specker, Peres, Cabello, Pavičić, Megill, McKay, Merlet, Aravind, Waegell, and others-see Fig. 1 and Sec.III in [39]) obtained 1233 4D KS sets by investing a considerable amount of research work and CPUcenturies of calculation on supercomputers which they published in over 20 papers.In contrast, with the help of our algorithm, by just putting the three components of their vectors {-1,0,1} in its program, we obtain all those KS sets and additional ones containing them, in seconds on a PC.
So what is a KS set?It is a set of n-tuples of mutually orthogonal vectors that provides a constructive proof of the Kochen-Specker theorem.This theorem states that it is impossible to ascribe predetermined eigenvalues to all quantum observables, which we call the contextuality of quantum mechanics.We represent the n-tuples as edges on a hypergraph, with individual vectors assigned to the vertices of the hypergraph.
Kochen-Specker theorem [40,45] reads: 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 and (ii) In any group of n mutually orthogonal vectors, not all of the vectors are assigned the value 0.
These sets are called KS sets and the vectors KS vectors.
That means that the terms "generation of hypergraphs" and "downward generation" used in the text are tantamount to the term "generation of KS sets" used in any of the papers mentioned in points (i-v) in Sec.I and to the term "generation of KS sets from master sets" used in (iii) and (v), respectively.
Generating hypergraphs and checking them for the KS property are exponentially complex tasks in general but for the great majority of runs they turn out to run in a feasible amount of time due to various heuristics and other techniques incorporated into our algorithms.So, for instance, our programs can generate and assign vectors to hypergraphs with over 100,000 vertices and edges.Verification of the KS property becomes very demanding on supercomputers when the number of vectors/vertices exceeds 1,000 and the number of dimensions exceeds 10, though.
We limit ourselves to critical non-isomorphic KS sets, where critical means that they are minimal in the sense that removing any n-tuple of mutually orthogonal vectors (i.e.any hypergraph edge) turns a KS set into a non-KS set.In other words, they represent non-redundant blueprints for their implementation since bigger KS sets that contain them only add orthogonalities that do not change the KS property of the critical sets.Note that edges within a hypergraph correspond to measurements necessary to show contextuality.
To deal with hypergraphs conveniently in our computer programs, we make use of the McKay-Megill-Pavičić (MMP) hypergraph language [29,39].

A. MMP Hypergraph Language
We describe KS sets by means of McKay-Megill-Pavičić (MMP) hypergraphs, which are defined as hypergraphs in which edges contain at least n vertices (corresponding to orthogonal n-tuples of vectors) and intersect each other in at most n − 2 vertices (corresponding to vectors themselves).MMP hypergraphs are encoded by means of printable ASCII characters [29].Vertices are denoted by one of the following characters: 1 2 ...9 A B ...Z a b ...z !" # $ % & ' ( ) * -/ : ; < = > ?@ [ \ ] ˆ' { | } ∼ [29].When all of them are exhausted we reuse them prefixed by '+', then again by '++', and so forth.An n-dim KS set with k vectors and m n-tuples is represented by an MMP hypergraph with k vertices an m edges which we denote as a k − m set.A KS set with a parity proof is one with an odd number of edges, in which all vertices belong to an even number of those edges, which makes the impossibility of a 0-1 assignment transparent.
A number of examples are given below.We generate, process, and handle MMP hypergraphs by means of algorithms in the programs Shortd, Mmpstrip, Mmpsubgraph, Vecfind, States01, and others.See the Appendices for more details.
Note that the aforementioned n − 2-intersection condition is the only condition that restricts a general hypergraph to an MMP hypergraph [29].It also directly generates the δ-feature (two edges might share n − 2 vertices) we introduce in Subsec.II D below.

B. Coordinatization of KS Sets
As we mentioned at the beginning of this section, we can generate the aforementioned KS sets from nothing but three vector components {-1,0,1} provided to program Vecfind.
It works as follows.We specify a dimension n (4 in this example), a set of vector component values {0, ±1}, and the option master.(In general, the vector component values can be arithmetic expressions involving complex numbers, including exponential and trigonometric functions.)The program builds an internal list of all possible non-zero vectors containing these components.(The vectors are not normalized in general.If two vectors are proportional, one of them is discarded.)From this list, it finds all possible mutually orthogonal n-tuples of vectors.It then generates a hypergraph (in the MMP notation) with edges corresponding to these mutually orthogonal n-tuples.We call this hypergraph a "master set."Depending on the vector component values chosen, this master set may or may not have the KS property.The program States01 tests for this property, and master sets without the KS property are discarded.When that happens, we can add more vector component values or try a different set of vector component values.Once we obtain a master set with the KS property, we can use our already existing programs (developed for our previous work with master sets obtained from polytopes, etc.) to extract critical KS subsets.Although in one sense the master option algorithm is straightforward-it just exhausts all possible mutually orthogonal n-tuples that can be built from given vector components-it nonetheless creates master sets that contain all the master sets of our previous work derived from polytopes or Pauli operators, when we provide it with nothing but the same vector components.
In this example, the set we obtain is indeed a KS master set with 40 vertices and 32 edges (See Fig. 6).It reveals that Peres' 24-24 set obtained previously is not a proper master set in the sense of generating all KS subsets with the coordinatization (assignment of vectors) generated by the vector components of the Peres coordinatization.Details are given in Appendix A.
In the last ten years, various KS sets have been generated from a number of polytopes for which correspondences with KS hypergraphs have been found [23,[30][31][32][33][34][35][36][37][38].These correspondences have proven very useful in the development of the more systematic approach to the generation of KS sets developed in this paper.
The vertices of regular or highly symmetrical polytopes in a number of dimensions, in both real and complex spaces, can be mapped into numerous KS master sets in Hilbert spaces.In particular, the 24-cell, 600-cell and 120-cell, which are the three exceptional 4D regular polytopes (having no analogs in lower or higher dimensions) provide striking illustrations of this statement.All these polytopes have the feature that their vertices lie on the surfaces of 3D-spheres and come in antipodal pairs whose members are diametrically opposite each other on the 3Dsphere.Since each antipodal pair maps on to a single ray, each of these polytopes gives rise to half as many rays as its vertices.The 24-, 600-and 120-cells thus lead to 12, 60 and 300 rays, respectively.
Furthermore, the vertices of each of these polytopes contain many inscribed copies of the cross-polytope (or 16-cell), each of which give rise to 4 mutually orthogonal rays, and thus corresponds to an edge in an MMP diagram.Naturally, only polytopes which give rise to edges can give rise to KS sets, and so, not all polytopes have a direct mapping to a KS master, nor do all KS masters have a recognized mapping from a polytope.
In the case of the 24-cell, one must unite the 12 rays with a second set of 12 rays obtained from its dual (another 24-cell, but oriented differently from the first) to obtain a set of 24 vertices and 24 edges that is identical to the famous 24-24 set in 4-dimensions discovered originally by Peres and then explored by a number of other authors.
The 600-cell gives rise to a 4D KS master set of 60 vertices that form 75 edges of mutually orthogonal vertices.By stripping only one edge at the time from this set using MMPSTRIP, we obtain 75 isomorphic 60-74 KS subsets which merge into a single 60-74 set.Their subsets can therefore be called the 60-75 and 60-74 classes, respectively.They are identical, short of the 60-75 set from the 60-75 class [38].
The 120-cell, which is the dual of the 600-cell, is unusual in that it contains ten 600-cells as subsets within it.Further, these ten 600-cells divide into two sets of five, with the members of each set having no vertices in common and the two together covering all the vertices of the 120-cell.From this it follows that the corresponding quantum 300-675 KS set has ten different 60-75 sets within it as subsets.
This might suggest that the vector sets generated from the aforementioned coordinates would lead to not just the 24-24, 60-74(75) and 300-675 classes, but also the inclusion of the second of these within the third.However this turns out not to be the case at all.The set V unexpectedly generates a KS master set, 2316-3052, consisting of 2316 vertices and 3052 edges, whose class of KS sets is too large to be determined by the present methods.But what is even more interesting is that we need not employ all the components of V to get the members of the 60-74 class.Removing just 2 from V gives us a 888-1080 master set, the further removal of ( √ 5 + 1)/2 gives a 676-848 master set, the still further removal of (− √ 5 − 1)/2 → a 272-268 master set and, finally, the removal of (− √ 5 + 1)/2 → a 156-120 master set.In other words, we have the nesting of master sets described by the relation 156-120 ⊂ 272-268 ⊂ 676-848 ⊂ 888-1080 ⊂ 2316-3052, with the largest of these having all elements of V as coordinates of its vectors and each member of the sequence having one less element than the member above it.
As was the case with the 40-32 master set discussed in the previous subsection, each of the five master sets just described can be decomposed into two disconnected pieces.The smallest of them, 156-120, consists of a 60-72 KS set and 6 structurally identical non-KS 16-8 sets, which is conveniently expressed by the equation 156 − 120 = 60 − 72 + 6 × 16 − 8.In an exactly similar way, the decompositions of the other master sets can be described by the equations given in Fig. 1.All 16-8 sets have the same hypergraph representation as the one shown in the right part of Fig. 6, i.e., they are all isomorphic to each other.
The above master sets might well contain the 60-75 and 300-675 classes, but we did not pursue this point (although we did verify that they contained a large number of KS sets from these classes).We demonstrated earlier that the 300-675 class contained both the 60-74(75) and 96-96 classes [35], and filled in the gap between the 82-41 and 211-827 sets we were left with in [38].This allowed us to assemble all the information we have presented in Fig. 1 and in the Appendices.
In Fig. 1 we see that the 60-74 class exhibits a cut-off feature from below which we find, via both the polytope and vector generation, to be an indication of the existence of a bigger set which contains it.There are actually several such cut-offs in the figure which form saw-tooths at the levels of 60, 72, 84, and 96 vertices which might correspond to the consecutive vector generated sets above.There is also a spindle-shaped agglomeration of a more complete distribution of sets as shown in Fig. 1.These features are elaborated in detail in the Appendices, and they are our starting points for a pure vector generation of supersets in the next subsection.

D. Vector Generation of KS Sets from Basic Vector Components
The theoretical background and algorithms of quantum computation are to a large extent based on qubits and their states, including entanglements in particular.KS sets should therefore also allow a qubit state representation.This can be done so as to define them via operators whose eigenvectors (eigenstates) then directly define vertices of MMP hypergraphs in the complex 4D H 2 ⊗ H 2 Hilbert space.Via that approach we shall get the coordinatization for our vector generation.
We carried out the qubit approach in [23] by means of Pauli operators for two qubits and their eigenstates and generated the 60-105 KS class.In [23] we obtained KS sets with an odd number of edges with the help of parity proof programs, and in [39] we generated sets with even numbers of edges and also all those ones with an odd number of edges which do not have parity proofs via our MMPSTRIP and STATES01 programs.The master set in MMP hypergraph notation is given in [39,App. 2,p. 22].A number of 60-105 KS class figures and MMP hypergraphs are given in [39].
The (eigen)vectors we obtained have components in the complex field, while Peres' 24-24 set and the whole 24-24 class is properly contained in the 60-105 class, which originally used real coordinatization.Bigger sets from the 60-105 class do not allow simple real coordinatization, e.g., with components from {-1,0,1} as we have shown in the Appendices, but they might allow an intricate kind of real coordinatization which are not eigenvectors of the Pauli operators that we used to generate the 60-105 KS class.So, such real vectors might allow a representation by means of particles with four level spin s = 3 2 (verifiable via, e.g., a Stern-Gerlach device), so that dim H s = 2s + 1 is satisfied, but possibly not via two qubits (dim(H 2 ⊗ H 2 ) = 2 2 = 4).This prompted us to investigate to what extent KS sets are determined by coordinatizations that they do or do not allow, and whether a coordinatization itself can enable us to generate bigger sets and master sets.
In [23,39] we presented in detail how the operator structure and related eigenstates (eigenvectors, vertices) were obtained from the 600-cell polytope and how the whole 60-105 class was generated and which features its KS sets possess.The eigenvectors had the components from the set I = {0, ±1, ±i}.However, the class also exhibits a flat cutoff at the 60 vertex level of critical KS sets shown in Fig. 2(a), similar to the one of the 60-74 class, shown in Fig. 1(a).That indicated that I might generate a much bigger master set containing the 60-105 one, although, to our knowledge, no one has come forward with such a set.We are now confirming the conjecture by means of a direct vector generation from I.
So, we started our vector generation with components from I and then pursued its variations via an automated computer search.From I we arrive at the 156-249 mas-  ter set whose KS subset 92-185 is already much bigger than the 60-105 that is contained in it.By stripping down its edges via MMPSTRIP and filtering with STATES01, we form the 92-185 class.By adding 2 to I ({0, ±1, ±i, 2}), we get 688-1305, and by adding -2 to it ({0, ±1, ±i, ±2}) we obtain the 972-1852 master and the class 636-1657 which contains all the others.They are shown in Fig. 2(c,f,g).As the master sets from the previous section, they also consist of smaller KS and non-KS sets.However, the non-KS sets are not always 16-8 ones but also 64-64 ones as in Fig. 2(c,d).All 16-8 sets are isomorphic to each other, thus effectively reducing all the masters to two sets: one KS and one non-KS.Sometimes we do not get a non-KS set at all, as e,g., in Fig. 2(h) when all the vectors are exhausted in building the KS set.We were unable to find correlations between kinds of non-KS set and vector components indicated at the bottom of Fig. 2(c-h).Each set of components yield a different coordinatization for the same KS sets and therefore give different possible experimental implementations.For instance, 21-11 can be assigned vectors generated by the set of components {0,+3,±i} or {0,±1,±i} or any other from Fig. 2(ch).In Appendix A of Ref. [43] we show how components of vectors of a given coordinatization of a 21-11 KS set directly generate quantum states via which we might implement the set.
In Fig. 2, the hypergraphs from the 636-1657 class are not so uniformly distributed as those from the 60-105 simply because a generation from such a big master requires orders of magnitude more time.Still, an especially sparse population of hypergraphs with 38 to 117 edges indicates an uneven probability of getting individual KS critical sets from the master set, similarly to the 300-675 probabilities (recall the gaps we obtained in [39,46]).
Five smaller hypergraphs from the class 636-1657 that are not subgraphs of 60-105 are given in Fig. 3. What is interesting about them is that the first four of them, although obtained from the {0, ±1, ±i, ±2} based master set, also have a {0, ±1, ±i} coordinatization.
The biggest critical with 31 edges from the 60-105 subclass has 58 vertices.
There are also KS hypergraphs with more than 60 vertices and with a {0, ±1, ±i} coordinatization, e.g., those obtained from the 156-249 master.The following 61-33 is one of the smallest of them.
The KS sets above have parity proofs.Actually, all KS criticals from 18-9 through 35-19 do have them, while none from 66-35 through 284-193 has one.In the region from 36-19 through 65-35 (mixed parities), KS criticals with odd number of edges might or might not have them (KS sets with even number of edges cannot have a parity proof by definition).Parities are indicated in Fig. 2.
Most of the hypergraphs from the 636-1657 class exhibit the δ-feature we recognized in Sec.V and Fig. 5 of [39] and indicated in Fig. 3-when pairs of edges share two vertices i.e. intersect each other twice at two vertices.
Global distribution of the hypergraphs shown in the inset (b) of Fig. 2

III. EXTENSION TO HIGHER DIMENSIONS
An automated generation of KS sets of the kind presented in the previous section can be extended to any dimension.Here we give an example whose generation escaped all previous attempts via other methods.It is related to the star-like 6D 21-7 KS set [12] which was implemented by [13].They made use of ω 2 -coordinatization (where ω = e 2πi/3 = (−1 + i √ 3)/2) defined by the vector components from the set {0, 1, ω, ω 2 }.In [39] it was shown that the set can be given a triangular hypergraph representation and a simpler ω-coordinatization based only on the components from the set Ω = {0, 1, ω}.All previous attempts [12,39] to find a KS class, or a master set to which the 21-7 set might belong, failed.In [39], a huge polytope based 6D class was generated, but the 21-7 provably did not belong to it.The vector generation based on the latter ω-coordinatization gives an ω-master set 216-153 and its class right away, though.The master set is connected, i.e., it consists of a single KS set and does not contain any unconnected non-KS sets as the master sets shown in Figs.1,2 do.It means that the ω-coordinatization exhaust all possible assignments from Ω.Still, the class 216-153, apparently contains only three critical KS sets, shown in Fig. 4(a,b,c), meaning that after several CPU years of generating criticals from the master set 216-153 we did not obtain any other criticalonly a myriad of isomorphic replicas of those three.All three of them have parity proofs.
A natural question arises: is there at least the next critical in the series, i.e., the 39-13 one with an additional pair of δ-triples, with however small probability of appearing?(By the very definition of the MMP hypergraphs, 6D ones can have up to four vertices that share two edges.)The answer is in the negative, because ascribing of the ω-coordinatization to its hypergraph fails.
But we are able to vector generate 39-13 from the ω 2coordinatization-the (d)-heptagon from Fig. 4 is then extended to a nonagon with two additional δ-triples at the bottom as shown in Fig. 4(e).
What geometrical property of the 216-153 master limits it to just three criticals 21-7, 27-9, and 33-11 and why the generation of the 39-13 critical requires a bigger ω 2 -coordinatization, remain open questions.
The ω 2 -coordinatization generates an 834-1609 master set.Unlike the ω-master set 216-153, the 834-1609 ω 2 -master set consists of four unconnected KS sets as shown in Fig. 5-one 591-1123 and three mutually isomorphic 81-162 sets, and thus amounts to just two sets.We have not yet generated the 591-1123 KS criticals since it requires too many CPU years on supercomputers due to their numerosity and dimensionality.

IV. DISCUSSION
In this paper we designed an unprecedentedly fast and efficient way of generating Kochen-Specker (KS) sets, a kind of quantum contextual sets, for application and implementation in quantum communication and computation.The design is based on our discovery [43] that fairly simple sets of vector components can generate, with a suitable algorithm, master KS sets within seconds on any PC.In this paper we provide methods of exhaustive generation of smaller critical KS subsets from such master sets.We call this kind of generation of both master KS sets and smaller KS sets they contain, the vector generation of KS sets.
We present it in detail for 4D Hilbert space, although the method is applicable to any dimension.As an example, we provide a generation of the star/triangle 6D class which the previous methods failed to provide.We also discuss a 3D case.
With vector generation, we effectively circumvent solving systems of nonlinear equations to find coordinatizations for generated KS hypergraphs that we faced in our previous approaches starting with [29].In the latter approach, we first generated MMP hypergraphs and then searched for possible coordinatizations for them.The vector generation approach is its inverse-we first generate a coordinatization and then search for possible MMP hypergraphs for them.This reduces finding of KS masters together with their coordinatizations from CPU years of calculations on supercomputers to mins on a PC.
At the present stage of our research, we combine two ways of finding sets of simple vectors for vector generation of KS sets: random computer searching, and taking over the coordinatization of master KS sets previously found via polytope symmetries or Pauli operator structures.In order to find an optimal approach to a successful vector generation of KS master set we have to find a balance between desired features of the KS classes we want to generate from a chosen master set and the required complexity of the their computer generation on supercomputers via our programs.For this purpose we extract many characteristic features of the sets while processing them.
We found that vector components exhaustively generate a coordinatization of a KS master in the sense of employment of all possible vectors.This, in most cases, results in a master set split into several unconnected sets as shown in Figs. 1, 2, and 4. When a master splits into two unequally big KS submasters as in the 6D example given in Fig. 4 this enables us to generate smaller criticals because the original master 834-1609 and/or the bigger submaster 591-1123 are computationally unfeasible on a supercomputer.In 4 dimensions, vector generation of criticals from the 972-1852 KS master set, i.e., the 636-1657 submaster, is perfectly feasible as shown in Figs. 2. Also the classes 300-675 and 148-265 (see the Appendices), even when enlarged in volume and scope by the vector generation of master sets which contain them, stay computationally feasible.
We also obtained and relied on a number of generic features of KS sets.
Complex components of vertices of the 4D KS classes are in the majority of cases linked to their implementation by means of two qubits, on the one hand, and to their δ-feature, on the other, where the latter feature means that pairs of edges share two vertices, i.e., intersect each other twice.Exceptions are among others, the smallest KS sets which can acquire both complex and real coordinatization as, e.g., the 18-9 KS set [28].Real components of vertices mostly lead to spin- 3  2 particle implementation, in the sense that corresponding operators are not qubit-describing H 2 ⊗ H 2 Pauli operators.
The δ-feature stems directly from the n − 2 hypergraph condition within the definition of MMP hypergraphs given in Subsec.II A. This implies that edges of 3D MMP hypergraphs can intersect each other in at most 3 − 2 = 1 vertex.In addition, in [29], we proved that the size of minimal loops of adjacent edges is not 2 as in 4 or 6D (exhibiting the δ-feature as in Fig. 3), but 5 (pentagon).These two features make 3D MMP hypergraphs computationally different from, e.g., 4D ones.Thus, although we can obtain 3D master hypergraphs as we pointed out above, we first have to develop new algorithms that would enable us to generate 3D criticals from them.This is a work in progress, which is the reason why we have not included any 3D results in this paper.
As a general rule, also for higher dimensions [39], bigger KS sets do not have parity proofs at all, while the very small ones with odd number of edges all have them, as shown in Figs. 1 and 2. Among the criticals of the 148-265 class, which does not have really small sets, not a single set with a parity proof was generated.
Sets generated from small master sets, like 4D 60-74, 60-105, 73-? and 84-?, and 6D 81-162 exhibit a flat cutoff as shown in Figs.1(a), 2(b), 5, and 7, and form a sawtoothed distribution as shown in Fig. 7(b); this feature enabled us to fill in the gap between the upper and lower clusters of the 300-675 class.
All classes generated from sufficiently big master sets, exhibit a spindle-like distribution of sets with an agglomeration of criticals below the line that connects the smallest and largest of them as shown in Figs.1(a),  2(a), and 5.
The 96-96 KS set is found to properly contain all sets from the 60-74 (60-75) class.The big gap between 82 (41) and 211 (127) vertices (edges) in the 300-675 KS class we obtained in [39,46] is filled in as shown in Fig. 1.The 96-96 KS sets form a subclass of the 300-675 KS class.Missing KS sets from the 147-265 KS class in [39,46] are obtained.
In 6D the ω-coordinatization of the star/triangle 21-7 KS set [12,39] is found to generate a master set 216-153 which contains only three criticals 21-7, 27-9, and 33-11 shown in Fig. 4(a-d).The ω 2 -coordinatization generates two KS sub-classes 591-1123 and 81-162; the distribution of the latter is shown in Fig. 5.The former is too big to be generated within the scope of this paper, but we confirmed that the 39-13 critical shown in Fig. 4(e) belongs to the former and not to the latter class.
In the end, we would like to recall that just over 50 years have passed since Simon Kochen and Ernst P. Specker formulated their KS theorem [45] and that for 36 years thereupon only three 4D KS sets were found.The results obtained since then and partly in this paper prove the power of computer science in and interdisciplinary approaches to the field.

V. METHODS
The MMP hypergraph language, and that algorithms and programs developed for it, are our general method for processing and categorising KS sets and other properties represented by hypergraphs.By using exactly one line of text for each MMP hypergraph, we manipulate a collection of millions of MMPs with standard text processing tools as well as distribute pieces of the collection to different CPUs for massive parallel processing.Most of our programs work with arbitrary hypergraphs and can be useful for any project using hypergraphs for knowledge representation.While we encourage the use of MMP notation because it is well-defined and convenient, we can also translate to and from other hypergraph representations.
All our programs are freely available from our repository [47], and with them a researcher can reproduce the results reported in this paper.Any of our programs can process an arbitrary number of lines each consisting of ASCII characters that represent KS sets in the form of KS hypergraphs.There are no inherent limitations in the number of vertices (vectors) or edges in which vertices are organized (mutually orthogonal n-tuples of vectors determining the dimension n of the Hilbert space in which vectors reside).
Program Mmpstrip generates 3,712 smaller KS sets which together with their 40-32 master set form the 40-32 KS class.Of those, 1,233 connected ones (up to 24 vertices and 24 edges) are isomorphic with the ones previously obtained from Peres' 24-24 KS set in [50].The 600-cell has 25 different 24-cells inscribed in it, in the way that a regular dodecahedron has five cubes inscribed in it.The inscribed 24-cells can be seen most easily in the basis table of the 600-cell, where each 24cell can be seen as one of the blocks of 12 vectors (each representing an antipodal pair of vertices of this 24-cell).The vertices of the 600-cell can be partitioned into those of five disjoint 24-cells in ten different ways, with the rows and columns of Table 2 of [33] showing the different partitions.It is important to note that although the 600cell has many 24-cells in it, no 24-cell is accompanied by its dual.Thus, the 24-24 system described above is not a subset of the 60-75 master set.

120-Cell Generates the 300-675 KS Mater Set
The 120-cell {5,3,3} has 120 dodecahedra for its outer boundary, with three around each edge of the polytope.Alogether it has 120 pentagons, 1200 edges, and 600 vertices.These vertices, lying on a 3-sphere in 4D, come in antipodal pairs, and so give rise to just 300 distinct vectors or quantum states.These 300 vectors form 675 bases of four mutually orthogonal states, from which we obtain the 300-675 KS master set according to the prescription given in [36].

Polytope Generation of the 300-675 and 96-96 KS Classes and Their Features
In [36] we obtained a 300-675 KS master set from the 120-cell polytope.However, the set was too big for our parity proof program, so that we made use of a 96-96 subset to generate critical (smallest) KS sets [36,Table 5].It is not too big for our Mmpstrip, States01 and Mmpsubgraph programs [50,52], though, and we obtained all the results in this section by making use of these three programs.The MMP hypergraph string of the master set 300-675 itself is however too long to be reproduced here and the reader can retrieve it from our repository in [47].
Subsets of the master set 300-675 form the 300-675 KS class and in Fig. 1 we give all the critical KS sets we obtained from this class.
The very construction of the 300-675 master set (presented in [36]) involved the 60-75 master set and therefore it constructively proved that the 300-675 KS class properly contains the 60-74 class.Namely, by stripping one edge at the time from the 60-75 master set we obtain seventy five 60-74 KS subsets.They turn out to be isomorphic to each other and actually merge into a single 60-74 set.Thus, both sets can be taken as master sets for smaller KS sets which form a class of their subsets and in the literature we called them 60-75 and 60-74 classes, respectively.They are identical, short of the very 60-75 set from the 60-75 class.This is a general feature of any master set in which all edges are symmetrically identical.
In [36] we called the 60-75 master set (first discovered in [30] and further elaborated in [31,33]), the 600cell.In that paper we mostly considered the 96-96 set ("one of the reduced sets," actually the last one from Table 4 of the paper, i.e., 36 2 48 5 12 6 − 96 4 ).It turns out that the 96-96 set properly contains the 60-75 set and therefore also the 60-74 set as well as all the sets from the 74 class.To see this, let us have a look at Table 1 of [36].In the table, the 60 rays of the 60-75 are labelled E ′ (they form a subset of the 300-675).We can construct the 96-96 so as to cancel 12-ray-blocks and from Table 4 we then see that E ′ remains intact.
Another way to prove that the 96-96 subset contains the 60-75 master set and all KS criticals from the 60-74 class in addition to criticals not contained in the 60-74 class is to make use of our universal programs Mmpstrip and States01.In this approach we obtain a number of results which are presented below and partly displayed in Fig. 7.
The black criticals are from the 60-74 class.Squared pink rectangles with dashed lines mean that some of the criticals are from the 60-74 while the others are not.Criticals in red do not belong to the 60-74 class.We obtained all the criticals via the universal Mmpstrip, States01, and Mmpsubgraph programs but we discerned 60-74 from non-60-74 criticals with an odd number of edges mostly via our parity proof program which is much faster than Mmpsubgraph.Criticals with an even number of edges which cannot be discerned by means of parity proof algorithms we discerned via States01.Criticals from the 60-74 cannot have more than 60 vertices which we visualized by means of the "60-74 max" dashed line.The 300-675 class contains the 60-74 class but it does not exhibit a cutoff shape.Its MMP hypergraphs contain edges with fewer and fewer vertices toward the opposite ends of their distribution.Also they exhibit agglomeration of criticals below the line which connects the smallest and largest hypergraphs.As we can see in Fig. 9(b), the 148-265 class possesses the same features.
The above cutoff shape of the 60-74 class appears to be characteristic of any subclass of a bigger class, which we tentatively call a complete class generated from a complete master set .Under complete sets we understand the ones obtained from an exhaustive usage of vector components to build their coordinatization.Then their distribution exhibits a spindle-shaped agglomeration elaborated on in Subsec.II D. E.g., in Fig. 7, from the distribution of the 96-96 criticals, in particular from its saw-toothed shape, we can, apart from the subclass 60-74, recognize two new subclasses 72-? and 84-?where "?" stands for the edges of the sub-master sets that we do not know as of yet.Also, through the cutoff at the 96 vertex level, we can see that the 96-96 class itself is a subclass of a bigger complete set, e.g., the 300-675 one.Our claim that the saw-toothed shapes are genuine effects and not consequences of insufficiently intensive generation of sets are supported by, first, the fact that among the last 15% of generated sets there were no new types belonging to the teeth area (only two from bottom left area), and, second, by two clearly pronounced sub-distributions of vertices related to the same edges and the base of each tooth.In Fig. 7, an example of such a double sub-distribution is shown in the Inset (b) for the edge 43.There is only one KS 73-43 critical (enneadecagon in the lower runs of the program Loop): U#s3,3 * "g,gaYW,WVOT,TRSQ,Q/$z,zy!f,f(%d,d&h ′ , ′ u26,,,1234,DEFG,HIJK,LMNO,JFB8,XYSN,ZaRM, de73,fgc6,hi54,jHD9,iZXV,opL2,stpn,uvie,"!rb,#vmb, $%t4,)$l6, * (o5,-/q5,#zxh,-)db,/&sc. example of the distribution shown in the Inset (b) of Fig. 7, is of sets with 37 edges with an order of magnitude bigger sub-distribution of vertices than for the above 43 edges.
In Fig. 8 we give some MMP hypergraph representations of the smallest KS criticals with an even number of edges, which cannot be obtained by means of parity proof algorithms.
They lack the symmetry many of KS criticals with an odd number of edges exhibit (Cf.[39,Figs. 3 and 8]).Their MMP hypergraphs run as follows.
The main loops are obvious from the figures (alphabetical order), and except for the first set we omit them.The loops are 14-gons for the first two and 16-gons for the last two sets.Some 58-32 and 59-32 have 17-gons as maximal loops but these are actually small as compared to many KS criticals from the upper part of the class shown in Fig. 1, whose maximal loops are 55-gons and bigger.
In [39,46] a uniform random generation of criticals with Mmpstrip and States01 generated a cluster of sets FIG. 8. Four small KS criticals with an even number of edges.In contrast to small criticals with an odd number of edges they all have several vertices that belong to only one edge (denoted as grey dots).
with edges between 127 and 188 and vertices between 211 and 283.The programs did not generate a single critical in between this cluster and the 96-96 cluster.When we tried to find out the cause of the gap we first realised that none of the criticals from the upper cluster had a parity proof, so, we could not obtain them with a parity proof program.Then, we realised that a probability of finding criticals between the aforementioned criticals via a uniform random procedure in the 300-675 class is extremely low (unlike in any other class in any dimension [39]) and that a random generation of each of them might take up to 3 months.However, following the above 96-96 saw-toothed feature, we conjectured that an analogous feature repeats throughout the 300-675 class up to the upper cluster.
We verified the conjecture in the following manner.We first let 100 jobs run in parallel for 3 months and ob-tained a number of criticals in between the former upper and lower clusters.Then we traced the subsets they were generated from.When a considerable number of criticals pointed to particular subsets, we ran up to 200 States01 jobs on these subsets in parallel.This proved fruitful and we filled in the gap, denoted by question marks in Fig. 9 [39] and Fig. 2 of [46], and obtained evenly distributed critical KS set shown in Fig. 1.
We found no parity proof among criticals bigger than 82-41, so the upper part of the 300-675 KS class is invisible to the parity proof algorithms.
The biggest maximal loop we found is a 57-gon for a 283-188 critical.
The 300-675 KS class has a real coordinatization, i.e., vectors corresponding to vertices of their MMP hypergraphs are from R 4 .The consequence is the structural simplicity of the hypergraphs.In particular, they all lack the δ-feature of two edges sharing two vertices characteristic of the hypergraphs from the 60-105 class that has the complex coordinatization.

Witting Polytope Generates the 148-265 KS Class
Complex coordinatization does not automatically furnish the hypergraphs with intricate features, as the 148-265 class shows [39,46].The 148-265 KS class sits in complex 4D Hilbert space, and the two classes 300-765 and 148-265 are completely disjoint, making the latter class particularly interesting for designing experiments with qubits residing in complex Hilbert space.The class is obtained from a polytope with coordinatization in C 4 , called the Witting polytope.
The well-known Penrose dodecahedron 40-40 KS set in 4D complex Hilbert space is related to the Witting Polytope, through the Majorana representation of spin states to the regular dodecahedron in 3-dimensional Euclidean space, and through a particular projection, to the root structure of the Lie algebra E8 in the 8-dimensional Euclidean space [38].Its coordinatization can be obtained from the set {0, ±1, ±ω, ±ω 2 }, where ω = e 2πi/3 .Penrose's 40-40 set is not critical, and we exhaustively generated all KS subsets it contains.The outcome turns out to be of importance for the definition of critical sets since all criticals contain all 40 vertices of the master set and are obtained by removing only edges.This shows that the vertex criticality criterion "A KS set is critical if by deleting any of its vertex it turns into a non-KS set" which can be found in the literature (for example [40,53]) is too restrictive.
On the other hand, it is important because it is an extreme example of a flat cutoff feature with no vertical (vertex) distribution of hypergraphs.
Via exhaustive stripping by means of the program Mmpstrip and filtering through the program States01, we obtain all subgraphs and all critical subgraphs among them, as shown in Table I.In Fig. 9 we give a figure of one of the 56 smallest 40-23 KS criticals.Its MMP representation runs as follows (maximal loop symbols can be read off from Fig. 9): ,,, 89A3,EFG4,HIJ2,KLM1,QRSJ,WOH6,XYZ8,abc5, cVPD,cZQ1,bYN2, dWU1,eVT2.All 40-40 criticals have decagons as their maximal loops.
As shown in Fig. 9(b), the criticals we obtained in the 148-256 class and which do not belong to the 40-40 ones have vertices in the span from 49 to 147 and edges from 27 to 97 and exhibit spindle-shaped agglomeration similar to the 300-675 class.The sets with 49 vertices might belong to a subclass similar to the 40-40 one, but we have not explored them further.
The maximal loops of the criticals go up to 36-gons, and their hypergraphs are therefore mostly too big to be efficiently visualized.One of the smallest non-40-40 ones, a 49-27 critical, has been presented in [39,Fig. 10] and [46,Fig. 2].
No set we generated from either the 300-675 class or the 148-265 class contains edges that share more than one vertex.Some sets from other classes do contain such edges, which we call the δ-feature, and it proves to be characteristic of the 60-105 class in particular.

FIG. 1 .
FIG.1.Distribution of 10 10 non-isomorphic critical KS sets from the 300-675 class we found by means of programs Mmpstrip, States01, and Mmpsubgraph.Dots represent KS criticals with the number of edges given at the ordinates and the number of vertices at the abscissae.When dots are next to each other ("glued" together), they are shown as vertical lines; e.g., at the far right end of the upper strip, there is a line of KS criticals with 99 edges ranging from 168 to 183 vertices, then, just below it, there is a 184-99 gap, followed by a dot which represent KS criticals with 99 edges and 185 vertices.Vertex units are scaled to 1/4 of edge units for a compact presentation.Inset (b) gives the whole span of criticals and shows that the criticals are agglomerated below the line which connects the smallest and largest criticals.Insets (c)-(g) show vector generated sets with the given coordinatization: KS hypergraphs for each of them are represented via biggest outer polygon loops found by Loop (after searching through 50,000 combinations for each): 16 edges (c), 33 (d), 48 (e), 65 (f), and '?' (g), indicating that we did not run Loop on them because it would take too much CPU time-cf.hexagon 18-9 in Fig.6.

2 FIG. 3 .
FIG.3.MMP hypergraphs of KS critical sets derived from the 636-1657 master that are not subgraphs of 60-105.The first four share the vertex components with the latter master while the last two do not; δ's denote the δ-feature introduced in[39].
exhibits the agglomeration below the line which connects the smallest and largest criticals.Also, the number of vertices per edge decreases toward both smallest and biggest vertices.Both features are consistent with those of 300-675 and 148-265 classes shown in Figs.1(b) and 9(b).

FIG. 4 .FIG. 5 .
FIG. 4. 6D ω KS criticals sets; (a) a star representation of 21-7 from [12]; (b) its isomorphic triangular equivalent from [39]; (c,d) the only two other criticals in the ω class within the ω-coordinatization; pairs of δ-triples comes to the triangle at the scissor indicated point; (e) 39-13 generated within the ω 2 -coordinatization from the 591-1123 master set and is contained neither in the ω 216-153 nor in the ω 2 81-162 class; (f) the second smallest from the 81-162 class presented so as to show the "remnants" of the 21-7 triangle; (g) the third smallest set from the class shown in the standard maximal loop representation; MMP hypergraph encodings and their coordinatizations are given in the Appendices.

FIG. 7 .
FIG.7.Distribution of 5 × 10 9 KS criticals obtained from the 96-96 KS subset of the 300-675 KS master set[36] via Mmpstrip and States01 programs.For an explanation of differently colored criticals see text.Vertex units are scaled to 1/2 of edge units to give a more compact graphical presentation."Mixed criticals" mean that only a portion of KS criticals with the shown vertices and edges are from the 60-74 class.Inset (a): the smallest critical hypergraph which is not a subgraph of the 60-74 master KS set.Inset (b): the distribution of all criticals with 43 edges."no pp" means "no parity proofs."

FIG. 9 .
FIG. 9. (a) 40-23 critical; ASCII symbols of vertices are taken directly from the computer generated MMP hypergraph.Grey dots depict vertices that belong to just one edge; (b) Distribution of 250140 KS criticals from the 148-265 class which shows the same kind of agglomeration of criticals below the line which connects the smallest and largest of them as in the 300-675 class in Fig. 1.Also, again as in the 300-675 class, the number of vertices per edge decreases toward the opposite ends of the distribution.

TABLE I .
All subgraphs, and all critical subgraphs among them, generated from the Penrose 40-40 dodecahedron hypergraph.