Skip to content

Commit

Permalink
another fix to pivot matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
RazinShaikh committed Jul 9, 2024
1 parent 92afac5 commit 98e2180
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyzx/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,9 @@ def match_pivot_parallel(
v0n = list(g.neighbors(v0))
v0b: List[VT] = []
for n in v0n:
if len(list(g.edges(v0,n))) != 1:
invalid_edge = True
break
et = g.edge_type(g.edge(v0,n))
if types[n] == VertexType.Z and et == EdgeType.HADAMARD: pass
elif types[n] == VertexType.BOUNDARY: v0b.append(n)
Expand Down

0 comments on commit 98e2180

Please sign in to comment.