bloqade.analog.factory.piecewise_constant
← Module overview
function
source
functionpiecewise_constant¶source
bloqade.analog.factory.piecewise_constant
Signature
def piecewise_constant(durations: List[ScalarType], values: List[ScalarType]) -> WaveformCreate a piecewise linear waveform.
Create a piecewise constant waveform from a list of durations and values. The
value duration[i] corresponds to the length of time for the i’th segment
with a value of values[i].
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 the same as the length of |