Qualtran icon indicating copy to clipboard operation
Qualtran copied to clipboard

Better musical score and graph drawing control for registers via `wire_symbol`

Open mpharrigan opened this issue 1 year ago • 0 comments

  • change the wire_symbol method to explicitly take a Register and idx: Tuple[int, ...] rather than one Soquet since the symbol shouldn't depend on the binst.
  • Eliminate or rename or merge short_name to explicitly compliment the wire symbols. This string should serve (solely) as a "title" to be written above the wire symbols and should be included if and only if the wire symbols don't already imply the gate. E.g. it's not necessary to write "CNOT" over something that's clearly a CNOT. Practically: we can rename the existing method and let it return None or we can use a sentinel value to the wire_symbol method (e.g. reg=None) to imply that we're asking for the (optional) title.
  • Single source of truth for drawing: modify the GraphvizDrawer for drawing composite bloq graphs to use the wire_symbol method and values to label the soquet rows in the table for each bloq. Use the title method for the title, and again omit if not required. Practically: we'll need a new method on WireSymbol to return a textual equivalent of the symbol

mpharrigan avatar Feb 29 '24 22:02 mpharrigan