Generalized flow and determinism in measurement-based quantum computation

We extend the notion of quantum information flow defined by Danos and Kashefi (2006 Phys. Rev. A 74 052310) for the one-way model (Raussendorf and Briegel 2001 Phys. Rev. Lett. 86 910) and present a necessary and sufficient condition for the stepwise uniformly deterministic computation in this model. The generalized flow also applied in the extended model with measurements in the (X, Y), (X, Z) and (Y, Z) planes. We apply both measurement calculus and the stabiliser formalism to derive our main theorem which for the first time gives a full characterization of the stepwise uniformly deterministic computation in the one-way model. We present several examples to show how our result improves over the traditional notion of flow, such as geometries (entanglement graph with input and output) with no flow but having generalized flow and we discuss how they lead to an optimal implementation of the unitaries. More importantly one can also obtain a better quantum computation depth with the generalized flow rather than with flow. We believe our characterization result is particularly valuable for the study of the algorithms and complexity in the one-way model.


Introduction
Measurement-based quantum computation, and, more specifically, the one-way quantum computation model [2] provides both a new theoretical description and a novel prescription for implementations of quantum computing.In the standard model of quantum computation -the circuit model -a computation is described as a network of unitary single and two-qubit gates acting on a register of qubits, followed, at the end, by measurement of each qubit.In the one-way quantum computation [2], first a special entangled multi-qubit state called a "graph state" or "cluster state" [3] is prepared, then the qubits are measured in a specified order and in specified bases.
An important aspect of this model is the way the inherent randomness of the measurement outcomes can be accounted for, so that the overall computation remains deterministic.This is accomplished by conditioning the basis of certain measurements upon the outcome of others, introducing a measurement order.
In [2,4] a prescription is given for the construction of deterministic measurementpatterns equivalent to any gate network.Nevertheless, one of the potential advantages of this new model is the possibilities it opens up for the development and design of quantum algorithms in a completely new picture, without direct recourse to the circuit model.
Thus an important question is, given a particular graph state and set of measurements, can these measurements be adapted in such a way that determinism of the computation is guaranteed?What is the structure of graph states and measurements which can be considered, such that the computation remains deterministic?In this paper, we provide a general framework to answer such questions.
Previously, a geometric condition on a graph state known as "flow", was developed which guaranteed that graph states satisfying a set of "flow conditions" would admit a deterministic computation, provided measurements were restricted to the (X, Y ) plane of the Bloch sphere [1].Nevertheless, this condition was not necessary and did not take into account possibilities of measurements in other planes of the Bloch sphere, and the special way graph states transform under measurement of Pauli-operator observables [5].In this article we provide a "generalized flow" condition.This is a set of geometric conditions on a graph, which are necessary and sufficient for that state to admit a deterministic one-way quantum computation under measurements in the (X, Y ), (X, Z) and (Y, Z) planes.
The structure of this article is as follows.We begin by reviewing the "measurement calculus" [6] -a means of algebraically representing measurement patterns in one-way quantum computation.After reviewing the flow condition introduced in [1], we shall then present definitions of generalised flow and prove its properties.We show how this can be further generalised in the cases where certain qubits are restricted to Pauli measurements alone before concluding with some examples of the application of these concepts.

