diff --git a/pyzx/graph/multigraph.py b/pyzx/graph/multigraph.py index f2d2a858..66407ae7 100644 --- a/pyzx/graph/multigraph.py +++ b/pyzx/graph/multigraph.py @@ -244,7 +244,7 @@ def remove_edge(self, edge): if e.is_empty(): del self.graph[s][t] - del self.graph[t][s] + if s != t: del self.graph[t][s] self.nedges -= 1