TeamGraphix / graphix

measurement-based quantum computing (MBQC) compiler and simulator
https://graphix.readthedocs.io
Apache License 2.0
55 stars 20 forks source link

PyZX as a pattern optimization backend? #66

Open shinich1 opened 1 year ago

shinich1 commented 1 year ago

Is your feature request related to a problem? Please describe. na

Describe the feature you'd like Implement pyzx interface to use ZX-calculus as a pattern optimization backend. This means we will need to construct graph-like diagram, optimize with pyZX, and then get pattern out of it to be simulated or executed on device.

Additional context https://quantum-journal.org/papers/q-2021-03-25-421/ https://arxiv.org/pdf/2304.08166.pdf etc

king-p3nguin commented 6 months ago

Note that PyZX is now updating the function to_graph_like. The current version's to_graph_like function does not work, so we may need to wait for the next release (or implement it ourselves). https://github.com/Quantomatic/pyzx/pull/189

Getting a pattern out of the PyZX diagram can be done by graphix.generator.generate_from_graph().