Module: musical_score#

Tools for laying out composite bloq graphs onto a “musical score”.

A musical score is one where time proceeds from left to right and each horizontal line represents a qubit or register of qubits.

Classes#

class RegPosition: Coordinates for a register when visualizing on a musical score.

class HLineFlavor: Create a collection of name/value pairs.

class HLine: Dataclass representing a horizontal line segment at a given vertical position x.

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 SoqData: Data needed to draw a soquet.

class VLine: Data for drawing vertical lines.

class MusicalScoreData: All the data required to draw a musical score.

class MusicalScoreEncoder: An encoder that handles MusicalScoreData classes and those of its contents.

Functions#

directional_text_box(...)

draw_musical_score(...)

dump_musical_score(...)

frozen(...): partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.

get_musical_score_data(...): Get the musical score data for a (composite) bloq.

Type Aliases#

NDArray

LeftDangle

Instance of qualtran.DanglingT

RightDangle

Instance of qualtran.DanglingT