Preliminary
We briefly recall the definition of measurement patterns and various notions of determinism.More detailed introductions can be found in [7,8,9].In this paper, we will employ an algebraic approach towards measurement-based quantum computing (MQC) called, the Measurement Calculus [6] and its extension [10].We define an arbitrary pure single qubit state by |+ θ,φ = cos( θ 2 )|0 + e iφ sin( θ 2 )|1 , and denote its orthogonal state (the opposite point in the Bloch Sphere) with where 0 ≤ θ ≤ π and 0 ≤ φ ≤ 2π.A computation, in the extended one-way model, is a combination of the following commands: • 1-qubit preparations, N i , to prepare the qubit i in state with the convention that |+ θ,φ + θ,φ | i corresponds to the outcome 0, while |− θ,φ − θ,φ | i corresponds to 1 , • 1-qubit Pauli corrections: X i and Z i , where i, j represent the qubits on which each of these operations apply, and 0 ≤ α ≤ π.Qubits are measured at most once, therefore we may represent unambiguously the outcome of the measurement outcome for qubit j by s j .To control the non-determinism of the measurement outcomes, certain corrections will depend upon previous measurement outcomes.These dependent corrections will be written as U s j i , with U 0 i = I, and U 1 i = U i .We will employ some set-theoretic notations, for example, A c denotes the complement of a subset A.
A measurement pattern P = (V, I, O, λ, S), or simply a pattern, is defined by the choice of V a finite set of qubits, two possibly overlapping subsets I ⊆ V and O ⊆ V determining the pattern inputs and outputs, a finite sequence S of commands acting on V , and a function λ : O c → {(X, Y ), (X, Z), (Y, Z)} which specifies the "plane" of the measurement on each measured qubits (i.e. the complement of the output qubits O).We will consider only runnable patterns where no command depends on an outcome not yet measured, no command acts on a qubit already measured or not yet prepared (except preparation commands), and a qubit i is measured (prepared) if and only if i is not an output (input).
We are sometime interested to standardize patterns: to put the commands sequence of the pattern in a particular order without changing the meaning of the computation.
We choose an order where all the preparation commands appear first (i.e.right-most), then all the entanglement commands, followed by the measurements and then corrections.The standardisation procedure is the basis for the new physical architecture proposed by measurement-based quantum computing where on performs all the entanglement in the beginning followed by local operation and classical communications.Furthermore, the rewriting of a pattern to standard form allows one to check that a given pattern is runnable and it reveals parallelism in the pattern computation [11].
We use commutation rules to interchange the order of operations to bring them into this form.Since the entanglement operations are to be performed first, when their order is interchanged with the correction operators they should not pick up the measurementdependancy in these corrections.This can be guaranteed by ensuring that the entanglement command is in the normalizer group of the group generated by the correction groups.In order to commute the corrections to the end of the pattern we simply use the following equations: Therefore we have the following simple observation.

Proposition 1 Any one-way MQC model admits a standardization procedure if and only if the entanglement operator is normalizer of all the correction operators.
We write H I (H O ) for the Hilbert space spanned by the inputs (outputs).The run of a pattern consists simply in executing each command in sequence.If n is the number of measurements (which is also the number of "non-output" qubits) then the run may follow 2 n different branches.Each branch is associated with a unique binary string s of length n, representing the classical outcomes of the measurements along that branch, and a unique branch map A s representing the linear transformation from H I to H O along that branch.
Branch maps decompose as A s = C s Π s U, where C s is a unitary map over H O collecting all corrections on outputs, Π s is a projection from H V to H O (where H V is the Hilbert space spanned by all the qubits) representing the particular measurements performed along the branch, and U is a unitary embedding (or isometry) from H I to H V collecting the branch preparations, and entanglements.Therefore and T (ρ) := s A s ρA † s is a trace-preserving completely-positive map (cptp-map), explicitly given as a Kraus decomposition.One says that the pattern realizes T .
A pattern is said to be deterministic if it realizes a cptp-map that sends pure states to pure states.This is equivalent to saying that branch maps are proportional.A pattern is said to be strongly deterministic when branch maps are equal (up to a global phase), i.e., for all s 1 , A pattern is said to be uniformly deterministic if it is deterministic for all values of its measurement angles.Finally a pattern is said to be stepwise deterministic if it is deterministic after performing each single measurement together with all the corrections depending on the result of that measurement.
The main result of our paper is a necessary and sufficient condition for strong uniform determinism based on the geometry of the entanglement structure which underlies a measurement pattern.Let us define an open graph state (G, I, O, λ) to be a state associated with an undirected graph G together with two subsets of nodes I and O, called inputs and outputs.We write V for the set of nodes in G, I c , and O c for the complements of I and O in V , N G (i) for the set of neighbours of i in G, i ∼ j for (i, j) ∈ G, and E G := i∼j E ij for the global entanglement operator associated to G. We first recall the definition of flow, under which one can construct a set of dependent corrections such that the obtained pattern is strongly and uniformly deterministic [1].

