Modular architectures for quantum networks

We consider the problem of generating multipartite entangled states in a quantum network upon request. We follow a top-down approach, where the required entanglement is initially present in the network in form of network states shared between network devices, and then manipulated in such a way that the desired target state is generated. This minimizes generation times, and allows for network structures that are in principle independent of physical links. We present a modular and flexible architecture, where a multi-layer network consists of devices of varying complexity, including quantum network routers, switches and clients, that share certain resource states. We concentrate on the generation of graph states among clients, which are resources for numerous distributed quantum tasks. We assume minimal functionality for clients, i.e. they do not participate in the complex and distributed generation process of the target state. We present architectures based on shared multipartite entangled Greenberger–Horne–Zeilinger states of different size, and fully connected decorated graph states, respectively. We compare the features of these architectures to an approach that is based on bipartite entanglement, and identify advantages of the multipartite approach in terms of memory requirements and complexity of state manipulation. The architectures can handle parallel requests, and are designed in such a way that the network state can be dynamically extended if new clients or devices join the network. For generation or dynamical extension of the network states, we propose a quantum network configuration protocol, where entanglement purification is used to establish high fidelity states. The latter also allows one to show that the entanglement generated among clients is private, i.e. the network is secure.


I. INTRODUCTION
Quantum communication is an emerging discipline within quantum information science. The applications of quantum communication range from quantum key distribution [1][2][3][4][5] over secure quantum channels [6][7][8] to distributed quantum computation [9] or quantum key agreement protocols [10][11][12]. All these tasks require entanglement as a key ingredient. Quantum networks [13][14][15][16][17], i.e. several connected quantum devices, form a highly relevant and active field of research in quantum communication. The most basic example of a quantum network corresponds to a single point-to-point quantum channel between two parties.
In contrast to classical networks, where information is simply sent through a classical channel, quantum networks may serve a more general purpose due to the nature of quantum mechanics. In particular, sharing distributed entangled states between parties enables them to perform distributed quantum tasks. This includes e.g. distributed quantum computation, secure quantum channels in terms of teleportation [18], quantum conference key agreement and distribution [10-12, 19, 20], quantum secret sharing [20][21][22][23] or distributed sensing [24,25]. Therefore it is desirable for a quantum network to offer capabilities beyond establishing pairwise communication channels, which corresponds to the quantum counterpart of classical network channels. Different multipartite entangled states serve as resources for various quantum task, but almost all of them rely on a class of states, so-called graph states [26]. Therefore, we concentrate on the generation of graph states in a quantum network in this work.
In contrast to previous approaches [27][28][29][30][31], we follow a top-down approach and introduce a flexible, modular architecture that allows one to establish arbitrary graph states among clients upon request, by using pre-generated (multipartite) entanglement. We aim at plug-and-play architectures, where clients solely connect to quantum network devices. In addition we assume minimal functionality of clients, including only single qubit memories. In turn, there are no memory restrictions at the network devices, however we provide architectures that minimize the required storage qubits. We discuss and present solutions for quantum networks at an abstract level by identifying network building blocks and their interactions, which enables highly modular architectures. Moreover, by abstracting and defining network devices and networks as building blocks, our construction allows for layered and recursive structures.
The architecture we focus on is request-driven by the clients: they request a graph state from the network but do not participate in its complex construction process. As a consequence, the quantum network devices carry out the generation of the graph state in a collaborative and distributed manner. More precisely, the quantum network devices generate the desired target state from an entanglement resource state -which we refer to as network state-, and a quantum state kept within the devices. The final state is then delivered to the clients. This enables a full multiparty functionality for the end users of the quantum network. For construction of the graph states we assume that the entanglement resource is available at the network devices upon incoming requests, i.e. the quantum state of the network has already been established. This has the advantage that no additional time is necessary to create the entanglement resource on demand. Hence, the time to generate the requested state only amounts to classical communication between devices, since all required measurements and operations can be done in a single time step. In addition, in such an entanglement-based approach, the network structure is at this stage in principle independent of the physical links. Following such a top-down approach avoids complex routing tasks (see e.g. [32,33]) that need to be op-timized dynamically while fulfilling the request. Observe that such tasks can cause a large time overhead which may result in long waiting times for the client. While the qubits for the network states need to be routed to their destination, the fact that these states are known in advance (due to the architecture of the network) and belong to a small set of states means that optimized routing schemes can be developed beforehand which do not need to be adjusted dynamically [34]. Hence, the focus of quantum networks relying on our architectures lies on describing a straightforward way to distribute arbitrary graph states in the network and providing fast response times for its clients. This is not necessarily the most resource efficient way and if the state requested by the clients is known beforehand or the set of target states of the network is restricted, it would certainly be possible to develop optimized architectures for those applications.
Clients and quantum network devices may appear or also disappear dynamically during the lifetime of a quantum network. To take this into account, we propose a quantum network configuration protocol for distributing and extending the network state during the run-time of the network, which is crucial for enabling our approaches. Observe that the entanglement resource needs to be such that the network devices can generate any graph state from it. Furthermore, it turns out that our protocols are especially suited for parallelization within the network. By parallelization we mean here that disjoint subsets of clients may demand the network devices to generate graph states among these subsets in parallel, without redistributing a new network state. Our architectures follow a recursive approach, where networks and devices appear in a recursive manner. This turns it into a promising candidate for recursive quantum network architectures [15].
To establish states with high fidelity among the devices, we rely on encoded transmission using quantum error correction, or bipartite and multipartite repeater architectures. Both approaches allow one in principle to establish long-distance entanglement in a network. The latter includes entanglement distillation, where few high fidelity states are generated from multiple noisy copies. Here, we employ entanglement distillation also to show the security of our architectures. In particular, as shown in [35,36], it suffices to prepend entanglement distillation protocols appropriately to disentangle any eavesdropper. This generates private entanglement, and yields to secure quantum networks even in cases where network devices are untrusted. Finally we point out that if the functionality of a network is restricted to generate specific classes of states, like e.g. GHZ states, our architectures simplify tremendously and provide efficient solutions for quantum networks.
The paper is organized as follows. In Sec. II we review the basic concepts which will be used throughout this paper. In particular we discuss GHZ states, graph states, their manipulations and merging/connecting techniques, generation of high-fidelity states over large distances and prior work on quantum networks. Then we present in Sec. III the elementary building blocks of quantum networks. Next, we propose the network architecture which relies solely on GHZ states in Sec. IV and the decorated network architecture in Sec. V. We also present a hy-brid architecture in Sec. VI and discuss an architecture relying solely on bipartite entangled states in Sec. VII. Next, we discuss protocols for generating and extending the network state of the architectures of Sec. IV and V in Sec. VIII. In Sec. IX we compare and relate our architectures to the bipartite approach of Sec. VII. Finally, we discuss optimizations of our architectures in Sec. X. We conclude and summarize our findings in Sec. XI where we also provide an outlook and identify interesting open questions.

II. BACKGROUND
In the following we summarize the necessary background to construct quantum networks. In particular we start with a short review of graph states, a specific class of stabilizer states, and their manipulations. Then we recap some merging and connecting techniques related to graph states as well as basic and useful properties of GHZ states. Next, we recall briefly the basics of entanglement distillation protocols and quantum repeaters. Finally, we review some relevant results on quantum networks.

