-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Is your feature request related to a use case or problem? Please describe.
@mpharrigan did an amazing job working on adding the SVG representation for a Cirq.Circuit. He left some TODOs in his Issue (#2313). In this issue, I plan to address them and open them for further discussion.
Describe the solution you'd like
Listing the tasks from #2313,
Bugs
- [BUG] Take care of the SVG circuits when the
cirq.Moment()is empty (Currently, it fails). - [BUG] Refactor the rendering code such that circuits do not require integer coordinates for spacing routines.
- [BUG] Implement a dynamic horizontal spacing framework for the rows in the SVGs of the circuits.
Design (A detailed RFC will be opened for this)
- [DESIGN] Come up with a way to visualize custom gates (
MatrixGate). - [DESIGN] Revamp the SVG output and make it more informative, illustrative, and colorful.
Testing
- [TESTING] Add thorough tests.
Ideally, once this issue is fixed, we can think of moving the SVG representation under cirq.Circuit itself.
This would require moving the code out from contrib.
Integration
- [IMPLEMENTATION] Generalize the code used in
cirq-core/cirq/circuits/_block_diagram_drawer.pyandcirq-core/cirq/contrib/svg/svg.pyto draw the blocks. - [INTEGRATION] Dissolve the
SVGCircuitclass and integrateSVGCircuit._repr_svg_incirq.Circuit(or evencirq.AbstractCircuit).
Additional context (e.g. screenshots)
Current Implementation
What is the urgency from your perspective for this issue? Is it blocking important work?
P2 - we should do it in the next couple of quarters
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
