Efficient growth of complex graph states via imperfect path erasure

Given a suitably large and well connected (complex) graph state, any quantum algorithm can be implemented purely through local measurements on the individual qubits. Measurements can also be used to create the graph state: path erasure techniques allow one to entangle multiple qubits by determining only global properties of the qubits. Here, this powerful approach is extended by demonstrating that even imperfect path erasure can produce the required graph states with high efficiency. By characterizing the degree of error in each path erasure attempt, one can subsume the resulting imperfect entanglement into an extended graph state formalism. The subsequent growth of the improper graph state can be guided, through a series of strategic decisions, in such a way as to bound the growth of the error and eventually yield a high-fidelity graph state. As an implementation of these techniques, we develop an analytic model for atom (or atom-like) qubits in mismatched cavities, under the double-heralding entanglement procedure of Barrett and Kok (2005 Phys. Rev. A 71 060310). Compared to straightforward post-selection techniques our protocol offers a dramatic improvement in growing complex high-fidelity graph states.


Introduction
For certain algorithms, quantum computing offers the possibility of exponential speed up over classical computing if significant obstacles to physical implementation can be overcome [1]. An important class of proposed implementations uses linear optical elements and photo-detection to perform the logical operations [2]. In these schemes the qubits are typically projected onto the required states using optical measurements. An undesired feature of this technique is that in general two-qubit gates are probabilistic. In a naive implementation of the circuit model of quantum computation, this causes a decrease in success probability that scales exponentially in the number of two-qubit gates. It can be avoided by dividing the circuit into sub-routines, postselecting successful implementations of sub-routines and then teleporting the sub-routine into the main algorithm [3]- [6]. This approach is closely related to the one-way model of quantum computing developed by Raussendorf and Briegel [7]- [9], and has become a serious alternative to the circuit model.
We divide the class of optical implementations of quantum computing into purely optical schemes where the logical qubits are photons, and hybrid schemes where the logical qubits are matter systems. In the latter class, matter systems are used to store qubits, and optical excitations followed by projective photon detections implement the two qubit gates [10]- [19]. Candidate matter qubits with optical transitions include nitrogen vacancy (NV) centres in diamond [20], quantum dots in microcavities [21] or photonic band-gap structures [22], and neutral atoms in cavity QED [23,24]. There exist several schemes for quantum computing in which qubits are embodied entirely photonically. However, it is interesting to reflect that these schemes may in fact ultimately require the introduction of matter-based memories in order to support large-scale quantum information processing (QIP). Such memories would allow one to store resource states 3 DEUTSCHE PHYSIKALISCHE GESELLSCHAFT offline and subsequently release them on-demand. Thus one could negate the time-uncertainty implicit in probabilistic growth strategies, something which may be impractical using optical delay lines alone. One might argue that if indeed qubits are to be embodied in matter systems of some form, then this aspect should be exploited as aggressively as possible [2]-for example by storing qubits in matter systems at all times and using photons ('flying qubits') to mediate entanglement.
Photon loss is a problem both for purely optical and hybrid schemes. Purely optical schemes have to tolerate photon loss during entangling operations and qubit storage [25,26]. Hybrid schemes do not face the latter problem, but still have to solve the problem of photon loss during the entangling procedures. We can post-select successful outcomes, but photon loss can lead to a detector signature that, erroneously, indicates a successful outcome. One hybrid scheme that achieves a degree of robustness against losing photons is the double-heralding (DH) procedure proposed by Barrett and Kok [10]. The essence of this scheme is two consecutive parity measurements that side-step any photo-collection and detection inefficiency. In turn, this allows us to grow high-fidelity graph states for quantum computing. In this paper, we develop upon our previous work [27] to give a full model of a dominant source of errors in this scheme. We also extend our proposed adaptive growth strategy, which can significantly alleviate the cost incurred by these errors. The solutions proposed here are suitable for correcting any parity measurement scheme where the error is known, and they move beyond mere post-selection where efficiency is traded for fidelity.
We address the experimental challenge that optical schemes require indistinguishable (mode-matched) photon sources. The problem of mode matching can be divided into the matching of frequency, polarization, and spatio-temporal modes. These categories can be further subdivided into mismatching due to random fluctuations or due to fixed variations inherent in the configuration of the matter-qubit system. This latter category is especially important when the fabrication process for the nano-structure containing the matter qubit is not under complete experimental control (e.g. self-assembled quantum dots). It is well known that nano-structures generally possess a very broad distribution of properties that are an intrinsic consequence of the fabrication process, but that they can be accurately characterized or calibrated. Although here the details are worked out for temporal mismatch in the DH scheme, the strategies employed are more generally applicable. Indeed, any form of mode-mismatch can be tolerated, provided that the error is a known function of some detector variable-that is, the error is monitored.
More specifically, we consider the elimination of monitored errors that generate a so-called tilting in the ideally equally weighted amplitudes of a graph state. The error can be associated with a single graph vertex, and as such, can easily be represented in a generalized graph state notation that is introduced in section 2.2. We assume a device that can perform parallel measurements between pairs of qubits, and the pairing of qubits can be optically switched. Following Nielsen [6], the proposed strategy proceeds by first constructing a resource of Greenberger-Horne-Zeilinger (GHZ) states, or microclusters: and then fusing these into an arbitrary graph. This allows us to build a universal resource for quantum computing. Sections 2.1 and 2.2 will outline the problem with a brief description of the DH scheme, followed by a Jaynes-Cummings model [28]

Phase 3:
Bridging of large GHZ states into arbitary graph.

Phase 2:
Efficient merging of GHZ states into large GHZ states.

