<<

Homotopical approach to quantum contextuality

Cihan Okay1,2 and Robert Raussendorf1,2

1Department of Physics and Astronomy, University of British Columbia, Vancouver, BC, Canada 2Stewart Blusson Quantum Matter Institute, University of British Columbia, Vancouver, BC, Canada

We consider the phenomenon of quan- on Čech cohomology by Abramsky and cowork- tum mechanical contextuality, and specif- ers [16], the geometric approach by Arkhipov [17], ically parity-based proofs thereof. Mer- and the approach based on cohomology of chain min’s square and star are representative complexes [18]. For other approaches to contex- examples. Part of the information invoked tuality see [19–23] and for refinements of the Čech in such contextuality proofs is the com- cohomology approach see [24–27]. mutativity structure among the pertain- In this paper we unify the approach of ing . We investigate to which Arkhipov and the approach based on chain com- extent this commutativity structure alone plexes, thereby generalizing one of Arkhipov’s determines the viability of a parity-based results [17]. Both [17] and [18] are concerned contextuality proof. We establish a topo- with so-called parity-based contextuality proofs, logical criterion for this, generalizing an of which Mermin’s square and star are represen- earlier result by Arkhipov. tative examples [28]. Generally, a parity-based contextuality proof is a set of linear constraints on hypothetical value assignments that has no so- 1 Introduction lution. Although concerned with the same type of contextuality proof, [17] and [18] use different Contextuality is a characteristic feature of quan- abstractions and address slightly different ques- tum mechanics [1,2] that distinguishes quantum tions. from classical physics. It rules out the descrip- Ref. [18] asks: Does a given set O of observ- tion of quantum phenomena by so-called non- ables produce a parity-based contextuality proof? contextual hidden variable models, in which each The first step in answering this question is in ex- has a pre-determined value which is tracting the essential information of the set O of merely revealed by the act of measurement. Such observables, in terms of a chain complex C that models are either internally inconsistent, or fail to captures the commutativity structure within O, reproduce the predictions of . and a cocycle β that captures the phase infor- What leads to paradoxes under too strin- mation of product relations among commuting gent assumptions about physical reality be- elements in O. Then, a parity-based contextu- comes a commodity if these assumptions are not ality proof arises in the setting specified by O if made: contextuality is also a resource in quan- and only if the cocycle β is cohomologically non- tum computation. For two models of quantum trivial, [β] 6= 0. computation—quantum computation with magic Arkhipov [17] invokes a different abstraction

arXiv:1905.03822v2 [quant-ph] 18 Dec 2019 states [3] and measurement-based quantum com- and addresses a different question. Rather than a putation [4]—it has been shown that a quantum chain complex, [17] defines an intersection graph speedup can occur only if contextuality is present G, with the edges labeling observables and the [5–12]. vertices labeling contexts. Again, G captures the At its core, contextuality is about the interplay commutativity structure among the observables between local consistency and global inconsis- involved. The counterpart to the cocycle β of tency [13]; and therefore topological methods are [18] is a sign function defined on the vertices of particularly suited to discuss it. Presently four G. Arkhipov’s question is, in a sense, the re- approaches to contextuality have been described verse of the above; namely: Given the intersec- that employ topology: the topos approach by tion graph G, does there exist a corresponding Döring and Isham [14, 15], the approach based set O of observables that produces a parity-based

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 1 contextuality proof? This question has a surpris- [17] all observables are constrained to have eigen- ingly simple—and topological—answer. Namely, values ±1, whereas the present treatment permits the intersection graph G can give rise to a parity- operators with eigenvalues e2πi/d, for any d ≥ 2. based contextuality proof if and only if G is non- The remainder of this paper is organized as fol- planar. lows. In Section2 we introduce magic arrange- In [17], rather than a set O of observables, the ments and explain the connection to the notion intersection graph G is the primary object. The of contextuality. Section3 we introduce the ba- broader significance of this is that a geometrical sic tools: topological realizations and path opera- object encoding commutativity relations among tors. Section4 contains our main result (Theorem observables emerges at the base of quantum me- 4.6). In Section4 we study topological realiza- chanical contextuality. In this paper, we seek gen- tions via the fundamental sequence of homotopy eralizations of Arkhipov’s results to a greater va- groups. Then in Section5 we move on to define riety of physical settings and to understand the a representation of the fundamental group of a structure of the emerging geometric objects. topological realization and use this to refine our main result (Corollary 5.6). Section6 is on the We now summarize how the two above- algorithmic approach [29, 30] to parity-based con- described approaches [17] and [18] are unified, textuality proofs and how it relates to the topo- how one of Arkhipov’s results is thereby general- logical approach presented in this paper. ized, and why such a generalization is desirable. First, we observe that the intersection graph G employed in [17] is defined only for settings in 2 Magic arrangements which each observable in O is part of no more than two contexts. This is a consequence of the Many proofs of contextuality of quantum me- simple fact that an edge in a graph has no more chanics employ fixed sets of observables to find than two end points. obstructions to the existence of non-contextual The extension of Arkhipov’s results to settings value assignments. Two key examples are Mer- with observables contributing to more than two min’s square and star [28]. However, the ex- contexts is, for example, relevant for the dis- istence of the obstruction does not depend on cussion of contextuality in measurement-based the precise choice of the observables; for exam- quantum computation (MBQC). In the stan- ple, conjugating each observable in the set by dard MBQC setting [4], applied to evaluation of the same unitary produces an equivalent proof. Boolean functions on m input bits [10], there are Rather, it depends only on which subsets of 2m measurement contexts overall. Each local ob- observables commute, and how commuting ob- servable measurable in the process, chosen from servables multiply. In Arkhipov’s formulation, a set of 2, appears in one half of these contexts. this information makes up the so-called “arrange- Therefore, each such observable appears in more ment", and the commutativity part of it the so- than two measurement contexts whenever m > 2. called “intersection graph" of the arrangement. Our main result is that one direction of The definition of the intersection graph is as Arkhipov’s result can be generalized in the for- follows. Given a fixed set of observables for a malism of [18] based on a chain complex C, with contextuality proof, such as Mermin’s square or no bounds on the number of contexts that any star, these observables become the edges of the given observable can appear in. Specifically, a intersection graph, and the sets of commuting complex C can yield a parity-based contextual- observables, i.e., the contexts, become the ver- ity proof only if the topological space XC corre- tices of the intersection graph. Thus, two edges sponding to C is not simply connected, i.e., only if have the same vertex as end point if and only if π1(XC) 6= 1. For example, in the case of Arkhipov the corresponding observables commute. To stick the complex C can be described by a closed sur- with the above examples, the intersection graphs face Σg of some genus g together with a cell struc- of Mermin’s square and star (see Fig. (2)) are the ture on it. The intersection graph G corresponds bipartite complete graph K3,3 and the complete to the dual cell structure of Σg. Vanishing of the graph K5, respectively. fundamental group coincides with the planarity Central in [17] is the notion of “magic" arrange- of the intersection graph in this case. Also, in ments. They appear in the context of nonlocal

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 2 games [31], cooperative strategies that demon- magic if it is quantum realizable but not classi- strate contextuality as a resource for winning cally realizable. with high probability. An arrangement is magic When the arrangement satisfies the property if the edges of its intersection graph can be popu- that each observable is contained in exacly two lated with Hermitian operators with eigenvalues contexts one can define the intersection graph. ±1, but not with numbers ±1. The significance Can it be judged from the intersection graph of of this notion is that every magic arrangement an arrangement alone whether the arrangement gives rise to a proof of contextuality. Formally, is magic? Arkipov answers this question in an a set of contraints among quantum observables is affirmative way, and provides the following char- specified, and a contextuality proof would be a acterization. demonstration of the failure to satisfy these con- Theorem A. An arrangement is magic if and straints by predetermined outcome assignments only if its intersection graph is non-planar. to the observables. The relevant basic notions can be formalized A shortcoming of this result is that the in- as follows. Let L be a finite set, and M denote tersection graph is defined only when each ob- a collection of subsets of L. The elements of M servable appears in no more than two contexts are called contexts. Together the pair (L, M) can (edges have only two end points). Our general- be regarded as a hypergraph with vertices L and ization removes this restriction: Observables can edges M. We will call such a pair an arrange- appear in arbitrarily many contexts. The geo- ment. We will allow operator inverses to appear metrical object underlying our construction is a in the constraints. Therefore we are given a sign 2-dimensional cell complex, or more algebraically function  : L → {±1}. The triple (L, M, ) the associated chain complex. In the special case will be referred to as a signed arrangement 1. We where Arkhipov’s result applies, i.e., when each sometimes drop  from notation and simply write observable is only contained in two contexts, then (L, M). the intersection graph and the chain complex are Arrangements can be used to define operator related by a duality. constraints. Operator constraints are determined by a function τ : M → Zd where d ≥ 2.A 2.1 Operator realization quantum realization of (L, M, , τ) is a function T : L → U(n) for some n such that Given a signed arrangement (L, M, ) we will in- troduce the notion of a topological realization. d • Each operator satisfies (Ta) = I. The idea is to encode the operator relations Eq. (1) in a topological way. For this construc- • In each context the operators {Ta| a ∈ C} tion we do not require the operators to commute pairwise commute. in each context. Therefore we relax the notion of • For each context C ∈ M the operators sat- a quantum realization by removing the commu- isfy the constraint tativity requirement. An operator realization for (L, M, , τ) is a Y (a) τ(C) d Ta = ω (1) function T : L → U(n) such that (Ta) = I a∈C for all a ∈ L and satisfies Eq. (1) for each con- text. In this case for Eq. (1) to make sense we where ω = e2πi/d.A classical realization of order the elements of each context C and write (L, M, , τ) is a function c : L → Zd such that {a1, a2, ··· , an} for the elements. Then Eq. (1) for each context can be written as n Y (a)c(a) τ(C) ω = ω . (2) Y (ai) τ(C) Tai = ω . (3) a∈C i=1 We say an arrangement is (classically) quantum realizable if (L, M, , τ) has a (classical) quantum 2.2 Chain complex of an arrangement realization for some τ. An arrangement is called We would like to introduce a chain complex be- 1 This terminology is different than Arkhipov’s. fore starting our discussion of a topological real-

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 3 ization. This algebraic construction associated to dictated by the constraints Eq. (3) that is the a given arrangement will capture the constraints boundary of the 2-cell is glued along the labels Eq. (1) using a chain complex. a1, a2, ··· , an respecting the order. Let us We define a chain complex D∗(M) whose 2- denote the resulting space by Xsing, emphasiz- chains, 1-chains, and 0-chains are given as D2 = ing that it has a single vertex. Now the chain Zd[M], D1 = Zd[L], and D0 = Zd together with complex (with Zd coefficients) C∗(Xsing) is ex- the boundary maps actly the chain complex D∗(M) introduced ear- lier. For spaces it is customary to denote the [M] −→∂ [L] −→0 Zd Zd Zd homology and cohomology groups by H∗(X, Zd) k and H∗(X, ), respectively. X Zd where ∂[C] = (ai)[ai] Our space Xsing consists of a single vertex. We i=1 will be interested in other spaces that can be ob- for each context C = {a1, a2, ··· , ak}. The corre- tained by a similar process that is used to con- sponding cochain complex is denoted by D∗(M). struct Xsing but with possibly using more than one vertex, although the edges and faces are kept For example, a 2-cochain is a function M → Zd, the same. and similarly a 1-cochain is a function L → Zd. The coboundary d : D1 → D2 is defined as df(C) = f(∂[C]). We will consider the homol- Definition 3.1. A topological realization of an ∗ ogy H∗(D(M)) and the cohomology H (D(M)) arrangement (L, M, ) is a 2-dimensional con- groups. nected cell complex X together with a map X → The relation to the set of constraints given in Xsing of cell complexes that induces an isomor- Eq. (1) is as follows: By definition of the cochain phism between the set of 1-cells and the 2-cells. complex the function τ : M → Zd can be re- garded as a 2-cochain, i.e. an element of D2(M). There is a corresponding cohomology class [τ] in So a topological realization of an arrangement H2(D(M)). A classical realization of (L, M, , τ) is a connected cell complex X which has 1-cells labeled by a ∈ L and 2-cells labeled by C ∈ M. is a function c : L → Zd that satisfies Eq. (2). Equivalently, our construction allows us to state The disk labeled by C has its boundary divided this condition as into segments labeled by its elements and oriented by  (for example as in Fig. (1)). In fact, this dc = τ construction gives a special type of a cell com- plex, namely, a combinatorial cell complex. This i.e. [τ] = 0 in the cohomology group. means that the attaching map of a 2-cell maps an edge on the boundary homeomorphically to the 3 Topological realizations corresponding edge on the 1-skeleton. See Ap- pendix §A for a definition of a combinatorial cell We can construct a topological space that real- complex, and basic properties. By construction izes the chain complex D∗(M). The construction there is a map C∗(X) → D∗(M) of chain com- can be given as a cell complex consisting of ele- plexes. Since the 1-cells and 2-cells are isomor- mentary pieces called n-cells. An n-cell is an n- phic this map induces an isomorphism on second disk which geometrically corresponds to vectors cohomology. As a consequence we can regard the n 2 of length ≤ 1 in the Euclidean space R . The class [τ] as living in H (X, Zd). construction starts with a collection of 0-cells i.e. To motivate this definition we relate it to points, and proceeds by gluing the boundary of Arkhipov’s construction of the intersection graph. the cells in a prescribed way — see Appendix §A. In the special type of scenarios that Arkhipov To realize the chain complex D∗(M) we start considers one can define an intersection graph G with a single point, and glue from both end points from the given data of the hypergraph. Then a 1-cell for each a ∈ L to this single vertex. there is a closed oriented surface Σg of genus g Then for each context C we glue a 2-cell (disk) into which the graph can be embedded. The sur- whose boundary traverses the loops labeled by face with minimum g determines whether G is C = {a1, ··· , ak} with orientation given by the planar or not. The minimum value of g is zero, sign function . The ordering of the elements is that is when Σg is a sphere, if and only if the

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 4 ization let us consider the Mermin square exam- ple. The triple (L, M, ) specifying the arrange- ment is given by

