Robust entanglement distribution via quantum network coding

Many protocols of quantum information processing, like quantum key distribution or measurement-based quantum computation, ‘consume’ entangled quantum states during their execution. When participants are located at distant sites, these resource states need to be distributed. Due to transmission losses quantum repeater become necessary for large distances (e.g. ≳ 300 km ). Here we generalize the concept of the graph state repeater to D-dimensional graph states and to repeaters that can perform basic measurement-based quantum computations, which we call quantum routers. This processing of data at intermediate network nodes is called quantum network coding. We describe how a scheme to distribute general two-colourable graph states via quantum routers with network coding can be constructed from classical linear network codes. The robustness of the distribution of graph states against outages of network nodes is analysed by establishing a link to stabilizer error correction codes. Furthermore we show, that for any stabilizer error correction code there exists a corresponding quantum network code with similar error correcting capabilities.

In [17] we described a quantum repeater scheme based on quantum graph states [18,19], which naturally generalizes to networks of such devices.Such a network consists of several parties connected by repeater lines according to a mathematical graph.The aim is to provide the parties with a resource of entangled quantum states, which can be used in several protocols of quantum information theory, e.g.key distribution [20][21][22], Bell experiments [23], teleportation [24], distributed quantum computing [25], and secret sharing [26,27].A recently introduced research field studies network codes, i.e. networks in which the intermediate nodes are able to process the data packets instead of merely routing them [28][29][30].Network coding can improve the throughput as well as increase the robustness of the communication scheme against outages of nodes.Analogous studies have been performed in the quantum case, i.e. regarding quantum network codes (QNC) [31][32][33][34][35]. Again one can distinguish them by the way classical communication is treated.
Here we consider network coding in the scenario of free classical communication, which is reasonable given that it is usually easier to implement and well-developed in practice.While we described the error correction on the * epping@hhu.dephysical layer (i.e.single qubits) in [17,36], we now focus on analysing quantum error correction on the higher level of the network, where errors correspond to failures of whole nodes.As the error model we use the depolarizing channel, i.e. lost qudits are replaced by the completely mixed state, which corresponds to some probability for discrete X and Z errors on the qudit of the lost node [37].In this paper we describe how network coding, implemented here by simple measurement-based quantum computation [38], helps to distribute multipartite entangled qudit graph states amongst distant nodes of a network.This task is a general prerequisite for many quantum information protocols, see above.We start with a short introduction to qudit graph states in Section II.In the same section we summarize the main idea of the graph state repeater [17] and generalize the concept from qubits to qudits (i.e.D-dimensional quantum systems with D ≥ 2).In Section III we apply network coding to the repeater network starting from the examples of the butterfly network and linear network codes and describe different codes that lead to the same distributed graph state.The main result of this paper, the analysis of the robustness of the quantum network coding scheme in terms of stabilizer error correction codes [39,40], is developed in Section IV.We end with an outlook and conclusions in Section V.

