pygsti.tools.matrixtools.is_pos_def

Contents

pygsti.tools.matrixtools.is_pos_def#

is_pos_def(mx, tol=1e-09, attempt_cholesky=False)#

Test whether mx is a positive-definite matrix.

Parameters:
  • mx (numpy array) – Matrix to test.

  • tol (float, optional) – Tolerance on absolute magitude of elements.

Returns:

True if mx is positive-semidefinite, otherwise False.

Return type:

bool