qilisdk.utils.visualization.style
Classes
!!! abstract "Usage Documentation" |
|
All visual parameters controlling the appearance of a QTensor plot. |
|
All visual parameters controlling the appearance of a circuit plot. |
|
All visual parameters controlling the appearance of a Hamiltonian interaction graph. |
|
Customization options for matplotlib schedule plots, with theme support. |
|
Customization options for matplotlib dataset plots, with theme support. |
Module Contents
- class Style(/, **data: Any)[font]
Bases:
pydantic.BaseModel- !!! abstract «Usage Documentation»
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- __class_vars__[font]
The names of the class variables defined on the model.
- __private_attributes__[font]
Metadata about the private attributes of the model.
- __signature__[font]
The synthesized __init__ [Signature][inspect.Signature] of the model.
- __pydantic_complete__[font]
Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__[font]
The core schema of the model.
- __pydantic_custom_init__[font]
Whether the model has a custom __init__ function.
- __pydantic_decorators__[font]
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__[font]
A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
- __pydantic_parent_namespace__[font]
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__[font]
The name of the post-init method for the model, if defined.
- __pydantic_root_model__[font]
Whether the model is a [RootModel][pydantic.root_model.RootModel].
- __pydantic_serializer__[font]
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_validator__[font]
The pydantic-core SchemaValidator used to validate instances of the model.
- __pydantic_fields__[font]
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
- __pydantic_computed_fields__[font]
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__[font]
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to “allow”.
- __pydantic_fields_set__[font]
The names of fields explicitly set during instantiation.
- __pydantic_private__[font]
Values of private attributes set on the model instance.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- fontfamily: str | list[str] | None[font]
- fontstyle: Literal['normal', 'italic', 'oblique'][font]
- fontvariant: Literal['normal', 'small-caps'][font]
- fontweight: str | int[font]
- fontstretch: str | int[font]
- fontsize: float | str[font]
- fontfname: str | None[font]
- math_fontfamily: str | None[font]
- dpi: int[font]
- title: str | None[font]
- property font: matplotlib.font_manager.FontProperties[font]
Construct a Matplotlib FontProperties from the configured fields. If fontfname points to a real file, it is used (and overrides family).
- class QTensorStyle(/, **data: Any)[font]
Bases:
StyleAll visual parameters controlling the appearance of a QTensor plot.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- sphere_points: int[font]
- sphere_color: str[font]
- arrow_color: str[font]
- arrow_length_ratio: float[font]
- draw_center_circle: bool[font]
- centre_circle_color: str[font]
- draw_reference_points: bool[font]
- reference_point_distance: float[font]
- rotation_style: Literal['azel', 'trackball', 'sphere', 'arcball'][font]
- class CircuitStyle(/, **data: Any)[font]
Bases:
StyleAll visual parameters controlling the appearance of a circuit plot.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- end_wire_ext: int[font]
- padding: float[font]
- gate_margin: float[font]
- wire_sep: float[font]
- layer_sep: float[font]
- gate_pad: float[font]
- label_pad: float[font]
- bulge: str[font]
- align_layer: bool[font]
- wire_label: list[Any] | None[font]
- start_pad: float[font]
- min_gate_h: float[font]
- min_gate_w: float[font]
- connector_r: float[font]
- target_r: float[font]
- control_r: float[font]
- layout: Literal['normal', 'compact'][font]
- fold: Annotated[int, Field(gt=0)] | Literal['auto'] | None[font]
- max_row_width: float[font]
- row_separation: float[font]
- fold_edges: Literal['dashed', 'closed', 'open'][font]
- fold_dash: float[font]
- max_view_height: Annotated[float, Field(gt=0.0)] | None[font]
- class HamiltonianStyle(/, **data: Any)[font]
Bases:
StyleAll visual parameters controlling the appearance of a Hamiltonian interaction graph.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- figsize: tuple | None[font]
- tight_layout: bool[font]
- title_fontsize: int[font]
- layout: Literal['spring', 'circular', 'shell', 'spiral', 'random'][font]
- layout_seed: int[font]
- positions: dict[int, tuple[float, float]] | None[font]
- node_radius: float[font]
- min_node_radius: float[font]
- show_qubit_labels: bool[font]
- qubit_label_fontsize: int[font]
- show_field_labels: bool[font]
- field_label_fontsize: int[font]
- coupling_linewidth: float[font]
- coupling_curvature: float[font]
- coupling_line_styles: dict[str, Any][font]
- default_coupling_line_styles: list[Any][font]
- show_coupling_labels: bool[font]
- coupling_label_fontsize: int[font]
- show_multi_body: bool[font]
- colormap: str | None[font]
- show_colorbar: bool[font]
- colorbar_shrink: float[font]
- colorbar_label: str | None[font]
- separate_color_scales: bool[font]
- show_legend: bool[font]
- legend_loc: str[font]
- legend_fontsize: int[font]
- legend_frame: bool[font]
- show_identity_offset: bool[font]
- class ScheduleStyle(/, **data: Any)[font]
Bases:
StyleCustomization options for matplotlib schedule plots, with theme support.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- figsize: tuple | None[font]
- grid: bool[font]
- grid_style: dict[str, Any][font]
- title_fontsize: int[font]
- xlabel: str[font]
- ylabel: str[font]
- label_fontsize: int[font]
- legend_loc: str[font]
- legend_fontsize: int[font]
- legend_frame: bool[font]
- line_styles: dict[str, dict[str, Any]][font]
- default_line_style: dict[str, Any][font]
- marker: str | None[font]
- marker_size: int[font]
- xtick_fontsize: int[font]
- ytick_fontsize: int[font]
- tick_color: str | None[font]
- tight_layout: bool[font]
- class DatasetStyle(/, **data: Any)[font]
Bases:
StyleCustomization options for matplotlib dataset plots, with theme support.
Controls only the appearance of a dataset plot (theme, fonts, colours, grid, markers, …). The kind of plot (
"1d","2d"or"3d") is selected separately via thestyleargument ofDataset.draw().Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- figsize: tuple | None[font]
- grid: bool[font]
- grid_style: dict[str, Any][font]
- title_fontsize: int[font]
- label_fontsize: int[font]
- xlabel: str | None[font]
- ylabel: str | None[font]
- zlabel: str | None[font]
- legend_loc: str[font]
- legend_fontsize: int[font]
- legend_frame: bool[font]
- trajectory_style: Literal['scatter', 'line'][font]
- line_style: dict[str, Any][font]
- marker: str | None[font]
- marker_size: float[font]
- point_size: float[font]
- color_by_time: bool[font]
- colorbar: bool[font]
- delay: int[font]
- xtick_fontsize: int[font]
- ytick_fontsize: int[font]
- tight_layout: bool[font]