AKLT-states as ZX-diagrams: diagrammatic reasoning for quantum states
Richard D. P. East, John van de Wetering, Nicholas Chancellor, Adolfo G. Grushin
AAKLT-states as ZX-diagrams: diagrammatic reasoning for quantum states
Richard D. P. East,
1, 2
John van de Wetering, Nicholas Chancellor, and Adolfo G. Grushin Univ. Grenoble Alpes, LIG, 38401 Saint-Martin-d’H`eres, France Univ. Grenoble Alpes, CNRS, Grenoble INP, Institut N´eel, 38000 Grenoble, France Radboud University Nijmegen, The Netherlands Durham University physics department and Durham-Newcastle Joint Quantum Centre, South Road, Durham UK (Dated: December 3, 2020)From Feynman diagrams to tensor networks, diagrammatic representations of computations inquantum mechanics have catalysed progress in physics. These diagrams represent the underlyingmathematical operations and aid physical interpretation, but cannot generally be computed withdirectly. In this paper we introduce the ZXH-calculus, a graphical language based on the ZX-calculus,that we use to represent and reason about many-body states entirely graphically. As a demonstration,we express the 1D AKLT state, a symmetry protected topological state, in the ZXH-calculus bydeveloping a representation of spins higher than 1/2 within the calculus. By exploiting the simplifyingpower of the ZXH-calculus rules we show how this representation straightforwardly recovers twoimportant properties, the existence of topologically protected edge states, and the non-vanishing of astring order parameter. We furthermore show how the AKLT matrix-product state representationcan be recovered from our diagrams. In addition, we provide an alternative proof that the 2D AKLTstate on a hexagonal lattice can be reduced to a graph state, demonstrating that it is a universalquantum computing resource. Our results show that the ZXH-calculus is a powerful language forrepresenting and computing with physical states entirely graphically, paving the way to develop moreefficient many-body algorithms.
I. INTRODUCTION
Representing involved mathematical formulas with sim-ple diagrams has been a common strategy to drive progressin physics. An important and widespread example areFeynman diagrams [1], where the often cumbersome inte-grals that predict the amplitude of a quantum field theoryprocess are ordered in perturbation theory with the aidof simple diagrammatic representations.A more recent example is the formulation of the quan-tum many-body problem in terms of tensor networks, thatare often represented diagrammatically [2, 3]. Tensor net-works have triggered the development of computationallyefficient variational algorithms that find an approximatesolution to many-body problems [4–10]. These formula-tions are based on efficient representations of quantumstates, for which matrix product states [11–13] (MPS)and projected entangled pair states (PEPS) [14, 15] areamong the most successful approaches. These states areoften represented diagrammatically as sites that connectto each other by legs that represent tensor contractions.Despite their unquestionable success in addressing thequantum many-body problem tensor networks have knownlimitations. For example, MPS are a one-dimensional(1D) representation of the wavefunction, which limit theirscope, while PEPS cannot be contracted both efficientlyand exactly [2, 16]. Additionally, there are limitationsto the type of states one can represent efficiently usingexisting tensor networks. MPS are well suited to describegapped Hamiltonians in one and two dimensions, but areless suited for critical states and higher dimensions [17–19].PEPS can handle both gapped and critical states and canbe defined in any dimension [20], but representing certainstates is challenging, notably states with chiral topologi- cal order [21–24]. Although many other tensor-networkmethods exist [2, 3], each tailored to solve different issues,finding novel ways to represent states is an open chal-lenge. The goal of this work is to propose a diagrammaticmethod to represent quantum states, that can also aidreasoning about them.Our proposal is based on a diagrammatic representationof quantum states with which we can compute directly, incontrast to the typical graphical representation of a tensornetwork which is merely a representation of the under-lying mathematical operations (the tensor contractions).We use
ZX-diagrams , a type of tensor network that comesequipped with a set of graphical rewrite rules known asthe
ZX-calculus . The ZX-calculus was developed to betterunderstand the foundations of quantum information andentanglement [25–27]. It has seen use in quantum circuitoptimisation [28–31], measurement-based quantum com-putation [32–34] and surface code lattice surgery [35–38].The goal of this paper is to explore how the ZX-calculuscan be used to represent quantum states, and to extracttheir useful physical properties.The power of the ZX-calculus stems from the fact thatwe can simplify a given diagram without calculating itsunderlying matrix: the diagram is the calculation. TheZX-calculus is complete , which means that any diagramsrepresenting the same linear map can be transformedinto one another entirely diagrammatically [39–42]. ZX-diagrams are generated by a small set of generators thatare symmetric tensors acting on a two-dimensional (2D)Hilbert space. While ZX-diagrams can in principle rep-resent any linear map between qubits, some particularlycanonical constructions are relatively hard to represent,in particular ‘AND-like’ constructions that are especiallyrelevant for this work. To remedy this problem, in 2018 a r X i v : . [ c ond - m a t . o t h e r] D ec (a) (c)(d)(b) (f) ProjectorSinglet AKLT state (e)
MPS equivalence spin-1spin-1/2
Figure 1. ZXH representation of the AKLT state. (a) and (b) show the singlet and symmetric projector and their ZHXrepresentation. These are the basic building blocks of the 1D AKLT state, shown pictorially in (c). (d) gives the MPSrepresentation of the 1D AKLT state, while (f) gives its ZXH representation, which consists of the components in (a) and (b).The shaded gray square in (f) highlights the part of the diagram from which one obtains the three MPS matrices M [ n ]+1 , M [ n ]0 , and M [ n ] − needed for the AKLT state. The diagrams of these matrices are shown in (e), and are obtained by fixing the physicalindex (highlighted by the magenta rectangles in (f)). the ZH-calculus was introduced [43]. It adds anothergenerator to the ZX-calculus, and suitable rewrite rulesto reason about it. In this paper we will develop anduse a slight variation on the ZH-calculus that we dub the
ZXH-calculus .The question we address in this work is to what ex-tent the ZXH-calculus can efficiently represent quantumstates, and simplify operations on them. We find thatthe ZXH-calculus presents some advantages comparedto existing formulations, and an evident potential forfurther advances. We demonstrate this by writing the1D AKLT and 2D hexagonal AKLT states [44, 45] asZXH-diagrams. For the 1D AKLT state we show that theZXH representation allows us to detect its string ordergraphically [46]. We also map the ZXH representationof the 1D AKLT state to its MPS representation [8], es-tablishing a bridge between graphical calculi and MPSrepresentations. To exemplify the power of the ZXH rep-resentation further, we prove entirely diagrammaticallythat the 2D AKLT state reduces to a graph state undera suitable set of measurements. This result, originallyproved in Ref. [47], can be used to show that the 2D AKLTstate is a universal resource for quantum computation.While Ref. [47] proved the reduction to a graph stateusing reasoning specific to their construction, in ZXHit follows directly using relatively simple and standarddiagrammatic rewrites. For these computations we haveused the
Python software package
PyZX to assist in the diagrammatic reasoning [48]. Many of the computa-tions we present in this paper are shown for pedagogicalpurposes only as they can be performed in an entirelyautomated manner by
PyZX , evidencing the power of us-ing the ZXH-calculus to represent these states. For thesecalculations see the accompanying Jupyter notebooks .The main difficulty in using the ZXH-calculus to rep-resent arbitrary quantum states is that all the indicesof the tensors in a ZX-diagram are of dimension two(i.e. they are spin-1/2 degrees of freedom). Hence, touse ZXH-diagrams to represent quantum states that livein larger Hilbert spaces (such as the spin-1 states in a1D AKLT state) we need to encode these larger Hilbertspaces into tensor products of two-dimensional Hilbertspaces. We solve this problem by resorting to the repre-sentation theory of SU (2), which tells us there is a unique N -dimensional representation given by the symmetricsubspace of N − C . Our construction of thissymmetriser in terms of simple tensors and its ties tothe representation theory of SU (2) might be of broaderinterest.As the intersection of readers familiar with both the ZX-calculus and the AKLT is probably quite narrow, we givea self-contained introduction to both. In Section II A wedescribe briefly what AKLT states are by introducing the You can find the accompanying Jupyter notebooks here. paradigmatic 1D AKLT state. In Section II B we presenta concise review of the ZX-calculus and its extension tothe ZXH-calculus. Then in Section III we represent the1D AKLT state in the ZXH-calculus and calculate withit. In Section IV we discuss how we can represent higherspin systems in the ZXH-calculus, and we use this inSection V to represent the 2D AKLT state on a hexagonallattice in the ZXH-calculus and to derive its reduction toa graph state fully diagrammatically. We end with someconcluding remarks in Section VI.
II. PRELIMINARIESA. Introduction to AKLT states
The one-dimensional AKLT Hamiltonian, named afterAffleck, Lieb, Kennedy and Tasaki, is defined as [44] H = (cid:88) i (cid:126)S i (cid:126)S i +1 + β ( (cid:126)S i (cid:126)S i +1 ) , (1)where β = 1 /
3. This Hamiltonian acts on a chain of N spin-1 degrees of freedom. Hence, the local Hilbert spaceat each site is C , on which we act with the spin opera-tor (cid:126)S i = ( S xi , S yi , S zi ), where the S ai are the 3 × N sites, ( C ) ⊗ N , can be rep-resented by N copies of the symmetric subspace of a pairof spin-1/2 particles. This decomposition is convenientto find the groundstate of the AKLT Hamiltonian Eq. (1)because this Hamiltonian can be written as a positive sumof spin s = 2 projectors on neighbouring sites. Hence, byfinding a state where two neighbouring spins are not inthe s = 2 subspace, we can construct the ground state ofthe AKLT Hamiltonian. Specifically, the groundstate canbe constructed by decomposing each spin-1 site into twospin-1/2 sites that form singlets between neighbouringsites (Fig. 1 (a)), and thus have a maximum s = 1. Thesetwo spin-1/2 sites are then projected back to the physical s = 1 at each site by the appropriate symmetrising pro-jectors (Fig. 1(b)). By construction, the resulting state,depicted in Fig. 1(c) is annihilated by the s = 2 projectors,and is therefore an exact ground state of Eq. (1). Werefer to this groundstate as the AKLT state .The AKLT state has two important physical propertiesthat we will express using the ZXH-calculus [46, 49, 50].The first property stems from the fact that terminatingthe chain necessarily breaks two singlets, one at each With periodic boundary conditions the groundstate of the AKLTHamiltonian is unique, but with open boundary conditions itis four-fold degenerate. When referring to ‘the AKLT state’ wedon’t distinguish open or boundary conditions, but rather meanall these possible states, as is common practice in the literature. edge, leaving two free spin-1/2 degrees of freedom at theedges. Since each spin-1/2 has a local Hilbert space of C (the dimensions corresponding to spin up or spin down),the AKLT state with open boundary conditions has adegeneracy of four (2 ).The second property that we wish to express using theZXH-calculus is that the AKLT state has a string or-der [46]. Namely, the AKLT state is a superposition of allspin configurations where, if we ignore the spins with s z =0, the remaining spins are ordered anti-ferromagnetically:a spin s z = ± s z = ∓ | j , j , · · · j N (cid:105) = | , , , , − , , , , (cid:105) is an allowedconfiguration, while | , , , , , , , (cid:105) is not. Analogousto how a spin-1/2 antiferromagnetic order can be cap-tured by an alternating spin-spin correlation function, thisstring order can be captured by defining a string orderparameter [46].The AKLT state has a simple MPS representation. Todescribe it we follow the notation of Ref. [8] from whichwe recall that any quantum state can be written as aproduct of matrices as | ψ (cid:105) = (cid:80) j , ··· j N (cid:80) α , ··· α N M [1] j α ,α · · · M [ N ] j N α N ,α N +1 | j , j , · · · j N (cid:105) . (2)The indices j i are called physical indices because they spanthe local Hilbert space at a given site n (e.g. j i = 0 , ± j i and n the M [ n ] j n α i α i +1 are matricesin the indices α i , known as bond indices . Although (2)is an exact representation of any state of a finite system,the maximum dimension of the bond indices needed towrite a given state, known as the bond dimension χ ,generally grows exponentially with system size. The bonddimension χ is a measure of the entanglement of the statewe wish to represent [8].The AKLT state can be written as an exact MPS ofbond dimension χ = 2. The local Hilbert space of eachsite consists of three spin-1 states and, with periodicboundary conditions, each site is equivalent. The AKLTis defined by the three matrices M [ n ]+1 = (cid:114) (cid:18) (cid:19) , M [ n ]0 = 1 √ (cid:18) − (cid:19) ,M [ n ] − = (cid:114) (cid:18) −
10 0 (cid:19) . (3)which are the same for all sites 1 < n < N in the bulk(see Fig. 1(d)).The ideas behind the AKLT state and their generali-sations are widely used to understand more complicatedcondensed matter systems [52], and used as well as com-putational tools [2]. The one-dimensional AKLT statecan also be generalized to two-dimensional lattices [45].The particular case we will consider in Section V is the Note that we do not sum over α and α N +1 . For periodicboundary conditions one sets α = α N +1 and sums over them. AKLT state on a hexagonal lattice with a spin-3/2 degreeof freedom at each site. It can be constructed using entan-gled pairs of spin-1/2 states projected to the appropriatesubspace. Hence the 2D AKLT state can be representedas a 2D PEPS with dimension D = 2 [15]. This state wasshown to be a universal source for measurement-basedquantum computation [47]. B. Introduction to the ZXH-calculus
In this paper we will use a graphical calculus that isa mixture of the ZX-calculus and the ZH-calculus. Forease of reference we dub this language the
ZXH-calculus .First, we provide a brief overview of the more well-knownZX-calculus. For an in-depth reference see Ref. [27].The ZX-calculus is a diagrammatic language similarto quantum circuit notation [25, 26]. A
ZX-diagram (orsimply diagram ) consists of wires and spiders . Wiresentering the diagram from the left are inputs ; wires exitingto the right are outputs . Given two diagrams we cancompose them by joining the outputs of the first to theinputs of the second, or form their tensor product bystacking the two diagrams.Spiders are linear operations which can have any num-ber of input or output wires. There are two varieties:Z-spiders depicted as green dots and X-spiders depictedas red dots, each of which can be labelled by a phase α ∈ R : α ... ... := | · · · (cid:105)(cid:104) · · · | + e iα | · · · (cid:105)(cid:104) · · · | (4) α ... ... := | + · · · + (cid:105)(cid:104) + · · · + | + e iα |− · · · −(cid:105)(cid:104)− · · · −| (5)Note that if you are reading this document in monochromeor otherwise have difficulty distinguishing green and red,Z-spiders will appear lightly-shaded and X-spiders darkly-shaded. ZX-diagrams are constructed iteratively fromthese spiders by composing them either sequentially, whichon the level of the linear map corresponds to the regularcomposition of linear maps, or by stacking them, whichforms the tensor product of the linear maps they represent.As a special case, diagrams with no inputs represent(unnormalised) state preparations, while diagrams withno open wires represent complex scalars.As a demonstration, let us write down some simplestate preparations and unitaries in the ZX-calculus:= | (cid:105) + | (cid:105) = √ | + (cid:105) (6)= | + (cid:105) + |−(cid:105) = √ | (cid:105) (7) α = | (cid:105)(cid:104) | + e iα | (cid:105)(cid:104) | = Z α (8) α = | + (cid:105)(cid:104) + | + e iα |−(cid:105)(cid:104)−| = X α (9) Note that, while (8) and (9) have a label α , we have notgiven a label to the state preparations (6) and (7). Byconvention, a spider without a label is taken to have alabel of 0. When we take α = π in (8) and (9) we getPauli matrices: π = Z π = X (10)By composing spiders we can make more complicatedlinear maps, such as the CNOT gate:= 1 √ ∝ CNOT (11)Here the symbol ‘ ∝ ’ denotes that the diagram is propor-tional to the gate, i.e. that there exists a global non-zeroscalar correction (in this case, the diagram needs to bemultiplied by √
2) that makes them exactly equal. Formany of the calculations in this paper, the exact scalarvalue will not be important. For clarity, we will in thosecases drop scalars implicitly. As above, we will write ∝ ina diagrammatic derivation to denote that the diagramsare merely equal up to a non-zero scalar.We can treat a ZX-diagram as a graphical depiction ofa tensor network, similar in style to the work of e.g. Pen-rose [53]. In this interpretation, a wire between twospiders denotes a tensor contraction. As tensors, Z andX spiders can be written as follows:( α ) j ...j n i ...i m = i = ... = i m = j = ... = j n = 0 e iα if i = ... = i m = j = ... = j n = 10 otherwise (12) ( α ) j ...j n i ...i m = (cid:16) √ (cid:17) n + m · (cid:26) e iα if (cid:76) α i α ⊕ (cid:76) β j β = 01 − e iα if (cid:76) α i α ⊕ (cid:76) β j β = 1 (13)where i α , j β range over { , } and ⊕ is addition modulo 2.ZX-diagrams have a number of symmetries that makethem easy to work with. In particular, we can treata ZX-diagram as an undirected (multi-)graph, so thatwe can move the vertices around in the plane, bending,unbending, crossing, and uncrossing wires, as long as theconnectivity and the order of the inputs and outputs ismaintained. These deformations of the diagram do notaffect the linear map it represents. Indeed, the readermight have noticed that in the CNOT diagram (11) wedrew a horizontal wire without explaining whether thisdenotes an input or an output from the Z- and X-spider.We are warranted in drawing it this way because:= (14)Besides these topological symmetries, ZX-diagrams havea set of rewrite rules associated to them, collectively β ... ... α ...... = ... ... ... α + β ( f ) − α = ππ α ... ... π ( π ) aπ ... α = ... aπ ( c ) aπ ( id ) = ( b ) e iαe iaα √ n − . . . n = (cid:0) √ (cid:1) ( n − m − m . . . . . .. . . m n n = 1/2 ( ho ) Figure 2. The rules of the ZX-calculus. These rules hold for all α, β ∈ [0 , π ), and a ∈ { , } . They also hold with the coloursred and green interchanged, and with inputs and outputs permuted freely. Note ‘...’ should be read as ‘0 or more’, hencethe spiders on the left-hand side of ( f ) are connected by one or more wires. Furthermore, the addition in ( f ) is taken to bemodulo 2 π . The right-hand side of ( b ) is a fully-connected bipartite graph. The rulenames stand respectively for ( f )use, ( π c )opy,( b )ialgebra, ( c )opy, ( id )entity and ( ho )pf. referred to as the ZX-calculus . See Figure 2 for a set ofthese rules. Note that these rules also hold with the Z-and X-spider interchanged (i.e. with the colours flipped).When doing diagrammatic derivations, we will often labelthe equalities with one of the rule names of Figure 2, suchas ( f ), to denote that rule was used there.In Figure 2 we use a hybrid notation of writing numbersin the diagram itself to denote the correct global scalarneeded to make the linear map of the two sides of thediagram exactly equal to one another. As noted above,we will sometimes drop these scalar factors when they arenot relevant to the derivation at hand.As a small demonstration of these rewrite rules, letus prove diagrammatically that the CNOT diagram (11)indeed acts like the CNOT. The computational basisstates are given by the following diagrams. | (cid:105) = π | (cid:105) = π | (cid:105) = ππ | (cid:105) =
12 12 12 12 (15)Then we can check that the diagram has the correct actionon these basis states: πππ ∝∝ π ππ π == ππ ( c ) ( f )( f )( c ) (16)ZX-diagrams were introduced over a decade ago [25] andhave proven useful for reasoning about Clifford computa-tion and single-qubit phase rotation gates [28, 35, 54]. Itis however harder to reason about certain logical construc-tions, in particular the AND operation | x (cid:105) ⊗ | y (cid:105) (cid:55)→ | x · y (cid:105) .For instance, the only way to represent a CCNOT gate(also commonly known as the Toffoli gate) in the ZX-calculus is to expand it into Clifford and phase gates. In 2018 a new graphical calculus was introduced to rem-edy this problem: the ZH-calculus [43]. This calculusadds another generator to the ZX-calculus that allowsfor a compact representation of an AND gate. This newgenerator is the
H-box : ... a ... nm := (cid:88) a i ...i m j ...j n | j . . . j n (cid:105) (cid:104) i . . . i m | (17)Here a can be any complex number, and the sum in thisequation is over all i , . . . , i m , j , . . . , j n ∈ { , } so thatan H-box represents a matrix where all entries are equalto 1, except for the bottom right element, which is a . Asa tensor we can write it as:( a ) j ...j n i ...i m = (cid:26) a if i = ... = i m = j = ... = j n = 11 otherwise (18)Whereas for spiders we only draw the phase on thespider when it is nonzero, for H-boxes we only draw thelabel when it is not equal to −
1. This is because the1-input, 1-output H-box with a phase of − (cid:18) − (cid:19) (19)Note that in this paper we only need H-boxes labelled by −
1. We give the general definition for completeness’ sake.We have the following relations among the three gener- ( hh ) == ( rw ) ... a ... m n ... nm ... a = 2 ...... m n ... nm ... = ...... (cid:16) √ (cid:17) n − ab = ab = π ... ... ... ... ... ab ...... a + b ... aa = π a ... ... ( m )( av )( in )( hf )( hb ) π ... = ππ ... ( hc ) = a ... √ a =... √ a π ... ( ex )( ab ) Figure 3. The rules of the ZH-calculus. These rules hold for all a, b ∈ C . Note ‘...’ should be read as ‘0 or more’. The right-handside of ( in ) and ( hb ) and the left-hand side of ( m ) contain fully connected bipartite graphs. In this paper we will only needthe rules in the left column. The rest are shown for completeness. The rule names stand for ( hh )-cancellation, r emove w ire,( ex )plode, ( ab )sorb, ( hb )ialgebra, ( hf )use, ( hc )opy, ( m )ultiplication, ( av )erage and ( in )troduction (as it introduces additionalwires to the H-box on the left-hand side). ators, Z-spiders, X-spiders and H-boxes: α ... ... α ... ... = √ n + m nm nm (20) α ... ... α ... ... = √ n + m nm nm (21) α = e iα (22) α = e iα α − α √ arity , i.e. boxes with a larger number of input and out-put wires, using just Z- and X-spiders, but this is quiteinvolved and not necessary for our purposes [55].In addition to the rules of the ZX-calculus of Figure 2and the relations among the generators (20)–(23) we alsohave some rules specific to the ZH-calculus; see Figure 3.We present in Appendix C a condensed overview of allthe rewrite rules and relations we have introduced so far.An H-box with zero input and output wires that islabelled by a is equal to the scalar a . This means wecan always translate the scalars in the hybrid notationof Figures 2 and 3 into a ZH-diagram. For instance, theself-inverseness of the Hadamard gate can be represented as follows: = 2 (24)ZH-diagrams are universal , meaning that any linearmap between complex vector spaces of dimension 2 n canbe represented as a ZH-diagram. Furthermore, the ZH-calculus is complete , meaning that if two diagrams rep-resent the same linear map, then we can find a sequenceof rewrites from Figures 2 and 3 and equations (20)–(23)that transforms one diagram into the other [43]. How-ever, in general, such a sequence of rewrites will involvediagrams of size exponential in the number of inputs andoutputs (as otherwise we could establish efficient classicalsimulation of quantum computation, among other unlikelyconsequences such as P=NP). The key to working withZH-diagrams efficiently is then to find good heuristics forsimplifying diagrams.H-boxes allow us to straightforwardly representcontrolled-phase gates. For instance, a CCZ( θ ) gate, i.e. agate that maps the computational basis state | xyz (cid:105) to e iθxyz | xyz (cid:105) is given by: e iθ = e iθ (25)In particular, we can represent the CCNOT gate as fol-lows: = (26)As a special case of (25) we also have the standardcontrolled-Z (CZ) gate:= − (27)As another variation on these diagrams, we have thefollowing diagram that we will use different iterations onthroughout this paper: = (28)I.e. this linear map throws away a | (cid:105) input, but other-wise acts as the identity.Those familiar with the ZX-calculus or the ZH-calculusmight have noticed that they have conflicting definitionsof the X-spider and the 2-ary H-box, resulting in differentscalar factors of √
2. In this paper we use the conventionsalso used in
PyZX [48] in order to aid in our calculations.This means that our Z- and X-spider are defined as isusual in the ZX-calculus. However, most literature on theZX-calculus also includes a yellow box to represent theHadamard gate. In our case we use the convention of theZH-calculus that such a box represents an unnormalised
Hadamard gate (cf. (19)). Hence, certain scalar factorswill be different than is usual in the literature on the ZX-calculus. Conversely, our H-box and Z-spider match thedefinition used in the ZH-calculus, but our X-spider doesnot match the corresponding definition in the ZH-calculus,and is off by certain factors of √
2. It is unfortunatelynot possible to have a fully satisfactory convention whenit comes to scalar factors in the ZX/ZH-calculus, andchoices have to be made about where scalar correctionsappear (see [56] for a longer discussion on this topic). Inorder to prevent confusion about these clashing scalarconventions, we will refer to our version of the ZX andZH calculus as the
ZXH-calculus throughout the paper.
C. Graph states
As it will be important for Section V, let us recallbriefly the notion of graph states and how they can berepresented in the ZX-calculus. Given a simple undirected graph G = ( V, E ), there is a corresponding graph state | G (cid:105) . The state | G (cid:105) is constructed by preparing for eachvertex v ∈ V a qubit in the | + (cid:105) state, and for eachedge ( v , v ) ∈ E applying a CZ gate between the qubitscorresponding to v and v [57]. Recall that graph statesare important as all stabiliser states can be reduced to agraph state (up to local Cliffords) [58], and because mostmeasurement-based quantum computation protocols usea graph state as their resource state [59].The representation of a graph state in the ZX-calculusis most easily explained by an example: G | G (cid:105)→ (29)In words: for each vertex of the graph we add a Z-spiderwith a single output, and for each edge we add a corre-sponding wire between spiders with a Hadamard gate onit. III. THE 1D AKLT STATE IN THEZXH-CALCULUS
We now have all we need to show how the AKLT state isrepresented in the ZXH-calculus. We start by representingthe singlet operator | (cid:105) − | (cid:105) of Fig. 1(a). Note thatthe Bell state | (cid:105) + | (cid:105) is related to the singlet stateby application of a Pauli Z and X on one of its qubits.Hence, the operator in ZXH is: ππ = | (cid:105) − | (cid:105) . (30)Indeed, an empty curved wire (commonly referred to as a‘cup’ in the ZX-calculus literature) is the Bell state | (cid:105) + | (cid:105) . If we then apply a Z π -phase ( | (cid:105) (cid:104) | + e iπ | (cid:105) (cid:104) | )to the first (upper) qubit we get | (cid:105) − | (cid:105) . Applying aNOT gate (an X π -phase) on the second (lower) qubit wethen get | (cid:105) − | (cid:105) as desired.The next operator we need to represent is the sym-metriser on two spin-1/2 spaces. We encode the spin-1state | +1 (cid:105) as the paired spin-1/2 state | (cid:105) , the spin-1state | (cid:105) as | (cid:105) + | (cid:105)√ and |− (cid:105) as | (cid:105) . This is a con-venient basis for us, and indeed the projector opera-tor in Fig. 1(b) acts as the identity on this basis. Infact, the only function of the operator Fig. 1(b) is toproject away the | (cid:105) − | (cid:105) state, which reduces the basis {| (cid:105) , | (cid:105) + | (cid:105)√ , | (cid:105)−| (cid:105)√ , | (cid:105)} into a three-dimensionalspace with basis {| (cid:105) , | (cid:105) + | (cid:105)√ , | (cid:105) . We can representthe projection operator as a ZXH-diagram as follows: √ =
12 12
12 12
00 0 0 1 . (31)Indeed, this can be shown by checking its action oneach of the basis states in {| (cid:105) , | (cid:105) + | (cid:105)√ , | (cid:105)−| (cid:105)√ , | (cid:105)} or composing the matrices presented in (11) and (28). Weleave this as an exercise for the reader. Note how thisdiagram is symmetric under interchange of the inputs andoutputs (i.e. under a horizontal flip), and hence we willgenerally not care about its orientation in our diagrams.We will find a different diagram that implements the sameoperator in Section IV where we show how to constructthe symmetrising projector for larger Hilbert spaces.In Figure 1 we summarise our construction of theone-dimensional AKLT state as a ZXH-diagram. Weshow the diagrammatic representation of its constituents,the singlet (Fig. 1(a)) and the projector (Fig. 1(b)). TheZXH-diagram of the 1D AKLT state is obtained by join-ing these in a (periodic) chain, as shown in Fig. 1(f). Thisdiagram consists of repetitions of the same block which isbuilt out the symmetriser projector (31) (Fig. 1(b)) andsinglets (30) (Fig. 1(a)): π π π π . . . . . . π ππ π (32)We can show explicitly how the ZXH-diagrammaticrepresentation and the MPS representation of the AKLTstate are connected. In Fig. 1(f) we have overlaid a graybox over the part of the ZXH-diagram that encodes theMPS matrices given in (3), as we now show.Recall that we represent the spin-1 | +1 (cid:105) state as | (cid:105) on a pair of spin-1/2 wires. If we apply this state, givenby the first diagram in Eq. (15), to one of the sites of(32), we get a diagram that can be drastically simplifiedand be shown to be equal as a matrix to M [ n ]+1 up to ascalar factor of √ : = π π = π π = π π = π = π ( f ) ( c )( f )( f )( ex ) = 2 (cid:18) (cid:19) = √ M [ n ]+1 ( π c ) (21) ( f ) ( c ) ( f ) (20) π π
12 12 √ √
212 12 (33)As we are plugging | (cid:105) into the top wires, we start witha scalar as shown in (15). Note that in the last dia-grammatic step we used that a Z-spider with no legs isequal to a scalar 2. The reason we keep track of scalarshere is because for the MPS representation it is importantthat the matrices are scaled correctly with respect to eachother.We now proceed analogously, showing that if we plugthe two remaining spin-1 states, | (cid:105) and |− (cid:105) , into one ofthe sites of (32) that we get the corresponding MPS ma-trices up to the same scalar factor of √ . First, we obtain M [ n ]0 by plugging √ ( | (cid:105) + | (cid:105) ), which corresponds tothe | (cid:105) spin-1 state: πππ = π ππ = π π ( ho ) ( f ) ( c ) (20)= = √ (cid:18) − (cid:19) = √ M [ n ]0 π √ √ √ ( f )( ab ) √ ( id ) = π √ M [ n ] − : π ππ = π ππ π = ππ π = ππ π = π ππ = π ( f ) ( f )(20) ( f ) ( ex ) ( c ) (21) ( c )( f ) ( c ) = 2 (cid:18) −
10 0 (cid:19) = √ M [ n ] −
112 12 √ √ − − c ) introduced a e iπ = − L sites in achain, and we post-select each of the physical indices onthe sites 2 , , . . . , L − | (cid:105) : π π π ππ j j L | , s z = 0 (cid:105) = | (cid:105) + | (cid:105) . . . . . . π πππ ππ (36)The non-vanishing of the string order parameter then tellsus that the sites 1 and L cannot then both be in the spin+1 or spin − j and j L to the same non-zero spin state: = 0. π π π πππ π . . . . . . π πππ ππ π ππ π (37)That this diagram is zero tells us that the spin configura-tion where j and j L are equal is not part of the AKLTstate.In contrast, when j (cid:54) = j L we get (cid:54) = 0. π π π πππ π . . . . . . π πππ ππ π π (38)Hence, the configuration where j (cid:54) = j L is part of the AKLT state. These results signify the dilute anti-ferromagnetic order characteristic of the 1D AKLT state.While one could use software such as the PyZXPython package [48] to simplify the diagrams aboveto show that these diagrams are indeed (non-)zero, it isillustrative to rewrite the diagram manually. Note thatthe central repeated building block consisting of the pro-jection to the spin-1 subspace followed by a post-selectionfor the | (cid:105) spin-1 state is exactly the diagram we simplifiedin (34). Hence, (36) simplifies to: ππ π . . . . . . ππ πππ (39)Note that this diagram is only equal to (36) up to non-zero scalar, but as we only care about whether the comingdiagrams are zero or not, this is enough for our purposes.Depending on the number of repetitions of the centralblock this diagram simplifies to one of the following: π π or πππ ππ (40)Whether this middle Z phase appears depends on whetherthere are an even or odd number of intermediate | (cid:105) statesapplied - giving a Z π -phase in the former case and nonein the latter. Now suppose we take j = j L = | +1 (cid:105) . Thenwe get the following diagram and simplification: aπππ π ∝ aππ π ∝ π π (33) ( f )( c ) π (41)A spider with a phase π with no legs is equal to 1 + e iπ =1 − j = j L = |− (cid:105) is shown similarly.Now when we set j (cid:54) = j L , for instance, j = |− (cid:105) and j L = | +1 (cid:105) we get a non-zero diagram: aππ π ππ π ∝ aππ π ∝ (33)(35) ( c )( f ) π (42)Indeed, as the scalar red spider we get is equal to 2, thisdiagram is indeed non-zero.0To summarise: we started with the 1D AKLT chain (32).We then post-selected an arbitrary number of adjacentsites to the spin-1 | (cid:105) state, resulting in the diagram (36)which we simplified to one of the diagrams in (40) de-pending on the parity of the number of | (cid:105) sites. Then,in Eq. (41) we saw that post-selecting the j and j L sitesto be equal but non-zero spins resulted in a zero diagram.However, in (42) we saw that post-selecting the j and j L sites to be different non-zero spins resulted in a non-zerodiagram. These observations signal the non-vanishing ofthe anti-ferromagnetic string order, as expected for theAKLT state.The calculations presented in this section are also avail-able in the accompanying Jupyter notebook. IV. ENCODING HIGHER SPINS IN MULTIPLEWIRES
The wires in a ZXH-diagram represent two-dimensionalHilbert spaces, or in other words the spin-1/2 representa-tion (space) of SU (2). In the previous section we repre-sented a spin-1 wire (a three-dimensional Hilbert space)by a pair of spin-1/2 wires together with a projector tothe appropriate subspace. This raises the question ofhow we can generalise this construction to higher spinrepresentations, and thus larger Hilbert spaces.To do this we need some basic representation theory.Recall that the group SU (2) has a unique irreduciblerepresentation on C n for each n [60]. For n = 1 this is thetrivial representation, and for n = 2 this is the fundamen-tal representation where each matrix M simply acts bymatrix multiplication. For our purposes a convenient wayto write the n -dimensional irreducible representation of SU (2) (which is spin- n/
2) is to take the symmetric sub-space of n copies of the fundamental representation [61].That is, we build spin- n/ symmetric subspace of n spin-1/2 spaces. So, starting with the space of the fun-damental representation H = C we build the the spaceof the ( n + 1)-dimensional representation as Sym( H ⊗ n ).Indeed, Sym( H ⊗ n ) has dimension n + 1 as a basis for it isgiven by | · · · (cid:105) , | · · · (cid:105) and the uniform superpositionsof computational basis states containing a fixed numberof | (cid:105) ’s, such as | · · · (cid:105) + | · · · (cid:105) + · · · + | · · · (cid:105) . Insummary, if we can represent the projector to the sym-metric subspace on n wires as a ZXH-diagram then wewill have succeeded in representing arbitrary-dimensional(spin) systems on a collection of qubit wires.Let σ ∈ S n be a permutation on n points. We write U σ for the unitary on H ⊗ n that permutes each of the compos-ite H spaces via σ : U σ | x · · · x n (cid:105) = | x σ · · · x σn (cid:105) . Notethat a space can be symmetrised by taking the superposi-tion over all the permutations. Hence, the symmetrising Click here to see the relevant Jupyter notebook. projector P ( n ) S on n wires is given by P ( n ) S := 1 n ! (cid:88) σ ∈ S n U σ . (43)Each U σ can straightforwardly be written as a ZXH-diagram by just permuting the wires, but as we needto represent a coherent superposition of these permuta-tion unitaries we need a controlled permutation opera-tor. It turns out to be sufficient to use controlled SWAP (CSWAP) operators that have the control qubit post-selected into (cid:104) + | . Recall that the CSWAP is defined by | xy (cid:105) (cid:55)→ | xy (cid:105) and | xy (cid:105) (cid:55)→ | yx (cid:105) , i.e. the first qubit de-termines whether the second and third qubit are swapped.Including the post-selection, we can represent this (up toa non-zero scalar) as a ZXH-diagram in a convenient way:= ( f )( id ) (44)We will refer to the right-hand side as a CSWAP in whatfollows.Here the top wire is the control which is projected intothe Z-basis. By inputting a computational basis statewe can verify that it indeed performs the maps required.First, when the input is | (cid:105) := == = = ( c )( id )( f )( c )( f ) (20) ( ex ) √ √ | (cid:105) : π = == = = ( ab ) ( b )( id )( ho )( f ) √ ( hh ) (46)Now, to write the symmetrising projector on n = 2wires we need an equal superposition of the identity per-mutation and the SWAP. Hence, if we make the controlof (44) a | + (cid:105) = | (cid:105) + | (cid:105) state we get the desired map:(47)1To generalise this to larger n we use induction. Indeed,if we have a coherent superposition of all the permutationson n wires P ( n ) S , then to get a coherent superposition ofthe permutations on n + 1 wires we need to compose P ( n ) S with a coherent superposition of the identity andthe SWAP gates from the ( n + 1)th qubit to every otherqubit: id + SWAP ,n +1 + SWAP ,n +1 + · · · + SWAP n,n +1 .We construct this superposition as a ZXH-diagram bywriting CSWAP gates from the ( n + 1)th qubit to eachother qubit and then connecting all the control wires insuch a way that at most one CSWAP ‘fires’ at the sametime. This gives us the general construction for n wires.For n = 3 this gives the following diagram: (48)This works, because ∝ | (cid:105) + | (cid:105) + | (cid:105) , (49)and hence the appropriate superposition is created.Notice that the symmetric subspace encoding for twowires of (44) seems to give an alternative form of thesymmetrising projection given in (31). They can howeverbe shown to be equal, up to an irrelevant scalar: ∝ ∝∝ ∝ ∝ ( b ) (20) ( b ) ( f ) ( ho ) (50)and as such our 1D AKLT chain (cf. Eq. (32)) can alter-natively be written as: π π π π . . .. . . π π (51)Where the projector now is of the form (47).Note that there are modified versions of the ZX-calculuswhere a wire carries a three-dimensional Hilbert space [62,63]. However, much less is known about rewriting thosediagrams, and it is harder to reason about the types ofdiagrams we have in this paper where we mix systems ofdifferent types of spins. V. 2D AKLT MODEL IN ZXH AS AUNIVERSAL RESOURCE FOR QUANTUMCOMPUTING
We will now study the generalization of the 1D AKLTstate to the 2D hexagonal lattice [44], depicted in Fig. 4(a).First, we derive the representation of this state as a ZXH-diagram, and then we show how it can be used as auniversal resource for quantum computing, by showingthat it reduces to a graph state.As mentioned in the introduction, it is possible toconstruct an AKLT type state on a hexagonal latticeusing spin-3/2 degrees of freedom at each site (Fig. 4(a)).Each spin-3/2 degree of freedom corresponds to a four-dimensional Hilbert space and, by the discussion in theprevious section, can be represented on a set of three qubitwires with the projector presented in (48). So whereasin the 1D AKLT state we projected two spin-1/2 statesdown to the symmetric subspace to represent a spin-1degree of freedom, here we project three spin-1/2 degreesof freedom to form a spin-3/2. This projector, with eachof the component spin-1/2 wires linked to another bysinglet states, forms the basic unit (a site) of the 2DAKLT state. As a ZXH-diagram: ππππ ππ (52)Here we have a single spin-3/2 degree of freedom of the2D AKLT state with singlet states on each of its legs.These can then be combined to give a diagram of a latticethat is not just a convenient visual aid for the 2D AKLTstate, but literally is the 2D AKLT state; see Figure 4(b).Analogous to the 1D AKLT example in Fig. 1 wheretwo wires corresponded to the physical spin-1 state, thetriples of wires coming out to the right of (52) correspondto the physical spin-3/2 degrees of freedom that formthe state. The remaining wires of the diagram shouldbe considered to be connected to other parts in thehexagonal lattice periodically (see Fig. 4(b)).We will now show how a hexagonal lattice AKLT statereduces to a graph state under a suitable measurement ofthe spin-3/2 degrees of freedom. A consequence of thisresult is that the 2D AKLT state is a universal resourcefor measurement-based quantum computing [64]. Thisresult was already shown in Ref. [47] and consists of twoparts. First, they showed the hexagonal lattice reducesto a graph state. Second, they use a percolation argu-ment to prove the resulting state is a universal resourcefor quantum computation. We will derive the first part2 ππ ππ ππππ ππ ππ ππππ ππππππ ProjectorSinglet (a) (b)
Figure 4. The 2D AKLT state on a hexagonal lattice and its representation as a ZXH-diagram. (a) Pictorial representationof the unit cell of the 2D AKLT state on a hexagonal lattice. At each site there is a spin-3/2 degree of freedom that can bedecomposed into three spin-1/2 states that form singlets with their nearest neighbours (represented by oval shapes). The bluecircles denote projectors to the appropriate symmetric subspace. The gray hexagon denotes a choice of unit cell. (b) The 2DAKLT state unit cell as a ZXH-diagram, with the same unit cell denoted by a gray dotted line. entirely diagrammatically. In the process we will see thatcertain derivations concerning the simplification of thelattice presented in Ref. [47] are in our approach just thestandard spider fusion rule ( f ) and the Hopf rule ( ho ) ofthe ZX-calculus.To reduce the 2D AKLT state to a graph state, weneed to reduce it to a simpler state. We do this bymeasuring each of the spin-3/2 states. Recall that eachof these spin-3/2 states is presented as a symmetric threequbit state and hence a measurement on it can be presentas a simultaneous measurement on these three qubits.The measurement is a POVM (Positive operator-valuedmeasurement, the most general type of measurement [65])with three elements: E z := 23 ( | (cid:105)(cid:104) | + | (cid:105)(cid:104) | ) , (53) E x := 23 ( | + + + (cid:105)(cid:104) + + + | + |− − −(cid:105)(cid:104)− − −| ) , (54) E y := 23 ( | iii (cid:105)(cid:104) iii | + |− i, − i, − i (cid:105)(cid:104)− i, − i, − i | ) . (55)Here the sets {| (cid:105) , | (cid:105)} , {| + (cid:105) , |−(cid:105)} and {| i (cid:105) , |− i (cid:105)} denoterespectively the eigenbases of the Z , X and Y Paulimatrices. Usually the elements of a POVM should sumup to the identity, but as we are working in the symmetricsubspace, we instead have E z + E x + E y = P S , where P S is the projection on the symmetric subspace, as desired.Conveniently, each of these POVM elements can be represented as a small ZX-diagram (up to global scalar): E z ∝ (56) E x ∝ (57) E y ∝ - π - π - π π π π (58)The forms of E z and E x follow directly from the definitionof the Z- and X-spider. To see the correctness of E y notethat a Z π -rotation R z ( π ) acts as R z ( π ) | + (cid:105) = | i (cid:105) and R z ( π ) |−(cid:105) = |− i (cid:105) where |± i (cid:105) = | (cid:105) ± i | (cid:105) . Hence, we cansee (58) as an X-projector surrounded by a basis trans-formation from the Y eigenbasis to the X eigenbasis. Wecould have equivalently chosen a Z-projector surroundedby X ± π rotations which corresponds to flipping thecolours and the signs of the rotations; cf. [27, Section9.4]. Note that E y is not symmetric under interchange ofinputs and outputs, and thus unlike the case for E z or E x , when considering E y we must keep in mind what weconsider an input and output.Importantly, each of the POVM elements E z , E x , E y projects to a 2D subspace, and hence encodes a spin-1/2 degree of freedom. While we could continue to workwith the three output wires as a single qubit with thequbit operations encoded onto the three wires, we willinstead represent the collapse to a single spin-1/2 degree3of freedom by simply writing one wire: E z (cid:32) (59) E x (cid:32) (60) E y (cid:32) - π - π - π π (61)We will use this ‘squigly arrow’ (cid:32) to denote when we makea step that corresponds to a redefinition of the outputbasis. Here this is a collapse of a two-dimensional degreeof freedom spread out over three wires to a single wire,but later on we will also use redefinitions to absorb singlequbit gates that appear on output wires. Physically, thiscorresponds to updating the correspondence between the‘logical’ or ‘encoded’ | (cid:105) and | (cid:105) , and the actual physicalstates.As these POVM elements are symmetric on the threequbits, they are preserved by the projection to the sym-metric subspace, a fact we can prove diagrammatically.For instance, considering E x , we first show that it absorbsa CSWAP gate: = = == = =
12 1 √ √ √ ( f ) ( ho ) (21) ( ex ) ( π c ) ( f ) (62)Iterating this three times we then get the followingequality: = √ (63)The floating scalar diagram on top multiplied by thescalar produced by the sequence of rewrites represents theeigenvalue of this operation under the projection. Thisscalar is not important for our purposes, and we will dropit implicitly in later diagrams.We can do a similar derivation for E z (see Ap- pendix B 1): = √ (64)An analogous equation and derivation exists for E y aswell (see Appendix B 1).We started with the 2D AKLT state on a hexagonallattice (Figure 4), and then we measured each of thespin-3/2 states with this POVM { E z , E x , E y } . Due toequations (63) and (64) and the analogous one for E y ,we see that regardless of the measurement outcome E z , E x or E y that the symmetrising projector on each spin-3/2 output is ‘consumed’ and replaced by the spiderassociated to one of E z , E x and E y . Hence, what remainsof the 2D AKLT state is a set of singlet states, connectedvia a network of spiders of the form (59)–(61). The stateresulting from applying this measurement to the 2D AKLTstate will hence be a hexagonal lattice where at each sitewe randomly have a X,Y or Z spider (which depends onthe measurement outcome), and these are connected viasinglet states. For example, the hexagonal unit cell ofFig. 4(b) could be reduced to a diagram like the following: ππππ − π − π − π ππππ ππππ − π − π − π ππππ ππππ ππ π π ππ (65)Readers familiar with the ZX-calculus can easily see thatthe resulting diagram is a Clifford diagram . Indeed, itdoes not contain any higher-arity H-boxes, and the onlyphases that appear are multiples of π making it a ZX-diagram in the Clifford fragment [54]. As it only hasoutputs, it is a state, and hence is a Clifford state . AnyClifford state can be presented as a graph state with Recall that a Clifford state, also called a stabiliser state , is a statethat is uniquely determined by being a eigenvalue 1 eigenvectorof a set of Pauli operators. Any Clifford state can be representedby a ZX-diagram containing only spiders with phases that aremultiples of π . π -phasesarising from the singlet states. We will do this by com-muting these phases through the spiders onto the outputsof the state (the spin-3/2 outputs). For instance, for a E z outcome, we can do the following: π ππ π π π = ππ ( f )( π c ) (66)Here the site is understood to be in the bulk of the lattice,with the top wire corresponding to its spin-3/2 degree offreedom . Hence, we can remove the internal π phasesby moving them onto the external edges. The analo-gous procedure for E x and E y measurement outcomes isdemonstrated in Appendix B 2.Since each Z and X π -phase is connected to two spiderswe need to make a choice about which way to commuteeach π . As the hexagonal lattice is two-colourable this isindeed possible in a consistent way.After this procedure, we will have a diagram where theonly π phases are on the spin-3/2 outputs of the states.As discussed beneath (61), our choice of representation ofthe spin-3/2 degree of freedom can be chosen arbitrarily.Hence we can redefine our basis here to remove these π phases (this again corresponds to a redefinition of howwe encode the | (cid:105) and | (cid:105) states on our physical system): (cid:32) ππ (67)The second step is to bring the diagram closer to theform of a graph state as presented in (29) by changing theX-spiders coming from E x and E y measurement outcomesto Z-spiders. This can be done easily using (21), and aredefinition of the output basis to remove the resultingHadamard: (cid:32) ∝ . . . . . . . . . . . . (21) . . . . . . (68) For sites that aren’t in the bulk of the lattice, the calculationwould be slightly different in that phases would pass onto theother external disconnected edges. However, these π phases canbe removed by redefining the basis of the external wires. For the E y outcomes, we additionally remove the π phases.For instance: . . .. . . - π (cid:32) . . .. . . - π = . . .. . . ( f ) (69)We leave the other cases to the reader. The diagram wehave now consists solely of Z-spiders and Hadamards.Now, the third step of our reduction to a graph stateis to fuse all the spiders that can be fused. In practicethis means that two adjacent sites that had the samemeasurement outcome will be fused together. This fusingresults in sites that have multiple outputs, which we againcollapse to a single output as we did in (59)–(61). SeeFigure 5 for a demonstration of this procedure.The final step is to remove parallel Hadamard-edgesthat could have been introduced by sites that were fusedtogether. To do this we use a variation on the Hopfrule ( ho ): ∝ ∝ ∝ ( ho ) (21)(20) ( hh ) (70)The resulting diagram consists of phaseless Z-spiders con-nected via single Hadamard-edges, and hence is a graphstate, as was desired. Note that this entire procedure canalso be done in an automated fashion using PyZX [48];see the attached Jupyter notebook. Because neighbouring sites that have the same measure-ment outcome get fused, and parallel edges resulting fromthis fusing get disconnected, the highly regular hexagonalgraph will generally collapse to a much less regular andmore sparsely connected graph. For example, consider thehexagonal graph given in Figure 5 where the vertices arelabelled by X , Y , or Z to denote the 2D AKLT state withthe E x , E y or E z measurement outcomes, and consideralso its reduction with the rules outlined above.Not any graph state can be used as a universal resourcefor measurement-based quantum computing. The mostcanonical example of a universal resource state is the cluster state that as a graph is just a regular square tiling.In Ref. [47] it is shown via a percolation argument thatgiven a large enough initial hexagonal lattice the irregulargraph state resulting from the measurement of a 2D AKLTstate can, with high probability, be further reduced to acluster state. In particular, they show that the expectedconnectivity of the graph is above the critical ‘percolationthreshold’ [66] which means that it includes a large clusterstate subgraph with high probability. Hence, for a largeenough lattice we can use, with high probability, the 2DAKLT state to do universal measurement-based quantumcomputation. Click here to see the relevant Jupyter notebook. (cid:32) =( f )=( ho ) Y YYXXZY ZXZX XYX YXY Z ZX YYY Z ZYYZZX ZZ XX XXZXXXZ X Figure 5. This figure shows the AKLT hexagonal lattice after the E x , E y , and E z projectors have been applied and the π phasesmoved onto the external wires and absorbed into basis redefinitions. In the first diagram on the left note that we have addedX,Y,Z labels to the Z-spiders: these aren’t formally part of the diagram but labels to indicate which projector was applied toreach this diagram. The first equality shows that spiders with the same measurement outcome are merged. Following this, theHopf rule ( ho ) is applied to remove pairs of wires with a Hadamard box on them between the same spiders. The final step isto redefine the output basis to collapse multiple output wires coming from the same spider into a single wire. The resultingdiagram can indeed be seen to be a graph state. This bears strong resemblance to the diagram seen in [47] (figure 4 diagram C)where now their ad-hoc reduction is describable entirely in quantum informational terms via the ZXH-calculus. VI. CONCLUSION
We introduced the ZXH-calculus as a new tool to rep-resent and operate with quantum states. Specifically, weshowed how to represent the 1D and 2D AKLT states asZXH-diagrams. Using the ZXH-calculus we showed howthe non-zero string order of the 1D AKLT state emergesin the ZXH representation, and how to reduce the 2DAKLT state to a graph state using a suitable measure-ment. These diagrammatic calculations were presented indetail for pedagogical purposes but are of such mechanicalnature that they can be done straightforwardly by
PyZX ,a Python package that can simplify ZXH-diagrams. Inthe process of constructing the AKLT states, we alsofound a general way to represent the symmetrising pro-jector on a tensor product of qubit Hilbert spaces in theZXH-calculus.Our work opens several directions for further research.One is to seek ZXH-representations of more general quan-tum states that would allow to simplify computations per-formed on them. The success in representing AKLT-typestates suggests that more general resonating valence bondstates [52], as well as fractional quantum Hall states [67]have useful representations in the ZXH-calculus. An-other natural direction is to construct symmetry protectedtopological phases [50, 68–70], for example higher-ordertopological phases based on the 1D AKLT chain andthe coupled wire construction [71]. The coupled wireconstruction consists in coupling d -dimensional states to construct d − is the calculation.6 ACKNOWLEDGMENTS
NC was funded by EPSRC fellowship EP/S00114X/1.AGG is indebted to C. Repellin and M. A. S´anchez-Mart´ınez for enlightening discussions, and acknowledgesfunding from the French National Research Agency through the project ANR-18-CE30-0001-01 (TOPO-DRIVE). RDPE would like to acknowledge financial sup-port from the “Investissements d’avenir” (ANR-15-IDEX-02) program of the French National Research Agency anddiscussions with P. Martin-Dussaud. [1] David Kaiser,
Drawing Theories Apart, The dispersion ofFeynman diagrams in postwar physics , Vol. 188 (Univer-sity of Chicago Press, 2005).[2] Roman Orus, “Tensor networks for complex quantumsystems,” Nature Reviews Physics , 538–550 (2019).[3] Ignacio Cirac, David Perez-Garcia, Norbert Schuch, andFrank Verstraete, “Matrix Product States and ProjectedEntangled Pair States: Concepts, Symmetries, andTheorems,” arXiv e-prints , arXiv:2011.12127 (2020),arXiv:2011.12127 [quant-ph].[4] Steven R. White, “Density matrix formulation for quan-tum renormalization groups,” Phys. Rev. Lett. , 2863–2866 (1992).[5] Steven R. White, “Density-matrix algorithms for quantumrenormalization groups,” Phys. Rev. B , 10345–10356(1993).[6] F. Verstraete, V. Murg, and J.I. Cirac, “Matrix productstates, projected entangled pair states, and variationalrenormalization group methods for quantum spin systems,”Advances in Physics , 143–224 (2008).[7] Ulrich Schollwock, “The density-matrix renormalizationgroup in the age of matrix product states,” Annals ofPhysics , 96 – 192 (2011), january 2011 Special Issue.[8] Johannes Hauschild and Frank Pollmann, “Efficient nu-merical simulations with Tensor Networks: Tensor Net-work Python (TeNPy),” SciPost Phys. Lect. Notes , 5(2018).[9] Jacob C Bridgeman and Christopher T Chubb, “Hand-waving and interpretive dance: an introductory courseon tensor networks,” Journal of Physics A: Mathematicaland Theoretical , 223001 (2017).[10] Jutho Haegeman and Frank Verstraete, “Diagonalizingtransfer matrices and matrix product operators: A medleyof exact and computational methods,” Annual Review ofCondensed Matter Physics , 355–406 (2017).[11] M Fannes, B Nachtergaele, and R F Werner, “Finitelycorrelated states on quantum spin chains,” Communica-tions in Mathematical Physics , 443–490 (1992).[12] Stellan ¨Ostlund and Stefan Rommer, “Thermodynamiclimit of density matrix renormalization,” Phys. Rev. Lett. , 3537–3540 (1995).[13] Stefan Rommer and Stellan ¨Ostlund, “Class of ansatzwave functions for one-dimensional spin systems and theirrelation to the density matrix renormalization group,”Phys. Rev. B , 2164–2181 (1997).[14] F. Verstraete and J. I. Cirac, “Renormalization algorithmsfor Quantum-Many Body Systems in two and higherdimensions,” arXiv e-prints , cond-mat/0407066 (2004),arXiv:cond-mat/0407066 [cond-mat.str-el].[15] Rom´an Or´us, “A practical introduction to tensor networks:Matrix product states and projected entangled pair states,”Annals of Physics , 117 – 158 (2014). [16] Norbert Schuch, Michael M. Wolf, Frank Verstraete, andJ. Ignacio Cirac, “Computational complexity of projectedentangled pair states,” Phys. Rev. Lett. , 140506 (2007).[17] Pasquale Calabrese and John Cardy, “Entanglement en-tropy and quantum field theory,” Journal of StatisticalMechanics: Theory and Experiment , P06002 (2004).[18] Frank Pollmann, Subroto Mukerjee, Ari M. Turner, andJoel E. Moore, “Theory of finite-entanglement scalingat one-dimensional quantum critical points,” Phys. Rev.Lett. , 255701 (2009).[19] L. Tagliacozzo, Thiago. R. de Oliveira, S. Iblisdir, andJ. I. Latorre, “Scaling of entanglement support for matrixproduct states,” Phys. Rev. B , 024410 (2008).[20] F. Verstraete, M. M. Wolf, D. Perez-Garcia, and J. I.Cirac, “Criticality, the area law, and the computationalpower of projected entangled pair states,” Phys. Rev. Lett. , 220601 (2006).[21] T. B. Wahl, H.-H. Tu, N. Schuch, and J. I. Cirac, “Pro-jected entangled-pair states can describe chiral topologicalstates,” Phys. Rev. Lett. , 236805 (2013).[22] J. Dubail and N. Read, “Tensor network trial states forchiral topological phases in two dimensions and a no-gotheorem in any dimension,” Phys. Rev. B , 205307(2015).[23] Didier Poilblanc, J. Ignacio Cirac, and Norbert Schuch,“Chiral topological spin liquids with projected entangledpair states,” Phys. Rev. B , 224431 (2015).[24] Ji-Yao Chen, Sylvain Capponi, Alexander Wietek,Matthieu Mambrini, Norbert Schuch, and Didier Poil-blanc, “SU(3) chiral spin liquid on the square lattice:A view from symmetric projected entangled pair states,”Phys. Rev. Lett. , 017201 (2020).[25] Bob Coecke and Ross Duncan, “Interacting quantumobservables,” in International Colloquium on Automata,Languages, and Programming (Springer, 2008) pp. 298–310.[26] Bob Coecke and Ross Duncan, “Interacting quantumobservables: categorical algebra and diagrammatics,” NewJournal of Physics , 043016 (2011).[27] B. Coecke and A. Kissinger, Picturing Quantum Processes:A First Course in Quantum Theory and DiagrammaticReasoning (Cambridge University Press, 2017).[28] Ross Duncan, Aleks Kissinger, Simon Pedrix, and Johnvan de Wetering, “Graph-theoretic Simplification of Quan-tum Circuits with the ZX-calculus,” Quantum , 279(2020).[29] Aleks Kissinger and John van de Wetering, “Reducingthe number of non-clifford gates in quantum circuits,”Physical Review A, Vol.102-2 , 022406 (2020).[30] Niel de Beaudrap, Xiaoning Bian, and Quanlong Wang,“Techniques to Reduce π/ Quantum Physics and Logic, Chapman University, Orange, CA, USA., 10-14 June 2019,Electronic Proceedings in Theoretical Computer Science,Vol. 318, edited by Bob Coecke and Matthew Leifer (OpenPublishing Association, 2020) pp. 131–149.[31] Alexander Cowtan, Silas Dilkes, Ross Duncan, Will Sim-mons, and Seyon Sivarajah, “Phase gadget synthesisfor shallow circuits,” in Proceedings 16th InternationalConference on
Quantum Physics and Logic,
ChapmanUniversity, Orange, CA, USA., 10-14 June 2019, Elec-tronic Proceedings in Theoretical Computer Science, Vol.318, edited by Bob Coecke and Matthew Leifer (OpenPublishing Association, 2020) pp. 213–228.[32] Ross Duncan and Simon Perdrix, “Rewritingmeasurement-based quantum computations withgeneralised flow,” in
International Colloquium onAutomata, Languages, and Programming (Springer, 2010)pp. 285–296.[33] Aleks Kissinger and John van de Wetering, “UniversalMBQC with generalised parity-phase interactions andPauli measurements,” Quantum (2019), 10.22331/q-2019-04-26-134.[34] Miriam Backens, Hector Miller-Bakewell, Giovanni de Fe-lice, Leo Lobski, and John van de Wetering, “There andback again: A circuit extraction tale,” arXiv preprintarXiv:2003.01664 (2020).[35] Niel de Beaudrap and Dominic Horsman, “The ZX calcu-lus is a language for surface code lattice surgery,” Quan-tum (2020), 10.22331/q-2020-01-09-218.[36] Craig Gidney and Austin G. Fowler, “Efficient magic statefactories with a catalyzed | CCZ (cid:105) to 2 | T (cid:105) transformation,”Quantum , 135 (2019).[37] Niel de Beaudrap, Ross Duncan, Dominic Horsman, andSimon Perdrix, “Pauli Fusion: a Computational Model toRealise Quantum Transformations from ZX Terms,” in Proceedings 16th International Conference on QuantumPhysics and Logic, Chapman University, Orange, CA,USA., 10-14 June 2019 , Electronic Proceedings in Theo-retical Computer Science, Vol. 318, edited by Bob Coeckeand Matthew Leifer (Open Publishing Association, 2020)pp. 85–105.[38] Michael Hanks, Marta P. Estarellas, William J. Munro,and Kae Nemoto, “Effective Compression of QuantumBraided Circuits Aided by ZX-Calculus,” Physical ReviewX , 041030 (2020).[39] Emmanuel Jeandel, Simon Perdrix, and Renaud Vilmart,“A Complete Axiomatisation of the ZX-Calculus for Clif-ford+T Quantum Mechanics,” in Proceedings of the 33rdAnnual ACM/IEEE Symposium on Logic in ComputerScience , LICS ’18 (ACM, New York, NY, USA, 2018) pp.559–568.[40] Kang Feng Ng and Quanlong Wang, “A universal comple-tion of the zx-calculus,” arXiv preprint arXiv:1706.09877(2017).[41] Amar Hadzihasanovic, Kang Feng Ng, and QuanlongWang, “Two complete axiomatisations of pure-state qubitquantum computing,” in
Proceedings of the 33rd AnnualACM/IEEE Symposium on Logic in Computer Science ,LICS ’18 (ACM, New York, NY, USA, 2018) pp. 502–511.[42] Renaud Vilmart, “A Near-Minimal Axiomatisation ofZX-Calculus for Pure Qubit Quantum Mechanics,” in (2019) pp. 1–10.[43] Miriam Backens and Aleks Kissinger, “ZH: A CompleteGraphical Calculus for Quantum Computations Involv- ing Classical Non-linearity,” in
Proceedings of the 15thInternational Conference on Quantum Physics and Logic,Halifax, Canada, 3-7th June 2018 , Electronic Proceed-ings in Theoretical Computer Science, Vol. 287, editedby Peter Selinger and Giulio Chiribella (Open PublishingAssociation, 2019) pp. 23–42.[44] Ian Affleck, Tom Kennedy, Elliott H. Lieb, and HalTasaki, “Rigorous results on valence-bond ground statesin antiferromagnets,” Phys. Rev. Lett. , 799–802 (1987).[45] Ian Affleck, Tom Kennedy, Elliott H Lieb, and Hal Tasaki,“Valence bond ground states in isotropic quantum antifer-romagnets,” Communications in Mathematical Physics , 477–528 (1988).[46] Marcel den Nijs and Koos Rommelse, “Prerougheningtransitions in crystal surfaces and valence-bond phasesin quantum spin chains,” Phys. Rev. B , 4709–4734(1989).[47] Tzu-Chieh Wei, Ian Affleck, and Robert Raussendorf,“Affleck-Kennedy-Lieb-Tasaki state on a honeycomb latticeis a universal quantum computational resource,” Physicalreview letters , 070501 (2011).[48] Aleks Kissinger and John van de Wetering, “PyZX: LargeScale Automated Diagrammatic Reasoning,” in Proceed-ings 16th International Conference on Quantum Physicsand Logic, Chapman University, Orange, CA, USA.,10-14 June 2019 , Electronic Proceedings in TheoreticalComputer Science, Vol. 318, edited by Bob Coecke andMatthew Leifer (Open Publishing Association, 2020) pp.229–241.[49] Zheng-Cheng Gu and Xiao-Gang Wen, “Tensor-entanglement-filtering renormalization approach andsymmetry-protected topological order,” Phys. Rev. B , 155131 (2009).[50] Frank Pollmann, Ari M. Turner, Erez Berg, and MasakiOshikawa, “Entanglement spectrum of a topological phasein one dimension,” Phys. Rev. B , 064439 (2010).[51] Eugene H. Kim, G. F´ath, J. S´olyom, and D. J. Scalapino,“Phase transitions between topologically distinct gappedphases in isotropic spin ladders,” Phys. Rev. B , 14965–14974 (2000).[52] P.W. Anderson, “Resonating valence bonds: A new kindof insulator?” Materials Research Bulletin , 153 – 160(1973).[53] R. Penrose, “Applications of negative dimensional ten-sors,” in Combinatorial Mathematics and its Applications (Academic Press, 1971) pp. 221–244.[54] Miriam Backens, “The ZX-calculus is complete for sta-bilizer quantum mechanics,” New Journal of Physics ,093021 (2014).[55] Stach Kuijpers, John van de Wetering, and AleksKissinger, “Graphical fourier theory and the cost of quan-tum addition,” arXiv preprint arXiv:1904.07551 (2019).[56] Niel de Beaudrap, “Well-tempered ZX and ZH calculi,”arXiv preprint arXiv:2006.02557 (2020).[57] M. Hein, J. Eisert, and H. J. Briegel, “Multiparty en-tanglement in graph states,” Phys. Rev. A , 062311(2004).[58] Matthew B Elliott, Bryan Eastin, and Carlton M Caves,“Graphical description of the action of Clifford operators onstabilizer states,” Physical Review A , 042307 (2008).[59] Robert Raussendorf and Hans J. Briegel, “A One-WayQuantum Computer,” Physical Review Letters , 5188–5191 (2001).[60] Brian Hall, Lie groups, Lie algebras, and representations: an elementary introduction , Vol. 222 (Springer, 2015).[61] Pierre Martin-Dussaud, “A primer of group theory forloop quantum gravity and spin-foams,” General Relativityand Gravitation , 110 (2019).[62] Quanlong Wang and Xiaoning Bian, “Qutrit dichro-matic calculus and its universality,” Electronic Pro-ceedings in Theoretical Computer Science (2014),10.4204/EPTCS.172.7.[63] Quanlong Wang, “Qutrit zx-calculus is complete for sta-bilizer quantum mechanics,” in Proceedings 14th Inter-national Conference on Quantum Physics and Logic, Ni-jmegen, The Netherlands, 3-7 July 2017 , Electronic Pro-ceedings in Theoretical Computer Science, Vol. 266, editedby Bob Coecke and Aleks Kissinger (Open PublishingAssociation, 2018) pp. 58–70.[64] Maarten Van den Nest, Akimasa Miyake, Wolfgang D¨ur,and Hans J Briegel, “Universal resources for measurement-based quantum computation,” Physical review letters ,150504 (2006).[65] Michael A Nielsen and Isaac Chuang, “Quantum compu-tation and quantum information,” (2002).[66] Daniel E Browne, Matthew B Elliott, Steven T Flammia,Seth T Merkel, Akimasa Miyake, and Anthony J Short,“Phase transition of computational power in the resourcestates for one-way quantum computation,” New Journalof Physics , 023010 (2008).[67] Daniel P. Arovas, Assa Auerbach, and F. D. M. Hal-dane, “Extended heisenberg models of antiferromag-netism: Analogies to the fractional quantum hall effect,”Phys. Rev. Lett. , 531–534 (1988).[68] Norbert Schuch, David P´erez-Garc´ıa, and Ignacio Cirac,“Classifying quantum phases using matrix product statesand projected entangled pair states,” Phys. Rev. B ,165139 (2011).[69] Xie Chen, Zheng-Xin Liu, and Xiao-Gang Wen, “Two-dimensional symmetry-protected topological orders andtheir protected gapless edge excitations,” Phys. Rev. B , 235141 (2011).[70] T. Senthil, “Symmetry-protected topological phases ofquantum matter,” Annual Review of Condensed MatterPhysics , 299–324 (2015).[71] Zhida Song, Zhong Fang, and Chen Fang, “(d-2)-Dimensional Edge States of Rotation Symmetry ProtectedTopological States,” Physical Review Letters , 246402(2017).[72] Tobias Meng, “Coupled-wire constructions: a Luttingerliquid approach to topology,” European Physical JournalSpecial Topics , 527–543 (2020). Appendix A: Spin matrices and representationtheory
The Hilbert space of a spin-chain with N spins is atensor product of the Hilbert space for each individualspin s : ( C s +1 ) ⊗ N . For the spin s = 1 chain this is simply( C ) ⊗ N . At each site, the spin-1 matrices that can beused to construct the AKLT Hamiltonian Eq. (1) in the main text can be taken to be S x = 1 √ , S y = i √ − −
10 1 0 , (A1) S z = 1 √ − , (A2)which can be used to define a spin vector at each site (cid:126)S i = ( S xi , S yi , S zi ). The spin operator S ai at site i actson the local Hilbert space of the i -th spin, and thus actstrivially on the full Hilbert space: S ai = I ⊗ I ⊗ I · · · I ⊗ I ⊗ S a ⊗ I ⊗ · · · . (A3)Hence, for two sites i, j we have the commutation rules (cid:2) S ai , S bj (cid:3) = iδ ij (cid:15) abc S cj , (A4)where latin letters label Cartesian directions (e.g., a = x, y, z ).Using representation theory we can explain how a spin-1 particle can be decomposed into the symmetric spaceof two spin-1/2 particles. First, recall that we can de-compose the four dimensions of the Hilbert space of twospin-1/2 particles into the triplet representation , whichis spanned by | (cid:105) , √ ( | (cid:105) + | (cid:105) ) , | (cid:105) , and the singletrepresentation √ ( | (cid:105) − | (cid:105) ). Viewing the triplet repre-sentation as a three-dimensional Hilbert space, these threespin-1/2 pairs have eigenvalues s z = 1 , , − s and s , can be decomposed into therepresentations with spins | s − s | , | s − s | +1 , · · · , s + s .We can then express the triplet and singlet decompositionfor two spin-1/2 particles as(1 / ⊗ (1 /
2) = (0) ⊕ (1) , (A5)which is sometimes called a fusion rule . For two spin-1particles we get using this rule(1) ⊗ (1) = (0) ⊕ (1) ⊕ (2) . (A6)Note that the only way to get (2) is from (1) ⊗ (1). Wecan use of this property to find the ground state of theAKLT Hamiltonian by expressing the Hamiltonian as asum of projectors onto the s = 2 subspace.A projector P ( s ) has eigenvalue 1 when applied to astate with spin s and zero otherwise. A projector into m spins of total spin s can be built from products ofthe operator ˆ O j = ( (cid:80) mi (cid:126)S i ) · ( (cid:80) mi (cid:126)S i ) − j ( j + 1) where j (cid:54) = s . This can be seen by noticing that S | s, s z (cid:105) = s ( s + 1) | s, s z (cid:105) , and thus ˆ O j returns zero when applied toa state with total spin j .For two ( m = 2) spin-1 particles, the projector to s = 2is constructed by projecting out the s = 0 and s = 1subspaces (choosing j = 0 , P (2) ( (cid:126)S , (cid:126)S ) = λ ˆ O ( (cid:126)S , (cid:126)S ) ˆ O ( (cid:126)S , (cid:126)S ) (A7)= λ [( (cid:126)S + (cid:126)S ) − (cid:126)S + (cid:126)S ) − . P (2) onto spin-2 annihilates any statewith total spin s equal to 0 or 1, i.e. P (2) | s = 1 , s z (cid:105) = P (2) | s = 0 , s z (cid:105) = 0, where s z denotes the eigenvalue ofthe state for S z . The coefficient λ is fixed by the require-ment that P (2) | s = 2 , s z (cid:105) = | s = 2 , s z (cid:105) which results in1 /λ = [2(2+1) − − (cid:16) (cid:126)S + (cid:126)S (cid:17) = (cid:126)S + (cid:126)S + 2 (cid:126)S · (cid:126)S and that (cid:126)S = (cid:126)S = 2for spin-1 we have P (2) ( (cid:126)S , (cid:126)S ) = 124 [4 + 2 (cid:126)S · (cid:126)S ][2 + 2 (cid:126)S · (cid:126)S ]= 16 ( (cid:126)S · (cid:126)S ) + 12 (cid:126)S · (cid:126)S + 13 . (A8)As a result, the AKLT Hamiltonian can be written as H = (cid:88) i (cid:126)S i · (cid:126)S i +1 + 13 ( (cid:126)S i · (cid:126)S i +1 ) (A9)= 2 (cid:88) i (cid:16) P (2) ( (cid:126)S i , (cid:126)S i +1 ) − / (cid:17) . (A10)As we observed below Eq. (A6), the only way for two spin-1 particles to be in the s = 2 subspace is for each to be in s = 1 subspace. Since the AKLT Hamiltonian is the sumof projectors onto the spin-2 subspace of neighbouringspins, it annihilates any state where any two of the fourneighbouring spin-1/2 degrees of freedom are in a spin-singlet, because such states have total spin s = 0.Lastly, as mentioned in the main text, the AKLT statehas a dilute anti-ferromagnetic order (a site with s z = ± ∓
1, with a string of s z = 0 inbetween), as discussed in the main text. It can be shownthat this order is captured by a non-zero string-orderparameter [46]. Appendix B: Additional diagrammatic proofs1. CSWAP POVM calculations
In the main text it was shown that if the E x operatoris applied to a CSWAP, that the CSWAP is absorbed(see (62)). In this appendix we will show the same for E z and E y . First, with E z : = == = == = 2 2 √ ( b ) ( f )( ho ) ( f ) ( ho )( ex ) ( c ) (B1)As such: = √ (B2)For the analogous derivation with E y we need a couplemore types of rewrites. First, there is a way to commutea π X-phase through an H-box: π = (B3)This can be proven easily using ( f ) to unspider the π phase, followed by ( hb ) and ( ab ).Second, there are ways to remove π -labelled Z-spidersand π -labelled Z-spiders from a diagram, by complement-ing the connectivity of their neighbours in a suitable way.These were proven in [28]. To write them down clearlywe adopt the notation of Hadamard-edges from [28]::= (B4)The first rule is known as local complementation : ± π α α n ...... ... ∝ ... α ∓ π ... α n ∓ π α ... α n − ... α ∓ π ... α n − ∓ π ...... (B5)Note that on the right-hand side the middle spider isremoved, at the cost of introducing edges between all itsneighbours. Because of (70), if there was already an edge0present between the spiders, the edge is cancelled, hencethe name complementation. The second rule is known as pivoting : jπα ∝ α n β β m γ γ l kπ ... α n + kπβ + ( j + k + 1) π ... β m + ( j + k + 1) πγ + jπα + kπ γ l + jπ ... ... ... ... u vU W V ........................ ......... ... (B6)Here the connected pair of spiders u and v which havea phase of 0 or π are removed on the right-hand side,at the costs of introducing edges between the exclusiveneighbourhood of u , the exclusive neighbourhood of v and the joint neighbourhood, labelled by respectively U , V and W in the diagram.Now we have all the ingredients we need to prove that E y applied to the symmetriser reduces to just E y : − π − π π − π π π − π π π π π π π − π π − π − π π − π π π − π − π − π π π − π − π − π π π − π − π − π π − π − π π − π − π − π π − π − π − π π − π − π − π π − π − π − π π − π ∝ ∝∝ ∝ = == ∝ (23)(20) ( f ) (21) ∝ (B5)(21) (B6) ∝ (21)(B3) ( f ) ∝ ( b ) ( f )( rw ) (70) ( c )( f )( hh )( id ) (B7)While this derivation is significantly more complicated,note that PyZX still manages to simplify it in an auto-mated way (using a different rewrite strategy).
2. Interior π phase extraction for the graph stateproof In the main text it was shown how the π phases from thesinglets on the measured 2D AKLT lattice can be movedonto the external wires for the measurement outcome E z .Here we will demonstrate the same for E x and E z .For an E x outcome in the bulk of the lattice we have: π ππ π π π = ππ (B8)1For an E y outcome, again in the bulk, we have: π ππ π − π − π − π π π π π π π − π π = π = − π − π − π − π πππ ππ = − π − π − π π π = π ππ π π π π π π π (B9)2 Appendix C: Overview of graphical rewrite rules α ... ... α ... ... = √ n + m nm nm α = e iα α ... ... α ... ... = √ n + m nm nm α = e iα α − α √ β ... ... α ...... = ... ... ... α + β ( f ) − α = ππ α ... ... π ( π ) aπ ... α = ... aπ ( c ) aπ ( id ) = ( b ) e iαe iaα √ n − . . . n = (cid:0) √ (cid:1) ( n − m − m . . . . . .. . . m n n = 1/2 ( ho )( hh ) == ( rw ) ... a ... m n ... nm ... a = 2 ...... m n ... nm ... = ...... (cid:16) √ (cid:17) n − ab = ab = π ... ... ... ... ... ab ...... a + b ... aa = π a ... ... ( m )( av )( in )( hf )( hb ) π ... = ππ ... ( hc ) = a ... √ a =... √ a π ... ( ex )( ab ) ππ