II. GRAPH STATES AND QUANTUM NETWORKS
In this work we make extensive use of the stabilizer formalism [37,39].Instead of directly writing down the quantum state |ψ of a system it can be more convenient to keep track of a set S of commuting operators, which uniquely define |ψ via the eigenequations We say s stabilizes |ψ .Please note that products of stabilizer operators fulfil Eq. ( 1), too.
Consider a measurement of the observable A with outcome α and let P α denote the projector onto the eigenspace of A associated with the eigenvalue α by P α .
One may update S corresponding to the new knowledge by replacing all s ∈ S that commute with P α by P α s.All stabilizer operators that do not commute with P α are removed from S after the measurement.Let the postmeasurement state |ψ be defined by a minimal set of operators that commute with P α (for all α).We call these operators the main stabilizers.Identifying them suffices to understand the measurement dynamics.
We will be mostly interested in the non-Fd part B of a system composed of A and B after measuring the observable A on A with outcome α.We therefore trace out system A after the measurement.If a stabilizer operator s has the form A x ⊗ B, with integer x, before the measurement of A, then we simply replace it by α x B (acting on B only) after the measurement.The stabilizer formalism is particularly handy in the context of graph states [18,19,41].A qudit graph state |G associated with a mathematical graph G is a particular quantum state of the composite system of several Ddimensional quantum systems (the vertices), see e.g.[41].
We denote the corresponding graph by G = (V, E), where V is the set of vertices and E is the set of edges.Each edge (a, b) ∈ E has an integer-valued weight, which can be found at the position (a, b) in the adjacency matrix Γ, i.e. the weight is Γ ab .The graph state |G is defined to be the unique quantum state stabilized by the so-called stabilizer generators where and Because X D = Z D = 1 many calculations in the remainder will be done modulus D, i.e. in the finite field F D .For example Z j = Z j mod D and X −1 = X D−1 .And more explicitly, where and the controlled-Phase gate acting on qudit a and b is X and Z are not Hermitian (except for D = 2) but normal and we will use them as observables, i.e. we measure in the eigenbasis of the operator, projecting onto the eigenspace associated with an eigenvalue.We assign this eigenvalue to the measurement outcome.The discrete Fourier transform matrix performs the basis change HXH † = Z and HZH † = X −1 .
The above considerations regarding measurements in the stabilizer formalism help to understand the idea of the graph state repeater of [17].
In the present context a quantum network consists of several (many) separated sites, which are connected by quantum channels.We keep the physical level with the error correction code against transmission losses hidden from our abstraction, because it will not be important in the present paper.See [17,36] for the omitted details.We may therefore assume that the quantum channels are perfect.
The task is to produce a graph state shared by a subset of these sites, which we call "parties".If the other sites have vertex degree two, then they are called quantum repeaters, else they are called quantum routers.The latter term is used to distinguish them from the standard concept of quantum repeaters in the literature.Repeaters and routers will be depicted by squares, while parties are shown as disks.The quantum circuits of a quantum repeater and a quantum router are shown in FIG. 1.A (a)A quantum repeater.
(b)A quantum router with vertex degree five.
FIG. 1.The circuits of a repeater (vertex degree two) and a router (vertex degree greater than two), see also [17,36].The shown state preparation, controlled-Phase gate and measurement are meant to be logical, i.e. the physical level is hidden from abstraction.
quantum network allows to generate a graph state like the one shown in FIG. 2. The transmission directions on the channels to create the edges can always be assigned, s.t. the network is acyclic and the nodes can be brought into a time-order, where each site receives all qudits before it sends the outgoing qudits.An edge of weight γ ∈ Z between sites A and B is created as follows.Let ) γ is applied to a and b.Finally the qudit b is sent to the site B.
Let a network corresponding to the graph G = (V, E) be given, i.e. parties V connected by repeater lines E. Suppose the graph state |G is to be distributed.This can be achieved by producing the graph state with a qudit at each repeater station as shown in FIG. 2.
In our protocol all repeaters and routers measure their qudits in the X-basis.The post-measurement state can be found by looking at the main stabilizer operators, which are constructed from chains of X-operators obtained by multiplying powers of the generators of Eq. ( 2), where the exponents are chosen such that the Z-operators cancel out each other [42].Note that the weight of the edge enters as a multiplicative factor in the exponent of the Z-operators, see Eq. (2).As described above one can measure the qudits of the repeater stations in X-basis and replace the operators in the main stabilizer by the corresponding measurement outcomes.One obtains, up to by-product operators, the stabilizer generators of the desired graph state.This way one easily sees which graph state is produced.

III. NETWORK CODING
In [17] all repeater stations had vertex degree two.Now we consider repeaters ("routers") with higher vertex degree.This leads to quantum network coding (QNC), i.e. the intermediate sites now perform a special type of (measurement-based) quantum computation instead of merely passing on the data.This can be advantageous in terms of the possible throughput (distributed states per network use) and the robustness against failures of nodes.A simple and famous example for the first advantage is the butterfly network [28,31], see FIG. 3. The desired target state has two edges: one from A 1 to B 1 and one from A 2 to B 2 , each with edge weight 1, i.e.A i and B i want to share a Bell pair.The communication on each network link is restricted to a single qudit.This task is impossible with a routing strategy [43].From the main stabilizer operators is clear, that the desired state is produced up to by-product operators (see Appendix A) by X measurements on qudits 1 and 2.
The example of the butterfly network is actually translated from classical network coding theory (see below).
We point out that a quantum network code like the one discussed previously can be found for any classical linear network code, see [44] and Theorem 1.

