pygsti.objects.GateSet.dproduct

GateSet.dproduct(gatestring, flat=False)

Compute the derivative of a specified sequence of gate labels.

Parameters:
  • gatestring (GateString or tuple of gate labels) – The sequence of gate labels.
  • flat (bool, optional) – Affects the shape of the returned derivative array (see below).
Returns:

deriv – * if flat == False, a M x G x G array, where:

  • M == length of the vectorized gateset (number of gateset parameters)
  • G == the linear dimension of a gate matrix (G x G gate matrices).

and deriv[i,j,k] holds the derivative of the (j,k)-th entry of the product with respect to the i-th gateset parameter.

  • if flat == True, a N x M array, where:

    • N == the number of entries in a single flattened gate (ordering as numpy.flatten)
    • M == length of the vectorized gateset (number of gateset parameters)

    and deriv[i,j] holds the derivative of the i-th entry of the flattened product with respect to the j-th gateset parameter.

Return type:

numpy array