L = {X1,X2,XX,Z1,Z2,ZZ,XZ,ZX,YY },

M consists of 6 contexts given by the 2-cells. Each context consists of 3 observables. Our 2- Figure 1: Boundary of a clockwise oriented 2-cell. cells are topologically equivalent to triangles in this case. Observables label the edges of the tri- graph is planar. The embedding problem can be angles. Since each operator squares to identity thought of possible ways of obtaining a surface the sign  does not have an effect on the operator from the graph by adding faces (gluing disks). constraints. However, to be able to specify the Our framework is dual in the sense that given the topological realization we need to make a choice. 0 embedding G ⊂ Σg we consider the dual graph G We make our choice so that the topological real- and regard the vertices of Σg as glued faces to this ization gives a torus (We will come back to other dual graph. Therefore X corresponds to the sur- possible choices, see Fig. (5)). The operator con- face Σg with the cell decomposition determined straints are given by 6 equations that look like by G0. X1X2(XX) = I, Z1Z2(ZZ) = I,... Only one of them multiply to −I, namely (XX)(ZZ)(YY ) = −I. Therefore τ : M → Z2 assigns 0’s to ev- Example 3.2. The intersection graph of the ery context, except this latter one, which is as- Mermin square and star examples correspond to signed 1. Alternatively we can see τ as a 2- the graphs K3,3 and K5. They can be embed- cochain on the torus, this time interpreted as as- ded in a torus as displayed in Fig. (2). Here the signing values in Z2 to each triangle. For Mermin boundary of the square region is identified in a star L consists of 10 observables and M consists way to obtain a torus. This can be achieved by of 5 contexts. Each context has 4 observables. identifying parallel edges with the same orien- Thus our 2-cells are rectangular shapes in this tation. The torus has a cell structure given by case. Similarly τ assigns values in Z2 to contexts, triangles or rectangular shapes. The graphs (de- and the corresponding 2-cells, determined by the picted in blue) live on the torus in such a way products of the observables in each context. that their vertices match one-to-one with the 2- cells of the torus. These graphs are non-planar, that is the self-intersection cannot be avoided by 3.1 Path operators moving the edges. We can embed them into a torus, but there is no way to embed them into a Our topological realization X encodes operator plane (or a sphere). relations by the attaching maps of the 2-cells. These attaching maps are nice so that our space is a combinatorial cell complex. For this purpose in this section we will assume that X is a combinato- rial 2-complex. See §A for the definition of com- binatorial complexes and combinatorial maps. Recall that an operator realization is a function T : L → U(n) and we can think of L as the labels for the edges in a topological realization X. Fix a vertex v of X for the rest of the discussion. For us a path at v is represented by a combinatorial map p : S1 → X for some cell structure on S1. Figure 2: Torus realizing the Mermin square( K3,3) and Mermin star( K5) arrangements. In other words, p traverses a sequence of edges (a1) (ak) a1 , ··· , ak of X where (ai) = ±1 specifies To illustrate the definition of a topological real- the orientation. Its image can be just the vertex

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 5 v as well. We define a path operator and F2 are oriented clockwise. We can cancel the operators in two different ways: k Y (ai) Tp = Ta . −1 −1 −1 −1 i (Tp1 TbTp2 Ta)(Ta Tc Tb Td ) or i=1 −1 −1 −1 −1 (Tp2 TaTp1 Tb)(Tb Td Ta Tc ) If the image is just v we set Tp to be the identity matrix I. which possibly gives different results. The prob- Given two paths p, q we can define the prod- lem is that after canceling Ta (or Tb) we cannot uct path p · q which means traversing p first cancel the remaining operator. and then q. In the combinatorial language if q is specified by the sequence of edges (b1) (bm) b1 , ··· , bm then the product would be given (a1) (ak) (b1) (bm) by a1 , ··· , ak , b1 , ··· , bm . By defini- tion of the path operator we have

