# plot_smooth_controls¶

`qctrlvisualizer.``plot_smooth_controls`(figure, controls, polar=True, unit_symbol='Hz', two_pi_factor=True)

Creates a plot of the specified smooth controls.

Parameters
• figure (matplotlib.figure.Figure) – The matplotlib Figure in which the plots should be placed. The dimensions of the Figure will be overridden by this method.

• 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):

```controls={
"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]},
}

controls={
'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.

Raises

ValueError – If any of the input parameters are invalid.
{"ft_lang_label":"__label__en","ft_lang_prob":0.5852392,"math_prob":0.97999734,"size":1755,"snap":"2021-43-2021-49","text_gpt3_token_len":547,"char_repetition_ratio":0.15648201,"word_repetition_ratio":0.0,"special_character_ratio":0.34074074,"punctuation_ratio":0.27737227,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99356824,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-20T09:54:32Z\",\"WARC-Record-ID\":\"<urn:uuid:65c04920-fd69-476d-8c5b-528641bca0e9>\",\"Content-Length\":\"15466\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:de527870-1ca0-4464-85e2-fca40204b90f>\",\"WARC-Concurrent-To\":\"<urn:uuid:50df6e79-56ea-4013-82ac-613b54e6ef68>\",\"WARC-IP-Address\":\"52.26.70.87\",\"WARC-Target-URI\":\"https://docs.q-ctrl.com/boulder-opal/references/qctrl-visualizer/qctrlvisualizer/plot_smooth_controls.html\",\"WARC-Payload-Digest\":\"sha1:ZKI75YLPNYCPNC3YNXQWTRKLULOCUCOO\",\"WARC-Block-Digest\":\"sha1:HF3NZ4AJZK7ZZJSYPMZRHJAP2DIH32TT\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323585305.53_warc_CC-MAIN-20211020090145-20211020120145-00161.warc.gz\"}"}