zxcalc / pyzx

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

Support edge_data dictionary in the graph data structure #247

Open RazinShaikh opened 4 months ago

RazinShaikh commented 4 months ago

This is analogous to vdata and can be used for storing arbitrary data corresponding to an edge. For example, storing edge curve information in ZXLive (see https://github.com/zxcalc/zxlive/issues/270), future support of multiplier edges, etc.

jvdwetering commented 4 months ago

So it is definitely an option to store it in edge data. But seeing as we now also have Edge objects, it might also just be part of the Edge? Although then it won't be available to GraphS, so that's probably not ideal.

RazinShaikh commented 4 months ago

Do you mean store curve distance in the Edge class or an edge data dictionary in the edge class?

jvdwetering commented 4 months ago

Maybe just edge_data in the Edge class. But for consistency, since there is a vertex_data in the Graph, maybe we should also have a edge_data.