  We introduce the H-type deviation $\delta({\mathbb G})$ of a step two Carnot
group ${\mathbb G}$, which measures the deviation of the group from the class
of Heisenberg-type groups. We show that $\delta({\mathbb G})=0$ if and only if
${\mathbb G}$ carries a vertical metric which endows it with the structure of
an H-type group. We compute the H-type deviation for several naturally
occurring families of step two groups. In addition, we provide analytic
expressions which are comparable to the H-type deviation. As a consequence, we
establish new analytic characterizations for the class of H-type groups. For
instance, denoting by $N(g)=(||x||_h^4+16||t||_v^2)^{1/4}$, $g=\exp(x+t)$, the
canonical Kaplan-type quasi-norm in a step two group ${\mathbb G}$ with taming
Riemannian metric $g_h\oplus g_v$, we show that ${\mathbb G}$ is H-type if and
only if $||\nabla_0 N(g)||_h^2=||x||_h^2/N(g)^2$ for all $g\ne 0$. Similarly,
we show that ${\mathbb G}$ is H-type if and only if $N^{2-Q}$ is ${\mathcal
L}$-harmonic in ${\mathbb G} \setminus \{0\}$. Here $\nabla_0$ denotes the
horizontal differential operator, ${\mathcal L}$ the canonical sub-Laplacian,
and $Q = \dim{\mathfrak v}_1+2\dim{\mathfrak v}_2$ the homogeneous dimension of
${\mathbb G}$, where ${\mathfrak v}_1\oplus{\mathfrak v}_2$ is the
stratification of the Lie algebra. It is well-known that H-type groups satisfy
both of these analytic conclusions. The new content of these results lies in
the converse directions. Motivation for this work comes from a longstanding
conjecture regarding polarizable Carnot groups. We formulate a quantitative
stability conjecture regarding the fundamental solution for the sub-Laplacian
on step two Carnot groups. Its validity would imply that all step two
polarizable groups admit an H-type group structure. We confirm this conjecture
for a sequence of anisotropic Heisenberg groups.
