Question
I'm searching for the derivation which enables me to say:
The first postulate of statistical thermodynamics can be extended to arrive at the Gibbs postulate, a postulate which relates the energy of said microstates to internal energy of a system as calculated by classical thermodynamics
Motivation
Gibbs's Postulate is one which relates the internal energy, $U$, of a system as determined by thermodynamics to the average ensemble energy, $E$, as determined by statistical mechanics. $$ U = \langle E \rangle $$
What is this average exactly? For say, the quantum harmonic oscillator is it:
$$ U = \langle E \rangle= \langle \psi |H| \psi \rangle $$
Where $H$ is the Hamiltonian and $\psi$ is the wavefunction. The partition function on the other hand makes no explicit reference to the wavefunction of the system as it uses trace.
P.S: Feel free to limit to an example to that of the quantum harmonic oscillator.