zxcalc / zxlive

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

The lastest version of pyzx breaks zxlive #247

Closed BenjaminRodatz closed 1 month ago

BenjaminRodatz commented 3 months ago

If you install the latest version of pyzx (this commit) you cannot add edges in edit mode anymore - if you try to connect two vertices by an edge, the edge simply does not show up. This is likely due to the new implementation of hyper edges.

Error message in console: Traceback (most recent call last): File ".../zxlive/mainwindow.py", line 263, in _undo_changed if self.active_panel: File ".../zxlive/mainwindow.py", line 218, in active_panel current_widget = self.tab_widget.currentWidget() File ".../zxlive/commands.py", line 260, in redo self.update_graph_view() File ".../zxlive/commands.py", line 48, in update_graph_view self.graph_view.update_graph(self.g, select_new) File ".../zxlive/graphview.py", line 118, in update_graph self.graph_scene.update_graph(g, select_new) File ".../zxlive/graphscene.py", line 141, in update_graph e_item = EItem(self, e, self.vertex_map[s], self.vertex_map[t]) KeyError: (8, 9)

RazinShaikh commented 3 months ago

I have fixed the issue with edges in this commit d8e50d68ca0e8c3364aed559463e00ae70893313 but now you need to use the latest version of pyzx

jvdwetering commented 1 month ago

I'm closing this, since it is fixed, and zxlive now in the requirements always asks for the github version of pyzx.

RazinShaikh commented 1 month ago

There are several things that still do not work such as saving/loading #308 and graph-like rewrites/other routines #256. But they are already tracked in their own issues so it's okay to close this.