zxcalc / zxlive

A graphical tool for the ZX calculus
Apache License 2.0
49 stars 19 forks source link

Multigraph support in edit mode #252

Closed RazinShaikh closed 3 months ago

RazinShaikh commented 3 months ago

I would like to split multigraph support work into several PRs and I think it is fine to merge as the main branch is already broken. This PR adds the ability to create multiple edges in the edit mode with multigraph. This PR depends on the PR https://github.com/Quantomatic/pyzx/pull/236 in pyzx which should be merged first.

jvdwetering commented 3 months ago

This is giving 'AttributeError: 'Edge' object has no attribute 'get_edge_count'' in the test suite. Is this expected?

RazinShaikh commented 3 months ago

I added the get_edge_count method in the PyZX PR that's now merged. https://github.com/Quantomatic/pyzx/blob/a11c8f8a2d6a086a0b9a2cb69ab85384a1aa762a/pyzx/graph/multigraph.py#L53-L57