qat.experimental.waveforms.numerical module

This module contains numerical methods for evaluating waveform derivatives, which can be used to implement DRAG when analytical definitions are not available.

numerical_derivative(y, x)

Computes a derivative of a function using numerical methods.

Currently just calls np.gradient which uses a second order central difference method.

Parameters:
  • y (ndarray | list[Number]) – The y values of the function to differentiate.

  • x (ndarray | list[Number]) – The x values of the function to differentiate.

Return type:

ndarray

Returns:

The derivative of the function at each x value.