...By quantizing we the get the following Hamiltonian operator
$$\hat{H}=\sum_{\mathbf{k}}\hbar \omega(\mathbf{k})\left(\hat{n}(\mathbf{k})+\frac{1}{2} \right)$$ where $\hat{n}(\mathbf{k})=\hat{a}^{\dagger}(\mathbf{k})\hat{a}(\mathbf{k})$ is the number operator of oscillator mode $\mathbf{k}$ with eigenvalues $n_{\mathbf{k}}=0,1,2,\dots$.
Using the quantum canonical ensemble show that the internal energy $E(T)$ is given by>
$$E(T)=\langle H \rangle = E_0 + \sum_{\mathbf{k}}\frac{\hbar \omega(\mathbf{k})}{e^{\beta\hbar \omega(\mathbf{k})}-1}$$
where $E_0$ is the sum of ground state energies of all the oscillators.
I started this by calculating the partition function
$$\begin{align} Z &= \sum_{\Gamma}e^{-\beta \mathcal{H}(\Gamma)} \\ &= \sum_{\Gamma}e^{-\beta (\sum_{\mathbf{k}}\hbar \omega(\hat{n}(\mathbf{k})+\frac{1}{2}))} \end{align}$$ ($\Gamma$ is a microstate of the system)
but I cannot see the thought process behind evaluating these, particularly with respect to the summations. This is a common problem I have found.
I would then go on to use $E=-\frac{\partial \ln Z}{\partial \beta}$