quantumlib / Qualtran

Qᴜᴀʟᴛʀᴀɴ is a Python library for expressing and analyzing Fault Tolerant Quantum algorithms.
https://qualtran.readthedocs.io/en/latest/
Apache License 2.0
179 stars 48 forks source link

Interactive visualization tool which allows navigating a large circuit and “zooming in” a specific part of the larger circuit. #29

Open tanujkhattar opened 2 years ago

tanujkhattar commented 2 years ago

Most of the circuits we build using this library will be large nested circuits, where we have a few composite outer level operations like loading data from QROM, selectively applying a linear combination of unitaries via Select etc. When visualizing these circuits, it would be useful to provide an interactive visualization tool to users so they can click on a "composite" operation and zoom into it's implementation (which can be obtained by calling cirq.decompose_once(op) on the composite operation). and then zoom out back to top level if needed.

One example of such a visualization is: https://github.com/microsoft/Quantum/tree/main/samples/algorithms/integer-factorization#quantum-vizjs-visualization. We should build a similar version for Cirq that's scalable and doesn't add new unnecessary qubits.

mpharrigan commented 2 years ago

potentially helpful aside: jupyter notebook has documentation and templates for writing interactive Widgets that can make interactable things using mainly-python (instead of e.g. writing a complete javascript visualizer).

I also think we should move away from the "fixed musical score" layout and lean into a tensor-network type graph visualization

mpharrigan commented 1 year ago

follow up: #246