Let (1) an operator, such as the hamiltonian operator, be represented by a hat on top: ##\hat{H}##,
(2) the expectation value of the hamiltonian operator be represented by angle brackets: ##<\hat{H}>##, and
(3) a simple scalar quantity, such as temperature, be represented just by a letter: T.
Would it be physically impossible too to measure the temperature of a gas in a box? Suppose we have a collection of identical monoatomic ideal gas particles in a (one-dimensional) box, with each particle in the ground state of energy ##E##. The average internal energy ##\bar{U}## of a particle ##=\frac{3}{2}kT=## the average kinetic energy of a particle ##\frac{<\hat{p^2}>}{2m}=\,<\hat{H}>\,=E=\frac{\hbar^2\pi^2}{2ma^2}##, from which we get ##T=\frac{\hbar^2\pi^2}{3kma^2}##.
If so, does it mean that ##E=\,<\hat{H}>\,=\frac{<\hat{p^2}>}{2m}\neq\frac{p^2}{2m}## (where ##E## and ##p## are the energy and the magnitude of the momentum of a particle respectively)? Do the particles have different ##p## but the same ##E##? How is this possible?
How does ##E\neq\frac{p^2}{2m}## change the way we interpret the kinetic theory of gases? Do the particles, when moving in a box and when colliding with other particles, have some definite momentum or some definite range/distribution (e.g. when in a superposition of momentum states) of values of momentum (although non-measurable)?