iqsharp icon indicating copy to clipboard operation
iqsharp copied to clipboard

Visualizing small circuits with %trace often creates deeply nested trace that requires a lot of clicks

Open guenp opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. It can be a bit of a hassle to visualize small circuits and having to click manually to expand all operations.

Describe the solution you'd like It would be great if small circuits are automatically expanded, or if there is an --expand flag we can use to automatically expand the entire circuit (equivalent to --depth but without providing an int value).

Describe alternatives you've considered

Additional context Screenshot: Screen Shot 2022-02-22 at 9 55 19 AM

guenp avatar Feb 22 '22 19:02 guenp

Thanks for filing this, makes sense! We should also likely expose default values for --depth and --expand through to %config so that they can be set notebook-wide or even folder-wide (using %config --save).

cgranade avatar Feb 22 '22 21:02 cgranade

Investigating a little further, this may require a modification to quantum-viz.js as well, since that library's public API doesn't currently expose expansion and collapsing of subcircuits (https://github.com/microsoft/quantum-viz.js/blob/c618233037b1d3150900e7dee526c7c08f4ae95f/src/sqore.ts#L70). +@anpaz for quantum-viz.js discussion.

cgranade avatar Feb 22 '22 22:02 cgranade