pygsti.tools.matrixtools.mx_to_string_complex

pygsti.tools.matrixtools.mx_to_string_complex#

mx_to_string_complex(m, real_width=9, im_width=9, prec=4)#

Generate a “pretty-format” string for a complex-valued matrix.

Parameters:
  • m (numpy array) – array to format.

  • real_width (int, optional) – the width (in characters) of the real part of each element.

  • im_width (int, optional) – the width (in characters) of the imaginary part of each element.

  • prec (int optional) – the precision (in characters) of each element’s real and imaginary parts.

Returns:

matrix m as a pretty formatted string.

Return type:

string