  The sub-optimality of Gauss--Hermite quadrature and the optimality of the
trapezoidal rule are proved in the weighted Sobolev spaces of square integrable
functions of order $\alpha$, where the optimality is in the sense of worst-case
error. For Gauss--Hermite quadrature, we obtain matching lower and upper
bounds, which turn out to be merely of the order $n^{-\alpha/2}$ with $n$
function evaluations, although the optimal rate for the best possible linear
quadrature is known to be $n^{-\alpha}$. Our proof of the lower bound exploits
the structure of the Gauss--Hermite nodes; the bound is independent of the
quadrature weights, and changing the Gauss--Hermite weights cannot improve the
rate $n^{-\alpha/2}$. In contrast, we show that a suitably truncated
trapezoidal rule achieves the optimal rate up to a logarithmic factor.
