pygsti.modelmembers.operations.denseop.finite_difference_deriv_wrt_params#
- finite_difference_deriv_wrt_params(operation, wrt_filter, eps=1e-07)#
Computes a finite-difference Jacobian for a LinearOperator object.
The returned value is a matrix whose columns are the vectorized derivatives of the flattened operation matrix with respect to a single operation parameter, matching the format expected from the operation’s deriv_wrt_params method.
- Parameters:
operation (LinearOperator) – The operation object to compute a Jacobian for.
wrt_filter (list or numpy.ndarray) – List of parameter indices to filter the result by (as though derivative is only taken with respect to these parameters).
eps (float, optional) – The finite difference step to use.
- Returns:
An M by N matrix where M is the number of operation elements and N is the number of operation parameters.
- Return type:
numpy.ndarray