Figure 1.
A schematic outline of the microcluster approach to graph state growth. Phase 1: GHZ states (or microclusters) are joined into larger GHZ states, in a manner that is inefficient for building GHZ states of arbitrary size. It yields a constant offline overhead to building medium-sized GHZ states. Phase 2: once the GHZ states are sufficiently large, they can be merged efficiently into large GHZ states. Phase 3: the large GHZ resources can be used to grow any graph (including cubic lattices like cluster states, or the minimal graph state for a particular algorithm) via a bridging procedure.
how to optimize the brute force growth of small, imperfect, GHZ states (see phase 2 in figure 1). The error under consideration will affect these states, such that throughout phase 1, they have the more general form: Here θ is the tilting angle of the vertex, and the vertex is untilted when θ = π/4. Section 2.4 shows that when constructing a large graph with mismatched cavities, the amplitude distribution for N-qubit entangled qubits does not deteriorate past that of the distribution for 2-qubit construction-although there is a modest decrease in the intrinsic gate success probability. Section 2.5 shows that when these GHZ resources are large enough to be used in phase 2 of graph state growth. Those that do not meet fidelity requirements can be purified probabilistically. We call this removal of tilting errors, realignment.  Figure 2. (a) A schematic layout of a typical device that could implement our proposal. Illustrated here are an array of atom/cavity systems for which optical pumping and photon measurements can be performed in parallel. A form of optical switching will also be required so that measurements can be performed on arbitrary pairs of systems. (b) The energy level structure for the matter qubit, which allows only the transition |0 ↔ |e via π-pulses. (c) Photon leakage rates P A (t) and P B (t) for two cavities A and B. These curves are derived from a cavity model described in the appendix B, where the coupling strengths differ by 25%.
In section 3, two procedures are described that can fuse the purified GHZ resources. With these procedures GHZ resources can be merged into larger GHZ states (see phase 2 in figure 1), or bridged by a graph edge, allowing construction of a general graph (see phase 3 in figure 1). In the course of describing these procedures it will be convenient to further generalize the graphical notation to include weighted graph edges and partial fusions. In section 4, we quantify the improvements gained over a naive post-selection strategy.

DH scheme with mismatched photon leakage rates
In this section we describe the DH scheme with both perfectly and imperfectly matched cavities. We construct a model for cavity photon leakage and discuss how this effects the DH scheme. We describe how the spread of the resulting tilting error can be limited, and eventually removed by the realignment procedure.

