bosing.generate_waveforms_with_states¶
- bosing.generate_waveforms_with_states(channels, shapes, schedule, *, time_tolerance=Ellipsis, amp_tolerance=Ellipsis, allow_oversize=False, crosstalk=None, states=None)¶
Generate waveforms from a schedule with initial states.
小心
Crosstalk matrix will not be applied to offset of the channels.
- 参数:
channels (collections.abc.Mapping[str, Channel]) -- Information of the channels.
shapes (Mapping[str, Shape]) -- Shapes used in the schedule.
schedule (Element) -- Root element of the schedule.
time_tolerance (float) -- Tolerance for time comparison. Default is
1e-12.amp_tolerance (float) -- Tolerance for amplitude comparison. Default is
0.1 / 2**16.allow_oversize (bool) -- Allow elements to occupy a longer duration than available. Default is
False.crosstalk (tuple[array_like, Sequence[str]] | None) -- Crosstalk matrix with corresponding channel ids. Default is
None.states (Mapping[str, OscState] | None) -- Initial states of the channels.
- 返回:
Waveforms and final states.
Waveforms part is a dictionary mapping channel names to waveforms. The shape of the waveform is
(n, length), wherenis 2 for complex waveform and 1 for real waveform.States part is a dictionary mapping channel names to final states.
- 返回类型:
- 抛出:
ValueError -- If some input is invalid.
TypeError -- If some input has an invalid type.
RuntimeError -- If waveform generation fails.