Solution (source code)

= Solution

For a normalized state and a <self-adjoint operator>, the <expectation value> and dispersion are
$$
\boxed{\langle A\rangle_\psi=\langle\psi|A\psi\rangle,\qquad
\Delta_\psi(A)=\sqrt{\langle A^2\rangle_\psi-\langle A\rangle_\psi^2}.}
$$
Use the physics convention that the <inner product> is conjugate-linear in its first argument, and assume the displayed products and second moments are defined. Self-adjointness gives $\overline{\langle\psi|A\psi\rangle}=\langle A\psi|\psi\rangle=\langle\psi|A\psi\rangle$, so the expectation is real. Moreover
$$
\Delta_\psi(A)^2=\|(A-\langle A\rangle_\psi)\psi\|^2.
$$
It vanishes exactly when $\psi$ is an eigenstate, with <eigenvalue> its expectation.

The product rule gives $XPf=-i\hbar xf'$ and $PXf=-i\hbar(f+xf')$, hence $\boxed{[X,P]f=i\hbar f}$ on their common differentiable domain. For general operators, put $z=\langle A\psi|B\psi\rangle$. Then
$$
\langle[A,B]\rangle=z-\overline z=2i\operatorname{Im}z=i\langle C\rangle.
$$
The <Cauchy-Schwarz inequality> yields
$$
\boxed{\langle A^2\rangle\langle B^2\rangle
\geq|z|^2\geq(\operatorname{Im}z)^2=\frac14\langle C\rangle^2.}
$$
Apply this to centered position and <momentum operators>, whose <commutator> is unchanged. Their squared <norms> are the <variances>, giving
$$
\boxed{\Delta P\,\Delta X\geq\hbar/2.}
$$
Equality requires both proportionality in Cauchy-Schwarz and a purely imaginary <inner product>. Thus for real means $x_0,p_0$,
$$
(P-p_0)\psi=i\gamma(X-x_0)\psi
$$
with real $\gamma$. Solving this first-order equation gives
$$
\psi(x)=N\exp\left[-\frac{\gamma(x-x_0)^2}{2\hbar}+\frac{ip_0x}{\hbar}\right].
$$
Normalizability on the real line forces $\gamma>0$. Writing $\sigma^2=\hbar/(2\gamma)$, all normalized equality states are therefore
$$
\boxed{\psi(x)=\frac{e^{i\phi}}{(2\pi\sigma^2)^{1/4}}
\exp\left[-\frac{(x-x_0)^2}{4\sigma^2}+\frac{ip_0x}{\hbar}\right],
\quad x_0,p_0,\phi\in\mathbb R,\quad\sigma>0.}
$$
They have $\Delta X=\sigma$ and $\Delta P=\hbar/(2\sigma)$. A nonconstant quadratic phase would increase the product, so the full family here has a real positive Gaussian width and only a linear spatial phase.