A. Graph states and their manipulations
Graph states [26,[37][38][39] form a specific class of stabilizer states. A stabilizer state is a quantum state which is stabilized by operators of the Pauli group. In particular, for a stabilizer state |ψ there exists a subgroup S n of the Pauli group P n such that we have for all s ∈ S n that s|ψ = |ψ . In other words, the state |ψ is the common +1 eigenstate of the operators within S n . A graph state |G [38] associated with a classical graph G = (V, E) is defined as the common eigenstate of the stabilizers or correlation operators where a ∈ V , and E denotes the set of edges. The subscripts in (1) indicate on which qubit the Pauli operator acts on. Graph states can explicitly be generated by means of controlled phase gates among all edges. More specifically, the graph state |G stabilized by the family of operators (1) can be generated via where CZ a,b = |0 0| a ⊗ id b + |1 1| a ⊗ Z b denotes the controlled phase gate, also referred to as CZ gate. In particular, performing a controlled phase gate between two non-adjacent qubits introduces a new edge within the graph G. Conversely, if there is already an edge within the graph G the controlled phase gate between the two adjacent qubits will remove that edge from the graph. There are several important properties of graph states [26,38] which we make use of extensively here. For example, if a qubit is measured in the Z basis, then all edges associated with this qubit and the vertex corresponding to that qubit will be deleted from G. Depending on the measurement outcome, local Clifford corrections may need to be applied to the remaining qubits. If a qubit is measured within the Y basis, the subgraph spanned by the neighbours of the measured qubit is locally complemented. After that the qubit is removed from the graph. Again, depending on the measurement outcome correction operations need to be applied. Finally, if a qubit is measured within the X basis, one selects a neighbour, which we denote by b, of the measured qubit, performs a local complementation w.r.t. b and locally complements the resulting graph w.r.t. the measured qubit. Next the measured qubit is removed from the graph. As last step another local complementation w.r.t. b is done. Depending on the measurement outcome, correction operations need to be employed.
Furthermore we call two graph states |G and |G local unitary equivalent (LU equivalent), if there exist unitaries U 1 , . . . , U n such that |G = U 1 ⊗ · ⊗ U n |G .

B. Connecting and merging graph states
In this section we will describe how to connect and merge graph states. Since the goal of our architectures is to generate arbitrary graph states, the techniques which we discuss here are crucial when applying our protocols. For simplicity we do not concern ourselves with any Clifford corrections due to measurement outcomes at this point.

Connecting graph states
The first technique, which we also refer to as connecting procedure, uses controlled phase gates and measurements in the Y basis. Suppose we want to connect two graph states at vertices having only one neighbour each. Applying a CZ gate between the those vertices establishes an edge between them. Recall that a measurement in the Y basis performs a local complementation of the subgraph induced by the neighbourhood of the measured vertex. Since both vertices which have been connected by the CZ gate had one neighbour before the CZ gate each, measuring those vertices results in a wire in the final graph state, see Fig. 1.

Merging graph states
Finally we discuss a merging procedure for graph states which uses a controlled NOT (CNOT) gate. We recall the effect of a CNOT on a tensor product of two graph states |G 1 ⊗ |G 2 where G 1 = (V 1 , E 1 ) and G 2 = (V 2 , E 2 ) denote classical graphs. For that purpose we first compute the commutation relations of a CNOT with X and Z operators as where s denotes the source and t denotes the target qubit of the CNOT. Therefore we find for the application of a CNOT to the tensor product of the two graph states |G 1 and |G 2 where s ∈ V 1 and t ∈ V 2 the following: Eq. (4) implies that all stabilizers of the neighbourhood of s do not change, since Z s commutes with CNOT s→t . Similarly we observe that the same observation applies to the stabilizer of the target qubit according to (5), since X t commutes with CNOT s→t . In contrast, (3) implies that all neighbours of the target qubit t will be neighbours of the source qubit s after the CNOT, since we annihilate the X t operator appearing within K s after the CNOT due to (3) by multiplying K s and K t , thereby producing a new stabilizer. This transformation of the neighbourhood of the source qubit s is also apparent from (6). So in summary, applying a CNOT to the tensor product of two graph state introduces new edges in the resulting graph state between the source qubit and the neighbourhood of the target qubit, see Fig. 2 and [40]. Therefore, if one measures the target qubit of the CNOT in the Z basis one effectively moves the neighbourhood of the target qubit to the source qubit of the CNOT.
Observe that the same transformation rule applies to a single graph state where the source and target qubit of the CNOT are not adjacent and have disjoint neighbourhoods.
C. GHZ states GHZ states are of particular interest in quantum information science, as they can be used to generate bipartite entanglement among any pair of qubits, are genuinely non-local and genuinely multiparty entangled. These states have several important applications like e.g. within quantum key agreement protocols [10], quantum conference key distribution [19], cryptographic protocols in general [20], quantum secret sharing [23] or quantum metrology [41,42]. In [19] it has been shown that a multipartite approach to quantum conference key distribution outperforms bipartite strategies in networks with a bottleneck.
A n-qubit GHZ state is of the form The following observation forms one of the key ingredients within this paper: Suppose we connect two GHZ states |GHZ m and |GHZ n via a Bell-measurement, which is a two qubit projective measurement with projectors |B ij B ij | where |B ij = (id ⊗ σ j x σ i z )(|00 + |11 )/ √ 2 and i, j ∈ {0, 1} denotes the four Bell-basis state projectors. Then the probability for each outcome is exactly 1/4. More importantly, the post-measurement state is, up to local Pauli corrections, again a GHZ state, i.e. the post-measurement state after applying the correction is |GHZ m+n−2 . In addition, there also exists a measurement where two qubits of the GHZ states |GHZ m and |GHZ n merge into one qubit, resulting in the GHZ state |GHZ n+m−1 . This is accomplished via measuring w.r.t. |0 00| + |1 11| and |0 01| + |1 10|.
These observations have been used in [43] to extend the quantum repeater scheme to the two-dimensional case, i.e. a quantum repeater for GHZ states. Our architectures will also rely on this result to cope with large distances between network devices within a quantum network.
Another observation is that the n-qubit GHZ state is LU equivalent to a graph state. To see this, recall that a graph state is stabilized by operators of the form (1). One easily verifies that the GHZ state (7) is stabilized by the operators X ⊗n and Z 1 ⊗ Z i where 2 ≤ i ≤ n. Now suppose we apply a Hadamard rotation to all qubits excepts the first. Since stabilizers transform via conjugation and HXH = Z as well as HZH = X, we find that the stabilizers of the resulting state after applying the Hadamard rotation are given by X 1 ⊗ Z ⊗n−1 and Z 1 ⊗ X i for 2 ≤ i ≤ n. In this paper we often use the graphical representation of this graph state (see Fig. 3) to indicate a GHZ state. In particular, we call qubit 1 of this graph representation the root and qubits 2, . . . , n the leafs of the GHZ state.
FIG. 3. Graph state that is LU equivalent to a four qubit GHZ state. The state is related by Hadamard operations (indicated by red circles) on all leaf qubits to a standard GHZ state, see text for details. The remaining qubit is denoted as root qubit of the GHZ state.

D. Quantum communication over noisy channels: quantum repeaters and entanglement distillation
In order to establish quantum networks, there are mainly three different strategies: direct transmission of quantum states over quantum channels, networks relying on bipartite entanglement and networks relying on multipartite entanglement. The direct transmission of quantum states corresponds to sending a qubit directly through a quantum channel, e.g. an optical fiber or free space, to a recipient. Unfortunately quantum information is very fragile against decoherence and channel loss, and the direct transmission of a qubit is limited to rather short distances. The classical approach to restore the signal periodically after a certain distance using classical repeaters cannot be straightforwardly adapted because of the no-cloning theorem [44], which states that quantum information cannot be simply copied or amplified. The fundamental limits of repeaterless point-to-point quantum communications where derived in [45]. However, encoding the qubit to be sent using a quantum error correction code [46] turns out to be useful for protecting quantum information against errors introduced by a quantum channel.
An alternative strategy is to establish bipartite entangled states using a so-called quantum repeater scheme [47][48][49]. A quantum repeater is able to establish a longdistance Bell-pair by combining several short-distance Bell-pairs via entanglement swapping. A perfect Bellpair is equivalent to a secure quantum channel [6][7][8]50] by means of teleportation [18]. The original quantum repeater scheme [47,48] executes entanglement distillation and entanglement swapping in a nested fashion, thereby generating high-fidelity entangled pairs over larger and larger distances. This allows one to obtain an efficient scheme to generate long-distance entangled pairs, overcoming the exponential scaling of resources (time or channel usages) of direct transmission. Recently, a generalized repeater scheme to generate multipartite entangled GHZ states has been put forward [43]. Quantum repeaters have been extensively used and discussed also in the context of quantum networks, see e.g. [33,[51][52][53][54][55][56][57][58][59][60][61][62][63][64].
A central element of quantum repeaters are (bipartite) entanglement distillation protocols (sometimes also referred to as entanglement purification protocols) that aim at distilling a perfect Bell-pair via local operations and classical communication (LOCC) from several noisy copies of a Bell-pair. Depending on the mode of operation we distinguish between recurrence-type [65,66] and hashing protocols [67]. There also exist extensions of entanglement distillation protocols to multipartite settings [20,40,[68][69][70][71][72][73][74][75], in particular for all graph states [40,69]. Notice that entanglement distillation protocols are simpler for two-colorable graphs (i.e. where the vertices can be grouped into two disjoint sets, where there are no edges within each group). It is hence desirable to design architectures that rely solely on two-colorable graph states, as they can be more efficiently purified in noisy settings.

E. Quantum networks
Quantum networks constitute an infrastructure which aims at connecting several distant quantum clients. The applications range from point-to-point teleportation, distributed quantum computation, quantum key distribution, quantum secret sharing to quantum key agreement, see Sec. I.
In the following we highlight a few papers that are relevant in our context. The application of the quantum repeater to long-distance quantum networks has received tremendous attention in recent years, especially the system design and architecture of quantum repeater network [13,58,59,[61][62][63]. In [13] the tightest upper bounds for quantum communication, entanglement distribution and key generation over an arbitrary quantum network using single-path or multi-path routing protocols was derived. The design of quantum repeater networks was investigated in [58]. In [59] the path selection within a quantum repeater network based on the Dijkstra algorithm according to certain metrics was investigated. In addition, a layer model similar to the Open Systems Interconnection Model (OSI model) [76] for classical computers was proposed in [14,15,61]. These layer models include layers for entanglement distillation, entanglement control and link management. In principle, bipartite quantum repeaters suffice to construct any given state within a quantum network. The construction of explicit quantum repeater protocols was investigated in [77]. Protocols for distributing bipartite entanglement with quantum repeaters were studied in [78,79]. Another line of investigation pursues the application of quantum network coding techniques to quantum repeaters [33,64]. However, observe that in order to generate arbitrary graph states within a network relying on Bell-pairs, the repeater nodes still need to combine the Bell-pairs according to the requested graph state.
Security aspects of direct transmission of quantum information within a quantum network was studied in [80]. This proposal does neither rely on quantum repeaters nor on any entanglement, but a-priori QKD links were mandatory to achieve security. One approach to design scalable quantum networks is the quantum recursive network architecture (QRNA) [15]. There the quantum network is composed of elementary building blocks like quantum repeaters or networks in a recursive fashion. Security aspects within QRNA-based architectures have recently been studied in [81] where the authors investigate a verification protocol to detect an eavesdropper. However, current descriptions of QRNA still reside within a high level of abstraction and rely on bipartite entanglement via quantum repeaters rather than multi qubit quantum states.
Nevertheless, the authors of [15] already identify one key aspect of quantum networks which we also believe is of utmost importance: generating/establishing distributed quantum states among the network without direct interaction of the clients, see also Sec. I. In particular, one important aspect of quantum networks is to generate certain distributed states within a given network on demand. For example, several clients of a quantum network may wish to share a GHZ state at time t in order to agree on a conference key. At time t + 1 two clients within the same network may wish to establish a secure quantum channel. This implies that the network needs to offer capabilities that allow to generate different target states between clients on demand, at any time and in an ideal case without direct interaction between the clients. Here we concentrate on the generation of arbitrary graph states |G . Notice that this includes also states corresponding to parallel requests of disjoint parties, as a tensor product of small graph states is again a graph state of N parties.
Ideally the network should respond immediately to such requests. This can only be accomplished in a setting with pre-distributed entanglement resources which the network uses for graph state generation. Observe that this corresponds to a top-down approach, where this "universal" entanglement resource is available prior to requests. The inverse direction, i.e. generating a graph state by fusing small scale entangled states, was studied e.g. in [27] and [28]. More precisely, in [27] adaptive strategies for the growth of graph state in the presence of monitored errors were presented. An approach for probabilistic growth of graph states by the fusion of small elementary graph states was proposed in [28]. The task of generating graph states was addressed in [29] for a single quantum network. Two of the protocols the authors propose rely on a central master node which prepares the requested graph state locally and teleports it to the clients. However, these protocols require one central node within the network which performs the local preparation of the target state and it remains unclear how several such central nodes connect and collaborate. The third protocol they propose uses GHZ states, which is interesting and promising, but requires explicit knowledge of the final graph state and the application of CZ gates and measurements in the Y basis at the clients. Therefore the clients need to be able to apply two qubit entangling gates. In [30] it was studied how to establish an arbitrary graph state within a network via broker qubits. There, the entanglement structure is first established among the broker qubits, which is assumed to be error-prone, and then projected onto the client qubits. Finally, [31] uses the quantum repeater scheme and quantum error correction to establish large-distance graph states.
Most of the previous works consider a bottom-up approach to quantum networks, where resources are generated on demand. Therefore, prior to completing a particular task, the network needs to distribute the necessary resources. So the network devices need to perform routing tasks in order to determine a path for resources through the network. As we explained in Sec. I this introduces longer waiting times for the clients of a network and we eliminate this issue by following a top-down approach to quantum networks.

F. Our setting
We recall our setting as explained in Sec. I: We consider the scenario where an entanglement resource is distributed in a quantum network prior to any request. Furthermore the resource -which we also refer to as network state -is such that any arbitrary graph state can be generated from it. This corresponds to a top-down approach, where the network devices manipulate the entanglement resource in a collaborative and distributed manner to fulfill requests in a network. The clients of the network remain passive throughout the entire process, i.e. they only request graph states rather than constructing them.
The protocols we propose here have significant advantages compared to earlier works. First, they explicitly use genuine multipartite entangled quantum states which is suited to the task of distributing multipartite entanglement over the network. Second, the control of which edge in the target graph state will be established reside within the network devices, which is in contrast to earlier works [29][30][31]. The clients themselves only need to store a small number of qubits and do not need the ability to perform two qubit measurements and entangling gates. The network devices need the capability to employ two qubit entangling gates and Bell-measurements. In addition, we remove the necessity of a single central master node within a network as in [29]. The network devices we propose collaborate and generate the target graph state in a distributed, collective manner, i.e. we follow a topdown approach where the network devices consume the entanglement resource available prior to requests. This also minimizes the waiting times for clients and allows for the parallel generation of graph states. In addition our approach pursues a plug-and-play architecture, similar to computer networks, which offers high modularity at the network level. In particular only small changes are required for modification of the network, i.e. when adding or removing network elements or clients.
As we discussed in Sec. I, the architectures we study can be layered due to its modular design. Therefore, a quantum network may be part of a larger quantum network without modifying the basic building blocks we propose. We remark that one can also introduce new network layers on demand, which can help to increase connectivity or reduce the complexity to establish certain target states among clients. In this way one can overcome limitations given by network structure at the level of physical links, and e.g. introduce a new layer to provide a shortcut between nodes that are otherwise connected only indirectly via multiple network elements. Finally, the computational assumptions we apply to our clients are minimal, i.e. the clients can apply single qubit gates and single qubit measurements only.

III. ELEMENTARY BUILDING BLOCKS FOR QUANTUM NETWORKS
In this section we describe three different types of elementary building blocks for quantum networks: quantum clients, quantum graph state switches and quantum graph state routers. The latter two constitute the network devices we consider. If the context is clear we will also refer to those entities as clients, switches and routers. In addition we also refer to switches and routers as (network) devices.
We remark that these devices and their functionality are in analogy to classical devices, however due to their quantum nature they need to have additional features. Notice that not all classical devices can have a natural quantum analogue. Consider for instance a classical hub that distributes the same information to several other devices. If information is unknown, a quantum hub is not possible as unknown quantum states can not be copied. We hence do not consider hubs here.

A. Quantum clients
Quantum clients correspond to the clients in a quantum network who wish to share arbitrary graph states on requests.
We assume that quantum clients solely connect to network devices via a quantum channel, e.g. an optical fibre, see Fig. 4, or that they share entanglement with a network device. In particular we do not assume any kind of quantum channel between two quantum clients. We further constrain the clients to neither have any knowledge about the topology of the quantum channels within the network nor to have the capabilities to perform any two qubit quantum operation or measurement. This constraints imply that the network devices need to handle the generation process of the target graph states. This is in contrast to previous works [29,30] where the clients were responsible for generating the target graph state. We summarize the capabilities of a quantum client as follows: only single qubit gates are feasible and the clients do not participate in the construction mechanism of the requested graph states. This implies that the clients need to store only a single qubit. Therefore the clients, or endusers, have minimal functionality.
We remark that to ensure security in a completely untrusted network, the clients will additionally need the capability to participate in an entanglement distillation protocol, which is discussed in more detail in section IV C, thereby implying that the clients need the ability to perform entangling gates and Bell-measurements in this scenario.

B. Quantum graph state switches
Quantum graph state switches form the quantum pendant to classical switches, which operate on the so-called "data link layer" of the OSI model [76] in computer networks. A classical switch has the capability to separate broadcast domains and perform a basic routing by using hardware addresses of network interfaces. Quantum graph state switches provide several interfaces to connect with the quantum network, e.g. through optical fibres.
Quantum clients connect to switches via the interfaces of the switch. In doing so the quantum graph state switch sends one qubit to the client. This qubit might correspond to half of a Bell-pair. In that case the other half resides within the quantum graph state switch, see Fig. 5. But a switch might use a different mechanism, relying on multi-qubit entangled states and measurements in the X or Y basis, to connect clients, see Sec. IV A and Sec. V A. Furthermore, switches might also connect to other network devices within a quantum network via the same interfaces, in a similar fashion as in classical computer networks.

FIG. 5.
In the left figure each quantum client shares a Bell-pair with the quantum graph state switch. The quantum graph state switch uses this Bell-pair to finally teleport the graph state to the quantum clients. Alternatively a switch might directly connect the client qubit to its device state see the right figure. This approach saves storage space at the network device.
Suppose a quantum client requests a particular graph state from the network. The quantum graph state switch is responsible for generating the adjacency of the clients which it connects. Observe that such adjacencies might also involve clients located at other network devices. In order to fulfill this task, the switch uses internally a quantum state, which we also refer to as device state.
We determine the demands on such a state easily: First, the switch needs to be able to establish any graph state between its connected clients from this resource, and second, the switch needs the capability to generate adjacencies across the network to clients located at other network devices. In addition we assume that the device state of a switch is available prior to a request. Hence the switch needs to generate the adjacency of a request by manipulating that resource appropriately. From this we deduce that switches need to store and manipulate qubits, which means that they use quantum memory, apply single and two qubit unitaries and perform measurements.
We will propose two different device states in Sec. IV A and Sec. V A.

C. Quantum graph state routers
Quantum graph state routers are the most involved network devices within quantum networks, as they might connect several quantum networks. Their responsibilities are the generation of the network state (if the router is dedicated for doing so), which we refer to as quantum network configuration protocol (QNCP) server, see Sec. III E, and the ability to connect two or possibly more quantum networks. The term QNCP server originates from the classical DHCP (dynamic host configuration protocol) server, which provides the logical addresses, i.e. the IP addresses, in computer networks. In addition, a quantum graph state router offers the same functionality as a switch, see Sec. III B.
Furthermore, routers may also provide a classical service to network devices: They have a global view on the network, i.e. they know which client connects to which network device of a network. This information is crucial if the network has to generate specific graph states, see Sec. III D for a more detailed discussion.
Quantum graph state routers correspond to classical routers, which operate on the third layer of the OSI model (network layer), since they are able to connect networks, provide logical addresses and perform routing tasks.

D. Quantum networks
In the following we use the graphical representation of clients, switches, routers, devices (which are switches or routers) and networks depicted in Fig. 6. We pursue an entanglement-based approach to quantum networks via multi-partite states. More precisely, the network devices of a network connect at a physical level via quantum channels like e.g. optical fibres, see tribute highly entangled states between each other, which we refer to as network state. Using this state a device is able to generate adjacencies of his clients to clients connected to other network devices, i.e. adjacencies across its device boundary. We emphasize that the entanglement structure of the network state may be completely different from the channel configuration of the network, see Fig. 8. Furthermore, if network devices are far distant, we employ the techniques discussed in Sec. II D to establish a long-distance network state. Observe that the same techniques can be applied for far-distant clients of a network device.
Generating target graph states via network states has many advantages. First of all it is fast, since the network state is distributed prior to requests. Therefore no distribution times need to be taken into account on incoming requests, which is in contrast to earlier proposals. The time clients have to wait for the graph state simply amount to the classical communication time, since the quantum operations and correction operations can be done within a single time step. Furthermore this approach allows for full flexibility, as the network devices tailor the network state according to incoming requests.
As we will see in Sec. IV B and Sec. V B our network states also enables the parallel generation of graph states on disjoint subsets of clients.

FIG. 8.
In this example the physical channel configuration (blue edges -quantum channels, orange dashed edgesclassical channels) differs from the entanglement structure of the network state. The vertices correspond to qubits of the network state and the black edges depict entanglement.
The network state is, as the device state, assumed to be a static resource which the devices consume during graph state generation. Therefore we imply a similar constraint as for the device state also to the network state: using the device and the network state the devices must be able to generate an arbitrary graph between all clients of the network.
In order to distribute the network state we propose a quantum network configuration protocol (QNCP), see Sec. III E.
In a quantum network the network devices have to know which client is connected to which device, as this information is mandatory for a device to establish adjacencies via the network state, see Sec. III C. This situation can either be achieved by storing this classical information within all network devices or by storing it at specific, selected devices and querying it on demand. The latter scenario is certainly more beneficial in terms of storage. Therefore, we consider the setting where a designated router (or alternatively a classical server), has global knowledge about which client connects to which device in the network. In a classical network, routers use similar information to determine paths through networks. However, in the quantum setting which we study here, the network devices query this information from a router in order to determine which qubits of the network state need to be used for particular graph state requests.
Finally, a quantum network may also be part of a larger network. In particular, routers, see Sec. III C, may connect networks in a recursive manner, see Fig. 9. For example consider the scenario of three networks, where one router resides in one network each consisting of possibly numerous switches with various clients. We refer to those networks as level 1 networks. The routers host the network states of their respective level 1 networks. Since routers can also connect networks, the three routers may again share a network, which we refer to as level 2 network. This network has its own network state, just as the level 1 networks do. Due to this fact it is also possible to connect switches to the level 2 network without any further modification, see the switch in Fig. 9. From this we find that networks might appear in a nested fashion within our architectural approaches. In particular, the FIG. 9. The quantum networks 1, 2 and 3 connect in a larger network via quantum routers. The vertices in the figure correspond to qubits, stored within a router of each network, of the network state of the surrounding network in a GHZ architecture, see Sec. IV for details. In this example a switch connecting client 1 is also located within the surrounding network.
design we propose abstracts networks in the same fashion as network devices which enables for layered networks.
It also possible to have side-by-side networks. By sideby-side networks we mean here that several quantum networks may be connected at the same hierarchical level instead of just two. This is established again by routers, which may be connected to several networks rather than one (stand-alone network) or two (hierarchical approach, see discussion above). The situation is summarized in Fig. 10. This technique turns out to be very useful for splitting up networks with a large number of devices. In this way one can effectively reduce the size of the network state.
Finally we highlight that only routers need to have knowledge about clients located in other networks. Switches do not need that knowledge since other networks appear at a router as virtual clients. If a client classically broadcasts a graph state request which involves clients (which are discovered classically) of other networks, the router, which connects to this network, responds to the requestor as a proxy for those clients. Therefore, the switch to which the initiator connects, establishes adjacencies to these clients via the responsible router.
We also note that due to single and two qubit measurements during target state generation the network devices need to keep track of measurement outcomes and resulting correction operations. Therefore, either the network devices ultimately apply the accumulated local correction operations after target state generation has finished or tell the clients which correction operations need to be applied to their qubits. Furthermore, we assume that classical communication is free within our architectures.

E. Quantum network configuration protocols (QNCP)
In this section we describe a network configuration protocol to distribute and extend the network state of a quantum network at an abstract level.
Assume that a new network device starts within the network. It first checks classically if there is a QNCP server, which is responsible for the generation of the network state, is available within the network. If there is a QNCP server available and the network device connects c i clients then the client requests c i network qubits from the QNCP server. The QNCP server acknowledges this request classically with an acknowledgement message, which signals the network device that the QNCP server will now deliver the network qubits. We refer to this mode of QNCP also as server-driven QNCP.
If no QNCP server is available, the device creates a certain state depending on the network architecture, corresponding to the possible network adjacency of his clients, and distributes parts of this state to the other network devices. Those connect the received qubits to the earlier established network state if necessary. We refer to this mode of QNCP also as device-driven QNCP.
In Sec. VIII A and Sec. VIII B we present specific protocols which implement these functionalities.

IV. ARCHITECTURE A (GHZ)
The first architecture, which we also refer to as architecture A or GHZ architecture relies solely on GHZ states. For simplicity we do not consider any correction operations necessary due to measurement outcomes. It is straightforward to take those correction operations into account.

A. Device state and protocol
Quantum clients connect to networks devices via a Bellpair, see Fig. 5. Suppose n quantum clients connect to a network device. Recall that, according to Sec. III B, the devices use the device state to generate the adjacency of a requested graph state among the directly connected clients. Therefore, the device state needs to be such that creating an arbitrary graph is feasible by manipulating this state. Hence we propose as device state for network devices. In particular, we associate the root of the GHZ state |GHZ i with client i for 2 ≤ i ≤ n. Therefore the device needs to store n − 1 GHZ states locally. We also refer to the root of |GHZ i as the proxy qubit of client i. The leafs of the GHZ state |GHZ i correspond to the clients 1, . . . , i − 1. We observe that there is no root for client 1, as the tensor product in (8) ranges from 2 to n. Hence for client 1 only leafs will be available, so the device chooses one leaf of the states |GHZ i as proxy qubit for client 1.
FIG. 11. The device state of a quantum network device in the setting of 4 quantum clients and a GHZ architecture. The yellow diamonds mark the proxy qubit of the respective client. Observe that, except for client 1, there is exactly one GHZ state for each client.
We observe that the network device is able to generate any n qubit graph state, where n corresponds to the number of clients, on the proxy qubits of the device state (8) as follows: First the device rotates each GHZ state according to the root and leaf configuration as specified above to the corresponding graph state (by applying Hadamard rotations), see Sec. II C. Then the device applies the merging procedure of Sec. II B 2 between the proxy qubit of client i (root of GHZ state |GHZ i ) and the leaf of the state |GHZ j where j ≥ i. If there is no edge in the final graph state the device measures the respective leafs of the GHZ states in the Z basis. The device applies this procedure iteratively starting with client 1 to client n. Finally the device teleports the proxy qubits to the clients via the respective Bell-pairs which establishes the graph state between the clients.
Instead of sharing Bell-pairs with the clients, the device might also include the client qubits as leaf within the respective GHZ state during device state preparation, see Fig. 5. This simply corresponds to the larger GHZ states |GHZ i+1 in (8). In that setting, the protocol for graph state generation remains the same until the very last step, since in that case the switch teleports the graph state via measurements in the X or Y basis to the client qubits. Observe that this reduces the storage requirement by n qubits if n clients are connected.
Because this state is a local state residing within the device, we assume that the state (8) may be generated within the device. Alternatively, the device may generate the device state via entanglement distillation to reach a sufficiently high fidelity of the device state relative to the state (8). In addition, we observe that if client i is not part of the current request the state |GHZ i does not need to be manipulated, i.e. it remains usable for future requests.

B. Network state and protocol
As we discussed in Sec. III D we connect network devices via quantum states. Recall that the network devices use the network state to generate the adjacencies of its clients (w.r.t. the requested graph state) to clients at other network devices. In particular suppose m network devices share the same quantum network. Furthermore assume that c i quantum clients connect to network device i.
We propose the network state where We associate network device i with the state |N i in (10) in order to generate the network adjacencies of clients which connect to device i to clients connected to the network devices 1, . . . , i − 1. We emphasize that several copies of GHZ states are required at each device to ensure full functionality, since multiple clients connect to each device. In particular, network device i stores the c i root qubits of the GHZ states |GHZ i j of (10), one root corresponding to exactly one client of device i. The network devices 1, . . . , i − 1 store one leaf qubit of each GHZ state copy in (10). We refer to the root of the state |GHZ i j also as network proxy of client j at network device i for the following reason: network device i uses the state |GHZ i j to generate the adjacency of client j at device i to clients connected to the network devices 1, . . . , i − 1. While the copies need to increase with the number of clients per device, it should be noted that the size of the GHZ states only depends on the number of devices in the network. We roughly describe the network protocol for the GHZ architecture as follows: First the devices need to expand the GHZ states of the network (state expansion phase). After that, they connect the network GHZ states to the device GHZ states in terms of Bell-measurements (state combination phase). Finally the devices generate the required graph state by applying the connecting procedure of Sec. II B 1 and teleport the graph state to the clients (state generation phase). A detailed example of this architecture in action can be found in Appendix A. Fur-thermore we discuss an example of a parallel request in Appendix B.

State expansion phase
Since c 1 , . . . , c i−1 clients connect to the network devices 1, . . . , i − 1 respectively, the devices 1, . . . , i − 1 have to expand their c i leaf qubits to c 1 , . . . , c i−1 respectively. Therefore device k where 1 ≤ k ≤ i − 1 prepares c i copies of the state |E k = |GHZ c k +1 . We refer to this state also as expander state of device k. The situation is summarized in Fig. 12. For a concrete example of the overall FIG. 12. Illustration of the network state for a network with three network devices, each connecting c1, c2 and c3 clients. Observe that the devices 1 and 2 need to prepare the GHZ states |GHZc 1 +1 and |GHZc 2 +1 locally to connect their c1 and c2 clients within the network.
state within a GHZ quantum network see Fig. 13. The state expansion phase for establishing a fully connected graph state within the network (the protocol for establishing arbitrary graph states is just a slight modification of it) is now as follows: Each device 1 ≤ k ≤ m connects its expander states |E k to its leafs of the GHZ states |GHZ l ⊗c l where k + 1 ≤ l ≤ m of the network states via a Bell-measurements. This results in a tensor product of expanded GHZ states, see Sec. II C. More specifically, after the expansion step the parts of the net-work states are given by where 2 ≤ i ≤ m. The states |GHZ 1+ i−1 k=1 c k j of (11) now enable to generate adjacencies between the clients of device i and clients connected to devices 1, . . . , i − 1, see Fig. 14.
FIG. 14. The state after expanding the network GHZ states.
We observe that |GHZ 1+ i−1 k=1 c k j within (11) enables the generation of edges between client j of device i to clients which connect to the devices 1, . . . , i − 1. More precisely, by recalling that the leafs of the state |GHZ 1+ i−1 k=1 c k j stem from Bell-measurements within the devices 1, . . . , i − 1 we find that these devices may use their c k leafs to generate an edge between client j at device i and the clients 1 ≤ l ≤ c k at device k. Consequently, if no edge needs to be established, all devices k measures this leaf qubit in the Z basis.
Alternatively, and certainly more beneficial in terms of required storage capacity, device k where 1 ≤ k ≤ i − 1 could prepare smaller expander states |E k . For example, if the part of the network state |GHZ l corresponds to the adjacency of client i at device l, and if only two clients of device l − 1 are adjacent to client i in the final graph, it suffices for device l − 1 to prepare the expander state |GHZ 3 instead of |GHZ c l−1 +1 .

State combination phase
Recall that c i clients connect to network device i. The device state of device i, i.e. |D i , is given by (8). To account for adjacencies of the c i clients across the network we extend the device state |D i by the virtual client 1, corresponding to the network. Observe that according to Sec. IV A this virtual client only has leaf qubits of the device state. This results in the new device state The protocol proceeds as follows: Since the expanded network state |N i of (11) needs to be finally connected with the device state |D i of (12), each device i = m creates c i copies of the GHZ state |GHZ 2+ m k=i+1 c k , one for each of its client, as adapter for the device GHZ states. Observe that exactly 1 + m k=i+1 c k leafs are necessary, as there are m k=i+1 c k leafs from the network states |N k for i + 1 ≤ k ≤ m stored at device i and the roots of the network GHZ state |N i . First the devices connect the root of the states |N i , i.e. the network proxies of the clients, to the adapter states, thereby expanding the adapter state. Then each device performs a Bellmeasurement between the c i virtual network leafs of the device state (12) and the expanded adapater states, resulting in an expanded device state, see Fig. 15. This procedure enables device i to generate edges to the clients of device i + 1, . . . , m.
Also in this case, similar to the state expansion phase of the previous section, the device could generate smaller adapter states in principle. In particular, the leafs of the adapter state |GHZ 2+ m k=i+1 c k , see Fig. 15, will ultimately be used to generate the network adjacency of the clients of a device. Therefore, depending on the graph state request, the device can prepare smaller adapter states tailored to the network adjacency of the device. For example, if a client of device i is adjacent to two clients on devices i + 1, . . . , m and to clients at devices 1, . . . , i − 1, then it suffices to prepare the adapter state |GHZ 4 instead of |GHZ 2+ m k=i+1 c k .

State generation phase
In this final phase, the devices rotate the GHZ states of the previous phase according to their root and leaf configuration to graph states via Hadamard rotations, see Sec. II C. Now the devices generate the requested graph state by performing connecting procedures according to Sec. II B 1 between the leafs of the device states and the leafs of the network GHZ states. The adjacency of clients connected to a device is generated according to the protocol in Sec. IV A. This generates the graph state on the proxy qubits of the clients.
Finally the network devices teleport the proxy qubits to the clients via the Bell-pairs to the clients.

Networking
Recall that routers may connect several networks. In particular, a router is a switch with the ability to connect networks, and to generate and distribute the state of the network |N of (9).
Therefore it is straightforward to extend the previous network protocol to a setting where quantum networks connect via routers: By employing the same architecture, i.e. the same network state and network protocol, as described above between several routers the routers share a network with network state (9). We only need more GHZ states in (10) to account for all clients of the network. This implies that routers which connect two or more networks enable the generation of graph states between clients located within different networks, see Fig.  16. Also observe that this approach enables recursive networks.
FIG. 15. In this example the right switch, i.e. switch 2, creates two |GHZ3 as adapter states, one for each client, whereas the lower switch creates two |GHZ4 states as adapter states. Then the GHZ network states get connected to the local GHZ states via Bell-measurements (indicated by ellipses). Finally each switch generates the adjacency of the requested graph state by employing connect procedures, see Sec. II B 1, i.e. controlled phase gates and Y measurements.
In particular, router R abstracts network N w.r.t. to other networks as follows: clients located within N can reach other networks via router R. Clients outside of network N can reach clients located within network N only via router R. Therefore, to other networks, network N appears simply as a network device connecting all clients of network N . Hence the same states as in (10) need to be distributed among the routers, just by replacing the number of copies of GHZ states with all clients located within a particular network, i.e. m i=1 c i . We also want to point out that, identical to device states, if certain devices, or more precisely all the clients of a device, are not involved in a request, the corresponding GHZ states of the network can be kept by the devices. Therefore, depending on the request, it may not be necessary to distribute the whole network state for every request in the network.

C. Security considerations
We reiterate that within the GHZ network protocol an edge appears in the generated graph state if a connecting procedure, see Sec. II B 1, is done. In order to remove an edge (or not to establish an edge) the devices have to measure the leaf qubits of the extended network GHZ state (11) in the Z basis. Observe that in both cases each device needs to operate on the network state. Hence we need to distinguish two different security settings: either we assume that all network devices are trustworthy, i.e. they execute the protocol, or at least one devices does not.
Before providing a discussion about the security of our architectures we first recall the definition of security for entanglement distillation protocols given in [35,36]. There, the security of an entanglement distillation protocol is defined as the distance of the output states between a real distillation protocol (for a finite number of initial states) and an ideal distillation protocol maximized over all purifications of initial states (where the purifications are held by an eavesdropper). The real distillation protocol consumes a finite number of initial states outputs a mixed state with fidelity close to unity. The output state of the ideal distillation protocol is, in case of a noiseless distillation protocol, one or several copies of a pure states (for bipartite distillation protocols one or several Bell-pairs, for multipartite distillation protocols one or several copies of a graph state). The results of [35] for the hashing protocol imply that the security of the hashing protocol is bounded by the trace distance between the output of the hashing protocol and several copies of the pure target state, which translates to the fidelity of the output of the hashing protocol. Furthermore it was shown that the security parameter scales exponentially fast towards zero in terms of the number of initial states, thereby implying that the hashing protocol guarantees exponential security levels. The protocol of [35] is discussed in more detail in section IV C 1.

Security considerations -trusted networks
First we treat the case of a trusted network. Observe that noise due to transmission decrease the fidelity of network states relative to pure GHZ states. In order to deal with this channel noise we employ entanglement distillation protocols for two colorable graph states to generate high fidelity network states [20,40,[68][69][70][71][72][73][74][75]. Recall that the requested graph state is generated by connecting GHZ states (which are two-colorable) via the connecting procedures of Sec. II B 1 which the network devices apply.
Using entanglement distillation to create high fidelity states has an advantage for implying security [35,36]. In [35] the security of a noisy measurement-based implementation of multipartite hashing protocols was investigated in scenarios where an eavesdropper distributes all initial states subject to distillation. Hashing protocols operate on a large noisy ensemble of initial states in a collective manner, where parity information about the noisy ensemble is being learnt, thereby purifying it. It was shown that if multipartite hashing protocols are prepended by symmetrization, a twirl (towards diagonal states w.r.t. to the graph state basis) and a parameter estimation, then hashing factors out the eavesdropper even in the presence of noise and imperfections. In particular, these modified hashing protocols converge towards states which can be described by local depolarizing noise acting on several copies of pure graph states, where noise stems solely from noise in the apparatus. This implies that the final states after hashing remain private, i.e. the hashing protocol disentangles any eavesdropper.
We use this observation to imply the security of our protocol in the case where all network devices are trustworthy as follows: All network devices receive their network GHZ states from a QNCP server (or establish them via device-driven QNCP). The device state residing within every network device is generated by the devices themselves, or distilled from initial states of an eavesdropper. In the former case security is guaranteed since the devices are trustworthy, whereas in the latter case the devices establish local security at a device level via entanglement distillation. In addition, we employ entanglement distillation after routing (which corresponds to the process of measuring a leaf qubit in the Z basis if it is not part of the request) of the network states. Hence, in the trustworthy scenario we can assume that all not involved network devices measure their leaf qubits of the GHZ network states in the Z basis. The devices which are involved in a request then run entanglement distillation on the routed network states, thereby destroying any entanglement with a potential eavesdropper outside the network. This process is performed for every graph state request. Since the security definition of [35] is composable, the security of the network states and the security of the device states imply security at the device and network level.
Finally the devices teleport the generated graph state to the clients. The Bell-pair used for this teleportation process also stems from entanglement distillation, and, as shown in [36], bipartite entanglement distillation protocols, even when carried out via imperfect quantum gates, lead to security. Therefore the Bell-pair can be assumed to be private, which finally implies via composability that the established graph state is secure. However, this also means that the clients need to possess the additional capability to perform a bipartite entanglement distillation protocol, if this connection to their nearest quantum network device is untrusted. This requires two qubit entangling gates at the clients.

Security considerations -untrusted networks
In cases where the network itself is not trustworthy, we modify the network states as follows: we decorate each edge of the GHZ states of (11) with two additional qubits. One of this decorators belongs to the root of the GHZ state, the other one to the leaf of the GHZ state, see Fig.  17. This enables the devices to measure the decorator The figure illustrates the secure GHZ network protocol state. We decorate each edge of the network GHZ states with two additional qubtis (red vertex), where one of each resides within the device. This enables the device to either establish an edge (Y measurement) or to remove an edge (Z measurement) locally. This procedure removes the trust relationship to other, not involved, network devices.
qubits of needed edges of the network states in the Y basis (which establishes an edge from the root of the GHZ state to the leaf) and to measure all unneeded edges by a measurement in the Z basis, which removes this edge. This has the advantage that the network devices of a request do not have to trust other, not involved, network devices. We note that the procedure above results in GHZ states, which enable to further proceed with the GHZ network protocol of Sec. IV B. This implies security at the device and network level via the same arguments as above, i.e. entanglement distillation. We refer to this modified protocol also as secure GHZ network protocol.
In situations where all network devices are untrusted one implies the security claim of the protocol via the following arguments. Recall that there exist entanglement distillation protocols for all graph states [40]. Further assume that all clients which are part of the graph state request demand the network to receive several qubits from their respective network devices, assuming that each qubit is part of a copy of the target state. By extending the computational capabilities of the clients to run the distillation protocol for all graph states of [40] they may generate privacy via entanglement distillation. Therefore, by appending the entanglement distillation protocol of [40] after the network protocol is finished, one establishes security even if all network devices are untrustworthy. Such a functionality corresponds to classical firewalls, which protect clients from network attacks.
On the one hand this approach has the advantage that no assumptions on the network devices is necessary, but on the other hand, the clients need to be capable of running the entanglement distillation protocol of [40]. In addition they have to store several qubits at the same time, as those will be subject to distillation. This observation implies a memory overhead for each client. Notice that these additional capabilities of the client are only necessary if the whole network or their connection to their nearest quantum network device is untrusted.

V. ARCHITECTURE B (DECORATED-TYPE)
The second architecture we propose relies on a different class of states: decorated graph states, which we introduce briefly. Also in this section we do not consider any correction operations necessary due to measurement outcomes for simplicity.

A. Device state and protocol
We recall our setting as discussed in Sec. III: quantum clients connect to switches and/or routers via quantum channels from which they receive a qubit which will finally be part of the request graph state.
The device state within a decorated architecture can be described as follows: the network device stores one qubit for each client (which we refer to also as proxy qubit, see also proxy qubits within the GHZ device state in Sec. IV A). The network device attachs to this proxy qubit another qubit which is send to the client. The client proxies are fully connected among each other and we decorate each edge within this graph state by a qubit (which we also refer to as decorator qubit). The device uses the decorator qubit to either establish or remove an edge within the final graph state, see Fig. 18, via a measurement in the Y basis or the Z basis respectively. The protocol to generate an arbitrary graph state between the clients is now as follows: The network creates the graph state via measurements in the Y and Z basis. Then the device teleports the graph state via X and Y measurements of the proxy qubits to the clients.

B. Network state and protocol
Here we discuss the network state and protocol for untrusted networks, since for trusted networks the protocol remains the same and its network state is easily obtained from the network state of untrusted networks.
We connect the network devices via a similar state as in Fig. 18. Suppose m devices connect within a quantum network. Instead of sharing a fully connected graph state, the m devices connect via an m partite graph where each partition i contains c i qubits, one for each client. We refer to these qubits of the network state, similar as in Sec. IV B, as network proxies, since they will finally be used to generate the network adjacencies of the clients. Furthermore we decorate each edge within this m partite graph as follows: network device i decorates the edges of its partition to the partition of the network devices 1, . . . , i − 1 once and edges to network devices i + 1, . . . , m twice, see Fig. 19. This decoration procedure ensures that the resulting state is a two-colorable graph and, more importantly, that each network device can either establish or remove edges within the network state without assuming a particular action of the neighbouring network devices. We will discuss this in more depth at the end of this subsection.
FIG . 19. The decorated network state for a network of four devices. Observe that the resulting state is two colorable.
Within this architecture the generation of an arbitrary graph state is achieved by combining the device protocol, see Sec. V A, and the network protocol we discuss below. An example network is shown in Fig. 20. The network devices establish the network adjacency of their clients on the network proxies by either measuring their decorator qubits in the Y basis, which establishes an edge, or in the Z basis, which removes an edge, see Fig.  21. Recall that the device state contains one proxy qubit for each client. In addition, recall that the network state also contains exactly one network proxy qubit for each client. The devices now apply to each client-wise pair of device proxy and network proxy qubit the merging pro-FIG. 21. The first step is to measure all decorator qubits of edges which contribute to the requested graph state in the Y basis. We measure the decorator qubits of unwanted edges in the Z basis. In this example a fully connected graph state needs to be established. cedure of Sec. II B 2 with the device proxy as source and the network proxy as target. The steps are summarized in Fig. 22. After measuring the decorator qubits of the device states the device proxy qubits form the requested graph state which enables the network device to transfer the graph state to the clients by measuring the device proxies accordingly. The devices apply the merging procedure, i.e. a CNOT with the proxy qubits as source and the network qubits as target followed by measurement in the Z basis of the network qubits. This transfers the network adjacency from the network qubits to the proxy qubits.
Observe that also this approach may again be easily applied recursively, similarly as for the GHZ architecture in Sec. IV B. Identical as to the GHZ architecture one abstracts whole networks as black-boxes which appear as a router at the next level. The network state at the next level is again a k partite graph state, but now, the qubits within that partition need to be equal to the number of clients of the abstracted network.
One possibility to deal with large network states may be to split up large networks into smaller networks, see Sec. III D, as this leads to smaller network states. We observe that, as we proposed the architecture of this section, only a single copy of the decorated network state is present in the network. Therefore another possibility to deal with large networks is to prepare several copies of smaller decorated states which may be merged upon request by the network devices.
Recall that the network devices share a decorated network state, see Fig. 19. Suppose a request is broadcasted within the network. Then the network devices which are part of that request measure the decorator qubits of unwanted edges in the Z basis. Thereby they remove correlations to other network devices which are not part of the request, see Sec. IV C for untrusted networks. Observe that the resulting state still remains two colorable. Now security for this architecture in untrusted networks follows via the same arguments as in Sec. IV C: The network state after routing, i.e. removing unwanted edges via measurements in the Z basis, remains two colorable and we assume that the network state is created in terms of entanglement distillation. Therefore the security of this architecture follows from the discussion of Sec. IV C.
Note that a simpler network state with only one decorating qubit per edge can be used if the ability to securely disconnect non-participating devices is not needed. This might be the case for trustworthy networks where all network devices act according to the network protocol described in this subsection.

VI. ARCHITECTURE C (HYBRID)
So far we had a sharp distinction between GHZ networks and networks based on fully connected decorated graph states. Both architectures differ in the kind of states they use, see Fig. 11 and Fig. 18 for the device state and Fig. 12 and Fig. 19 for the network state.
An example of a hybrid network is depicted in Fig. 23. Observe that also in this case the generation of arbitrary graph states is possible. One just needs to slightly modify the protocol of Sec. IV B or Sec. V B. Instead of the final Bell-measurement between network proxy qubits and network qubits one applies a CNOT as described in Sec. V B. Similarly one easily derives a protocol for GHZ device states and decorated network states.
Therefore we find that any combination of device and network states might appear within our architectures. This implies that our solutions offer a high degree of modularity, since the network may be composed of different device architectures at the same time.

VII. ARCHITECTURE D (BELL-PAIRS)
We also discuss how one may establish the same functionality as we offer via the architectures of Sec. IV and Sec. V directly via Bell-pairs. In particular, we assume the same building blocks as proposed in Sec. III, i.e. clients which solely connect to switches or routers. Furthermore we follow the same top-down approach: the network state, which now consists only of Bell-pairs between the network devices, is distributed prior to any graph state request.
When one uses Bell-pairs instead of multipartite states to generate the network state then, if c i clients to device i and c i+1 clients connect to device i + 1, one needs c i c i+1 Bell-pairs between those devices to generate arbitrary edges between clients located at device i and i + 1. It can not be less since each client of device i may have an edge to a client located at device i + 1 which needs to be dynamically established. Hence to generate the adjacency of a single client of device i we need at least c i+1 Bell-pairs. In total we therefore need 2c i c i+1 qubits to establish arbitrary edges between clients which connect to device i and i + 1, see Fig. 24. As we discuss in Sec. IX this introduces an overhead of almost 2 compared to the architectures in Sec. IV and Sec. V.
FIG. 24. The figure shows the setting when three network devices connect via Bell-pairs. The devices connect c1, c2 and c3 clients respectively. Therefore c1c2, c1c3 and c2c3 Bell-pairs need to be distributed between the respective devices.
Nevertheless, the protocol for establishing arbitrary graph states via Bell-pairs is similar to the protocol of Sec. IV: the network devices establish edges across devices by first expanding their device state Bell-pairs with a GHZ state as an adapter state. Then, depending on the adjacency of the request, they either couple a Bell-pair to these GHZ adapter states or not. Finally, the merging procedures of Sec. II B need to be applied to establish the adjacency across the network.
We point out that there might also exist more optimized schemes relying solely on Bell-pairs. For example, one strategy could be to generate a Bell-pair between network devices where one half of the Bell-pair is then coupled to a locally created GHZ state in terms of a Bellmeasurement. Observe that this results again in a GHZ state as it simply teleports one qubit of the GHZ to the remote network device.
A further optimization corresponds to having a single master node as in [29]. This reduces the number of Bellpairs to c if c clients are within a given network. In such a scenario, the single master node needs to generate the graph states of given requests which the node then teleports to the clients.

VIII. QUANTUM NETWORK CONFIGURATION PROTOCOLS
In this section we discuss the quantum network configuration protocols for architecture A (GHZ) and architecture B (decorated). Recall that these protocols are responsible for distributing and extending the network state of the respective architectures, see Sec. III E.

A. QNCP for GHZ architecture
First we discuss the server-driven QNCP for GHZ architectures. The client checks whether a QNCP server is available or not, see Sec. III E. If yes and there are m devices within the network, the QNCP server answers the configuration request by creating c copies of the GHZ state |GHZ m+1 , where c corresponds to the number of clients connected to the new device. Next the QNCP server sends the roots of the GHZ states to the new device and the leafs to the other network devices using the available quantum channels, see Fig. 25. This approach has the advantage that the previously distributed network state will not be destroyed if new network devices appear within the network, i.e. they can still be used for graph state generation. Now we discuss the device-driven QNCP for GHZ networks. In this case, the start-up procedure for the network devices is slightly different than within the serverdriven QNCP protocol. Any new network device creates c copies of the GHZ state |GHZ a+1 on boot locally, i.e. a GHZ state with a leafs where a corresponds to the number of neighbours of the new device. Then, the network device sends the a leafs of the c GHZ states over the quantum channels to its neighbour devices. This establishes c copies of GHZ states within the neighbourhood of the new network device.
Next the devices which receive the leafs check all their respective neighbours if they also received leafs during the previous round. If all neighbours have received leafs, the procedure completes for this network device. Otherwise, if a neighbours do not have received leafs, then the network device creates c copies of a GHZ states with a +1 leafs, i.e. the state |GHZ a +2 ⊗c , connects the roots of these GHZ states to earlier received leafs (thereby enlarging the GHZ state of the first step), and keeps one leaf each locally. The device broadcasts the remaining leafs to the a so far unconnected neighbours.
The clients within the network repeat this procedure recursively until each client receives c leafs of the new GHZ network state. We note that this procedure ends after at most m recursions where m corresponds to the number of network devices within the network. An example of the device-driven QNCP is depicted in Fig. 26 for three network devices.
FIG. 26. Illustration of device-driven QNCP: In this example we consider three network devices, 1, 2 and 3 respectively, where devices 1 and 2 as well as 1 and 3 share a quantum channel. Suppose device 1 and 2 boot first. According to device-driven QNCP they connect via a Bell-pair (2 qubit GHZ state). Next device 3 starts. It directly connects to device 1 via a Bell-pair. In order to establish a connection to device 2, device 1 creates a three qubit GHZ state. One of the leafs is kept locally at device 1, the second leaf is send via the quantum channel to device 2. Finally, device 1 connects the root of the GHZ state with the received qubit of the Bell-pair, thereby enlarging the GHZ state over the whole network.
This approach for establishing the network state inherently consumes resources. The ideal channel configuration is if all devices within the network are fully connected via quantum channels. In contrast, the worst case within that setting corresponds to a linear chain. More precisely, if a new device connects to one of the outermost device in a linear chain of m devices, then each formerly device within the chain needs to create a three qubit GHZ state. The new device connects to its neighbouring device via a Bell-pair. In total there are m − 1 three qubit GHZ states and a Bell-pair necessary to establish the new network state, which amounts to 3(m − 1) + 2 qubits and m − 2 Bell-measurements. For a graphical illustration see Fig. 27.
We also want to emphasize that the distribution of the network state over long distances could also rely on quantum repeaters, and high-fidelity generation in noisy settings can be achieved using entanglement distillation. Now we present a protocol for distributing and extending the network state within decorated architectures.
Suppose the network state within a decorated network has been established. In particular, the state depicted in Fig. 19 is distributed in the network. Further assume, that in total there are m network devices where network device i connects c i clients.
If now a new device, i.e. device m + 1, connects to the network we need to modify the network state accordingly to take the new network device and its clients into account. For simplicity we illustrate the protocol for one client connected to device m + 1, as the protocol just needs to be repeated to account for an arbitrary number of clients.
We propose the following protocol to modify the network state without destroying it: If the new device connects one clients, then, either the QNCP server or the new network device, creates one decorated GHZ states of size 1 + m j=1 c j . It is the same as the decorated GHZ states shown in Fig. 17 but with only one decorating qubit instead of two. This state is directly associated with the client of network device m + 1 whereas the leafs of the decorated GHZ state correspond to the clients located at the network devices 1, . . . , m.
Next, each network device 1, . . . , m modifies his part of the network state as follows: it creates locally for each client proxy one qubit in the |+ state. Then he connects these qubits to the proxy qubits via CZ gates, thereby establishing a new edge within the network state. Next the leafs of the decorated GHZ states will be send to corresponding network devices. The situation is depicted in Fig. 28.
Finally the devices 1, . . . , m connect their received leaf qubits, corresponding to connections to the new network device m+1 to their previously generated decorator qubits via CZ gates.

IX. COMPARISON OF THE ARCHITECTURES
In order to determine the efficiency of the different architectures we compare the multipartite approaches A and B to architecture D which relies solely on Bell-pairs. Schemes relying only on bipartite entangled states are a common scenario considered for quantum repeater networks [55,[57][58][59]. In particular we determine the performance of our architectures by computing two parameters: number of qubits to be stored and the maximum number of required operations to establish an arbitrary graph state. In our approach, we can freely decide for each edge in the graph if it should appear or not. The worst case in QNCP for decorated networks: If a new device starts connecting one client, then a decorated GHZ state of size 1 + m j=1 cj needs to be prepared. In order to connect the decorated GHZ state to the current network state the leafs of the decorated GHZ state will be send to the corresponding network devices. The devices create a decorated edge on the previous network state (red dashed line) and connect the incoming qubits corresponding to the new device via CZ gates.
such an approach is given by the fully connected graph state (if created in a naive manner), since all edges need to be generated. That is, the number of gates and measurements which have to be applied is at most. Notice that the fully connected graph state is LU equivalent to a GHZ state, which could be generated more efficiently.

A. Device level
We compute the number of qubits which the device needs to store in architecture A as follows: According to (8) the device state is given by n i=2 |GHZ i . The number of qubits which the network device needs to store is thus given by For the number of local operations to establish a fully connected graph state, we observe the following: Recall that the root of the GHZ state |GHZ i is the proxy qubit of client i, which the device teleports to the client after completing the graph state generation on the proxy qubits. According to the protocol description the device generates the adjacency by employing the merging procedure of Sec. II B 2, i.e. CNOT gates between leafs and roots of GHZ states followed by Z measurements. Therefore, the number of CNOT gates is equal to the number of leafs of the GHZ states of (8) minus 1 (since the leaf of the GHZ state |GHZ 2 can be used as proxy of client 1), i.e.
After applying the CNOT gates the device measures the leafs of the GHZ states of (8) in the Z basis which implies for the total number of measurements the expression of (14). The number of qubits which need to be stored for architecture B is determined as follows: recall that the device state corresponds to a fully connected, decorated graph state. Therefore we the number of qubits corresponds to the number of clients, i.e. n, plus the number of edges of a fully connected graph, i.e. n(n − 1)/2. This also corresponds to the number of measurements in the Y basis in order to generate the fully connected graph among the clients.
Using Bell-pairs the network device needs to store one Bell-pair for each possible edge within the graph state. Since the number of edges within the fully connected graph state for n particpants is n(n − 1)/2 the network device needs to store n(n − 1) qubits. The number of controlled NOT gates is determined as follows: Observe that within the Bell-pair approach each client proxy has exactly n−1 qubits, because each client has n−1 possible neighbours. One of these qubits will be used within the final teleportation process, hence there are n − 2 qubits left which need to be connected to the proxy before teleportation. This implies for the total number of merging procedures n(n − 2). D A B Qubits n(n − 1) n(n + 1)/2 − 1 n(n + 1)/2 CNOT n(n − 2) n(n − 1)/2 − 1 -Meas. n(n − 2) n(n − 1)/2 − 1 n(n − 1)/2 We summarize our findings on the device level within Table I. We find that the number of qubits which have to be stored within the proposed architectures is approximately half as in the direct approach using Bell-pairs for large n, see also

B. Network level
On the network level we compare the number of qubits for the network state to connect all clients between devices.
For the GHZ network state of architecture A this means that we account for the network proxies, not the adapater qubits, see Sec. IV B. We elaborate our reasoning why this suffices briefly.
We determine the number of qubits of the expanded network state (11) of architecture A as follows: The state |N i in (11), i.e. after expansion, consists of qubits. From this we infer that the total number of qubits of the full network state after expansion is equal to In order to determine the number of qubits of the secure network state for architecture B we first fix a particular device, for example device i: Observe that the partition of device i contains c i network proxies. Now suppose we select a specific network proxy within that partition. The network state contains edges to all network proxies of other devices, therefore we have k =i c k edges associated with the selected network proxy. All these edges are decorated at least once. Furthermore, the edges to the network devices i + 1, . . . , m get decorated twice which amounts to m k=i+1 c k additional qubits. Since we have in total c i network proxies in partition i we find for the number of qubits for device i the following expression: From (17) we find that in total qubits are necessary to generate the network state within the secure decorated architecture. Observe that if all network devices are trusted, then the term k =i c k in (18) disappears.
To compare our findings to the standard approach using Bell-pairs we first compute the number of Bell-pairs necessary to establish a fully connected network state. In particular assume that we have m devices and that device i connects c i clients.
Observe that we need for each client connected to device 1 exactly m i=2 c i Bell pairs which implies that device 1 needs c 1 · m i=2 c i in total. For device 2 we consequently need m i=3 c i Bell-pairs in order to connect a single client of device 2 to all other clients, see Sec. VII. Since c i clients connect to network device i we easily find that the total number of Bell-pairs necessary to establish the full network state is given by We summarize our findings within Table III. Note that we consider a simpler, non-secure version of the decorated architecture with only one decorating qubit per edge for this comparison as we compare it to the standard GHZ architecture without the additional decorating qubits that guarantee security in untrusted networks.  We emphasize that we only compare the number of qubits of the network state, not including the adapter states due to the following reasoning: the adapter states have to be generated in both, GHZ and bipartite approaches. In contrast, in case of a decorated architecture the adapter states are not necessary.  From Table IV we find: our multipartite approaches outperform the bipartite approach via Bell-pairs. Furthermore we observe that the decorated network state may occupy slightly more qubits than the GHZ network state, but this state does not require any adapter states.

X. OPTIMIZED ARCHITECTURES
We also want to emphasize if less functionality, or equivalently the set of target graph states is more restricted, then our architectures need far less states/qubits. Therefore, in a restricted setting, our architecture performs far more efficient compared to bipartite approaches.
For example consider the scenario of a network which is restricted to generate GHZ states only. Such a network might be of interest for a community or group of clients which want to agree on conference keys via quantum key agreement protocols relying on GHZ states, but also for distributed sensing or other tasks.
If only GHZ states should be provided by a network with m devices, then it suffices to generate the network state instead of (9) and (10). Furthermore, we replace the device state for devices using GHZ states of (12) with where 1 ≤ i ≤ m. We observe that via the states of (20) and (21) the network is able to create any GHZ state in the network.
If the network should also account for parallel requests in that setting, then we enhance the network and devices as follows: instead of generating a single copy of (20) and (21) the network and the devices prepare ν copies of both states. This enables the network to work on ν requests in parallel.
One may optimize our architectures in a similar fashion also to other classes of target states, like e.g. open or closed cluster states.
Another optimization technique of the architecture of Sec. IV is to store a modified version of the network state of Sec. IV B. In particular, by symmetrizing the GHZ states of (9), i.e. distributing several copies of that state where the roots of the GHZ states get shifted among the devices, one can minimize the number of qubits which need to be measured within the Z basis for particular requests. For example, a network device might choose that GHZ state of the network which matches the number of neighbouring devices for a particular request. One could even further optimize such an architecture by shifting around the root of the GHZ network state to different network devices as those other graph states are Local-Clifford equivalent to the GHZ network state (via local complementation, see e.g. [26,38]).

XI. CONCLUSION AND OUTLOOK
We have presented elementary buildings blocks at an abstract level for quantum networks which enable the generation of arbitrary graph states in a highly distributed manner. In particular we identified two architectures: an architecture relying on GHZ states and an architecture which uses decorated graph states. Clients solely connect to quantum network devices and both architectures make extensive use of multipartite entangled quantum states. Our approaches are plug-and-play, which means clients and network devices can appear or also disappear at any time within the network. This enables for dynamic networking. The device and network state within GHZ architectures corresponds to several GHZ states of different sizes. In contrast, the states within the decorated architecture use a m−partite or fully connected, decorated graph state. In addition, for each architecture we have presented a protocol for generating, distributing and extending the network state. Our approaches turn out to be especially suited for recursive networks. Finally we have shown the security of our architectures in different settings, ranging from trusted networks to completely untrusted network where only the local apparatus of each client is trustworthy. What remains to be dealt with are imperfections in the apparatus of the network devices. Therefore one can consider to employ entanglement distillations protocols to cope with noise and imperfections. In particular it would be interesting to investigate specific noise models and entanglement distillation protocols to obtain error thresholds, reachable fidelities and concrete security levels of our protocols in a noisy environment. In addition, it is not clear which architecture is best suited for a concrete noisy network where the number of devices and number of clients connected to a device might vary. Furthermore, there might also exist other multi-partite entangled states besides GHZ states and decorated, fully connected graph states which could be candidates for network states. It is also not clear if the states we use are optimal in terms of storage size. Finally, it would be interesting to study how classical information needs to propagate within our network architectures.  Let us look at a particular request of a graph state corresponding to a 4-qubit ring graph between the clients marked 1 to 4 in Fig. 31. The network can identify which states are needed to fulfill this request using only the information about how many clients are part of the target state for each device. In this particular example only two of the 3-qubit GHZ states are needed because the request involves only parties connected to devices I and III and 2 clients are connected to the device with the root of the GHZ state. Note that the states which are not used for this request can be stored for later use. Then, the devices with the leafs of the resource states use expander states to expand the GHZ states according to how many clients are part of the requested state in that particular device. Of course, each device can simply fully expand the states to the number of clients which are connected to that device. However, this is not necessary if only some clients are involved in the request. In Fig.  31 the situation after the expansion is shown.
Next, the devices generate the adapter states, which are GHZ states as well, that will be needed to pick the desired adjacencies in the graph state. The roots of the network states and the adapter states are then connected to the device states via Bell measurements as illustrated in Fig. 32. Device II is not involved in this particular request and will simply measure its qubits belonging to the network state in the Z basis. Since device II is not participating in this case, its device state is not used up and can be used to fulfill parallel requests that only involve clients connected to device II. Here it also becomes obvious why it is necessary to add decorating qubits as a way to reliably cut the connections to device II (as described in section IV C), if that device, which is not directly involved in the generation of the requested state, is not trusted. The remaining qubits, i.e. the leafs of the expander and adapter states corresponding to the network level, are then used to generate the desired adjacencies in the graph states. To establish an edge in the graph, the qubits are connected using the connect procedure for graph states of Sec. II B 1, i.e. a controlled phase gate followed by Y measurements (and local Clifford corrections). Otherwise, the connecting qubits are simply measured in the Z basis to remove them from the graph. This process is shown for our example state in Fig. 33.
Similarly, the adjacencies between the parties directly connected to a device are established. In particular, unwanted connections are removed by measuring directly in the Z basis while desired connections are established via the merging procedure of Sec. II B 2, i.e. a controlled NOT gate and a Z measurements, see Fig. 34.
Finally, the finished graph state is teleported to the clients, see Fig. 35. disjoint sets of parties. In the above example, in Fig. 31 the qubits of several states are greyed out because those states are not used for fulfilling the particular request discussed there. These left-over states can be used to fulfill another request in parallel. Let us consider a parallel request that consists of distributing the fully connected graph state between the parties labelled 5-7 in Fig. 36, which also depicts all the states that are not in use for the other request.
From here on, we just follow the usual protocol for generating the graph state. Note that in this particular case there are no expander states needed because only one party per device is participating in this request. The operations and measurements as specified in Fig applied and all that is left to do is to teleport the state to the clients.