I'm a bit confused with some results from the interpretation of the QHO in a canonical ensemble.
The partition function is given by the expression $$Z = \sum_{s} e^{-\beta E_s},$$ where $s$ represents each microstate. My first question is: if a system consists on several QHO (let's suppose 2 for simplicity), this expression gives the total partition function (using that $E$ is the total energy of the two oscillators), right?
Knowing that the spectrum of energies in the QHO is given by $$E_n = \hbar \omega \left( n + \dfrac{1}{2} \right),$$ if we want to calculate $Z$ for two oscillators, the partition function will be given by a double sum, one in $n_1$ and one in $n_2$, right (considering we have 2 oscillators; this could be generalised for $k$ oscillators, then we will have $k$ sums depending on $n_k$)?
Lastly, can we calculate $Z$ by calculating the partition function for 1 oscillator and then raising it to the number of oscillators? I've been told that I can do this when the particles are distinguishable and non-interacting, but when evaluating it for 2 oscillators I don't get the same result as evaluating the partition function in general.