Skip to content

Commit

Permalink
removed extended gflow stub
Browse files Browse the repository at this point in the history
  • Loading branch information
akissinger committed Dec 22, 2024
1 parent 6d12d2a commit d169035
Showing 1 changed file with 0 additions and 57 deletions.
57 changes: 0 additions & 57 deletions pyzx/gflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,60 +140,3 @@ def gflow(
processed.update(correct)
k += 1


def extended_gflow() -> None:
r"""NOT IMPLEMENTED YET: Compute the extended (i.e. 3-plane) gflow of a diagram in graph-like form.
Based on the algorithm in "There and Back Again"
See https://arxiv.org/pdf/2003.01664
For reference, here is the pseudocode from that paper:
```
input: an open graph, given as:
- M: an adjancency matrix M
- I: input rows/cols
- O: output rows/cols
- lambda: a choice of measurement plane for each vertex
output: extended gflow, given as a triple (success, g, d) where:
- g: assigns each vertex its correction set
- d: assigns each vertex a "depth", i.e. the number of layers away from the output layer. This
is related to the flow ordering as v ≺ w <=> d(v) > d(w)
EXT_GFLOW(M, I, O, lambda)
initialise functions g and d
foreach (v in O)
d(v) <- 0 // Outputs have depth 0
end
return GFLOWAUX(M, I, O, lambda, 1, d, g) // Start the recursive process of finding Vj^≺
end
GFLOWAUX(M, I, O, lambda, k, d, g)
O' <- O \\ I
C <- {}
foreach (u in O^⟂)
if lambda(u) = XY
K' <- Solution for K Δ O' where Odd(K) ∩ O^⟂ = {u}
elseif lambda(u) = XZ
K' <- {u} ∪ (Solution for K Δ O' where Odd(K ∪ {u}) ∩ O^⟂ = {u})
elseif lambda(u) = YZ
K' <- {u} ∪ (Solution for K Δ O' where Odd(K ∪ {u}) ∩ O^⟂ = {})
end
if K' exists
C <- C ∪ {u}
g(u) <- K' // Assign a correction set for u
d(u) <- k // Assign a depth value for u
end
end
if C = {}
if O = V
return (true, g, d) // Halt, returning maximally delayed g and depth values d
else
return (false, {}, {}) // Halt if no gflow exists
end
else
return GFLOWAUX(M, I, O ∪ C, lambda, k+1, d, g)
end
end
```
"""
raise ValueError("Not implemented")

0 comments on commit d169035

Please sign in to comment.