qctrlvisualizer.plot_smooth_controls(controls: dict, polar: bool = True, unit_symbol: str = 'Hz', two_pi_factor: bool = True, *, figure: Optional[matplotlib.figure.Figure] = None)

Create a plot of the specified smooth controls.

  • controls (dict) –

    The dictionary of controls to plot. The keys should be the names of the controls, and the values represent the pulse by either (1) a dictionary with the ‘times’ and ‘values’ for that control, or (2) a list of samples, each a dictionary with ‘time’ and ‘value’ keys. The times must be in seconds and the values (possibly complex) in the units specified by unit_symbol. For example, the following two controls inputs would be valid (and equivalent):

      "Clock": {"times": [0.0, 0.5, 1.5, 2.0], "values": [0.1, 0.3, 0.2, 0.4]},
      "Microwave": {"times": [0.0, 1.0, 2.0], "values": [0.5 + 0.5j, 0.3, 0.2 - 0.3j]},
      "Clock": [
        {"time": 0.0, "value": 0.1},
        {"time": 0.5, "value": 0.3},
        {"time": 1.5, "value": 0.2},
        {"time": 2.0, "value": 0.4},
      "Microwave": [
        {"time": 0.0, "value": 0.5 + 0.5j},
        {"time": 1.0, "value": 0.3},
        {"time": 2.0, "value": 0.2 - 0.3j},

  • polar (bool, optional) – The mode of the plot when the values appear to be complex numbers. Plot magnitude and angle in two figures if set to True, otherwise plot I and Q in two figures. Defaults to True.

  • unit_symbol (str, optional) – The symbol of the unit to which the controls values correspond. Defaults to “Hz”.

  • two_pi_factor (bool, optional) – Whether the values of the controls should be divided by 2π in the plots. Defaults to True.

  • figure (matplotlib.figure.Figure, optional) – A matplotlib Figure in which to place the plots. If passed, its dimensions and axes will be overridden.