Module: drawing#
Draw and visualize bloqs.
Modules#
bloq_counts_graph: Classes for drawing bloq counts graphs with Graphviz.
classical_sim_graph: Classes for drawing classical data flows with Graphviz.
flame_graph: Classes for drawing bloqs with FlameGraph.
graphviz: Classes for drawing bloqs with Graphviz.
musical_score: Tools for laying out composite bloq graphs onto a “musical score”.
qpic_diagram: Classes for drawing latex diagrams for bloqs with QPIC - https://github.com/qpic/qpic.
Classes#
class GraphDrawer: A class to encapsulate methods for displaying a CompositeBloq as a graph using graphviz.
class PrettyGraphDrawer: A class to encapsulate methods for displaying a CompositeBloq as a graph using graphviz.
class RegPosition: Coordinates for a register when visualizing on a musical score.
class HLine: Dataclass representing a horizontal line segment at a given vertical position x.
class VLine: Data for drawing vertical lines.
class LineManager: Methods to manage allocation and de-allocation of lines representing a register of qubits.
class WireSymbol: Base class for a symbol.
class TextBox: Base class for a symbol.
class Text: Base class for a symbol.
class RarrowTextBox: Base class for a symbol.
class LarrowTextBox: Base class for a symbol.
class Circle: Base class for a symbol.
class ModPlus: Base class for a symbol.
class MusicalScoreData: All the data required to draw a musical score.
class ClassicalSimGraphDrawer: A graph drawer that labels each edge with a classical value.
class GraphvizCallGraph: Draw a bloq call graph using Graphviz with additional data.
Functions#
format_counts_graph_markdown(...): Format a text version of graph as markdown.
format_counts_sigma(...): Format sigma as markdown.
get_musical_score_data(...): Get the musical score data for a (composite) bloq.
show_bloq(...): Display a visual representation of the bloq in IPython.
show_bloq_via_qpic(...): Display latex diagram for bloq by invoking qpic. Assumes qpic is already installed.
show_bloqs(...): Display multiple bloqs side-by-side in IPython.
show_call_graph(...): Display a graph representation of the call graph.
show_counts_sigma(...): Display nicely formatted bloq counts sums sigma.
show_flame_graph(...): Display hiearchical decomposition and T-complexity costs as a Flame Graph.