pyzx icon indicating copy to clipboard operation
pyzx copied to clipboard

add_edge with auto_simplify is incorrect in Multigraph

Open boldar99 opened this issue 1 year ago • 3 comments

It incorrectly changes scalars, and it sometimes can't add self-loops.

For a reference, the new tests in #258 don't work if auto_simplify is enabled.

boldar99 avatar Jul 16 '24 10:07 boldar99

I noticed this line throws exceptions. Check https://github.com/zxcalc/zxlive/issues/256#issuecomment-2251311410.

https://github.com/zxcalc/pyzx/blob/7248d5b3e77ad18c10bcafa9856b49c595762ab6/pyzx/graph/multigraph.py#L252

colltoaction avatar Jan 31 '25 19:01 colltoaction

That should now be fixed.

jvdwetering avatar Feb 01 '25 18:02 jvdwetering

#331 partially solves this, but the multiedge scalar test still fails when autosimplify is active

lara-madison avatar Aug 14 '25 16:08 lara-madison