Skip to content

Commit

Permalink
if there are no edges, _magic_hopf should return false
Browse files Browse the repository at this point in the history
  • Loading branch information
RazinShaikh committed Jul 24, 2024
1 parent e80a835 commit 40d0ea0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions zxlive/proof_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ def _magic_hopf(self, trace: WandTrace) -> bool:
if not all(isinstance(item, EItem) for item in trace.hit):
return False
edges = [item.e for item in trace.hit]
if len(edges) == 0:
return False
if not all(edge == edges[0] for edge in edges):
return False
source, target = self.graph.edge_st(edges[0])
Expand Down

0 comments on commit 40d0ea0

Please sign in to comment.