qat.quops.math_util.are_equal_up_to_phase

qat.quops.math_util.are_equal_up_to_phase(A, B, tol=1e-07)

Determine if A and B are equal up to a phase

Parameters
  • A (matrix) – a matrix or vector

  • B (matrix) – a matrix or vector

  • tol (float) – tolerance

Returns

whether A and B are equal up to a phase

Return type

bool