An open graph is a triple of a graph , a set of input vertices and a set of output vertices. Write for the measured vertices and for the vertices initialised in .
A flow (Danos and Kashefi) is a map together with a strict partial order on such that, for every ,
- ;
- ;
- for every neighbour of other than .
Measuring in the order , the byproduct created by measuring is cancelled by applying to and to the other neighbours of (that is, by the graph-state stabilizer at , times ); conditions 2 and 3 guarantee that every qubit receiving a correction is still unmeasured or is an output. Danos and Kashefi show that a flow makes the pattern deterministic for every choice of -plane angles, with outcome-dependent Pauli corrections determined by the graph and alone.
A generalized flow (gflow) (Browne, Kashefi, Mhalla and Perdrix) replaces by a set and conditions 1–3 by: and has an odd number of neighbours in ; every satisfies ; and no vertex with an odd number of neighbours in satisfies (in the version for measurements in the plane). Browne et al. prove that an open graph admits a gflow if and only if it supports uniformly, strongly and stepwise deterministic measurement patterns, and that gflow can give smaller measurement depth than flow.