Problem definition
Given a set of points, determine (true or false) if they are the vertices of an $n$-cube.
Attempted Solutions
The following strategy isn't sufficient:
Calculates the square of the distances between all possible pairs of points (including self-pairs and both $(p_i,p_j)$ and $(p_j,p_i)$ for all points $p_j$ and $p_i$ where $i\neq j$) and normalises them by the smallest non-zero square distance (i.e. the square of the sides of the $n$-cube, $a^2$). For an $n$-cube we should then see a pattern of integers $i = 0,1,2,3,\dots, n$ each occurring $2^{n}{n\choose i}$ times. This corresponds with the $0$s for all the self-pairs, the normalised square of the lengths of all the sides being $\frac{a^2}{a^2}$, and the normalised square of the lengths of all the diagonals being $\frac{2a^2}{a^2}, \frac{3a^2}{a^2},\dots, \frac{na^2}{a^2}$.
Because there are points for which this pattern holds but aren't $n$-cubes. The following is not a square:
$$(1,0,0,0,0),(0,1,0,0,0),(0,0,1,0,0),(0,0,1,1,1)$$
But passes the above test.
So have added a check that all points must also be equidistant from the centre of mass of the points.
Are these now sufficient tests for the vertices of an $n$-cube? Obviously the set of vertices of any given $n$-cube will pass these two tests. But will these two tests also filter out all sets of points that aren't all of the vertices of an $n$-cube?