Skip to content

Commit

Permalink
remember edge type when unfusing
Browse files Browse the repository at this point in the history
  • Loading branch information
RazinShaikh committed Nov 18, 2023
1 parent 98f9643 commit 989d32c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zxlive/custom_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ def unfuse_zx(self, graph, subgraph_nx, v, vtype):
graph.add_edge(graph.edge(new_v, v))
for b in neighbors:
if b not in subgraph_nx.nodes:
graph.add_edge((new_v, b), graph.edge_type((v, b)))
graph.remove_edge(graph.edge(v, b))
graph.add_edge(graph.edge(new_v, b))


def matcher(self, graph: GraphT, in_selection: Callable[[VT], bool]) -> list[VT]:
vertices = [v for v in graph.vertices() if in_selection(v)]
Expand Down

0 comments on commit 989d32c

Please sign in to comment.