bosing.SetPhase¶
- class bosing.SetPhase(channel_id, phase, *, margin=None, alignment=None, phantom=False, duration=None, max_duration=Ellipsis, min_duration=Ellipsis, label=None)¶
基类:
ElementA phase set element.
Waveform generator treats the base frequency \(f_0\) and the channel frequency shift \(\Delta f\) differently. \(f_0\) is never changed during the execution of the schedule, while \(\Delta f\) can be changed by
ShiftFreqandSetFreq.SetPhaseonly considers \(\Delta f\) part of the frequency. The channel phase offset \(\phi_c\) will be adjusted such that\[\Delta f t + \phi_c = \phi\]at the scheduled time point, where \(\phi\) is the phase parameter.
小心
The unit of phase is number of cycles, not radians. For example, a phase of \(0.5\) means a phase shift of \(\pi\) radians.
- alignment¶
- channel_id¶
- duration¶
- label¶
- margin¶
- max_duration¶
- measure()¶
Measure the minimum total duration required by the element.
This value includes both inner duration and outer margin of the element.
This value is a minimum total duration wanted by the element. If the element is a child of other element, the final total duration will be determined by alignment option and parent container type.
- min_duration¶
- phantom¶
- phase¶
- plot(ax=None, *, channels=None, max_depth=5, show_label=True)¶
Plot arrange result with the element as root.
- 参数:
ax (matplotlib.axes.Axes | None) -- Axes to plot. If
None, matplotlib.pyplot.gca is used.channels (Sequence[str] | None) -- Channels to plot. If
None, all channels are plotted.max_depth (int) -- Maximum depth to plot. Defaults to
5.show_label (bool) -- Whether to show label of elements. Defaults to
True.
- 返回:
Axes with the plot.
- 返回类型: