pygsti.objects.GateSet.frobeniusdist

GateSet.frobeniusdist(otherGateSet, transformMx=None, gateWeight=1.0, spamWeight=1.0, normalize=True)

Compute the weighted frobenius norm of the difference between this gateset and otherGateSet. Differences in each corresponding gate matrix and spam vector element are squared, weighted (using gateWeight or spamWeight as applicable), then summed. The value returned is the square root of this sum, or the square root of this sum divided by the number of summands if normalize == True.

Parameters:
  • otherGateSet (GateSet) – the other gate set to difference against.
  • transformMx (numpy array, optional) – if not None, transform this gateset by G => inv(transformMx) * G * transformMx, for each gate matrix G (and similar for rho and E vectors) before taking the difference. This transformation is applied only for the difference and does not alter the values stored in this gateset.
  • gateWeight (float, optional) – weighting factor for differences between gate elements.
  • spamWeight (float, optional) – weighting factor for differences between elements of spam vectors.
  • normalize (bool, optional) – if True (the default), the frobenius difference is defined by the sum of weighted squared-differences divided by the number of differences. If False, this final division is not performed.
Returns:

Return type:

float