Tp·q = TpTq. Figure 4: Merging does not correspond to multiplying Another elementary property is that changing operator relations. orientation of the path amounts to inverting the −1 operator Tp−1 = Tp , again by definition. 4 Simply connected realization Example 3.3. Consider two 2-cells that share a common path as in Fig. (3). Let us orient both Given a signed arrangement (L, M) we de- cells clockwise. Regarding the 2-cell as 2-chains rive consequences about magic arrangement from the common path p2 gets a plus sign from the topological properties of its possible topological left cell and a minus sign from the right cell. The realizations. Our main theorem says that if we sum of the chains is geometrically represented can realize the signed arrangement on a simply by the face F obtained by merging the cells. F connected (trivial fundamental group) space then comes with the clockwise orientation hence it cor- the arrangement is non-magic. For topology of 2- responds to the relation that is obtained by mul- dimensional cell complexes we follow [32, Chapter tiplying the two constraints II].

(T T )(T −1T −1) = T T −1. p1 p2 p2 p3 p1 p3 4.1 Dragging along a path We introduce a deformation of a map along a path that will be useful for certain constructions re- lated to homotopy groups. This is a standard trick in algebraic topology. 2 2 1 Let D denote the unit disk in R , and S de- note its boundary. We give a base point ∗ to D2 that lies in the boundary, for example we can set 2 Figure 3: Merging 2-cells is interpreted as multiplying (1, 0) as the base point. Given a map g : D → X operator relations. and a path β from w = g(∗) to a fixed vertex 2 v ∈ X we define a new map g˜β : D → X that is obtained by deforming g by dragging the point w backwards along the path β. We refer to g˜ =g ˜β as the deformation of g along β. If α is the loop Example 3.4. However, there is no one-to-one at w given by the image of the boundary under g correspondence between multiplication of opera- then g˜β maps the boundary of the disk to the loop tor relations and merging cells (adding chains). β · α · β−1 at v. For a more technical definition For example, consider Fig. (4), where both F1 see [33, page 341].

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 6 Similarly, we can deform a map f : S1 → X by dragging along a path and write f˜ for the result- ing map. Example 4.1. In Fig. (5) we see two differ- 4.2 Fundamental sequence ent topological realizations for Mermin square, see Ex. (3.2) for the explanation of the tuple The key topological tool for studying 2- (L, M, , τ). The difference comes form the ori- dimensional cell complexes is the fundamental se- entation of the boundary edges. The resulting 1 quence. Let X denote the 1-skeleton of X, the spaces are distinct: a torus X1 = T and a pro- 2 oriented graph on which we glue the disks. There jective plane X2 = RP . The maximal trees are is an exact sequence of homotopy groups given by T1 = {e8, e9} and T2 = {e2, e8, e9}. Note that adding an extra edge to these trees creates a 1 ∂ 1 0 → π2(X) → π2(X,X ) → π1(X ) → π1(X) → 1 loop. The main difference between the two cases (4) is the number of vertices on the boundary. X1 see [32, Chapter II, §2.1]. We describe the groups has a single vertex v1 on the boundary and X2 in this sequence: has two given by v1, v2. In both cases we need to construct the loops ai form the edges ei outside • π1(X) is the fundamental group of X. It is defined with respect to a vertex v ∈ X, the maximal tree. and consists of homotopy classes of maps f : • For X the loops at v can be chosen as fol- 1 1 1 1 S → X that carries the base point ∗ ∈ S lows: to v.

a1 = e1 • Second homotopy group π2(X) is the homo- 2 −1 topy classes of maps h : S → X where a2 = e2 · e9 h(∗) = v. −1 −1 a3 = e3 · e8 · e9 1 a = e • The relative homotopy group π2(X,X ) con- 4 4 2 −1 sists of homotopy classes of maps g : D → a5 = e5 · e9 2 1 X where g(∂D ) ⊂ X and g(∗) = v. −1 −1 a6 = e6 · e8 · e9 Exactness means that at each consecutive map a7 = e9 · e8 · e7. β ··· →α A → · · · in the fundamental sequence, 1 the kernel of β is equal to the image of α. The Therefore π1((X1) ) is the free group F7 on 1 most interesting map in the exact sequence is the 7 generators, where (X1) is the 1-skeleton boundary map ∂. It is defined on an element of X1. Φ: D2 → X by restriction onto the boundary: • For X2 with base point v1 we can choose:

