Can invariants distinguish these two 2-groups? 
  
*
  
*$G = \{ x,y \mid x^{2^{n+1}} = 1, y^4 = 1, xy = yx^{−1} \}$
  
*$H = \{ x,y \mid x^{2^{n+1}} = 1, y^4 = 1, xy = yx^{2^n−1}\}$
  
  
  Can these groups of order $2^{n+3}$ and nilpotency class $n+1$ be distinguished by any reasonable (computable) set of invariants?

While for any set of reasonable invariants, there is surely a pair of groups that share the invariants, it is also surely true that for any pair of groups there is some invariant that distinguishes them.
I personally have not found any significant differences in the conjugacy classes, centralizers, proper subgroups, normalizers, normal subgroups, etc., but perhaps I overlooked something.  I've been looking at simple groups lately, and have forgotten how muddy $p$-groups can be.
 A: I have played around with these two groups for $n=3$ and $n=4$, and for those, one distinction is that the first group has no 2-dimensional irreducible representations with non-real characters (i.e. the Frobenius-Schur indicators of all the 2-dim irreducibles are $\pm1$), while the second has plenty 2-dim irreducible non-real characters. That should be easily provable for all $n$, although I haven't tried yet.
I am not sure whether this can be turned into a purely group theoretic criterion. I briefly tried something in the spirit of this and the answer to this, but to no avail: both groups have the same number of involutions and for both of them, the square roots counting function assumes its maximum at a non-trivial central element.
A: A completely different method of recognition is just a random constructive recognition:


*

*Choose a random element $z$

*If $z$ has order $|G|/4$, call it $x$ [ probability 25% ]

*If $z$ has order $4$ and if it has more than $2$ conjugates, call it $y$ [ probability 50% ]

*Otherwise, go to $1$ [ probability 25% ]

*If we are missing $x$ or $y$, go to $1$.

*If $x^y = x^{-1}$, return "$G$", else $x^y = x^{(|G|/8)-1}$ and so return "$H$"


This is easy to do since the automorphism groups of $G$ and $H$ act quite transitively on the possible generators.  This works well even for large $n$.
This is using the normally "cheating" purely-group-theoretic invariant of "how many isomorphisms to $G$?"  In this case, there are just so many, it is easy to find one by random chance.
