pygsti.objects.GateSet.hpr¶
-
GateSet.
hpr
(spamLabel, gatestring, returnPr=False, returnDeriv=False, clipTo=None)¶ Compute the Hessian of a probability generated by a gate string and spam label as a 1 x M x M array, where M is the number of gateset parameters.
Parameters: - spamLabel (string) – the label specifying the state prep and measure operations
- gatestring (GateString or tuple of gate labels) – The sequence of gate labels specifying the gate string.
- returnPr (bool, optional) – when set to True, additionally return the probability itself.
- returnDeriv (bool, optional) – when set to True, additionally return the derivative of the probability.
- clipTo (2-tuple, optional) – (min,max) to clip returned probability to if not None. Only relevant when returnPr == True.
Returns: - hessian (numpy array) – a 1 x M x M array, where M is the number of gateset parameters. hessian[0,j,k] is the derivative of the probability w.r.t. the k-th then the j-th gateset parameter.
- derivative (numpy array) – only returned if returnDeriv == True. A 1 x M numpy array of derivatives of the probability w.r.t. each gateset parameter.
- probability (float) – only returned if returnPr == True.