Display¶
- class lightworks.Display(circuit: PhotonicCircuit, display_loss: bool = False, mode_labels: list[str] | None = None, display_type: str = 'svg', show_parameter_values: bool = False)¶
Used to Display a circuit from lightworks in the chosen format.
- Parameters:
circuit (PhotonicCircuit) – The circuit which is to be displayed.
display_loss (bool, optional) – Choose whether to display loss components in the figure, defaults to False.
mode_labels (list|None, optional) – Optionally provided a list of mode labels which will be used to name the mode something other than numerical values. Can be set to None to use default values.
display_type (str, optional) – Selects whether the drawsvg or matplotlib module should be used for displaying the circuit. Should either be ‘svg’ or ‘mpl’, defaults to ‘svg’.
show_parameter_values (bool, optional) – Shows the values of parameters instead of the associated labels if specified.
- Returns:
- The created figure and axis or drawing for the
display plot, depending on which display type is used.
- Return type:
(fig, ax) | Drawing
Raised:
- DisplayErrorIn any cases where an invalid display type is provided
an exception will be raised.