From 1ff2776f8d443abebab727cc3b8b98ec03f25382 Mon Sep 17 00:00:00 2001 From: gadhvirushiraj Date: Mon, 5 Aug 2024 17:46:52 +0530 Subject: [PATCH] added styling docstring --- src/qutip_qip/circuit/mat_renderer.py | 61 +++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/src/qutip_qip/circuit/mat_renderer.py b/src/qutip_qip/circuit/mat_renderer.py index 6c2de08f..b547cbb0 100644 --- a/src/qutip_qip/circuit/mat_renderer.py +++ b/src/qutip_qip/circuit/mat_renderer.py @@ -28,8 +28,69 @@ class StyleConfig: """ Dataclass to store the style configuration for circuit customization. + + Parameters + ---------- + dpi : int, optional + The dpi of the figure. The default is 150. + + fontsize : int, optional + The fontsize control at circuit level, including tile and wire labels. The default is 10. + + end_wire_ext : int, optional + The extension of the wire at the end of the circuit. The default is 2. + + padding : float, optional + The padding between the circuit and the figure border. The default is 0.3. + + gate_margin : float, optional + The margin space left on each side of the gate. The default is 0.15. + + wire_sep : float, optional + The separation between the wires. The default is 0.5. + + layer_sep : float, optional + The separation between the layers. The default is 0.5. + + gate_pad : float, optional + The padding between the gate and the gate label. The default is 0.05. + + label_pad : float, optional + The padding between the wire label and the wire. The default is 0.1. + + fig_height : float, optional + The height of the figure. The default is None. + + fig_width : float, optional + The width of the figure. The default is None. + + bulge : Union[str, bool], optional + The bulge style of the gate. Renders non-bulge gates if False. The default is True. + + align_layer : bool, optional + Align the layers of the gates across different wires. The default is False. + + theme : Optional[Union[str, Dict]], optional + The color theme of the circuit. The default is "qutip". + The available themes are 'qutip', 'light', and 'modern'. + + title : Optional[str], optional + The title of the circuit. The default is None. + + bgcolor : Optional[str], optional + The background color of the circuit. The default is None. + + color : Optional[str], optional + Controls color of acsent elements (eg. cross sign in the target node) + and set as deafult color of gate-label. Can be overwritten by gate specific color. + The default is None. + + wire_label : Optional[List], optional + The labels of the wires. The default is None. """ + + dpi: int = 150 fontsize: int = 10 end_wire_ext: int = 2