bloqade.analog.factory.piecewise_linear
← Module overview
function
source
functionpiecewise_linear¶source
bloqade.analog.factory.piecewise_linear
Signature
def piecewise_linear(durations: List[ScalarType], values: List[ScalarType]) -> WaveformCreate a piecewise linear waveform.
Create a piecewise linear waveform from a list of durations and values. The
value duration[i] is of the linear segment between values[i] and values[i+1].
Parameters
| Name | Type | Description |
|---|---|---|
durations | List[ScalarType] | The duration of each segment |
values | List[ScalarType] | The values for each segment |
Returns
WaveformWaveform: The piecewise linear waveform.
Raises
| Type | Description |
|---|---|
ValueError | If the length of `values` is not one greater than the length of |