Free photon gas
Let us consider different thermal light sources, such as the Sun, an incandescent lamp, or a fluorescent bulb. In elementary quantum mechanics and statistical physics one describes the emission of such light sources using Planck's law, which is readily obtained as (up to a definition-dependent coefficient)
$$
B(\omega, T) \propto \sum_{\mathbf{k},\mu}\delta(\omega-\omega_{\mathbf{k},\mu})\hbar\omega_{\mathbf{k},\mu}\langle a^\dagger_{\mathbf{k},\mu}a_{\mathbf{k},\mu}\rangle,
$$
($\mu$ are the photon polarization states), where the averaging is performed using the free-field density matrix (i.e., assuming the non-interacting photon gas)
$$
\hat{\rho} =\frac{1}{Z}e^{-\beta H_{ph}},Z= Tr\left[e^{-\beta H_{ph}}\right], H_{ph}=\sum_{\mathbf{k},\mu} \hbar\omega_k a^\dagger_{\mathbf{k},\mu}a_{\mathbf{k},\mu}
$$
From this it readily follows that
- the shape of the spectral density depends only on temperature, but not on the nature of the emission process
- the light emitted by different thermal sources of the same temperature is indistinguishable, as, e.g., discussed in this thread.
Light-matter interactions The thermodynamic description above ignores the source of radiation, which we will call "matter", and which can be trivially included in the Hamiltonian: $$ H = H_{matter} + H_{ph} $$ Using this Hamiltonian would not change the properties of the black body radiation discussed above, but it brings to the surface the important assumption used in thermodynamic description: neglecting the residual interactions, which are responsible for equilibrating the state of the photons and the matter. In particular, if some of these interactions are not small, we can no longer neglect them, but need to include them in the Hamiltonian. E.g., In case of two-level atoms interacting with a photon gas we would write something like: $$ H = H_{atoms} + H_{int} + H_{ph},\\ H_{atoms} = \Delta\sum_i\sigma_z^{(i)},\\ H_{int}=\sum_{i,\mathbf{k},\mu}\sigma_x^{(i)}\left(\lambda_{\mathbf{k},\mu}a_{\mathbf{k},\mu} + h.c.\right) $$ In this case the eigenstates of the Hamiltonian are however no more the photon eigenstates, but rather polaritons - joints states of atom-photon system. If we were to consider a partition function of such a system in the basis of the photon eigenstates, it would have non-zero diagonal elements.
Equilibration time Note that the interaction in the example above is not sufficient for the establishment of the thermal equilibrium, as most of the exchange will happen between the atoms and the photon modes with frequencies close to $\hbar\omega_{\mathbf{k},\mu}=\Delta$. To have thermal equilibration we still have to consider weaker interactions, higher-order processes (such as Raman scattering), Doppler broadening, etc. This is to say that the equilibration between the matter and the photons may be very slow. In fact, it may be divergently slow - such as the equilibration between the alternative polarizations of a ferromagnet (somewhat similar to the phase transition in Dicke model).
It is easy to point examples where this is the case: gas tubes produce light of different colors, depending on the gas they are filled with, even if their temperature is the same. Similarly, we are able to discern the chemical composition of stars by the intensity of different spectral lines in their radiation.
Non-equilibrium Thermal light sources are never in equilibrium, as they lose energy via emitting radiation. Thus, describing the radiation emitted by a heated slab of metal as a black-body radiation is valid only approximately, as long as we believe that this loss of energy is negligible for practical purposes. Moreover, the light sources such as incandescent bulbs or starts are in a steady rather than a thermal state - the energy is generated inside of them (via electric current or thermonuclear reactions) and then dissipated as radiation.
Taken together, all these mean that the light originating from different types of "thermal light sources" (stars, incandescent lamps, fluorescent bulbs) possesses different properties and in principle distinguishable. The question is then: how can we do it? More specifically, I am interested in detecting the entangled photons and the non-equilibrium state.