from measured qubits to prepared qubits) and a partial order
As one can see, a flow consists of two structures: a function f over vertices and a matching partial order over vertices.In order to obtain a deterministic pattern for an open graph state with flow, dependent corrections will be defined based on function f .The order of the execution of the commands is given by the partial order induced by the flow.The matching properties between the function f and the partial order > will make the obtained pattern runnable.
Theorem 1 [1] Suppose the open graph state (G, I, O, λ), such that ∀i ∈ O c , λ(i) = (X, Y ), has flow (f, >), then the pattern: where the product follows the dependency order >, is runnable, uniformly and strongly deterministic, and realizes the unitary embedding: The above theorem provides a necessary condition for determinism for the one-way model considering only measurements in the (X, Y ) plane, which encompasses for example, the measurement patterns proposed [2,12].Nevertheless, it can be useful to construct patterns which contain measurements in other planes [9], and this arises naturally when one uses the graph transformation rules associated with Pauli measurements [5] to reduce the size of a pattern.As we shall describe in this article one can extend the notation of flow to obtain a necessary and sufficient condition considering measurements in all the (X, Y ), (X, Z) and (Y, Z) planes.This will lead to a full characterization of deterministic computation in the MQC models.As a result we also obtain a tight bound on depth complexity that improves the presented results in [11].