∂[Φ] = [Φ|∂D2 ] −1 a1 = e1 · e2 · e9 1 1 −1 −1 −1 hence as a result one obtains a map S → X i.e. a3 = e9 · e2 · e3 · e8 · e9 1 an element of the fundamental group of X . −1 a4 = e9 · e · e4 We start by describing π (X1). Recall that X1 2 1 −1 −1 is an oriented graph. Let T ⊂ X1 be a maximal a5 = e9 · e2 · e5 · e9 −1 −1 −1 tree. T consists of all the vertices but it avoids a6 = e9 · e2 · e6 · e8 · e9 loops. In particular, it is contractible. Select a a7 = e9 · e8 · e7. vertex v ∈ T as a base point. For each remaining 1 edge ei, 1 ≤ i ≤ n, choose paths pi and qi in In this case for the 1-skeleton (X2) the fun- 1 T that connects the two vertices of ei, the source damental group π1((X2) ) is the free group and the target, to the vertex v. Consider the loop F6 on 6 generators. a = p · e · q that consists of traversing p , e , i i i i i i 1 q . Then π (X1, v) is the free group generated by Next we move to π2(X,X ). First we show i 1 2 that each characteristic map Φj : D → X, 1 ≤ the homotopy classes of loops ai: j ≤ m, can be interpreted as an element of the 1 ∼ π1(X ) = F (a1, ··· , an). relative homotopy group. Choose a path βj in

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 7 2 T from the point Φj(∗) to v. Let Φ˜ j : D → we can calculate what the fundamental group is X denote the deformation of Φj along βj. Then in each case: Φ˜ j satisfies the requirements for a map to be in 2 the relative homotopy group. Thus its homotopy π1(T ) = Z × Z and π1(RP ) = Z2. 1 class [Φ˜ j] belongs to π2(X,X ). Now the fundamental sequence is giving us a pre- sentation for these groups. That is we have Example 4.2. In Fig. (5) the 2-cells in both cases are labeled by Cj. Let us consider the torus F7/Im(∂) = Z × Z and F6/Im(∂) = Z2. 2 case. We think of C1 as a map Φ1 : D → X 2 This can be verified by considering all the rela- where the base point ∗ ∈ D is mapped to v1, 2 −1 tions imposed by the characteristic maps. the boundary ∂D traverses e1 · e2 · e9 , and the interior of the disk is mapped homeomorphically 4.4 Evaluation on a disk to the face C1. We orient each face in the clock- wise direction. In this case we do not need to We study the evaluation of the coycle τ on a drag the characteristic map along a path since disk and relate it to the path operator associated 2 each face contains the base point v1. In the RP to the boundary. We assume that (L, M, , τ), case there are faces not containing the base point which we used to construct X, has an operator v1, such as C2 and C5. We can connect them to realization T : L → U(n). v1 by dragging along the path e9. So after drag- Recall that the 2-cells of X encodes the oper- ˜ 2 ging we think of C2 as a map Φ2 : D → X whose ator relations in Eq. (1). We express this using −1 −1 −1 boundary traverses e9 · e2 · e3 · e8 · e9 . We do the characteristic map. Given a map g : Y → X a similar construction for C5. we write g∗τ for the pullback of the cocycle. We will apply this construction to characteristic 2 4.3 Action of the fundamental group maps. Let Φj : D → X denote the characteristic 1 map of the 2-cell that corresponds to the context There is an action of π1(X ) on the relative ho- motopy group. Let γ be a loop in X1 based at v Cj ∈ M. We rewrite Eq. (1) using the path op- and Φ: D2 → X be a map representing an ele- erator notation: ment of the relative homotopy group. Then the Φ∗τ(D2) T 2 = ω j . (6) map γΦ obtained from the action of γ on Φ is Φj (∂D ) given by the deformation Φ˜ γ of Φ along γ. The ∗ Here Φj τ means that the cocyle τ is regarded as boundary map ∂ respects this action in the sense 2 a 2-cocycle on D via the map Φj. Therefore that we can evaluate it on the whole disk to obtain ∂(γΦ) = γ · ∂Φ · γ−1. (5) ∗ 2 the number Φj τ(D ). Another point is that the Now we can conclude our description of the rel- action of a path γ on the characteristic map does ative homotopy group. The key technical tool is not change the operator the approximation result given in Lemma A.1 of T 2 =T 2 −1 §A. This result reduces considerations to combi- γΦj (∂D ) γ·Φj (∂D )·γ −1 2 natorial maps. As a result the relative homotopy =TγTΦj (∂D )Tγ (7) 1 group π2(X,X ) is generated by 2 =TΦj (∂D ) ˜ 1 [γΦj] where [γ] ∈ π1(X ), 1 ≤ j ≤ m. as a consequence of Eq. (5) and Eq. (6). Combining this with the fundamental exact se- The key observation is a generalization of quence gives us a presentation of the fundamental Eq. (6). Instead of evaluating τ on a disk using a characteristic map Φj we consider the general group π1(X) as well as a description of π2(X) in case of a cellular map g : D2 → X. We can ask terms of the characteristic maps of the 2-cells of ∗ X. about the result of evaluating the cochain g τ on the whole disk. The result turns out to be exactly the path operator associated to the loop g(∂D2). Example 4.3. As we know that the gluing in Fig. (5) produces a torus and a projective plane

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 8 Lemma 4.4. For a combinatorial map g : D2 → h∗τ = h0∗τ. This is the homotopy invariance of X we have cohomology. In the following we will approximate an arbitrary map by a combinatorial map to be g∗τ(D2) Tg(∂D2) = ω . able to apply Lemma 4.4. Roughly, the idea is to think of a sphere as composed of two disks Proof. By definition of a combinatorial map, g glued along their boundary and use Lemma 4.4 satisfies the two properties for each disk to conclude that evaluation of τ on • on some 2-cells g acts as a (signed) charac- each piece is the same as the product of the op- ± erators on the boundary. Since the boundary of teristic map Φj , 1 ≤ l ≤ r, l the disks are oriented oppositely these products • the remaining 2-cells are product cells and cancel out exactly. they are collapsed to a 1-cell or a 0-cell.

A product cell (define more precisely in §A) is Lemma 4.5. For any map h : S2 → X, where a rectangular region with horizontal boundary X is an arbitrary topological realization, we have components h1, h2 and vertical boundary compo- h∗τ(S2) = 0. nents v1, v2. Parallel boundary components are oriented in the same direction. Without loss of Proof. The fundamental sequence Eq. (4) implies generality we can assume g collapses the vertical that [h] ∈ π2(X) can be written as an element [Φ] 1 direction of this cell. Therefore Tv1 and Tv2 are in the relative homotopy group π1(X,X ) such 1 both equal to the identity operator. On the other that ∂[Φ] = 1 in π1(X ). Moreover by Lemma hand Th1 = Th2 . Therefore the operator assigned A.1 we can first deform ∂Φ to a combinatorial to the boundary of a product cell is given by the loop, and then we can deform the resulting map identity operator. We can remove the product to a combinatorial map on the whole disk. Thus cells one by one to obtain h is homotopic to a combinatorial map Φ: D2 →

r r X such that ∂Φ is a contractible loop in the 1- Y Y ±1 skeleton X1. Since homotopic maps induce the Tg(∂D2) = TΦ±1(∂D2) = T 2 . j Φjl (∂D ) ∗ ∗ l=1 l l=1 same map in cohomology we have h τ = Φ τ and applying Lemma 4.4 to Φ we obtain Note that D2 is a compact space, and there are h∗τ(S2) Φ∗τ(D2) only finitely many cells. Therefore the elimina- ω = ω = T∂Φ(D2). tion process eventually terminates. Using Eq. (6) ∗ for each jl gives us the evaluation of g τ on the It remains to calculate T∂Φ(D2). As a conse- whole disk since the product cells do not con- quence of contractability of ∂Φ there exists a map tribute to the evaluation. Φ:¯ D2 → X1 ⊂ X that extends the combinato- rial map ∂Φ. Up to homotopy we can assume Φ¯ is also combinatorial (Lemma A.1). The cell struc- 4.5 Non-magic arrangements ture on D2 consists of only product cells since the image of Φ¯ is a path. Now we can apply Lemma A connected space whose fundamental group is 4.4 to Φ¯: trivial is called a simply connected space [33]. We will consider a simply connected topological real- Φ¯ ∗τ(D2) T∂Φ(D2) = T∂Φ(¯ D2) = ω = I ization X. Since X is a 2-dimensional cell com- plex Hurewicz theorem [33, Corollary 4.33] im- since product cells do not contribute to the eval- plies that X is homotopy equivalent to a wedge uation of the cocycle. sum of 2-spheres. Wedge sum means that the spheres are glued as a single point. For a pair of spheres the resulting space is denoted by S2 ∨S2. Now we come to our generalization of Therefore we need to understand how τ evaluates Arkhipov’s result on restricted arrangements, i.e. on spheres. So we consider a map h : S2 → X. each observable belongs exactly to two contexts, The cochain h∗τ defined on the sphere only de- that the arrangement is magic only if the inter- pends on the homotopy class of h. That is if section graph is non-planar. h0 is another such map homotopic to h then

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 9 Theorem 4.6. If an arrangement (L, M) is Remark 4.7. In fact Theorem 4.6 is more gen- topologically realizable by a simply connected eral. Stated for operator realizations it says that space X then it is non-magic. if (L, M, , τ) can be topologically realized by a simply connected space and it has an operator re- Proof. Non-magic means that either there is no alization then it can also be classically realized. quantum realization or if there is one then we need to show that it has a classical realiza- tion. Suppose that there is a quantum realiza- tion for some τ. As we observed above X can be continuously deformed into a wedge of spheres S2 ∨ · · · ∨ S2. This decomposes the cohomology as 5 Representation of the fundamental 2 ∼ 2 2 2 2 group H (X, Zd) = H (S , Zd) ⊕ · · · ⊕ H (S , Zd).

By Lemma 4.5 the cocycle τ vanishes on each sphere. This implies that [τ] = 0, or equivalently, In this section we reinterpret Lemma 4.4 and pro- there exists a function c : L → Zd such that duce a projective representation of π1(X). This dc = τ. This function gives the desired classical refined approach will allow us to improve Theo- realization. rem 4.6.

Figure 5: Two different ways of orienting the edges of the surface realizing the Mermin square. Right one is the projective plane RP 2 and the left one is the torus. Blue edges correspond to a possible choice for a maximal tree T . The edges are labeled by ei, vertices by vk, and contexts by Cj.

5.1 Definition of the representation

