  We study the thermodynamics of quantum particles with long-range interactions
at T=0. Specifically, we generalize the Hamiltonian Mean Field (HMF) model to
the case of fermions and bosons. In the case of fermions, we consider the
Thomas-Fermi approximation that becomes exact in a proper thermodynamic limit.
The equilibrium configurations, described by the Fermi (or waterbag)
distribution, are equivalent to polytropes with index n=1/2. In the case of
bosons, we consider the Hartree approximation that becomes exact in a proper
thermodynamic limit. The equilibrium configurations are solutions of the mean
field Schr\"odinger equation with a cosine interaction. We show that the
homogeneous phase, that is unstable in the classical regime, becomes stable in
the quantum regime. This takes place through a first order phase transition for
fermions and through a second order phase transition for bosons where the
control parameter is the normalized Planck constant. In the case of fermions,
the homogeneous phase is stabilized by the Pauli exclusion principle while for
bosons the stabilization is due to the Heisenberg uncertainty principle. As a
result, the thermodynamic limit is different for fermions and bosons. We point
out analogies between the quantum HMF model and the concepts of fermion and
boson stars in astrophysics. Finally, as a by-product of our analysis, we
obtain new results concerning the Vlasov dynamical stability of the waterbag
distribution.
