What is temperature on a quantum level? When I was in high school, I learned that temperature is kinetic energy.
When I learned statistical physics, we learned that temperature is a statistical thing, and there was a formula for it.
Questions:


*

*What is temperature in terms of quantum mechanics?  This is, how  is temperature connected to quantum concepts like position, momentum, angular momentum, spin and energy levels?

*How does temperature relate with the energy levels of an atom?

*Is the ground state always at absolute zero?

*If energy levels are discrete, how is this in play with the infinite amount of temperatures that exist in the universe?
 A: In classical mechanics, one can think of configurations ("microstates") of the system, each with definite position and momentum for all the particles. In thermal equilibrium at temperature $T$, the probability of finding the system in any given configuration is proportional to $\mathrm{e}^{-E/k_{\mathrm{B}}T}$ [1], where $E$ is the energy of that configuration and $k_{\mathrm{B}}$ is Boltzmann's constant. (Proportional, not equal, because probabilities need to be normalized so that they add up to $1$. To normalize them you divide by the partition function, $Z$.)
In quantum mechanics, you can't think of configurations with definite position and momentum any more. Instead, you have energy levels (i.e., eigenstates of the Hamiltonian operator), and the statement needs to be rephrased in terms of them: In thermal equilibrium at temperature $T$, the probability of finding the system in an energy level $E$ is proportional to $\mathrm{e}^{-E/k_{\mathrm{B}}T}$ [2]. (The normalization constant is still $1/Z$.)
For example, an isolated 1D harmonic oscillator has a set of energy levels, labeled by $n=0,1,2,\ldots$, with energies $E_n \propto n + \frac{1}{2}$. If you bring it to thermal equilibrium at temperature $T$ (by allowing it to exchange photons with a black body, for example), it then has a probability $p_n \propto \mathrm{e}^{-E_n/k_{\mathrm{B}}T}$ of being found in state $n$.
In the limit that the temperature approaches zero, all of the probabilities go to zero except for the ground state, which approaches $1$. (You need to keep track of the normalization when taking this limit.) So a system at thermal equilibrium at zero temperature is always in its ground state.

An important aside: Note that this doesn't mean that, in thermal equilibrium, a quantum system is in a superposition of energy eigenstates $\lvert n \rangle$ such as $\lvert \psi \rangle = \sqrt{p_0} \lvert 0 \rangle + \sqrt{p_1} \lvert 1 \rangle + \sqrt{p_2} \lvert 2 \rangle + \cdots $. In fact, a system in thermal equilibrium is not in a coherent superposition, but rather in an "incoherent mixture". Such mixtures can be described by a density matrix (though this formalism isn't usually needed for describing simple mixtures like thermal equilibrium).
A: The temperature $T$ is defined via the relation
$$T^{-1}=\frac{\partial S}{\partial E}\;,$$
where $S$ and $E$ denote entropy and energy, respectively. At the quantum level there is a notion of temperature. As in the classical discussion, it requires the number of particles to be large. Clearly, (ideal) quantum gases do have a temperature (when in equilibrium).
As for your questions:

*

*

What is temperature in terms of quantum mechanics?  This is, how  is temperature connected to quantum concepts like position, momentum, angular momentum, spin and energy levels?

The statistical mechanics definition is always the same. Of course, the computation differs.


*

How does temperature relate with the energy levels of an atom?

It does not relate in a direct way. Of course, the average occupation numbers depend on the temperature.


*

Is the ground state always at absolute zero?

Hard to answer because it is not clear what you mean by ground state.


*

If energy levels are discrete, how is this in play with the infinite amount of temperatures that exist in the universe?

