pygsti.objects.GateSet.deriv_wrt_params

GateSet.deriv_wrt_params()

Construct a matrix whose columns are the vectorized derivatives of all the gateset’s raw matrix and vector elements (placed in a vector) with respect to each single gateset parameter.

Thus, each column has length equal to the number of elements in the gateset, and there are num_params() columns. In the case of a “fully parameterized gateset” (i.e. all gate matrices and SPAM vectors are fully parameterized) then the resulting matrix will be the (square) identity matrix.

Returns:2D array of derivatives.
Return type:numpy array