-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
area/decomposearea/visualizationkind/feature-requestDescribes new functionalityDescribes new functionalitypriority/p2Next release should contain itNext release should contain itpriority/reviewReassess the priority of this item at the next opportunity.Reassess the priority of this item at the next opportunity.triage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked onA consensus emerged that this bug report, feature request, or other action should be worked on
Description
As part of https://tinyurl.com/cirq-organize-decompose-rfc, we want to have a cirq.plot_decompose(op_tree) method which can take in an op-tree and plot the decomposition graph built by recursively calling cirq.deocmpose_once() to each operation till they cannot decompose anymore.
Some things to consider:
- Control by a flag whether the decomposition graph should contain individual operations as nodes (eg: cirq.X vs cirq.X ** 0.5) or whether it should contain the operation class as nodes (so both cirq.X and cirq.X ** 0.5 will be represented by
XPowGate). - We can also consider returning the constructed
nx.Graphfrom the method so the user has the opportunity to play around with it if they wish to.
For a reference of the resulting plots, see Visualizing Gate Relationships colab
Part of #3242
P1 - I need this no later than the next release (end of quarter)
Metadata
Metadata
Assignees
Labels
area/decomposearea/visualizationkind/feature-requestDescribes new functionalityDescribes new functionalitypriority/p2Next release should contain itNext release should contain itpriority/reviewReassess the priority of this item at the next opportunity.Reassess the priority of this item at the next opportunity.triage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked onA consensus emerged that this bug report, feature request, or other action should be worked on
Type
Projects
Status
Done