pygsti.objects.GateSet.hproduct

GateSet.hproduct(gatestring, flat=False)

Compute the hessian 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:

hessian – * if flat == False, a M x M x G x G numpy 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 hessian[i,j,k,l] holds the derivative of the (k,l)-th entry of the product with respect to the j-th then i-th gateset parameters.

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

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

    and hessian[i,j,k] holds the derivative of the i-th entry of the flattened product with respect to the k-th then k-th gateset parameters.

Return type:

numpy array