A. Classical network coding
We focus on wired networks, which consist of nodes connected by communication lines (see FIG. 4).The nodes can be distinguished into three classes: sources (A) send information to sinks (B), possibly via intermediate sites (C).Sources and sinks will be denoted parties.A classical network can be represented mathematically by a graph G cl. = (V cl., E cl. ), where V cl. is the set of nodes or vertices and E cl. is the set of links or directed edges.It will be convenient to associate imaginary edges with the sources (sinks) that do not have a starting point (endpoint) and transmit the message created (decoded) at the source (sink).Each edge e ∈ E cl. has the form (a, b) and implies that a single symbol can be transmitted from a to b in a single network use.The underlying alphabet contains D different symbols and will be denoted as the base field F D .G cl. is required to be acyclic, which implies that nodes and the transmissions on the edges can be brought into a time order, such that each node received the incoming packets before it sends the outgoing ones.With this order of the nodes and edges at hand, we define for each node v the vectors In(v) and Out(v) to contain the parents and children of v, respectively.In a slight abuse of the notation we denote the in-and outdegree of v by | In(v)| and | Out(v)|, respectively.The instructions for each node how to process the packets form the network code.We focus on linear network codes meaning that the outgoing packets are linear combinations of the incoming packets.Even though situations in which non-linear codes outperform the linear ones are known [45], the latter nevertheless form a very important class of network codes.They are proven to be optimal in networks with a single source.Furthermore the linear nature allows for a simple decoding.Following Raymond W. Yeung [29] The notation is exemplified with the (classical) butterfly network in FIG. 4. A linear network code on the Butterfly can outperform the best routing strategy.The overall effect of any linear network code with sources A and sinks B can be described by the |B| × |A|-matrix F that maps the vector of symbols sent by the sources to the vector of symbols received at the sinks.The network coding decomposes this matrix into a product of block matrices, the local encoding kernels, such that the rate constraints of the edges are fulfilled.

B. Distribution of quantum two-colorable graph states
In this section we describe quantum network codes that distribute graph states associated with two-colorable (bipartite) graphs.A two-colorable graph G = (V, E) allows FIG. to split V into two sets V 1 and V 2 , such there are no edges between vertices of the same set.The construction is the same as the one of [35], but we use the network for the distribution of graph states instead of teleportation only.
The following graph state will be a useful building block.
Definition 1 (Graph state for a linear map).Let an arbitrary linear function K : F n D → F m D be given via its m×n-matrix representation K.We define the graph state |K via the two-colorable graph G K with partitions A = {A 1 , A 2 , ..., A n } and B = {B 1 , B 2 , ..., B m }, i.e. vertices V = {A, B}, and adjacency matrix We remark that the state where i is the vector of base-D digits of i, is produced up to by-product operators, if K is injective, the qudits A are initialized in an arbitrary state |ψ A instead of |+ ⊗m and measured in X-basis [35].This relates the considerations in terms of stabilizers to the quantum state produced in measurement-based quantum computations.See Appendix B for details.
As mentioned above, a linear network code is the decomposition of F into a product of local encoding kernels, such that the rate constraints are fulfilled.A concatenation of the graph states corresponding to the local encoding kernels K v according to Definition 1, see FIG. 5, translates the linear network code to a quantum network code.This is done in the following theorem.It generalizes the results of [35], which considers teleportation in the described network, to the distribution of general two-colorable graph states.
where the j-th row of F is the global encoding kernel on the j-th imaginary sink edge.
The proof and more details on the construction of the pre-measurement graph state are given in Appendix C. We remark that Theorem 1 contains the production of |A| GHZ states as a special case, when the imaginary edges of the sink nodes are canonical basis vectors as defined by the imaginary edges of the source nodes.The construction of the quantum network code is illustrated for the example of a network of one source p and six sinks that does not allow for a binary multicast, i.e. it is not possible to send two bits from p to all sinks.But a ternary multicast is possible [29].The corresponding QNC is shown in Fig. 6.

