tqec
tqec copied to clipboard
Circuit visualizer
Describe the solution you'd like Add a feature to the repo that enables users to visualize the Stim circuits it produces.
- should include the built-in visualizer stim.Circuit.diagram.
- some discussion can be found in 9/2, 10/2, and 10/9 meetings recordings
- should help greatly with debugging and provide some granularity to the tool
Please feel free to discuss any further details here.
Additional context Add any other context or screenshots about the feature request here.
https://github.com/QCHackers/tqec/issues/325#issuecomment-2403521249
What would be nice is to be able to superimpose the "image" of a (grid of) logical qubit on the output of
stim.Circuit.diagramto help understanding locating the qubits on thestimdiagram and understanding their status. We can close this issue too and open a new one with a more detailed description of what would be interesting to have. I think that, on this particular issue, it would be nice to have feedback from everyone to know what would be the best visualisation for everyone.
https://github.com/QCHackers/tqec/issues/325#issuecomment-2405568874
+1 to this. Being able to step forward and backwards through the ticks of the circuit would be great. An alternative view where you just see the plaquettes and a number in each corner giving the time of interaction would also be very useful. A useful way to focus on just hook errors without numbers is to put a line inside the plaquette connecting the last 2 corners touched.
I also really liked Adrien's idea of just using Crumble to visualize the circuits since then you can also check detectors etc. Adding colored polygons to assist would be great.
On Sat, Oct 12, 2024, 12:50 AM Kabir Dubey @.***> wrote:
Describe the solution you'd like Add a feature to the repo that enables users to visualize the Stim circuits it produces.
- should include the built-in visualizer stim.Circuit.diagram https://github.com/quantumlib/Stim/blob/main/doc/python_api_reference_vDev.md#stim.Circuit.diagram .
- some discussion can be found in 9/2, 10/2, and 10/9 meetings recordings https://docs.google.com/spreadsheets/d/11DSA2wzKLOrfTGNHunFvzsMYeO7jZ8Ny8kpzoC_wKQg/edit?resourcekey=0-PdGFkp5s-4XWihMSxk0UIg&gid=0#gid=0
- should help greatly with debugging and provide some granularity to the tool
Please feel free to discuss any further details here.
Additional context Add any other context or screenshots about the feature request here.
#325 (comment) https://github.com/QCHackers/tqec/issues/325#issuecomment-2403521249
What would be nice is to be able to superimpose the "image" of a (grid of) logical qubit on the output of stim.Circuit.diagram to help understanding locating the qubits on the stim diagram and understanding their status. We can close this issue too and open a new one with a more detailed description of what would be interesting to have. I think that, on this particular issue, it would be nice to have feedback from everyone to know what would be the best visualisation for everyone.
#325 (comment) https://github.com/QCHackers/tqec/issues/325#issuecomment-2405568874
+1 to this. Being able to step forward and backwards through the ticks of the circuit would be great. An alternative view where you just see the plaquettes and a number in each corner giving the time of interaction would also be very useful. A useful way to focus on just hook errors without numbers is to put a line inside the plaquette connecting the last 2 corners touched.
— Reply to this email directly, view it on GitHub https://github.com/QCHackers/tqec/issues/357, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKAXTEZTSGMI3J2HQCHJYTZ3DIFVAVCNFSM6AAAAABP2FRT6GVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU4DENRWGM2DCNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Updating this issue given the new RPNGTemplate data structure. Take note of PR #427, which gives an rpng_svg_viewer function that shows plaquette indices, interaction order, and hook errors.
We can build on this foundation to interoperate with Stim circuits and/or Crumble while I continue learning about them myself. Please don't hesitate to reach out if you're new and want to get involved with visualization.
@giangiac can you be assigned to this issue, or are your visualization efforts different?
Updating this issue given new visualization methods:
Visualization of observable propagation
Visualization of plaquettes with annotations
Printer of layer-tree circuits in Crumble
These methods seems good enough for visualization for the time-being. Perhaps we can close this issue or leave it as a good first issue for someone interested in using integrating existing methods into a complete GUI. Thoughts @nelimee @inmzhang ?
These methods seems good enough for visualization for the time-being. Perhaps we can close this issue or leave it as a good first issue for someone interested in using integrating existing methods into a complete GUI. Thoughts @nelimee @inmzhang ?
I'll implement a few CLI to make the above visualisations easy to obtain, the PR will close the issue.