TeamGraphix / graphix

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

Visualization from pattern #109

Closed shinich1 closed 3 months ago

shinich1 commented 6 months ago

Is your feature request related to a problem? Please describe. Current visualization tool is based on the flow or gflow obtained from the graphix.gflow.flow or graphix.gflow.gflow functions, which may have different feedforward structure from the pattern itself.

Describe the feature you'd like Add an option to visualize the feedforward structure according to pattern, not from flow or gflow. This can be done by obtaining layers from Pattern.get_layers and then constructing the arrows according to the feedforward part of measurement commands. Perhaps only consider either s or t feedforward for arrows as there may be too many of them.

Additional context

masa10-f commented 6 months ago

Perhaps only consider either s or t feedforward for arrows as there may be too many of them.

Comment on this part, s(X correction) is equal to g and t(Z correcion) is equal to Oddneighbor(g), so, in this context, arrows should be s signals(see thm. 2 in Generalized Flow and Determinism in Measurement-based Quantum Computation)

We can construct a function like get_gflow_from_pattern that collects all s signals or X corrections from pattern.