From af1d1e7c995d42e7ba1852873187b70158fedfd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mafalda=20Ram=C3=B4a?= <74077940+mafaldaramoa@users.noreply.github.com> Date: Thu, 30 Mar 2023 16:12:14 +0100 Subject: [PATCH] Fix gflow Changed the gflow function to prevent it from returning a gflow if any vertices outside of boundary type inputs remain unprocessed in the end. Should solve issue #114 --- pyzx/gflow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyzx/gflow.py b/pyzx/gflow.py index 6fb6b172..d8956c54 100644 --- a/pyzx/gflow.py +++ b/pyzx/gflow.py @@ -109,7 +109,7 @@ def gflow( l[u] = k if not correct: - if not candidates: + if vertices.difference(processed) == inputs.difference(pattern_inputs): return l, gflow, k return None else: