qat.experimental.waveforms.shapes.square module
Implements the sampling definitions for a Square waveform shape.
The shape for Square waveforms is defined to be unity for all values, and is not parameterised by any value. Its derivative with respect to time is zero at all orders.
- class SquareWaveformShape
Bases:
WaveformShapeWaveform-shape wrapper for square sampling functions.
- derivative(x, order=1)
Evaluates the derivative of the square waveform shape.
- Return type:
ndarray[tuple[int,...],dtype[complexfloating]]
- evaluate(x)
Evaluates the square waveform shape at the sample points.
- Return type:
ndarray[tuple[int,...],dtype[complexfloating]]
- sample_square_waveform(x)
Samples a square waveform shape.
A square waveform is defined as unity for all values.
- Parameters:
x¶ (
ndarray[tuple[int,...],dtype[floating]] |list[float]) – The list of values in the range [-1, 1] to sample the waveform for.- Return type:
ndarray[tuple[int,...],dtype[complexfloating]]
- sample_square_waveform_derivative(x, order=1)
Samples the derivative of any order of a square waveform shape.
A square waveform is defined as unity for all values, so its derivative for all orders is zero.