  We consider both the bosonic and fermionic second quantization of spectral
triples in the presence of a chemical potential. We show that the von Neumann
entropy and the average energy of the Gibbs state defined by the bosonic and
fermionic grand partition function can be expressed as spectral actions. It
turns out that all spectral action coefficients can be given in terms of the
modified Bessel functions. In the fermionic case, we show that the spectral
coefficients for the von Neumann entropy, in the limit when the chemical
potential $\mu$ approaches $0,$ can be expressed in terms of the Riemann zeta
function. This recovers a result of Chamseddine-Connes-van Suijlekom.
