DrawerAnyon Class

class tqsim.lib.drawer_anyon.DrawerAnyon(initial_id, pos)[source]

This class represents an anyon object in the circuit drawer, and is used to set the colors and labels for each anyon in the circuit. It is not meant to be used directly, and is used by the Drawer class to draw individual anyons.

property color

Get or set the color of the anyon.

This property represents the color assigned to the anyon. Since the drawing is done with matplotlib, its value must be on of the color values that are accepted by matplotlib.

Returns:

The color of the anyon’s worldline.

Return type:

str

property label

Get or set the label of the anyon.

This property represents the label assigned to the anyon. It can be either a string, an integer, or a float. (or anything that can be passed to matplotlib.axes.Axes.text).

Returns:

The current label of the anyon.

Return type:

Union[str, int, float]