Skip to content

Commit

Permalink
first step to self loops
Browse files Browse the repository at this point in the history
  • Loading branch information
RazinShaikh committed Jun 26, 2024
1 parent 32f7ef7 commit c7e62f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyzx/graph/multigraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def remove_vertices(self, vertices):
e = self.graph[v][v1]
self.nedges -= e.s + e.h
del self.graph[v][v1]
del self.graph[v1][v]
if v != v1: del self.graph[v1][v]
# remove the vertex
del self.graph[v]
del self.ty[v]
Expand Down Expand Up @@ -270,7 +270,7 @@ def edges(self, s=None, t=None):
if s == None:
for v0,adj in self.graph.items():
for v1, e in adj.items():
if v1 > v0:
if v1 >= v0:
for _ in range(e.s): yield (v0, v1, EdgeType.SIMPLE)
for _ in range(e.h): yield (v0, v1, EdgeType.HADAMARD)
for _ in range(e.w_io): yield (v0, v1, EdgeType.W_IO)
Expand Down

0 comments on commit c7e62f6

Please sign in to comment.