UnitaryMatrix.is_unitary

static UnitaryMatrix.is_unitary(U, tol=1e-08)[source]

Check if U is a unitary matrix.

Parameters:
  • U (Any) – The matrix to check.

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

Returns:

True if U is a unitary.

Return type:

bool