There are a lot of misconceptions here.
First, temperature definitely can be used in quantum mechanics. You are correct that temperature is fundamentally a statistical mechanical property, but there is a whole field of statistical mechanics called quantum statistics. Google Fermi-Dirac and Bose-Einstein statistics.
Next, the notion that temperature is always related to the kinetic energy of the particles of a system is a common misconception. The reason for this is that in introductory physics courses, it is not common to teach the true definition of temperature, which is understandable, given that it takes a lot of prior knowledge to understand. The relation between temperature and the average transnational kinetic energy is true for an ideal gas, but not in general. The true definition of temperature is:
$$T \, \equiv \left(\frac{\partial S}{\partial U}\right)^{-1}$$
which is the reciprocal of the partial derivative of the U, the internal energy of the system, with respect to the entropy, S, of the system.
Very quickly, <PERSON> entropy is:
$$ S\, \equiv\, k_B\, ln(\Omega)$$
where $$k_B$$ is <PERSON>'s constant (this comes from how units were historically defined; there are systems of units where that constant is 1) and $$\Omega$$ is the multiplicity of a given macrostate. This just means the total number of different microscopic states of a macroscopic system when that system is in a specific macroscopic state. For example, an ideal gas with a particular volume, pressure, and number of particles. $$\Omega$$ is typically HUGE for normal, macroscopic objects; thus the natural log is there to suppress the number a bit. The change in entropy of a system can be shown to be a function of the number of particles, the internal energy, and the volume of a system. The higher these values, the more number of microstates of a system for a given macrostate, and thus a larger entropy. This is why many people refer to entropy as a measure of the "randomness", "uncertainty", or "disorder" of a system. It really is just a measure of the number of microstates of a system, but the many (huge amount) more possible microstates for a given macrostate, the much less certain you can be about the specific macrostate it is in; so these terms make sense.
You need to learn a bit of thermal physics, specifically about entropy before it makes sense. When you do, it becomes clear that temperature is a much more abstract concept than first taught. For example, there is a system called the two-state paramagnet. 28
A paramagnet is a material where some of the unpaired electrons within atoms of the material align with an externally applied magnetic field. This creates a net induced magnetic field in the material. Only a portion of the unpaired electrons align with it, while some don't; how many depends on the strength of the external field. For the two-state paramagnet, the electrons can either be aligned with the field or against it. Different levels correspond to different energies of the system. If you were to plot the entropy as a function of the energy, you would find that, starting as you moved from the energy of no electrons aligned all the way to all of the electrons aligned, the temperature would start at $$+0\,K$$ increase to $$+\infty\, K$$ when half the electrons are aligned, and then go from $$-\infty\,K$$ to $$-0\, K$$ from there. This example should highlight the abstract nature of temperature. Note how the temperature of this system has nothing to do with kinetic energy.
It should be noted that since temperature is dependent on the entropy of a system, which is a measure of the number of microstates of a system, it only makes sense to talk about it when there are multiple (really MANY) particles within a system. Also, though temperature is related to the internal energy of the system by its definition, it is not THE energy of the system, even in the example of an ideal gas. The temperature is proportional to the average kinetic energy (and vice versa), but it is not THE energy.
The Hamiltonian, under certain conditions, is equal to the total mechanical energy of a system. This is not always true though. It is only the case when the Lagrangian of a system is not explicitly time-dependent.
I hope this cleared a few things up! I know this was not a full explanation of your question, but I'm not sure how to fully describe it in a single answer. My advice would be to study up on thermal physics; there is a lot of base knowledge that is needed to understand temperature, entropy, etc. fully. I would recommend Thermal Physics by <PERSON>. Good luck! 28