zxcalc / quantomatic

Quantomatic is a tool for doing automated graph rewriting.
http://quantomatic.github.io
154 stars 22 forks source link

no-effect rewrite : directing edges #223

Open rossduncan opened 6 years ago

rossduncan commented 6 years ago

I have created a rule consisting of two boundary nodes joined by an edge. On the LHS the edge is undirected, on the RHS it is directed.

It seems that the matcher handles this correctly, but the direction is not present in the rewritten graph. Sees that variations on this theme where both vertices are not boundary work fine.

hmillerbakewell commented 6 years ago

bug222.zip (ZX diagrams)

I get different behaviour for the two graphs. In 3-edges.qgraph I don't see any directions appearing in the matches at all. In 2-edges.qgraph I do get directions appearing, but only towards boundary nodes. I suspect this is more than one bug? Part of the issue could be that the rule matches on the interior of any wire, and is then left with a wire that is directed for part of its length, but undirected on others.