The DH scheme
The DH scheme for the construction of graph states [10,19] uses matter qubits that have a threelevel structure denoted by the states |0 , |1 and |e (see figure 2b). The low-lying (|0 , |1 ) states are the computational basis states for the logical qubit, and |e is an excited level that becomes occupied when a qubit in the |0 state is excited by a π-pulse. Of the two computational basis states, only the |0 is excited by the π-pulse, as the transition from |1 is forbidden (e.g. by a selection rule).
The first stage of building a graph state requires an entangling operation between two qubits. The DH scheme for entangling two qubits consists of two rounds of measurements, and requires a resource of qubits in the |+ ≡ (|0 + |1 )/ √ 2 state. If one could completely prevent photon 6 DEUTSCHE PHYSIKALISCHE GESELLSCHAFT loss, and have perfectly reliable number-resolving detectors, then only the first step of the DH scheme would be required-that is, the system would require only single heralding. For single heralding two matter qubits in different cavities A and B (see figure 2(a)) are prepared in the |+ state and then pumped with a π-pulse. Upon relaxation the matter qubits will emit zero, one or two photons with probabilities 25, 50 and 25%, respectively. Figure 2(a) illustrates how a beam splitter erases the path information of the photons. If one (and only one) photon is detected, and there is no photon loss, the system is projected on to the |0, 1 ± i|1, 0 subspace, giving a successful entangling operation. When photon loss or lack of photon number information is included, a single detector click will project the system on to a mixture of the ideal result and the two photon subspace, |0, 0 . The unwanted part of the mixture can be eliminated by two more steps of the procedure. First, both matter qubits are rotated by the Pauli spin flip matrix X, which does not affect the desired part of the density matrix but converts the |0, 0 component into |1, 1 . Next, the heralding is repeated by re-exciting the qubits with a π-pulse and waiting for any photon detection events. If this second round of heralding produces a single detector click then the procedure has succeeded, the |1, 1 component of the mixture is eliminated, and it is known that photon loss could not have occurred on the first round. This procedure relies on negligible dark counts in the photodetectors [10]. In order to avoid confusion, the term DH application denotes the two rounds of a successful entangling operation.
After a successful application of DH the qubits are maximally entangled in the state Applying the local rotation HX to either one of the qubits creates the graph state ( where H is the Hadamard gate. A larger graph can be constructed by an application of DH on two graph nodes that are both connected to only a single neighbour. If the DH application is successful, then the resulting graph is fused [19]. If the DH application fails, then the two qubits must be measured in the computational basis (a Pauli Z measurement) in order to remove them from the graph state. More generally, if the qubits have more than one neighbour each, a successful DH application will yield a graph with one qubit having all the connections of the original two qubits. The other qubit (up to a Hadamard gate) will be connected to this qubit as a single dangling bond, or a 'cherry'. We can also think of these two qubits as being a redundant encoding of a single graph node.

The effect of cavity mismatch
The effect of mismatched cavity leakage rates on the DH scheme will now be described in the Jaynes-Cummings model. We show that mismatched cavities cause a tilting in the amplitude of the resulting state, which depends on the photon detection times. With good time resolving photon detectors and calibrated photon sources this tilting is known to the experimenter and can be corrected by the scheme presented here. In the non-ideal case, if atom A is in a cavity that tends to emit photons faster than the cavity that hosts atom B, then an earlier detector click means that the photon is more likely to have come from cavity A, hence achieving only partial path erasure. In order to know the resulting state, each matter-cavity system must be calibrated by measuring the photon leakage rate from a qubit prepared in the |0 state. We denote this probability distribution by P x (t), where the x indexes the atom/cavity system. Two examples of mismatched P A (t) and P B (t) are shown in figure 2(c), where perfect path erasure occurs only when the curves cross.

DEUTSCHE PHYSIKALISCHE GESELLSCHAFT
A suitably general model for the probability distributions P x (t) can be constructed by considering the three-level atomic system and its coupling to an electromagnetic cavity mode. With only one quanta of energy available to the cavity mode, its quantum state will be described in the Fock basis of |∅ andâ † |∅ , with no photons, and one photon of energyhω, respectively. If we monitor a joint matter-cavity system x for the emission of photons, and none are detected, then its evolution can be described by a non-Hermitian conditional Hamiltonian H x [29]: whereĴ x is known as the quantum jump operator, The constant g x represents the Jaynes-Cummings coupling strength between the cavity mode and the optical transition, and κ x quantifies the leakage rate of the cavity (h = 1). Note that the last non-Hermitian term is responsible for the irreversible evolution of the system. This irreversible decay also reduces the norm of the wavefunction N = | at a rateṄ that represents the probability density of detecting a photon. In general, any measurement event associated with a jump operatorĴ will occur with probability |Ĵ †Ĵ | . Defining the amplitudes of a system as follows: the detection probability satisfies,Ṅ = κ x |c 2 | 2 . We define P x (t, g x , κ x ) as the solution forṄ(t) when equation (5) is solved with the initial condition c 1 (t = 0) = 1. Note that, since c 1 is coupled to the decaying component c 2 , it too will vanish over time. When a photon is detected the system is projected onto a new state by the quantum jump operatorĴ x . In the case of a single photon source the constant factor κ x has no effect, but when we model the DH scheme it becomes physically important.
If we consider two of these systems A and B, then while no photons are detected the joint system will evolve according to H AB = H A + H B . If detectors D + and D − are placed behind a 50/50 beam-splitter then the corresponding jump operators J + and J − will each be a mixture of the photon modes a and b. To retain the same conditional Hamiltonian we require that: This requirement alone does not uniquely define the new jump operators. With the beam splitter transformations in mind, it may seem natural to presume that J + and J − will be √ κ A /2(â +b) and √ κ B /2(â −b). However, both detectors-being behind a 50/50 beam splitter-have an equal chance of registering a photon, hence we require: 8 DEUTSCHE PHYSIKALISCHE GESELLSCHAFT which is not satisfied by our first guess. Jointly, the two conditions in equations (6) and (7) restrict the jump operators to: where the undetermined phase, exp(iφ), is related to any difference in path length. This phase is unimportant as it vanishes after two rounds of DH. We therefore set it to 1 from now on. Using this formalism we can now turn to modelling the effect of mismatch on the DH scheme. We first consider the preparation of qubits in the state |+ A |+ B and then apply the DH scheme. To pass the first round the detector must click at time t 1 , then be left without being interrupted by a second detector click, until the decaying amplitudes, A 1 , A 2 , B 1 , B 2 , are negligible. This is will generate the state: which lends itself to an intuitive interpretation. Each amplitude squared is simply the relative probability of one cavity having emitted a photon compared to either cavity emitting a photon.
Proceeding with the DH procedure, both qubits are flipped with X A X B , and another π-pulse is applied. Upon detection of a second photon at time t 2 , the system is projected onto: where the amplitudes are represented as a function of an angle, θ β , which we call the tilting angle: When θ β = ±π/4, the state simplifies to a standard graph state, otherwise we say the state belongs to a class of generalized graphs that has a tilted vertex. As shown in figure 3(a), we represent the states as graph states but with the tilted vertex labelled by an angle θ. In a similar fashion to the constructive definition of pure graph states, we constructively define the quantum state associated with a tilted graph. Whereas a pure graph has every qubit initialized in the state |+ , a tilted vertex is prepared in the state: After this different preparation stage, control-Z gates are applied to all qubits connected by a graph edge.
Having demonstrated the modelling techniques used on a simple two qubit system, and having defined the graphical representation of a tilted vertex, we shall now state the results for more complex systems.
Consider the effect of the DH scheme when the qubits used correspond to tilted vertices in tilted GHZ states. Figure 3(b) represents this in the new graphical notation. From our constructive definition of tilted graph states it follows that the two initial states, a and b, have the form: Failure Success Failure Success Figure 3. The effect of a successful or failed application of the DH scheme (where the qubits used are within the dotted ellipse) for the non-ideal case: (a) when the initial state is two separable qubits in the untilted |+ ; (b) when the qubits are part of a tilted GHZ state; (c) when the qubits are part of a tilted GHZ state, but have had a Hadamard rotation removed. All successful outcomes have a single tilted vertex parametrized by θ β , which is specified by equation (17). The probability of success is given by equation (15). (d) Some identities for tilted vertices: when θ = ±π/4, the graph is equivalent to a pure graph; the effect of an X rotation transforms a tilted angle θ → π/2 − θ. The identity for a local X rotation is used in section 2.4. With the exception of section 2.4, Pauli rotations will not be important, and will be omitted from our graphs. However, local Hadamard transforms always have an important role, as such the presence of an additional Hadamard is shown by the labelling of vertices with a H.
where x = a, b and n a = n b = n. In figure 3(b), the tilted GHZ state has all but one qubit labelled by a H, indicating that these qubits are also rotated by a Hadamard, giving: Whether a graph state qubit is rotated by a Hadamard will have an important effect on its behaviour under the DH scheme. For this reason the presence of a Hadamard is always shown on figures. However, local Pauli X, Y and Z rotations do not play a pivotal role, and hence, are omitted from figures for the sake of brevity. Following figure 3(b), we perform a parity measurement between a qubit in a with a qubit in b, with success probability: which is the upper bound of success for the DH scheme-reduced upon consideration of photon loss. Upon failure the two qubits are measured in the Z basis, projecting all 2n qubits into a 10 DEUTSCHE PHYSIKALISCHE GESELLSCHAFT separable state. Success yields a single 2n qubit entangled state: which is, up to spin flips on n qubits, equivalent to another tilted GHZ state with a tilted vertex parametrized by θ β , such that: This can be shown to be consistent with the less general result when the initial states are pure graph states, by substituting in θ a = θ b = π/4 and deriving (11). Furthermore this simplification is possible when θ a = θ b , which is a point that we shall return to in section 2.4.
In figure 3(c), the graphical notation is used to describe how the DH scheme applies when the qubits used are not the nodes of a GHZ state. Note that the notion of central node requires some clarification, since the state described by equation (14) has no single qubit playing a privileged role that would make it 'the' node. Indeed, applying the DH scheme will have the same effect independently of which qubit is used. However, in figure 3(c) the qubits used have a Hadamard rotation removed, compared to equation (14). This has an effect on the shape of the graph for successful and failed outcomes. However, it has no effect on the probability of success, or the value of the resulting tilted vertex, which both still obey equations (15) and (17).
So far we have given a full account of the effect of cavity mismatch when the detectors click at times t 1 and t 2 . What remains to complete the description is to specify the probability distribution for the random variables t 1 , t 2 . The probability density for a single detector click in round one is: Given an event at t 1 , the second round is governed by the probability density distribution: where and These are convenient variables that will allow us to cast many expressions in a concise form. The product of these distributions gives the joint probability density distribution for t 1 and t 2 :

Expectation values for some measures of gate quality
In this section we consider the expected quality of an attempt at DH. The results of this section will form the criteria for evaluating different strategies for graph growth that are discussed in the subsequent section. We consider two tilted vertices θ A and θ B , with two leakage rates P A (t) and P B (t), from which we can determine the probability distribution for θ β . Our quality measure must incorporate both the probability of success, defined in equation (15), and some function that measures how close θ β is to the ideal values of ±π/4. Without loss of generality, we shall only consider +π/4 as the ideal case, and assume known phase errors are always corrected with a local Z rotation.
Although we could use a pure state entanglement measure, such as the von Neumann entropy, we shall instead consider functions of the inner product between the tilted state and the ideal state: In this section we will give some plausibility arguments for the value of these measures. However, they are ultimately established by the nature of the realignment procedure, which distils the tilted states and is the topic of section 2.5.
Since even a failed DH application generates | (0) , which has f(0) = 1/2, we choose the quantity of interest to be F(θ β ) = f(θ β ) − 1/2. Using equation (17), θ β is eliminated from F(θ β ) to give: where µ and ν have been defined in equation (20). To get the average fidelity over all possible detector click times for t 1 and t 2 , we multiply by Q 12 (t 1 , t 2 ), which takes the simple form Q 12 = µ + ν, and integrate over t 1 and t 2 : Hence the expected fidelity can be split into two independent factors, one dependent on initial tilting angles, and one dependent on the overlap between the probability distributions. However, many different fidelity distributions may have the same expected fidelity and yet represent very different resources. Consider two distributions: the set U of 2 n-qubit tilted graphs all with sin(2θ U ) = A/2; and the set V of 4 n-qubit tilted vertices with sin(2θ V ) = A/4. If we sum the values of F they both equal A, but the two distributions are of different utility in subsequent attempts at DH. Attempting to double herald set U will produce a distribution of 2n-qubit tilted graphs with expected fidelity proportional to sin 2 (2θ U ) = A 2 /4, whereas the same calculation for set V gives 2 sin 2 (2θ V ) = A 2 /8. Heuristically, this indicates that quality is better than quantity. Quantitatively, it tells us that F 2 may be a better measure of gate quality. As alluded to earlier, this is a point that is supported by section 2.5. The expected value of F 2 is: Unfortunately, the general case does not admit tilting angles to be factored outside the integral. Furthermore, even for specified cavities, evaluating the integral can be quite involved. We proceed by considering an example for a particular pair of cavities. The details of these cavities are given in appendix B, and are the same as used to generate the example probability distributions given in figure 2. In appendix A, we demonstrate the details of how to evaluate E(F 2 ), and we give a general proof that for any probability distribution the behaviour of E(F 2 ) is qualitatively the same. Hence, we can draw conclusions from figure 4 without concern that they do not carry across for other pairs of cavities.

Strategies for phase 1 GHZ growth
This section proposes strategies for the 'phase 1' growth of GHZ states on the basis of E(F 2 ) as a measure of the expected gate quality. Firstly, we consider the procedure given two tilted GHZ states with tilting angles (θ a , θ b ) and cavity leakage rates P A (t) and P B (t). Secondly, we discuss the more complex issue of how best to divide 2N GHZ states from a set (θ 1 , . . . , θ 2N ) into N pairs of GHZ states-where the objective is that the selection maximizes E(F 2 ) summed over all pairs.
Consider the first problem, for which the only freedom we have that can change the outcome is the application of local rotations prior to a DH application. If we apply an X rotation to one of the qubits, then up to some local rotations on other qubits in the graph this interchanges the magnitude of the qubits |0 and |1 -the tilting angle transforms θ → π/2 − θ. Hence, if θ a and θ b are of similar magnitude, they become dissimilar, and vice versa. This also inverts the success and failure probabilities, so applying spin flips alternates between high and low success probabilities. When the success probability is high, one qubit is much more likely to emit a photon than the other, and we can expect the resulting graph to be more tilted. Interestingly, the X flips have no effect on E(F ), as these two effects cancel out exactly. However, E(F 2 ) is more sensitive to fidelity than success probability. Guided by this measure, we prescribe that a spin flip is applied when the tilting angles are initially far apart, | sin 2 (θ a ) − sin 2 (θ b )| > 1/2. For example, let us consider when the tilting angles are symmetric about π/4, and hence far apart. Now E(F 2 ) is the green curve of figure 4, and an X flip change makes the tilting angles identical and changes E(F 2 ) to the red curve.
We now turn to the second question: how best to pair up a set of tilted GHZ states (θ a , θ b , . . . , θ 2N ) for DH. The optimal strategy is computationally hard because it requires evaluating a complex measure of success, like E(F 2 ), for every possible combination of pairs. Furthermore, since the quantum computer will have to perform these assessments while running, time is a critical factor, as delays between rounds of DH will increase the amount of decoherence. Non-optimal, yet good strategies that are computationally efficient to implement may be divided into two categories: those based solely on matching cavities; and those based solely on tilting vertices. It may be the case that there also exist computationally efficient strategies that use both pieces of information, although whether this is the case is not clear at this point.
In this paper we propose a strategy that takes only tilting angles into consideration. We have chosen this over a cavity based strategy for two reasons: (1) although we may match cavities during GHZ growth, to make a unified graph we will eventually have to connect qubits from mismatched cavities; (2) the problem does not admit a general answer, as it depends on the connectivity of the target graph, and the distribution of cavities used.
Having motivated our proposed strategy, its enunciation is simple. The tilted GHZ states are sorted into an ordered list from descending to ascending tilting angle, and the adjacent items on the list are paired up. Again this utilizes the fact that the red curve in figure 4 is higher than the green curve, and this strategy will sort the qubits to be as close to the red line as possible.
As the size of the quantum computer grows, so too will the number of entangling operations being carried out in parallel. Applying the proposed strategy in this limit of many parallel operations approaches a situation where all vertices are paired with other vertices of an identical tilting angle. In this limit the expression for the tilting angle after DH (equation (17)) reduces to the result for when pure, untilted, graphs are used. Therefore, the average fidelity of GHZ states will not deteriorate past the fidelity distribution of building 2-qubit tilted graphs. However, the scheme does not mask the reduced probability of success.

The realignment procedure
After a supply of entangled qubits of the required size has been produced, those GHZ states that do not meet a criterion of acceptable fidelity can be purified by a probabilistic procedure described in this section. A graphical description of this procedure is shown in figure 5. One qubit of each low fidelity GHZ state is rotated by the unitary matrix M(θ): For realignment the variable θ is set equal to θ a , where for the rotated qubit cos(θ a ) is the amplitude of the |0 component. Note that in the ideal limit, as θ a → −π/4, M(θ a ) becomes the Hadamard gate. Following this rotation the qubit is measured in the computational basis. With probability p s (θ a ), where: Figure 5. The realignment procedure applied to: (a) any qubit in a GHZ state, as all qubits in a GHZ state are cherries; (b) the cherry of the inter-node tilted vertex. The rotation required before a computational basis measurement is M(θ β ), and this is defined by equation (28). The procedure succeeds with probability p s (β), equation (29). Upon failure the tilting is exacerbated, such that the vertices are tilted by angle R(θ β ), equation (30).
the state |1 is measured, and the remaining qubits are projected into a maximally entangled GHZ state. Notice that the probability of success is proportional to F 2 . The expectation value E(F 2 ) was proposed in section 2.3 as a sensible measure of the usefulness of the product of a given DH application. It should now be clear that F 2 is a good measure, since it tells us how many untilted GHZ states we can expect if we attempt to double herald and then attempt to realign. If the procedure fails then the amount of lopsidedness of the GHZ state increases, such that the tilting angle changes to −R(θ a ), where the function R(φ) is defined such that: The success probability has an upper bound of 1/2, which is approached as cos 2 (θ a ) → 1/2. On first inspection this contradicts the fact that in the ideal limit an X basis measurement will deterministically remove one of the qubits to give another GHZ state. However, when |0 is measured on a state for which cos 2 (θ a ) = 0, 1/2, 1, the amount of entanglement lost drops to zero (since, −R(θ α ) = −θ a , which is the same state up to a local Z rotation). If the first attempt at realignment fails, a single qubit is lost but the procedure can be reattempted on the remaining qubits with a lower success probability corresponding to the new tilting angle.
In addition to purifying tilted GHZ states, the realignment procedure is applicable to a wide class of tilted graph states. A second example is given in figure 5(b), which begins with the tilted graph that was generated as the failed outcome of the procedure shown in figure 3(c). The tilted vertex has a single neighbour, which itself has no other neighbours, which we refer to as a cherry. It is the cherry that is measured out in the realignment procedure, and in general, this is the graph resource required to attempt to realign a tilted vertex.
As a closing remark it is worth noting that the rotation M(θ) and its relationship to R(θ) will have significance beyond the realignment procedure. Indeed, the M(θ) rotation plays a pivotal role in both the merge and bridge procedures of later section. Furthermore, the function R(θ) will appear in the state description of failed procedures.

Procedures for joining resource states
So far we have shown how to perform phase 1, which grows small GHZ states. We shall now turn our attention to phase 2 and 3, which respectively, efficiently grow larger GHZ states and join large GHZ states into an arbitrary graph. How the various stages of this section fit together is represented in figure 6. It has already been shown that the realignment procedure has applications beyond distilling GHZ states. Indeed, this means we already know how to perform the first two boxes of phase 2 and 3, as described in the flow chart.
The remainder of this paper concerns what happens after this realignment fails, that is, what can be done with the tilted graph state of figure 5(b). The naive, and inefficient, answer is that the central qubit can be measured out and we can try again. However, in this section we propose two procedures that probabilistically utilize this tilted vertex. The procedures are coined the merge and bridge procedures which, when successful, fuse the nodes to which the central qubit was connected. Which procedure should be used depends on the target graph as both generate different kinds of fusion. The effect of a successful procedure is best seen by comparison with the effect of an X or Y measurement on an ideal graph, as shown in figure 7. A successful bridge procedure will, like a Y -basis measurement, connect the nodes by a graph edge. A successful merge procedure will, like an X-basis measurement, redundantly encode the two nodes in the same way as type-II fusion [30].
As a consequence of a failed attempt at either of these procedures the resulting state is not a pure graph state. However, the failure outcomes can still be described by a further extension to our graphical language where failed mergers and bridges create partial fusions and weighted graph edges, respectively. In later sections, we show that even these improper graph states are of use, as the partial entanglement established by a partial fusion or weighted graph edge can be recycled to improve the success probability of subsequent attempts at merging or bridging. This extended graphical language will be introduced with each procedure.

Merging, and partial fusions
This section describes how the merge procedure works, and how both outcomes are represented as partial fusions. We begin with the system corresponding to the failure outcome of figure 5(b): where the first qubit is the tilted central vertex that has x and y as neighbours. These are themselves part of two other graph segments |ψ X and |ψ Y . In the case of figure 5(b), the graph segments have the form: The merging procedure requires only that | X and | Y are graph states that contain qubits x and y. The merger procedure is represented in figure 8 Repeat these steps until GHZ state is sufficiently large, and then start phase 3.

Phase 3 with cavity mismatch
Key: Start here Success outcome Failure outcome Repeat these steps between different nodes until graph state is completed. where γ is related to the failure function introduced in the realignment section, γ = ∓R(θ a ), and the operator P xy is given by For φ = ±π/4 this reduces to the even (+) or odd (-) parity projector, Note that we are using the expression parity projector loosely, as P 2 xy (±π/4) is only equal to P xy (±π/4) up to a constant. The reason for the unconventional normalization of P xy (θ) is so that when it acts on the graph state | X | Y , it generates a normalized state, hence the probability of success can be read of as the square of the amplitude.
A measurement in the Z-basis yields a successful merge when the |1 state is measured, which happens with probability p s (θ). The result is that x and y are projected by an even (+) or odd (−) parity projector. Since the choice of sign in M(±θ) determines the parity subspace of a successful outcome, we say that M(±θ) targets a particular subspace. In the ideal limit where θ → π/4, the success probability p s (θ) → 1/2. However, we should expect it to tend to 1 as the ideal case is deterministic. This paradox is resolved when we notice that, as θ → π/4, the failure outcome P xy (γ) tends towards the non-targeted parity projector P xy (∓π/4), and hence even failure becomes a success. Indeed, the merging procedure is completely continuous with an X-basis measurement, as the prescribed rotation becomes the Hadamard under ideal conditions.
Combining partial fusions: A pure graph state: A B Partial fusion notation: θ Apply P(θ) to qubits Α and Β.
Failure Success Figure 8. The graphical notation for a partial fusion is defined and the procedure for merging tilted vertices is shown. (a) The symbol for a partial fusion, a dashed graph edge labelled with an angle. We also show how a maximally entangling partial fusion (θ = ±π/4) reduces to a pure graph state, and how multiple partial fusions combine into a single partial fusion. (b) The procedure for merging tilted vertices when there is no pre-existing partial fusion. (c) The procedure for merging tilted vertices when there is a pre-existing partial fusion. The rotation required before measuring the tilted vertex is the same in both (b) and (c); M(±θ), as in equation (28). Upon failure a partial fusion is generated of angle ∓R(θ), where R(θ) is the failure function of equation (30). Note that, to maximize the probability of success, the sign choice in the rotation M(±π/4) must match the sign of the pre-existing partial fusion. Figure 8 casts this procedure into a graphical language by defining a new kind of graph edge, represented by a dashed line, that is labelled by an angle θ. We call this dashed line a partial fusion, which is to be interpreted as meaning that qubits it connects have the operation P xy (θ) applied to them. Furthermore, since partial fusions with θ = ±π/4 generate pure graph states, they are called pure fusions. To see how a pure graph state can be regained after an impure fusion has occurred, it is first necessary to see how partial fusions combine. Consider two partial fusions P xy (θ 1 ) and P xy (θ 2 ), which are acting on the same qubits as in figure 8(a), then: which can be expressed as a new partial fusion (plus a renormalization constant): where

DEUTSCHE PHYSIKALISCHE GESELLSCHAFT
and One significance of these relations is that a pure partial fusion always overrides a partial fusion, P xy (±π/4)P xy (φ) = P xy (±π/4), as would be expected. Furthermore, the behaviour of the normalization constant is crucial since the normalization constant determines the probability of success. The nature of this dependence will be made explicit in the following discussion.
We now consider what can be made of the improper graph state which forms the failure outcome of figure 8(b), and the procedure that we shall derive is shown in figure 8(c). In preparation, another attempt at DH has to be made on two qubits from | X and | Y . When successful, this produces another tilted central vertex connected to qubits x and y. The state of this system is now: which is the similar to equation (31), except for the important addition of a partial fusion generated from previous attempts at merging, P xy (γ). Again, we perform a rotation M(±θ b ) on the central qubit, but this time the choice of sign will be important. This gives the state: which can be simplified using the rules for combing partial fusions to give: Here the value for γ 3 follows from equation (38), and the new amplitudes are products of the old amplitudes and the normalization constant, such that This simplifies to The second factor of this probability is due to the partial fusion, and by the correct choice of the sign ± can always be made greater than 1. This is achieved by matching the sign in the rotation M(±θ b ) to the sign of γ 1 . Insight into the physical underpinnings of this sign matching can be gained by reflecting that partial fusions can be decomposed into linear sums of the odd and even parity projectors. For a partial fusion P xy (φ) we find the following: it is closer to even parity than odd when −π/2 < φ < 0; and it is closer to odd parity than even when 0 < φ < π/2. As for a rotation M(±θ), this will attempt to project on to the even or odd parity subspace for + and − respectively. Since two graph state qubits initially have equal magnitude in the odd/even parity subspaces, a partial fusion will increase the magnitude in one particular subspace, and a measurement of parity is more likely to work for the dominant subspace. As a closing remark on merging, notice that if a central vertex is not tilted it can be used deterministically to project the two qubits into a definite parity state. If the two qubits are already partially fused then this alters the probability of an odd or even parity projection. Some fine tunings of the strategy are described in section 3.3. Note that, to maximize the probability of success we must choose the correct sign in β ± .

Bridging, and weighted graph edges
When performing a bridge operation on a pure graph state, as in figure 9, it differs from a merge operation by an additional rotation S, where S is a diagonal matrix with entries (1, i). Again, we shall algebraically describe the bridge procedure in parallel with a graphical description given in figure 9, and shall begin with a system resulting from the failed outcome of figure 5(b). Initially the state is described by equation (31) and after rotating the central qubit by M(±θ a ) · S the state is: Again, γ is determined by the failure function such that γ = ∓R(θ a ), and the new operator is: which is always unitary.
As with the merging procedure there is a p s (θ a ) chance of successfully obtaining |1 in a measurement, and this generates a unitary U xy (±π/4) acting on |ψ X |ψ Y . This unitary matrix is identical to a control-Z operation with an additional S x S y byproduct. Again, failure establishes a partial amount of entanglement that can be recycled in later attempts at bridging.
As with the merging procedure, a failure on the first attempt is at least partially successful in that U(γ) generates a control-Z(−4γ) gate with a byproduct Z x (−2γ)Z y (−2γ). The notation Z(ϕ) denotes the diagonal matrix with elements (1, e iϕ ). As before, this partial entanglement will improve the probability of success when a second attempt is made. Furthermore, as with the merging procedure M xy (θ) · S and M xy (−θ) · S target two distinct but equally acceptable results, which generate either a control-Z(π) or a control-Z(−π).
The above procedure is represented in figure 9(b), where the partial entanglement of a failed bridge is represented as a weighted edge, a solid line labelled with an angle. From the definition of U xy (θ), we can again derive a combination relation, U xy (θ 1 )U xy (θ 2 ) = U xy (θ 1 + θ 2 ). Therefore, unlike the partial fusion operator, U xy (±π/4) does not override previous failures. Consequently, when later attempts are made at bridging it is necessary to target the correct amount of weighted edge. If there is a pre-existing edge of angle θ then a successful outcome is generated by ±π/4 − θ. As before, the sign choice will play an important role in recycling entanglement to boost to the probability of success.
Taking a system with a weighted edge between x and y and then making, via non-ideal DH, a tilted central vertex between x and y, we have the state: A weighted edge of magnitude ±π/4 − γ 1 can be targeted by rotating the central qubit by M(β ± ) · S, where β ± satisfies: Here plays an analogous role to N M . After the rotation, the state becomes: where p b (γ 1 , θ b ) is the probability of success The angle γ 2 of the additional weighted edge equals F(γ 1 , β ± ): cos(F(γ 1 , β ± )) = cos 2 (θ b ) (± cos(γ 1 ) − sin(γ 1 )) where F(γ 1 , β ± ) is a generalization of the failure function R(φ), and it is simple to show that R(φ) = F(0, φ).

DEUTSCHE PHYSIKALISCHE GESELLSCHAFT
The effect of the previous weighted edge modifies the success probability by a factor N B (γ 1 , θ b ). This factor can always be made greater than 1 by the correct choice of the '∓' sign, corresponding to a physical choice in the targeted unitary U(±π/4 − γ 1 ). The extent to which N B deviates from 1 is dependent on sin(2γ 1 ), which is intuitive, as it vanishes for no preexisting weighted edge (γ 1 = 0), and it is at a maximum for a pure graph edge (γ 1 = π/4). The effect of θ b on N B is less intuitive, as it increases as the vertex approaches a qubit initialization in the |0 or |1 state. Recall that a constructively defined graph state generates entanglement by control-Z gates on initialized qubits, so any qubits in the |0 or |1 would not become entangled with the graph.
Also, we find that the determinism of the ideal regime is regained when the central vertex is untilted (θ b = ±π/4) even if there is a pre-existing weighted edge (γ 1 = 0). Although the success probability does not become 1, the failure outcome becomes the equally desirable alternative to the targeted operation, that is U xy (∓π/4 − γ 1 ) instead of the targeted U xy (∓π/4 − γ 1 ). However, unlike merging in the ideal regime, γ 1 does not alter the probability of these outcomes, with each remaining equally likely.

Overall strategies
For both the merge and bridge procedure we have described the success probability when using a tilted central vertex of angle θ. However, there are alternative methods of generating this graph, which would result in different values of θ. In either case, an attempt at DH has to be made, which will generate a tilted central vertex with a cherry, that is tilted by some amount θ a .
For method (i) the cherry is measured in the Z-basis, so that the tilted vertex can be used to merge or bridge with success probability: where N is the appropriate factor, N M or N B . In terms of figure 6 this corresponds to skipping the starred step, and going straight to the failure outcome. For method (ii) an attempt at realignment is made on the cherry, which if successful, guarantees success at merging or bridging, but if unsuccessful, changes the vertex tilting to θ α = −R(θ a ). Hence, the overall probability of success is: which although benefiting from the additional opportunity at realignment, may suffer if N(γ, θ α )p s (θ α ) is substantially lower than N(γ, θ a )p s (θ a ). When γ = 0 the best method can be determined by simple calculation. On a first attempt at merging or bridging γ = 0, and the best method is always the same. If γ = 0, then N(0, θ) = 1, and since p s (θ α ) < p s (θ a ), it follows that P i < P ii . Note that on a first attempt P ii has at upper bound of 75%, which is approached as θ a → π/4, whereas on later attempts the upper bound can approach 1.

Improvements in resource costs
The purpose of this paper has been to demonstrate that if we know what errors are caused in our entangling operation (due to the additional information provided by detector 'click' times) then  there are numerous strategies and procedures that we can deploy which allow us to construct a graph. This scheme is not designed to replace traditional error correction (as this will still be necessary), but rather to supplement it. If we consider even a modest amount of cavity mismatch, the error rate for tilting errors is far beyond the current error correction thresholds. Since these errors have to be prevented, the only alternative proposal that we are aware of is to post-select DH applications that meet some fidelity requirement. We give some examples of how our proposal improves upon a naive post-selection strategy. As a measure of the two approaches we take the probability of successfully merging or bridging, on the first attempt. The pair of cavities we use in our calculations are assumed to be critically damped, as described in appendix B. This assumption reduces their mismatch to a single parameter, the ratio of their coupling strengths. Requiring the resulting state to have an infidelity of less than 10 −4 , the success probabilities are shown in figure 10.
These success probabilities were calculated by the following procedure, which we illustrate for the photon leakage rates in figure 2c (a coupling strength ratio of 1.25). We calculate the probability density of F , and for a post-selection strategy we are constrained to the window in figure 11. The area inside this window-times the rate of photon loss-is the probability of success, which we calculate to be P(post-select) = 3.3%. For our scheme, we can accept the same graph segments that the post-selection strategy accepts, and attempt to merge/bridge the lower fidelity graphs, hence P(our-strategy) = P(post-select) + P(out-window). On the first attempt at merge/bridge equation (54) simplifies to 3F 2 , and we calculate P(outside-window) by integrating 3F 2 dF over the whole outside region, which gives P(outside-window) = 32.4%. Post-selection region F Probability density of F Figure 11. The fidelity distribution for the example pair of cavities outlined in appendix B. The inset is an enlargement of the region just below 0.5, with the region of 0.5-10 −4 < F < 0.5 highlighted, as this is the window of graph state that are post-selected as being within error correction tolerances.
Hence, P(our-strategy) = 35.7%, and for these parameters our strategy is an improvement by over an order of magnitude.
There are three important points in appreciating these results. Firstly, these results are valid for the first attempt at merge/bridge. In subsequent attempts, a post-selection strategy will have the same success probability, whereas merge and bridge have an improved success probability. This improvement originates from the recycling of partial entanglement from weighted edges and partial fusions. Secondly, our higher success probability can cut resource costs in a manner that scales with the size of the graph. Although the scaling varies between different approaches to graph growth, it is common to see resource costs that scale with p − log(n) [31]. Finally, it is informative to compare these results with the analysis of cavity mismatch presented by Barrett and Kok [10]. Therein, they show that a single physical parameter could be changed by up to a few percent and still have an average fidelity of better than 1-10 −4 . This is consistent with our results, as figure 10 shows that success probability remains at 50% until mismatch exceeds 0.5%. The slight difference between 0.5% and a few percent originates from keeping other physical parameters in proportion to the coupling strengths; via our assumption of critical damping. Although, for small mismatch, the DH scheme is inherently robust, for larger mismatches a post-selection strategy rapidly becomes inefficient, whereas our proposed protocol retains a high success probability even for very large mismatches.

Conclusion
In this paper a set of procedures have been proposed that allow distributed quantum computing to be achieved despite systematic errors that generate a tilting error in the graph vertices. These errors have been shown to naturally arise when the DH scheme is used with photon sources that possess different inherent leakage rates. Graph construction has been considered as consisting of three phases: phase-1-construction of a GHZ resource; phase-2-efficient merging of GHZ resources into larger GHZ states; phase-3-efficient bridging of GHZ states. The proposed scheme contains modified protocols for each of these graph construction steps. The modified protocols adapt to information from photon detection times so as to eliminate all known tilting error. We have extended the graphical language of graph states to include tilted vertices, weighted edges and partial fusions, so that an intuitive grasp of the errors can be gained. Weighted graph edges have already found various applications throughout the field of quantum computation [32]- [34], and the authors suspect that tilted vertices and partial fusion may also prove to be useful concepts in other problems.  For the first cross-section, in red, the solution is exact even up to 0th order. For the second cross-section, in green, we compare the approximation with a high order solution, which is represented by a dashed line. For the high order solution we use the same cavity parameters as in figures 2(c) and 4, which is specified in appendix B.
An expression for E(F 2 ) R I can be found by calculating I n . Although these may have to be performed numerically, this is preferable to numerically calculating E(F 2 ) at every point. Also, we shall show that there is a recurrence relation between different I n , so some terms can be found without any integration. However, first we state the expansion for the second region R J (tan 2 (θ a ) < 2 tan 2 (θ b )): Since the difference between U and V is only in the labelling of t 1 and t 2 , we know J n = I n .

DEUTSCHE PHYSIKALISCHE GESELLSCHAFT
Furthermore: (A.8) Interestingly, for odd n, I n are fixed in terms of I k with even k. However, the even terms of I n are not constrained by this recurrence relation. For example, I 1 = 1 2 I 0 , which means that (up to a constant factor I 0 ) we can expand up to first order without performing any numerical integration. Hence, when sin 2 (θ a ) − sin 2 (θ b ) ≈ 0, where the change between E(F 2 ) R I and E(F 2 ) R J is achieved by using L as the largest of the pair 1 , 2 and S as the smallest. Two cross-sections of E(F 2 ) aprx are shown in figure A.1, and compared with an example solution. Both cross-sections agree well with the example solution, even far away from sin 2 (θ a ) − sin 2 (θ b ) = 0. The importance of this result is that it tells us about the shape of E(F 2 ) independently of the shape of P A (t) and P B (t). In the main body of this paper we argue from a numerical solution of E(F 2 )-shown in figure 4-that sin 2 (θ a ) = sin 2 (θ b ) is preferable to sin 2 θ a = 1 − sin 2 (θ b ). The above result shows us that, at least near θ a ≈ π/4, this behaviour is not an artefact of the particular solution but a general property valid for any P A (t) and P B (t). In fact, the only requirement is that P i are non-negative, so we can also accommodate photon loss and distributions that violate our Hamiltonian, equation (3).

DEUTSCHE PHYSIKALISCHE GESELLSCHAFT
where (t) is the Heavyside function The example pair of cavities used throughout this paper are parametrized by g A = 10 and g A = 12.5. Note that all conclusions of this paper are independent of the particular form of the photon leakage rate, and that this example is solely used to guide the reader through the paper.