This question doesn't make sense. There is no notion of an "infinite amount of temperatures that exist in the universe". Regardless of how many particles you have, in a finite system you will always have a finite number of levels, even if you call this system "universe".
A: tl;dr: particles transition been microstates; temperature is a property of the ensemble macrostate at equilibrium
To use a statistics mechanics framing, quantum mechanics describes how particles transition between the different microstates of your system. Temperature is a property that emerges from the macrostate of the system when it reaches equilibrium.
Here “the system” is a collection of particles. So it does not make sense to talk about temperature of a single atom in isolation.
A: In classical mechanics, there does not always exist a well-defined notion of temperature (it does not make sense to define the temperature for a single free particle). Quantum mechanics exhibits similar behavior.
Formally, we can define a thermal expectation value $\langle \rangle_\beta$ which means, for some observable $\mathcal{O}$,
$$\langle \mathcal{O} \rangle_\beta = \langle \mathcal{O} e^{-\beta H} \rangle $$
where $\langle \rangle$ is the usual expectation value in quantum mechanics, and $\beta$ is the inverse temperature (this definition should be properly normalized, which we will ignore for now). To understand what this means intuitively, we can expand the expectation value in the energy eigenbasis
$$\langle \mathcal{O} \rangle_\beta = \sum_n \langle n | \mathcal{O} | n\rangle e^{-\beta E_n} $$
What this means is that, for low temperature (large $\beta$), the $e^{-\beta E_n}$ term penalizes higher energy contributions, and the lower energy states contribute more to the thermal expectation value. If you're familiar with the notion of density matrices, you'll see that the thermal expectation value is just the expectation value for a system in the state $\rho = e^{-\beta H}$. 
If you want to, you can take this as just the definition of what temperature means in quantum mechanics. If we want to talk about a quantum system at some inverse temperature $\beta$, we just replace all the normal expectation values with thermal expectation values. But this doesn't really explain why this definition is relevant (similar to how we sometimes just take the classical laws of thermodynamics as a given, without a statistical justification). 
How do we associate a temperature with a quantum state? For any quantum state with average energy $E$, we can define a temperature from the energy by solving
$$E = \langle H \rangle_\beta$$ 
Note that this answers your question regarding the discreteness of energy levels - we can always consider the average energy of a state, which is continuous. 
Now, imagine that your quantum mechanical system is very large. It may turn out to be the case that the expectation values of operators restricted to a small region of the system look thermal - in other words, they take values close to $\langle \mathcal{O} \rangle_\beta$. If this is true, then we say that our system has thermalized, and it becomes useful to talk about thermal expectation values. It's easy to come up with states that don't satisfy this, but it turns out (rather non-trivially) that many states tend to become thermal if you evolve them in time long enough.
A: Since you are a high school student, I will break it down in simpler terms
Heat is a result of combustion, chemical reactions at an atomic or molecular level or radiation like fission/fusion at an atomic and sub-atomic level.
At a quantum level particles are not identified with any known elements on periodic table so as to associate temperature. In a known sense quantum particles are building blocks of an atom and sub-atomic particles.
E.g. you cannot say whether an electron or a quark belongs to Platinum or Gold or Silver or Plutonium or Silicon. Since it is the quantum particle that makes an atom and not the other way round.
There are three quantum states you probably know:

*

*A state at which Quantum particles are freed. These temperatures can be an insane trillions of degrees at which even quarks are liberated from any bonding with other quarks

*A state at which quantum particles are created or generated near absolute zero to trillions of degrees depending on what type of chemical reaction is initiated fission or fusion

*A state at which quantum particles are accelerated temperature is lower than outer space typically -453 degrees Fahrenheit

So associating temperature to a quantum particle can be pretty hopeless unless you have a specific reason.
Since a quantum particle like electron and quarks make an atom. It depends on what atom you are talking about about:

*

*Each atom exists in a certain natural condition or state. Such as temperature and pressure.

*An atom of an element can exist in solid or liquid or gaseous state

*E.g. Oxygen atom in gaseous state has different temperature depending on whether it is a solid or liquid or gas

Quantum particles tend to keep the atomic structure of an element within the natural boundaries of temperature and pressure. Which means there is range of temperatures and pressures in which the solid, liquid or gaseous state of atom and its molecules is maintained. This temperature and pressure typically become the temperature and pressure at which the quantum particles exist within that atom.
Theoretically at Zillion and Gazillion degrees there will be only quantum physics and no other chemistry or physics or biology. All quantum particles will roam freely without any bonding.
Theoretically once all quantum particles are free and suddenly you some how drop the temperature to absolute zero then all particles and waves if any will freeze in their place. It will be a big freeze. There will be no ice like how it is believed in popular science and fiction.
So you see how pointless it is to associate temperature to quantum particles.
A: A lot of questions. I’ll focus on the main question.

What is temperature on a quantum level?

The reason for the inner energy of a body is the exchange of radiation with other bodies. In detail, the subatomic particles of a body receive stochastic energy packets - photons - and emit photons again. A body is in equilibrium when the incident radiation corresponds to the outgoing radiation.
For an "isolated" observed atom, the equality of the in and out of energy over a certain period of time is therefore related to the constancy of the temperature of the body to which the atom belongs. The same applies to a gas (if someone does not agree with the model of the isolated atom in a rigid body).
