  In this article it is introduced a theoretical model made in order to perform
calculations of the quantum heat of a body that could be acquired or delivered
during a thermal transformation of its quantum states. Here the model is mainly
targeted to the electronic structure of matter[1] at the nano and micro scale
where DFT models have been frequently developed of the total energy of quantum
systems. Defining an Entropy functional $S[\rho]$ makes us able optimizing a
free energy $G[\rho]$ of the quantum system at finite temperatures. Due to the
generality of the model, the latter can be also applied to several first
principles computational codes where ab initio modelling of quantum matter is
asked.