C. Equivalent network codes
The pre-measurement graph state of Theorem 1 is not necessarily the simplest possible one.A network code can be simplified by using the graph state after the Xmeasurement on a qudit (see [19] for the case D = 2) right from the start if it is compatible with the network constraints (rates of the channels).In many cases the FIG. 6.A linear network code (taken from Yeung, Fig. 19.5) and its corresponding quantum network code.Grey vectors are global encoding kernels.The network does not allow for a binary linear network code to achieve the task.The QNC produces two 7-qutrit GHZ states.Orange (light grey) edges have weight −1 and black edges have weight one unless explicitly labelled otherwise.
state after X-measurements is given by the following theorem.
Theorem 2 (Network simplification).Let G = (V, E) with adjacency matrix Γ be given.Denote the neighbour- and Γ ab and D are co-prime.Via a measurement of a in X-basis, the state |G is projected onto |G (up to by-product operators) with adjacency matrix Γ , which equals Γ except for and where c ∈ N a \{b} and d ∈ N b \{a}.
The theorem is proven by finding appropriate main stabilizers, see Appendix D. It can also be applied in the other direction.For example subdividing an edge by inserting a node on it leads to an equivalent quantum network code (this is a "quantum repeater").Theorem 2 can be applied to more general graph states than the ones of Theorem 1, e.g. to networks where the graph of the distributed graph state is not two-colorable.Different codings, i.e. different pre-measurement graph states that are compatible with the network constraints, can lead to the same post-measurement graph state.Two equivalent codings are shown in FIG. 7.  The measurement of a stabilizer operator detects an error that anti-commutes with it, because the measurement outcome becomes −1 [39,40].
In principle a graph state is an [[n, k = 0]] stabilizer quantum error correction code [39,40], which can correct an arbitrary amount of errors.However, this would require to measure the stabilizer generators, which are not local and we consider this impossible in the network scenario.Also graph codes [18,46], i.e. quantum error correction codes where the codewords are elements of the graph state basis, which can encode data (k > 0) require to measure non-local stabilizer operators in general.But it is possible to detect a restricted set of errors from the data obtained in the X-measurements on the intermediate qudits in a QNC scheme.Namely any error that does not commute with an X-chain is detected [42], because the product of the measurement outcomes (to the appropriate power) on an X-chain is 1 in case of no errors.A tandem arrangement of weight one edges acts as an identity: The graph is equivalent to , see Theorem 2, which obviously can be used for teleportation (see remark after Definition 1).The explicit calculation is done in Appendix F. We can thus form a three qudit repetition code as shown in FIG.8(a).We think of such a network as a distributed storage system: quantum information is sent to the three storage devices q 1 , q 2 , and q 3 , where it is saved for some duration.Afterwards it is sent to b where it is read out and/or processed.However, with some probability a memory gets corrupted or lost, e.g.due to some power outage, a malfunction or an adversary intervention.Suppose that an unnoticed Z error occurs on one of the memories, say q 1 , in the network of FIG.8(a).This error shifts (rotates) the outcome of the X-measurement on q 1 .But, because X q1 X −1 q2 and X q1 X −1 q3 are X-chains of the graph state, the measurement outcomes of q 1 , q 2 and q 3 need to be equal in case of no errors.By majority vote we decide that the error occurred on q 1 and we can correct it.There is also a slightly different way of understanding the error correction in a network.The network acts as the identity, because the main stabilizer operators X a X −1 b and Z a X q1 Z b are projected onto X a X −1 b and Z a Z b by the X-measurements on the intermediate qudits.This Bell pair can be used to teleport a quantum state.Instead of choosing Z a X q1 Z b we could also choose Z a X q2 Z b or Z a X q3 Z b , i.e. we only need to find one pair of error free main stabilizer operators to do teleportation.If the position of the error is known, which we will consider to be the case in the remainder, then two errors can be corrected/tolerated.We assume that an outage of a node is noticed.Of course the presented three qudit repetition code is not able to correct X errors on the storage devices.We therefore enlarge the code to the nine-qudit-Shor code, see FIG. 8(b).The X-chain group on the intermediate qudits is generated by the operators corresponding to the generators of the stabilizer of the code space of the nine-qudit-Shor code.A possible choice of the two main stabilizer operators that are projected onto the stabilizer generators of a Bell pair are while again multiplication of S i with any X-chain leads to another possible choice for S i .As before, the error Z q1 shifts the outcome of the X-measurement outcome on q 1 .An X-error on q 1 does not affect the outcome at q 1 , but it propagates to an Z-error on r 1 via the C Z -gate.Again we assume that the positions of losses are known.Then S 1 requires that there is at least one error-free qudit in each group ({q 1 , q 2 , q 3 }, {q 4 , q 5 , q 6 } and {q 7 , q 8 , q 9 }), while S 2 requires, that there is at least one group with no loss at all.The nine-qudit-Shor code can be generalized to an arbitrary amount of blocks and an arbitrary number of qudits per block, which is sometimes referred to as quantum parity code [47].
The link between the network of Fig. 8(b) and the Ninequbit-Shor code, and an analogue correspondence for all network error correction codes, is made formal in the following definition.
1. for i ∈ {1, 2, ..., k} the operators X ai Z bi and Z ai X bi stabilize the state after X-measurements on C and application of by-product operators (on A and B) 2. and d is the smallest weight of an error acting on Q ⊂ V that commutes (after error propagation) with all X-chains on C.