Generalized Flow
In order to describe the motivation behind our construction of the generalized flow we first briefly explain the main idea behind the proof of the flow theorem (Theorem 1).Recall that the graph stabiliser [5,13] at qubit i is defined as K i := X i ( j∈G(i) Z j ) and one has the following relation: The proof of Theorem 1 is based on the following simple observation.We could make a measurement M (X,Y ),α i "deterministic" (corrected) if it could be pre-composed by an anachronical Z s i i correction (i.e.conditioned on the outcome of a measurement which hasn't happened yet).This unphysical scenario is a useful starting point for our proof.
The flow construction guarantees that such a deterministic pattern with anachronical corrections can be transformed into a runnable pattern, where all dependencies now do respect the proper causal ordering.It is easy to verify that, the pattern P f,G in Theorem 1 can be equivalently written in terms of anachronical measurements as: The key observation which allows us to tranform this into a runnable pattern is that the flow conditions mean that there exists a stabiliser K f (i) which when composed with the anachronical correction, forms an operator which commutes with the measurement, and thus the pattern can be brought into runnable order.A natural way to extend this idea is to consider a set of vertices as a correcting set.Hence instead of working with a function f : O c → I c defining the correcting vertices, we will have a function g : O c → P I c defining the correcting sets of vertices, where P I c denotes the power set of all the subsets of vertices in I c .It is important to note that the condition on these correcting sets will depend on the plane which the measurement will be performed, as measurement in different planes require a different anachronical correction.We define the odd neighborhood of a set of vertices K to be the set Odd(K) = {u , |N G (u) ∩ K| = 1 mod 2}.
Definition 3 An open graph state (G, I, O, λ) has generalized flow if there exists a map g : O c → P I c (from measured qubits to a subset of prepared qubits) and a partial order - One can consider the partial order < as a notion of time.Then, condition (G2) says that all the vertices with an odd number of connection to the correcting set g(i) should belong to the past of i.These conditions can be better understood pictorially, as illustrated in Figure 1.Similar to the Theorem 1 we will apply dependent stabiliser corrections on all the qubits in the correcting set.The evenness or oddness condition on the number of the connections between a vertex and its correcting set and neighbors will guarantee that the anachronical correction on qubit i can be transformed to a correction with casual dependencies.

Determinism Theorem
A necessary and sufficient condition for determinism in the extended one-way model is given in the following two theorems.It is important to note that this condition can be easily extended to any other MQC models (e.g.teleportation-based models [14,15]), since there exist compositional embeddings from the one-way model to all other MQC models [6].Recall that g(i), where g is a generalised flow, is a subset of vertices.

Theorem 2
Suppose the open graph state (G, I, O, λ) has generalised flow (g, >), then the pattern: where the product follows the dependency order >, is runnable, uniformly, strongly and stepwise deterministic, and realizes the unitary embedding: Theorem 3 Suppose the pattern P is uniformly, strongly and stepwise deterministic, then the underlying geometry of P has generalized flow and the pattern realizes the unitary embedding: The next lemma will be used in the proof of Theorem 3 and illustrates the role that the strong condition of uniformity will play.Denote by P |ψ a projection to state |ψ .

Lemma 4
If for all α in the (X, Z),(X, Y ) or (Y, Z) plane P α |ψ = e if (α) P α |ψ ′ then |ψ = e iθ |ψ ′ Proof.We write the proof for the case of a projection in (X, Z) plane as other cases are similar.It suffices to consider the angles of α = {0, π/2, π}, or in other words, measurements of X and Z observables.First we write the states in the basis of the eigenvectors of Z: The lemma condition with α = 0 and α = π (i.e.projections onto |0 and |1 ) implies that We also obtain a = e iφ 0 b and a ′ = e iφ 1 b ′ and therefore Now consider the projection onto |+ state (α = π/2) which implies .
Thus e i(φ 1 −φ 0 ) = 1 or a ′ = 0 which completes the proof.✷ The following equations on anachronical corrections play the central rule in the proof of theorem 2: Proof of Theorem 2. We prove one case, where all the measurements are assumed to be in (Y, Z) plane, all other cases have a similar proof.Clearly, the generalized flow conditions make the following pattern a runnable one, By commuting the corrections and using the definition of the graph stabiliser, K i , we have: Note that to derive the above equality we have also used the trivial equations Z s i j Z s i j = I to complete the missing part of any stabiliser.Recall that Condition (G2) for (Y, Z) measurement guarantee to have the required even number of such missing Z operators.Finally from equations 1 and 4 we obtain the following uniformly, strongly and stepwise deterministic pattern

✷
Proof of Theorem 3. We start from the end of the pattern computation (i.e. last measurement commands).Let P O C be the projector over the state Π i∈O C |+ λ(i),α i .Suppose the last measurement is in the plane (X, Y ) and is performed on qubit n, it creates then the following two branches where we have used the fact − αn |Z n = + αn |.Now from the stepwise determinism there exists a collection of correction C A on output qubit such that since the corrections are performed on output qubit we can commute C A with P O C and write The above equation is valid for any value of α n (uniformity condition) and thus according to lemma 4, since it is a Pauli operator it can be written as a product of the Pauli group generators (graph stabiliser, K i ), thus there exists a set S ⊆ V such that It remains to prove that S is indeed the correcting set of qubit n and satisfies the condition of the generalised flow conditions.First we show that S ∩ I = ∅, let |G = E G N V \I |+ I , then for any arbitrary subset K ⊆ I since A ∩ I = ∅ we have In particular for K = ∅ we obtain C A Z n |G = |G .Suppose now there exists e ∈ S ∩ I, and set K = {e}, since e ∈ S then Z e anti commutes with C A and therefor which leads to a contradiction and proves S ∩ I = ∅.
On the other hand since A does not intersect with the set of already measured qubits any u ∈ S cannot act on a measured qubit as it will be simplified later and X u on the other side will appear.Also N(u) should see measured qubits evenly so that Z i on the previously measured qubit will cancel out each other as well.Therefore S is the correcting set for the qubit n in terms of Definition 3. The presented argument can be similarly carried out for all the measurements performed in the previous stages which completes the proof.✷

Pauli Measurements
Pauli measurements play a central role in one-way quantum computing.In particular, it is known that the action of such a measurement on a graph state is to leave the remaining qubits in a graph state (up to a local Clifford-group correction) [5].Definition 3 provides conditions for determinism when single qubits at any angle in specified Bloch-sphere planes are allowed.The special properties of Pauli measurements (for example, that they simultaneously lie in two measurement-planes) mean that if one restricts the measurement of certain qubits to certain specific Pauli measurements, one must extend the generalised flow conditions in order to account for these extra properties.
In this section, we introduce such an extension.We will use the convention that the labeling function λ(i) for any non output qubit i, is either a plan -(X, Y ), (X, Z), or (Y, Z) -or a vector -X, Y , or Z (i.e.Pauli measurements).First, notice that a Pauli measurement, say X, can be interpreted as a (X, Y ) or (X, Z) measurement and thus it may satisfies the conditions of either a (X, Y ) or a (X, Z) measurement.Second, when a qubit is measured according to a Pauli operator, say X, then, after the measurement, the state of this qubit takes ±X as its stabiliser.We use this property to allow already-measured qubits to be included in a correcting set.Finally the following relation between Pauli correction and Pauli measurements will be used for the Pauli flow construction Definition 5 An open graph state (G, I, O, λ) has Pauli flow if there exists a map p : O c → P I c (from measured qubits to a subset of prepared qubits) and a partial order < over V such that for all i ∈ O c , -(P1) if j ∈ p(i), i = j, and λ(j

Theorem 4
Suppose the open graph state (G, I, O, λ) has Pauli flow (g, >), then the pattern: where the product follows the dependency order >, is deterministic and realizes the unitary embedding: Proof: The proof is similar to the proof of theorem 2. In (P 1), if λ(j) ∈ {X, Y }, j may be in the p(i) Notice that if λ(j) = Y , j ≤ i and j ∈ p(i) then j must be in Odd(p(i)) - ) is necessary because of (P 3).Finally, (P 7), (P 8), and (P 9) are obtained from (P 4), (P 5), and (P 6) since a X measurement is both a (X, Y ) and a (X, Z) measurement, and so on.✷

Examples
Trivially, any open graph state with a flow also has a generalised flow, but the following set of examples show how the generalised flow can be beneficial.The open graph state in Figure 2 has no flow (due the cyclic connections), but it admits a generalized flow.This example demonstrates the fact having flow is not a necessary condition for uniform determinism, contrary to the existence of the generalized flow, as it is shown in theorem 3.
In relation to the circuit model, having a generalised flow lead to an optimal realisation.It is known that given a pattern where the underlying geometry has flow one can directly decompose the pattern into a circuit with no auxiliary qubits that implements the same unitary [1].Consider for example the pattern given in Figure 3 that implements the following pattern (all measurement are in (X, Y ) plane) that can be decomposed to the circuit given in Figure 4 using the construction of [1].The base of this procedure is to replace the pattern X j s i M α i E ij N j with Phase and Hadamard gate and the remaining edges of the graph with ctrl-Z gates.Now if we follow the same construction for pattern in Figure 2 that has generalised flow but no flow, in order to remove all the auxiliary qubits, we obtain acausal circuit (not runnable), Figure 5.Of course, there exists another casual circuit implementing the same unitary but it might need more gates.This suggest that how patterns with generalised flow may implement more efficiently a given unitary.
Even if a graph has a flow, looking for a generalized flow is a way to decrease the depth of the computation, i.e. the parallel execution time.For instance, the open graph state in Figure 6 has a flow function f given below with the corresponding partial order being a hence the depth of this flow is 5.We know the flow function f is unique [16] and since each b i must be greater than a i and each a i is greater than b i−1 , thus the minimal depth is 5.However, this open graph state has also a generalized flow defined as with partial order {a 1 , a 2 , a 3 } < {b 1 , b 2 , b 3 } with depth 2. On can easily extend this example (Figure 6) to construct for any given n, an open graph state with 3n vertices having no flow of depth less than n + 1, but a generalized flow of depth 2.
Our final examples deal with the case of Pauli flow.An open graph with no generalized flow is not uniformly deterministic, but it can be still deterministic if one restrict some of the angel of measurements to Pauli.For instance, the open graph state in Figure 7, has no generalized flow, but it has the following Pauli flow with depth 1 when all the non output qubits are X-measured (implementing SWAP operator).
Finally, Pauli flow is not necessary for determinism in a graph-state pattern whose measurements are solely Pauli -since these do not require any adaptive measurements.An example of this is the open graph state in Figure 8, has no Pauli flow but is deterministic and realizes also the SWAP operator [17].

Conclusion
What makes the measurement-based quantum computing special is the fact that one can employ probabilistic measurement operators and yet perform a deterministic computation by imposing a causal dependent structure over the measurements sequence.On the other hand the MQC highlights the role of entanglement as a resource for quantum computing.Hence a full understanding of the MQC depends on gaining insight into the interplay of these two ingredients.
In this article we have extended the notion of flow [1] on the geometry of the entanglement graph required for a one-way computing to address the above questions.We have presented for the first time a full characterisation of deterministic computation in the one-way model independent of any reference to the circuit model.Having generalised flow is a necessary and sufficient condition for uniform determinism.On the other hand if one is willing to restrict to a particular set of angles such as Pauli measurements then the Pauli flow criteria might be used.
One interesting consequence of patterns with generalised flow (but no flow) is that they can admit very compact implementations of a given unitaries (as illustrated in our examples).In particular, the generalised flow admits a great deal of flexibility in the causal structure of the corrections which can have have little in common with the structure of the associated quantum circuit.Further investigation of such features will be a line of future research.
A further important open question is how one can design an efficient algorithm to find generalised flow given an open graph state, which would aid direct pattern design (as proposed in [18]).In the particular case where |I| = |O|, if a geometry has flow it is unique and can be found efficiently [18,16,19], using a combination of network flow algorithms, and Tarjan's algorithm to avoid acausal sequences of measurements (forming "vicious circuits"), as described in detail in [16,19].
We conjecture that an algorithm for generalised flow will be similar to [16,19].First one would find a maximal collection of disjoint Input-Output paths to attempt to define the flow function.Then if the obtained partial order has vicious circuit one can attempt to cancel its effect using the additional vertices in the correcting set.
We believe this work can form a basis for the development of novel quantum algorithms conceived solely in the language of measurement-based quantum computation.

Figure 1 .
Figure 1.The pictorial presentation of the generalised flow conditions (G1-G5) for different measurement planes.The straight lines (blue) stand for multiple edges in the entanglement graph where the labels give the parity of the number of these connections and the doted straight lines (red) for a single edge.The single qubit in Current layer denote the qubit to be measured, its correcting set lays in Future layer (black closed curve).The neighbours of the correcting set belonging to Past layer are denoted by doted closed cure.

Figure 2 .
Figure 2. A graph with generalised flow but no flow: g(a) = d, g(b) = e, g(c) = {d, f }.The blue arrows represent the flow edges, where as black arrow a virtual flow edge, (an edge that is not an edge of the graph state).

Figure 3 .Figure 4 .Figure 5 .
Figure 3.A graph with flow: f (a) = d, f (b) = e, f (c) = f .The blue arrows represent the flow edges and the order over the vertices is a < {b, d} < {e, c} < f .

Figure 6 .
Figure 6.Open graph state having a flow of depth 5 and a generalized flow of depth 2.

Figure 7 .Figure 8 .
Figure 7. Open graph state having no generalized flow but having a Pauli flow