Let T : L → U(n) be an operator realization for the data (L, M, , τ). Given a topological real- ization X of the signed arrangement (L, M) we can consider the assignment Figure 6: The boundary of the disk is mapped to the two paths that are homotopic. p 7→ Tp from a loop S1 → X (combinatorial map) at v to Fig.6) gives us the unitary matrices. Lemma 4.4 says that if p is homotopic to q, written as p ∼ q, then the disk 2 H∗τ(D2) −1 ∗ H : D → X which realizes this homotopy (see ω = TH (∂D2) = TpTq .

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 10 α α(ai) α ˜ Here the homotopy p ∼ q is thought of as a map Tai = ω Tai . Then T = T ◦ ρ and we obtain from the disk that sends the upper half of the that T α(Im ∂) = T˜◦ρ(Im ∂) = I by exactness i.e. boundary to p and the lower half to q. As a result ρ ∂ is the identity map. α we obtain that Tp and Tq differ by a scalar, writ- Conversely, if there exists α such that T maps α ten as Tp ∼ω Tq. So modulo the scalar subgroup the image of ∂ to I that means T descends to a hωi we obtain a well-defined homomorphism homomorphism T˜ : π1(X) → U(n) which turns out to be a lift of T . Here we use the presentation T : π1(X) → U(n)/hωi, [p] 7→ [Tp] of π1(X) given by the upper row of Eq. (8). where [Tp] denotes the equivalence class of the operator under ∼ω. 5.3 Classical realization as linearization We describe the link between the projective repre- 5.2 Linearization sentation of the fundamental group and the clas- An equivalent way of thinking about this repre- sical realization problem. This result will be used sentation is to consider the fundamental sequence to generalize Theorem 4.6. (see Eq.4) of X:

ρ π (X,X1) ∂ π (X1) π (X) Lemma 5.2. Suppose that p, q are two loops in 2 1 1 1 1 X such that [p] = [q] in π1(X ). Regarding p 0 T T and q as paths in X we have Tp = Tq. hωi U(n) U(n)/hωi Proof. The idea is similar to the proof of Lemma (8) 4.5. Let H : D2 → X1 denote the map that re- This makes the construction more concrete since alizes the homotopy between p and q. We can 0 T can be chosen more specifically using the iso- assume H is combinatorial as usual. Compos- 1 ∼ morphism π1(X ) = F (a1, ··· , an). We set ing H with the inclusion X1 ⊂ X we can apply 0 Lemma 4.4 to H and obtain T (ai) = Tai −1 τ ∗H(D2) and extend it to a homomorphism on the free TpTq = TH(∂D2) = ω = I group. Given a function α : {a , ··· , a } → let since the combinatorial map H collapses all the 1 k Zd 2 α 1 cells of D . us define a new homomorphism T : π1(X ) → U(n) by setting T α(a ) = ωα(ai)T 0(a ). Let Im ∂ i i As π (X,X1) is generated by the homotopy denote the image of the homomorphism ∂. 2 classes of the elements γΦ˜ j the image of ∂ is generated by ∂(γΦ˜ j). We can expand this ele- Lemma 5.1. The projective representation T : ment as a word in the generators a1, ··· , ak of the free group, say as a sequence a1 ··· ar where π1(X) → U(n)/hωi can be linearized i.e. it lifts i1 ir to a linear representation T˜ making the diagram l = ±1. Then applying Lemma 5.2 to the ho- motopic paths ∂(γΦ˜ ) and a1 ··· ar and using commute j i1 ir Eq. (7) gives U(n) r T˜ ∗ 2 Φj τ(D ) Y l ω = TΦ (∂D2) = T ˜ 2 = T . (9) j γΦj (∂D ) ail T l=1 π1(X) U(n)/hωi if and only if there exists a function α such that T α(Im ∂) = I. Example 5.3. Let us express the loop relations Proof. Assume that the lift T˜ exists. Let us write Eq. (9) for the Mermin square, see Fig. (5). We a¯i for the image of a generator under the quo- will use the loops ai as defined in Example 4.1. 1 ˜ tient map ρ : π1(X ) → π1(X). Then T (¯ai) has For notational simplification we write Ti for Tai , α(ai) 0 ∗ 2 to be ω T (ai) for some α(ai) ∈ Zd by com- and τj for τ(Cj) (also means Φj τ(D )). We start mutativity of the diagram in Eq. (8). We can set with the torus case. With our choice of ai loops

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 11 the relations imposed by the characteristic maps T4 = −1. We have [τ] 6= 0 and thus no clas- can be written as sical realization exists. This is the case for the Mermin star: τ1 T1T2 = ω 2 −1 τ2 (T4) = (X1)(X1X2)(Z2) = −1 T2 T3 = ω −1 −1 τ3 T4T7 T3 = ω where we used the usual operator realiza- −1 −1 τ4 tion. T5 T4 = ω −1 τ5 T5T6 = ω • d odd: Eq. (10) has an interesting conse- −1 τ6 quence. We can invert 2 to obtain T6T7T1 = ω . P6 (−τ1+ τi)/2 If we multiply these equations in the given order T4 = ω i=2 then we end up with the equation and therefore Ti ∼ω I for all i. Therefore P6 τi [T1,T4] = ω i=1 . for any operator realization T the loop op- erators turns out to be a scalar. To solve We can verify this on Mermin square. In the pro- the classical realization problem we can use jective plane case we get more information from the assignment: ei 7→ Tai , which is a scalar, the loop relations. They are given by and the rest of the edges e∈ / T maps to 1. This assignment satisfies the required re- T = ωτ1 1 lations and is a valid classical realization. τ2 T3 = ω From the representation point of view, we −1 −1 τ3 T4T7 T3 = ω have that T : π1(X) → U(n)/hωi is the triv- ial representation for any operator realiza- T T −1 = ωτ4 4 5 tion T . Therefore a lift always exists. −1 τ5 T5T6 = ω τ6 T6T7T1 = ω . Remark 5.4. This illustrates the benefit of Using these equations we obtain: T = 7 rewriting the operator relations as loop relations. ω−τ2−τ3 T , T = ω−τ4 T , T = ω−τ4−τ5 T , T = 4 5 4 6 4 7 As we also observed there is a strong connection ωτ4+τ5+τ6−τ1 T −1. Thus T ∼ T ±1 for 5 ≤ i ≤ 7. 4 i ω 4 between linearization of the projective represen- Comparing the two expressions for T we obtain 7 tation and the existence of classical realization. P6 2 −τ1+ τi Next we make this connection precise. (T4) = ω i=2 . (10)

In particular we see that T 0 : π(X1) → U(n) has image given by an abelian group since all the Ti Theorem 5.5. The data (L, M, τ) together with commute with each other. Now let us consider an operator realization T : L → U(n) induces a different cases for d: projective representation T : π1(X) → U(n)/hωi • d = 2: When ω = −1 Eq. (10) becomes such that the following are equivalent: 2 T4 = ±1. First assume that T4 = 1, in other • There exists a classical realization of P words, τi = 0. This means that [τ] = 0 (L, M, τ). 2 in H (X, Z2) and thus we have a classical realization. Note that the projective repre- • T can be lifted to a linear representation. sentation lifts to a linear representation in Proof. Suppose that T lifts to a linear represen- this case. Since each Ti has order 2 the im- ˜ 0 tation T : π1(X) → U(n). By Lemma 5.1 for age of T is an elementary abelian 2-group. some α we have T α(Im ∂) = I. Using α let us We can simply send define a classical realization c : L → Zd by set- ting c(ei) = −α(ai) for each edge ei correspond- ρ[ai] 7→ Ti. ing to the generator ai, and set c(a) = 0 for the This defines a group homomorphism T˜ : remaining labels in L. Recall that ai were origi- π1(X) → U(n). For the other case where nally defined form edges ei that lie outside of the

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 12 maximal tree T . We claim that c is a classical is, in fact, a direct consequence of the fact that 2 2 2 realization for τ. We regard c as an operator re- π1(RP ) = Z2 which implies H (RP , Zd) = 0 alization C : L → U(1). This way we can apply when d is odd. the results obtained for operator realizations. We need to check that dc(Cj) = τ(Cj). In terms of 6 Quantum realizations and the algo- operator realizations this is equivalent to showing

2 2 rithmic approach CΦj (∂D ) = TΦj (∂D ) as a consequence of Lemma 4.4 and the definition of C. Applying Eq. (9) to both C and T (taking γ the trivial path) we can 6.1 Quantum realization replace ∂Φ˜ with the homotopic path a1 ··· ar . j i1 ir We have defined the operator realization with- Now we calculate out the requirement that the operators in each r context must commute. Therefore a quantum re- −1 Y α(a )    il l C 1 r T 1 r = (ω Tai ) alization is an operator realization such that for a ···a ai ···ai l i1 ir 1 r (11) l=1 each context C ∈ M the operators {Ta| a ∈ C} =T α(a1 ··· ar ) = I i1 ir pairwise commute. We would like to understand the effect of the commutativity requirement on since a1 ··· ar = ∂[Φ˜ ] lies in the image of ∂. i1 ir j the topological realizations. Conversely, let c : L → Zd be a classical re- We will modify our definition of a topologi- alization. Let α(ai) = −c(ei) and consider the cal realization to accommodate the extra require- operators T α. Lemma 5.1 implies that to show ment imposed by commutativity. For an operator that there exits a lift it suffices to check that realization we constructed a cell complex Xsing T α(a1 ··· ar ) = I for any product a1 ··· ar that i1 ir i1 ir with a single vertex. Given the constraints the lies in the image of ∂. Since c is a classical realiza- definition of this cell complex is unique. Then we tion Lemma 4.4 implies that Ca1 ···ar = Ta1 ···ar . defined a topological realization X to be a cell i1 ir i1 ir Using Eq. (11) we find that T α(a1 ··· ar ) = I. complex with the same set of 1-cells and 2-cells i ir 1 but except possibly more than just a single ver- tex. The way the 2-cells are glued in the new com- plex must be compatible with Xsing i.e. comes with a map of cell complexes X → Xsing. Under Corollary 5.6. If (L, M) has a topological real- this map the multiple vertices are identified to a ization X such that π1(X) is a finite group whose single vertex. order is coprime to d then any operator realizable When we pass to quantum realizations, due τ is classically realizable. to the commutativity condition, the definition of Proof. Let T be an operator realization of τ. By Xsing is no longer unique since we can always per- Theorem 5.5 it suffices to show that there exists a mute the labels in a given context. Alternatively if we fix Xsing then we can allow a more flexi- lift T˜ : π1(X) → U(n). Let G denote the quotient ble notion of a topological realization that takes group T (π1(X)). Similarly G is a finite group and its order is coprime to d. To see that the lift T˜ commutativity into account. We choose the lat- exists it suffices to show that any extension ter approach.

1 → hωi → G˜ → G → 1 (12) Definition 6.1. Given a quantum realization and a fixed choice of Xsing, a commutative topo- splits. The extension splits as a consequence logical realization is a cell complex X together of the Schur-Zassenhaus theorem [34, Theorem with a map of chain complexes 7.41]. This theorem says that when the order of r : C (X) → C (X ) the quotient group G is coprime to the order of ∗ ∗ ∗ sing the kernel hωi then every extension splits. such that r1 : C1(X) → C1(Xsing) and r2 : C (X) → C (X ) are isomorphisms. As we have observed in Example 5.3 that for 2 2 sing projective plane realization of the Mermin square As it is reflected in this definition the commu- and d is odd any operator relation has a classi- tation requirement “abelianizes" the geometric re- cal solution. From the corollary we see that this quirement of having a map of cell complexes to

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 13 just having a map of chain complexes. This relax- Combining them we obtain ation amounts for the freedom of permuting the 2τ(X) labeling within contexts when we realize it topo- ω = 1. logically. To compare the two versions, for a fixed But when d is odd, this equation implies that choice of Xsing a topological realization asks for τ(X) = 0. Equivalently, the arrangement is non- a map of cell complexes X → Xsing, whereas a commutative topological realization only requires magic. a map of chain complexes C∗(X) → C∗(Xsing).

6.2 Orientation reversing

A typical example of a commutative topological realization that is not allowed in the operator re- alization case can be obtained by reversing the orientation of each cell. For a cell complex X let us denote by X¯ the cell complex obtained from X by reversing the orientation of its edges, and re- Figure 7: Reversing the orientation of the cells. versing the orientation of its 2-cells. If X → Xsing is a cellular map, contracting all vertices to a single vertex, there may not be a cellular map 6.3 Raising constraints to a power X¯ → Xsing. But there is a map of chain com- Another special feature of quantum realizations plexes C∗(X¯) → C∗(Xsing), send a generator cor- responding to an edge or a face to its negative. is that given a constraint ¯ Therefore X 7→ X is an operation that is avail- k able only for the quantum realizations. Y (ai) τ(C) Tai = ω i=1 and a natural number m we can take the m-th Example 6.2. Let us consider the Mermin power of both sides. Using commutativity we ob- square example. In Fig. (7) we see two choices tain a new constraint of orientations for the cells. Let Xsing denote the complex obtained from X by identifying all k Y m(ai) mτ(C) the vertices. We see that X¯ does not admit a Tai = ω . i=1 cellular map to Xsing. The reason is that, for ex- ample, the top cell is glued in the wrong order: This is a very useful property which allows one to ACD−1 versus AD−1C. But when we pass to concentrate on a prime divisor of d. Thus if {Ta} chain complexes the order does not matter, and is a quantum realization for (L, M, , τ) then also a chain map exists. Next we illustrate an appli- m {Ta } is a quantum realization for the same ar- cation of the orientation reversing operation to rangement. deduce that the Mermin square arrangement is We are interested in quantum realizations with non-magic for d odd. Suppose that there is a d Ta = I for a fixed d. To emphasize dependence quantum realization T for a given τ. Note that on d let us denote a quantum realization by (T, d). on a 2-cell Φ : D2 → X and its orientation re- j Let pi denote the prime divisors of d so that we ¯ 2 ¯ versed version Φj : D → X the evaluation of τ can write gives the same result since the operators placed t Y αi on the edges of the boundary pairwise commute. d = pi . Therefore evaluation of τ on the whole surface is i=1 αi the same in both cases. Let us write τ(X) for For a fixed j let us write dj for the product of pi αj this common value. At the boundary we get two where i 6= j. So that we have dj = d/pj . We dj different equations can raise each operator Ta to the dj-th power Ta . α dj j We will write (T , pj ) for the resulting quan- ABA−1B−1 = ωτ(X), BAB−1A−1 = ωτ(X). tum realization. Our construction was in such a

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 14 way that the new operators have order given by As a consequence of this observation for quan- a prime power. This follows from tum realizations we can always restrict to the

α α prime power case. This restriction also simplifies d j j j pj dj pj d (Ta ) = (Ta) = Ta = I. any algorithmic approach that checks whether a given arrangement is magic or not. Next we will Similarly τ can be broken into prime power explain the interplay between the topological and pieces. For a context C we define τ (C) to be j algorithmic approaches. We start with the rela- the product d τ(C). We write τ for the result- j j tively simpler scenario of one-relator groups. ing assignment M → Z αj . pj Our goal is to “glue" a given set of classical 6.4 One-relator groups realizations for each “prime" piece τj to construct a classical realization for τ. A convenient way of describing a group is to write down a presentation. A presentation consists of a set of generators and a set of relations. If there is Proposition 6.3. Given (L, M, τ) and a quan- a presentation consisting of only a single relation tum realization T the following are equivalent then the group is called a one-relator group. For • τ is classically realizable; example, the fundamental sequence in Eq. (4) is a presentation of the fundamental group π1(X). • τj is classically realizable for each prime di- This group is not necessarily a one-relator group. visor pj of d. When we restrict our setting to Arkhipov’s where Proof. One direction is immediate. Namely given only certain types of arrangements are allowed the fundamental group becomes a surface group, a classical realization c : M → Zd for τ we can simply set cj(C) = djc(C) to obtain a classical re- in particular a one-relator group. alization for τj as a consequence of pairwise com- Let us suppose each observable belongs to ex- mutativity of operator constrains in each context. actly two contexts for the moment. Then the in- Conversely, given classical realizations cj we tersection graph G can be embedded into a closed would like to construct a global c that works for surface Σg of minimal genus. We can use this sur- Qt αi face as a topological realization in our framework. d. Recall that we have d = i=1 pi . The abelian group d factors into a product α1 ×· · ·× αt . Its fundamental group is given by Z Zp1 Zpt (For example Z6 = Z2 × Z3.) Regard dj, after αj π1(Σg) = ha1, b1, ··· , ag, bg| [a1, b1] ··· [ag, bg] = 1i reducing mod pj , as an element of Z αj . There- pj fore θ = (d1, ··· , dt) specifies an element in Zd. and we have a single relation given by the van- We want to construct a multiplicative inverse to ishing of the product of the commutators. More- θ. This can be done component-wise. Let wj be over we can apply Lemma 4.4 to this situation. the multiplicative inverse of d in the group αj . j Zp The surface Σg can be obtained from a disk j −1 −1 Then the element w = (w1, ··· , wt) is the inverse whose edges are labeled by ai, bi, ai , bi where 1 ≤ i ≤ g. We can think of this as a (combinato- of θ i.e. θw = 1 in Zd. This equation can also be written as rial) map 2 t D → Σg X diwi = 1 mod d. identifying the boundary with the sequence of i=1 loops in the surface described by the partitioning Therefore we can write of the boundary. For a set of operator constraints t t Lemma 4.4 applies to give Y di wi X Ta = (Ta ) , τ = wiτi. τ(Σg) i=1 i=1 [Ta1 ,Tb1 ] ··· [Tag ,Tbg ] = ω Hence the classical realization defined by that is evaluation of τ on the whole surface can t X be computed from the product of the operators c = wici on the boundary, which is given by the product i=1 of the commutators. Note that this is the rela- will be a classical realization for τ. tion defining the fundamental group of the surface

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 15 realizing the operator constraints. Alternatively, where it is also assumed that d = 2. The equiv- we can read this equality in terms of the product alence of the two conditions is proved in [17, of the constraints Proposition 10 & 11]. ! We would like to generalize this result by mak- Y Y [Ta1 ,Tb1 ] ··· [Tag ,Tbg ] = Ta . (13) ing a connection to Theorem 5.5. The projective C∈M a∈C representation defined there can be modified by Now the restriction that each observable belongs replacing the unitary group U(n) by the solution to two contexts (or more generally even number of group. Given a (combinatorial) path p specified (ai) contexts) implies that the existence of a classical by a sequence of edges ai in X we define the realization forces the right-hand side of Eq. (13) group element to be equal to 1. This is an AvN type of argument k [25]. Y (ai) gp = gai . i=1 6.5 Solution group Then the assignment [p] 7→ gp gives a group ho- It is possible to assign an abstract group for a set momorphism of operator constraints [29, 30]. We will consider θ : π (X) → G.¯ the quantum case by imposing the commutativity 1 constraint in each context. Recall that L denotes Then Theorem 5.5 takes the following form. the label set, i.e. the union of the contexts in M, also corresponds to the set of edges of a topologi- cal realization, and τ is a function M → Zd. The Corollary 6.4. The following conditions are solution group G is generated by ga where a ∈ L, equivalent: and J satisfying • There exists a classical realization for the set d d • J = (ga) = 1 for all a ∈ L; of constraints; ¯ ˜ • [J, ga] = 1 for all a ∈ L; • θ : π1(X) → G lifts to a homomorphism θ :

2 π1(X) → G. • [ga, gb] = 1 for all a, b ∈ C and C ∈ M; This result is the generalization of the equiva- • For each C ∈ M there is a relation of the lence between the existence of a classical realiza- form Y τ(C) tion and the product of all the constraints being ga = J . equal to 1, that holds in the restricted setting of a∈C Arkhipov. To illustrate this we consider the one- We denote the quotient group G/hJi by G¯. We relator case of surface groups. Eq. (13), obtained can think of this as a central extension of groups from Lemma 4.4, also holds in G, that is we have g ! 1 → hJi → G → G¯ → 1. Y Y Y [gai , gbi ] = ga (15) Note that J replaces the role of ωI in the unitary i=1 C∈M a∈C group. since its derivation does not depend on the uni- Going back to the restricted setting of tary group. Note that the lift θ˜ exists if and only Arkhipov the algorithmic approach as explained if the right-hand side of Eq. (15) is equal to 1. On in [29] decides about existence of classical realiza- the other hand, a classical realization exists if and tions by checking the right-hand side of Eq. (13) only if the right-hand side gives us 1. Thus this in the solution group. That is existence of a clas- illustrates Corollary 6.4 in the restricted setting sical realization is equivalent to the condition that of Arkhipov. the product of the constrains satisfy ! 6.6 General case Y Y ga = 1 in G, (14) C∈M a∈C So far we have looked at the relationship between the topological approach and the algorithmic ap- 2 For operator realizations we remove this condition. proach in the restricted types of contexts and

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 16 the case where d = 2. For arbitrary d and ar- a magic arrangement. Moreover, quantum real- bitrary collection of contexts the algorithmic ap- izations can be studied one prime at a time, that proach breaks down. That is checking the value of is we loose no generality by restricting d to be a the product of all the constraints in the solution prime power. All these observations can be com- group does not indicate anything about classical bined with the algorithmic approach that can be realizability. utilized by the Knuth–Bendix algorithm for in- Our approach solves this problem. We can stance. Dialing through different topological re- interpret Corollary 6.4 as follows. For a fixed alizations produce different sets of relations, gen- choice of topological realization X the fundamen- eralizing one-relation surface groups, whose ver- tal group π1(X) has a specific presentation ification is expected to vary in efficiency. Thus both approaches can be combined to study magic π1(X) = ha1, ··· , an| r1, ··· , rmi arrangements. with generators a and relations r . In the general i j Acknowledgments. This work is supported case the fundamental group is not necessarily a by NSERC (CO,RR), Cifar (RR), the Stewart one-relator group i.e. m ≥ 1. Corollary 6.4 says Blusson Quantum Matter Institute (CO). that we need to check whether θ˜ lifts to G, that is equivalently we need to check whether the re- lations ri also hold in G. If we write ri as an References equation wi = 1 for some word wi then one needs to verify in the group G the following set of equa- [1] John S Bell. On the Einstein Podolsky Rosen tions: paradox. Physics Physique Fizika, 1(3):195, θ˜(wi) = 1 where 1 ≤ i ≤ m. (16) 1964. [2] Simon Kochen and E. P. Specker. The This can be checked, for example, using the problem of hidden variables in quantum Knuth-Bendix algorithm [35, Chapter 12]. There mechanics. In The Logico-Algebraic Ap- is an extra freedom here, that is the choice of X. proach to Quantum Mechanics, pages 293– A different topological realization will change the 328. Springer Netherlands, 1975. DOI: relations ri to some other relations. Among these 10.1007/978-94-010-1795-4_17. different choices some of them would be more fa- [3] Sergey Bravyi and Alexei Kitaev. Univer- vorable in verifying Eq. (16) algorithmically. sal quantum computation with ideal clif- ford gates and noisy ancillas. Physical Re- 7 Conclusion view A, 71(2), feb 2005. DOI: 10.1103/phys- reva.71.022316. The goal of this work is to extend Arkhipov’s re- [4] Robert Raussendorf and Hans J. Briegel. A sult on magic arrangements. In the restricted sce- one-way quantum computer. Physical Re- nario where each observable belongs to exactly view Letters, 86(22):5188–5191, may . DOI: two contexts Arkhipov studied contextuality us- 10.1103/physrevlett.86.5188. ing the intersection graph. For arbitrary arrange- [5] Mark Howard, Joel Wallman, Victor Veitch, ments this graph theoretical tool is not available. and Joseph Emerson. Contextuality sup- We have overcome this difficulty by introducing plies the ‘magic’ for quantum computation. the notion of a topological realization. In this Nature, 510(7505):351–355, jun 2014. DOI: formulation we showed that an arrangement is 10.1038/nature13460. magic, in other words contextual, only if the fun- [6] Nicolas Delfosse, Philippe Allard Guerin, Ja- damental group of the topological realization is cob Bian, and Robert Raussendorf. Wigner non-trivial. We refined this approach further by function negativity and contextuality in defining a projective representation of the fun- quantum computation on rebits. Phys- damental group. A classical realization for the ical Review X, 5(2), apr 2015. DOI: given set of constraints can be regarded as a lin- 10.1103/physrevx.5.021003. earization of the representation. When the fun- [7] Robert Raussendorf, Dan E. Browne, Nico- damental group is finite divisibility of its order by las Delfosse, Cihan Okay, and Juan Bermejo- a prime divisor of d is required in order to have Vega. Contextuality and wigner-function

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 17 negativity in quantum computation. Bartlett, and Robert Raussendorf. Topolog- Physical Review A, 95(5), may 2017. DOI: ical proofs of contextuality in qunatum me- 10.1103/physreva.95.052334. chanics. Quantum Information & Computa- [8] Janet Anders and Dan E. Browne. Com- tion, 17(13-14):1135–1166, 2017. putational power of correlations. Physi- [19] Antonio Acín, Tobias Fritz, Anthony Lev- cal Review Letters, 102(5), feb 2009. DOI: errier, and Ana Belén Sainz. A combina- 10.1103/physrevlett.102.050502. torial approach to nonlocality and contex- [9] Matty J. Hoban and Dan E. Browne. tuality. Communications in Mathematical Stronger quantum correlations with Physics, 334(2):533–628, jan 2015. DOI: loophole-free postselection. Physical 10.1007/s00220-014-2260-1. Review Letters, 107(12), sep 2011. DOI: [20] R. W. Spekkens. Contextuality for prepa- 10.1103/physrevlett.107.120402. rations, transformations, and unsharp mea- [10] Robert Raussendorf. Contextuality in surements. Physical Review A, 71(5), may measurement-based quantum computation. 2005. DOI: 10.1103/physreva.71.052108. Physical Review A, 88(2), aug 2013. DOI: [21] Adan Cabello, Simone Severini, and An- 10.1103/physreva.88.022322. dreas Winter. (non-) contextuality of phys- [11] Samson Abramsky, Rui Soares Barbosa, ical theories as an axiom. arXiv preprint and Shane Mansfield. Contextual fraction arXiv:1010.2163, 2010. as a measure of contextuality. Physical [22] Nadish de Silva and Rui Soares Barbosa. Review Letters, 119(5), aug 2017. DOI: Contextuality and noncommutative geome- 10.1103/physrevlett.119.050504. try in quantum mechanics. Communica- [12] Markus Frembs, Sam Roberts, and tions in Mathematical Physics, 365(2):375– Stephen D Bartlett. Contextuality as 429, jan 2019. DOI: 10.1007/s00220-018- a resource for measurement-based quantum 3222-9. computation beyond . New Journal [23] Frank Roumen. Cohomology of effect alge- of Physics, 20(10):103011, oct 2018. DOI: bras. Electronic Proceedings in Theoretical 10.1088/1367-2630/aae3ad. Computer Science, 236:174–201, jan 2017. [13] Samson Abramsky and Adam Branden- DOI: 10.4204/eptcs.236.12. burger. The sheaf-theoretic structure of non- [24] Giovanni Carù. On the cohomology of con- locality and contextuality. New Journal of textuality. Electronic Proceedings in The- Physics, 13(11):113036, nov 2011. DOI: oretical Computer Science, 236:21–39, jan 10.1088/1367-2630/13/11/113036. 2017. DOI: 10.4204/eptcs.236.2. [14] A. Döring and C. Isham. “what is a thing?”: Topos theory in the foundations of physics. [25] Samson Abramsky, Rui Soares Barbosa, Ko- In New Structures for Physics, pages 753– hei Kishida, Raymond Lal, and Shane Mans- 937. Springer Berlin Heidelberg, 2010. DOI: field. Contextuality, cohomology and para- 10.1007/978-3-642-12821-9_13. dox. arXiv preprint arXiv:1502.03097, 2015. [15] A. Döring and C. J. Isham. A topos foun- [26] Giovanni Caru. Towards a complete coho- dation for theories of physics: I. formal lan- mology invariant for non-locality and con- guages for physics. Journal of Mathemati- textuality. arXiv preprint arXiv:1807.04203, cal Physics, 49(5):053515, may 2008. DOI: 2018. 10.1063/1.2883740. [27] Sivert Aasaess. Cohomology and the al- [16] Samson Abramsky, Shane Mansfield, and gebraic structure of contextuality in mea- Rui Soares Barbosa. The cohomology of non- surement based quantum computation. pre- locality and contextuality. Electronic Pro- sented at QPL, 2019. ceedings in Theoretical Computer Science, [28] N. David Mermin. Hidden variables and the 95:1–14, oct 2012. DOI: 10.4204/eptcs.95.1. two theorems of john bell. Reviews of Mod- [17] Alex Arkhipov. Extending and characteriz- ern Physics, 65(3):803–815, jul 1993. DOI: ing quantum magic games. arXiv preprint 10.1103/revmodphys.65.803. arXiv:1209.3819, 2012. [29] Petr Lisonek, Robert Raussendorf, and Vi- [18] Cihan Okay, Sam Roberts, Stephen D jaykumar Singh. Generalized parity proofs of

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 18 the kochen-specker theorem. arXiv preprint and combinatorial group theory, volume 197 arXiv:1401.3035, 2014. of London Mathematical Society Lecture [30] Richard Cleve, Li Liu, and William Slofs- Note Series. Cambridge University Press, tra. Perfect commuting-operator strategies Cambridge, 1993. ISBN 0-521-44700-3. DOI: for linear system games. Journal of Math- 10.1017/cbo9780511629358. ematical Physics, 58(1):012202, jan 2017. [33] Allen Hatcher. Algebraic topology. Cam- DOI: 10.1063/1.4973422. bridge University Press, Cambridge, 2002. [31] R. Cleve, P. Hoyer, B. Toner, and J. Wa- ISBN 0-521-79160-X; 0-521-79540-0. trous. Consequences and limits of non- [34] Joseph J Rotman. An introduction to the local strategies. In Proceedings. 19th theory of groups, volume 148. Springer Sci- IEEE Annual Conference on Computa- ence & Business Media, 2012. tional Complexity, 2004. IEEE. DOI: [35] Derek F Holt, Bettina Eick, and Eamonn A 10.1109/ccc.2004.1313847. O’Brien. Handbook of computational group [32] Cynthia Hog-Angeloni and Wolfgang Met- theory. Chapman and Hall/CRC, 2005. DOI: zler, editors. Two-dimensional homotopy 10.1201/9781420035216.

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 19 A Appendix: Topology of 2-dimensional complexes

In this section we describe some properties of cell complexes. In particular, we describe combinatorial complexes and combinatorial maps, which are the main technical tools to study the topology of 2- dimensional cell complexes. Notation: Following [33] we write A ⊂ B or A ⊃ B for set-theoretic containment, not necessarily proper. As a map an inclusion (monomorphism) is denoted by ,→ and a surjection (epimorphism) is denoted by .

A.1 Cell complexes n n n n Let D denote the unit disk in R , and S denote its boundary ∂D . A cell complex is constructed in the following way [33]: 1. Start with a set X0, called the set of 0-cells.

n n−1 n 2. Construct the n-skeleton X by attaching n-cells to X via the attaching maps φj : ∂Dj → Xn−1. n Each cell has a characteristic map denoted by Φj : Dj → X. A typical example is the following cell structure of a torus T . Let T 0 consist of a single point {∗}. Glue two 1-cells using the attaching maps ∂D1 → T 0 by sending both boundary points to ∗. The resulting object is the 1-skeleton T 1 and it is a bouquet of two circles, call these two loops α and β. Finally glue a 2-cell using the attaching map ∂D2 → T 1 by sending the boundary to the loop α · β · α−1 · β−1. A map f : X → Y between cell complexes is called cellular if f(Xn) ⊂ Y n. It is well known that any map is homotopic to a cellular map. For our purposes we need maps that have nicer properties than cellular maps in the sense that they are more combinatorial.

A.2 Combinatorial maps We will describe combinatorial maps only for 2-complexes [32, Chapter II, §1.2]. These types of cell complexes are more rigid in structure and can be manipulated much easier. We need the notion of a product cell.A 2-cell is a product cell if it is described by a map φ : D1 × D1 → X such that φ(D1 × {1}) and φ(D1 × {−1}) are 1-cells of X. Product cells can be collapsed in a special way. Let f : X → Y be a cellular map. This map collapses the product cell φ if f restricts to the same function on φ(D1 × {t}) for all t ∈ D1. Thus the 2-cell is collapsed onto the image of the 1-cells φ(D1 × {±1}). We say a cellular map f : X → Y is combinatorial if • Every 1-cell of X is either mapped homeomorphically onto a 1-cell of Y or collapsed to a 0-cell • Every 2-cell of X is either mapped homeomorphically onto a 2-cell of Y or it is a product cell that is collapsed to a 1-cell or a 0-cell. A 2-complex is called combinatorial if the attaching map of every 2-cell is combinatorial. In this type of cell complexes the behavior of the attaching maps is simpler. But still the homotopy type captures all possible 2-dimensional cell complexes. Topological realizations introduced in the text are examples of combinatorial complexes. The rigidity of such complexes will be immensely useful to understand the relationship between path operators and the cocycle τ determining the product constraints. Up to homotopy cellular maps are always combinatorial as a consequence of the following technical Lemma.

Lemma A.1. [32, Chapter II Theorem 1.5, Theorem 1.8] Let X be a combinatorial 2-complex. • For a given map f : S1 → X1 there is a cell structure on S1 such that f is homotopic to a combinatorial map. • Let g : D2 → X be a map such that the restriction to the boundary is combinatorial. Then there is a cell structure on D2, extending the one on its boundary, such that g is homotopic (relative to the boundary) to a combinatorial map.

Accepted in Quantum 2019-12-09, click title to verify. Published under CC-BY 4.0. 20