PermutationMatrix.isclose

PermutationMatrix.isclose(other, tol=1e-06)

Check if self is approximately equal to other upto global phase.

Parameters:
  • other (UnitaryMatrix | complex128 | complex64 | int64 | int32 | float64 | float32 | Sequence[Sequence[int | float | complex]]) – The unitary to compare to.

  • tol (float) – The numerical precision of the check.

Returns:

True if self is close to other.

Return type:

bool

See also