From d169035c8c0b529a3de091b118a723f4527bea3f Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Sun, 22 Dec 2024 14:14:15 +0000 Subject: [PATCH] removed extended gflow stub --- pyzx/gflow.py | 57 --------------------------------------------------- 1 file changed, 57 deletions(-) diff --git a/pyzx/gflow.py b/pyzx/gflow.py index cc83faed..2acfc1f8 100644 --- a/pyzx/gflow.py +++ b/pyzx/gflow.py @@ -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")