It should be worth mentioning that
the finite-temperature HF theory
can be derived by the principle of maximum entropy,
with an assumption that the partition function is given in a form,
\(Z=\mathrm {tr} [ e^{-\beta \hat{K}} ]\)  with
a one-body operator \(\hat{K}\) .
Constraining the energy and the particle number
with Lagrange multipliers (associated with \(\beta \)  and \(\mu \) ),
it is equivalent to
the minimization of the thermodynamic potential
[1]}.
\(J&=& E - TS - \mu N \\&=& E[\rho ]+ k_B T \mathrm {tr} \left[ \hat{D}\ln \hat{D} \right]-\mu \mathrm {tr} \left[ \hat{D}\hat{N} \right] \\&=& E^{\prime }[\rho ] - \mathrm {tr} \left[ \hat{D}\hat{K} \right]- k_B T \ln Z ,\) 
