Solution (source code)

= Solution

For a normalized state and a Hermitian <quantum observable> $\hat A$, its <quantum uncertainty> is the standard deviation of repeated measurement outcomes:
$$
\boxed{\Delta A=\sqrt{\langle(\hat A-\langle A\rangle)^2\rangle}
=\sqrt{\langle A^2\rangle-\langle A\rangle^2}.}
$$
Here $\langle A\rangle=\langle\Psi|\hat A|\Psi\rangle$. It is a property of the state and observable, not an instrumental error; the required moments must be finite.