Each main stabilizer between
A and B acts on Q or Out(Q) non-trivially.
In the following we motivate the previous definition by mapping the network code to a stabilizer error correction code.An X-chain of a graph state is a stabilizer operator which does not contain Z-operators [42].Xchains form a group with the usual multiplication.The X-measurements on C determine the measurement outcomes of all X-chains simultaneously.Let s i denote the generators of the X-chain group on G restricted to C (i.e. they act trivially on A and B).This group is mapped to the stabilizer group of an [[n, k, d]] stabilizer error correction code generated by si Out(q j ) j qj (19) with α ij and β ijh being the power of X qj and X Out(qj ) h in s i , respectively.That is, si contains an X operator for each X operator on Q and a Z operator for each X operator on a successor of Q, respectively, in s i .The C Z gates corresponding to the edges between the qudits in Q and their successors Out(Q) propagate X-errors on Q to Z-errors on Out(Q).Thus after error propagation an error on Q commutes with sj if and only if the same error in the stabilizer code commutes with s j .An error is undetected if and only if it commutes with all stabilizer generators.Therefore the network code with generators s j and the stabilizer code with generators sj have the same error correction capabilities.The mapping of Definition 2 can be used to analyse the robustness of a QNC w.r.t.errors on Q.We do this for the two networks shown in FIG. 9.The first network is (a)A QNC corresponding to the linear code of FIG.
FIG. 9.Quantum network coding can be used for diversity coding [29]: Errors on some of the memories (Q) can be corrected using the data of the X-measurements on all qudits except at A and B.
a QNC analogue of the diversity coding scheme of FIG.
18.5 in [29].In this example, a possible choice of main stabilizer operators reads and i.e. two Bell pairs shared by A and B are produced.One easily verifies that the X-chain group on X q 2 X q 3 .These generators correspond to s1 = X −1 XX and s2 = 11Z 2 .While this code can detect a single Z error on any memory, it cannot detect an X error, i.e. it can only correct one type of errors.Consequently it has d = 1.One might expect this result for a classical code.The generators of the X-chain group on C = P ∪Q∪R in the expanded network in FIG.9(b) and the corresponding codespace stabilizer operators are , and s4 =1111.(24) From this one readily obtains that the QNC of FIG.9(b) is a [[4, 2, 2]] code, i.e. it encodes two qudits into four qudits and it can tolerate a single erasure in Q.A construction similar to the previous ones can be used to obtain a quantum network code from any stabilizer quantum error correction code.Theorem 3. Given an [[n, k, d]] stabilizer quantum error correction code C with parity check matrices H X and H Z in prime dimension D. Let the i-th logical X-operator be given by the numbers , s 2 , ..., s n−k }, and Q = {q 1 , q 2 , ..., q n }.The network with vertices V and adjacency matrix with and The proof is done by identifying main stabilizer operators and is given in Appendix E. The idea of the construction of Theorem 3 is illustrated in FIG. 10 for the 7-qubit Steane code, the five-qubit code and a [ [12,2,3]] low-density parity check code taken from [40].The error correction in the network variant is done analogously to the stabilizer code.For example in FIG.10(b), the X-chains FIG. 10.Three examples for Theorem 3. By measuring all qudits except at A and B in X-basis, k Bell-pairs shared by A and B are obtained (up to by-product operators).The distribution scheme can tolerate two errors (i.e.node outages) on the n "memories"-qudits Q.
in the five-qubit code.Please note that the QNC described in Theorem 3 is not necessarily the simplest one implementing the stabilizer error correction code in a network (see also Theorem 2).The QNC corresponding to the nine-qubit-Shor code obtained from Theorem 3 differs from the example shown in Figure 8(b).

V. CONCLUSION AND OUTLOOK
In this paper we described how graph state repeater with vertex degree larger than two, which we call quantum router, can employ network coding.It is well known that this measurement based quantum computation at intermediate network sites can increase the throughput of a network.We used the framework of graph state repeaters to generalize the construction of QNCs from linear codes of [44] to the distribution of general graph states associated with two-colorable graphs.Furthermore we analysed the robustness of QNC, i.e. its error correction capabilities, by mapping them to stabilizer codes.The formalism developed in this work can be applied to investigate further interesting questions in this context.We plan to apply the techniques developed to simplify the quantum network code to the simplification of gates in measurement-based quantum computation, e.g. the SWAP gate that corresponds to the butterfly network.It will be interesting to consider network coding in random graphs and compare it to classical random network coding, which proved to be very efficient, e.g. if the network layout is unknown.A further related project is the generalization of the presented scheme to the distribution of graph states associ-ated with non-two-colorable graphs.The advantage of the distribution of multipartite entanglement via routers with network coding for quantum key distribution, as measured by the secret key rate, compared to bipartite QKD protocols, deserves further quantitative investigations.This finishes the proof of Eq. (C7).We continue by showing that S Bĩ =g Bĩ e=(a,[Out(a)]j )∈E cl.We used that H † XH = Z −1 and H † ZH = X.From the exponents of the Z-operator one can read the weights of the post-measurement state.

