zxcalc / pyzx

Python library for quantum circuit rewriting and optimisation using the ZX-calculus
Apache License 2.0
388 stars 116 forks source link

add_edge with auto_simplify is incorrect in Multigraph #259

Open boldar99 opened 4 months ago

boldar99 commented 4 months ago

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.