pygsti.tools.jamiolkowski.sum_of_negative_choi_eigenvalues

pygsti.tools.jamiolkowski.sum_of_negative_choi_eigenvalues#

sum_of_negative_choi_eigenvalues(model, weights=None)#

Compute the amount of non-CP-ness of a model.

This is defined (somewhat arbitrarily) by summing the negative eigenvalues of the Choi matrix for each gate in model.

Parameters:
  • model (Model) – The model to act on.

  • weights (dict) – A dictionary of weights used to multiply the negative eigenvalues of different gates. Keys are operation labels, values are floating point numbers.

Returns:

the sum of negative eigenvalues of the Choi matrix for each gate.

Return type:

float