pygsti.tools.diamonddist

pygsti.tools.diamonddist(A, B, mxBasis='gm', dimOrStateSpaceDims=None)

Returns the approximate diamond norm describing the difference between gate matrices A and B given by :

D = ||A - B ||_diamond = sup_rho || AxI(rho) - BxI(rho) ||_1
Parameters:
  • B (A,) – The gate matrices to use when computing the diamond norm.
  • mxBasis ({“std”,”gm”,”pp”}, optional) – the basis of the gate matrices A and B : standard (matrix units), Gell-Mann, or Pauli-product, respectively.
  • dimOrStateSpaceDims (int or list of ints, optional) – Structure of the density-matrix space, which further specifies the basis of gateMx (see BasisTools).
Returns:

Diamond norm

Return type:

float