( a )
FIG. 2. A network of repeater stations (squares) connects the parties V = {A, B, C, D} (disks).The orange (light grey) edge has weight −1 (s.t.no basis change is necessary for the final state), black edges have weight one unless explicitly labelled otherwise.All repeaters and routers (squares) measure their qudit in X-basis.The main stabilizer centred on C shown in (a) defines the neighbourhood of C in the postmeasurement state (b) shared by the parties A, B, C, and D. The brown background indicates the network infrastructure, i.e. the sites and fibres.

FIG. 3 .
FIG.3.The butterfly network.A1 and A2 want to share a Bell pair with B1 and B2, respectively.Orange (light grey) edges have weight −1 and black edges have weight one unless explicitly labelled otherwise.
we describe a linear network code over base field F D by its local and global encoding kernels.The global encoding kernel f e of an edge e gives the coefficients of the packet transmitted across e in the basis of the source packets.For |A| symbols created by sources the network code is called |A|dimensional and f e ∈ F |A| D .The local encoding kernels are | Out(v)|×| In(v)|-matrices K v for each node, that define the linear combination of the outgoing packets.The local encoding kernel K v at vertex v relates the global encoding kernels of the incoming and outgoing edge via (a)The global encoding kernels.(b)The local encoding kernels.

FIG. 5 .Theorem 1 .
FIG. 5.The construction of G (b) from G (a).The local subgraphs of (b) are given by Definition 1 for the linear map of the local encoding kernels shown in (a).Orange (light grey) edges have weight −1 and black edges have weight one unless explicitly labelled otherwise.
IV. ROBUSTNESS OF QUANTUM NETWORK CODINGAn[[n, k, d]] quantum error correction code encodes k logical qudits into n physical qudits with code distance d, i.e. it can correct up to d−1 2 errors at unknown positions or up to d−1 errors if the affected qudits are known.

FIG. 7 .
FIG. 7. Different quantum network codes can lead to the same distributed graph state.Orange (light grey) edges have weight −1, black edges have weight one unless explicitly labelled otherwise.The brown background indicates the network sites and available links.The post-measurement state can be read from the main stabilizers like the one centred on D, which is shown in (a) and (b).The final state is not local unitary equivalent to any two-colorable graph state.

FIG. 8 .
FIG. 8. Simple network variants of error correction codes.All edges have weight one.

Definition 2 (
Network error correction code).A graph state |G associated with G = (V, E) with vertices V = A ∪ C ∪ B (sources, intermediate nodes and sinks) and adjacency matrix Γ defines an [

)
implements an[[n, k, d]] QNC w.r.t.errors on Q.Here wt( Xi ) denotes the number of qudits on which the i-th logical X operator acts non-trivially.The network produces k Bell pairs and thus allows to teleport k qudits from A to B.
network coding on G T cl., source and sinks exchange their role.The same reasoning as above can be applied to prove Eq. (C11).Denote the measurement outcome of the intermediate node w as e xw2πi/D .The operator X w in Eqs.(C3) and (C5) is replaced by e xw2πi/D .By this S v accumulates a phase e ξv2πi/D with In(b)]j ,b)∈Ex bin,j ( f e ) i if v = A i e=(a,[Out(a)]j )∈E x aout,j ( g e ) i if v = B ĩ (C12)and a possible choice of the corresponding by-product operator is Z (D−1)ξv v .One sees that |G has been produced by comparing its stabilizer generators with the main stabilizers.

Appendix D: Proof of Theorem 2 Theorem 2 (FIG. 12 .
FIG. 12. Sketch of the graph in Theorem 2 with vertices a, b, c, and d.
4. The Butterfly network.It consists of two sources A = {u, v}, two sinks B = {y, z} and two intermediate nodes C = {w, x}.The task is for u to transmit a bit to z, while simultaneously v casts a bit to y.Under the restriction that each link has capacity one, this task is not achievable with a routing strategy.But the depicted linear network code achieves it.Dashed edges are imaginary.