  Density shift plays one of the major roles in the uncertainty of optical
lattice clock, thus has attracted lots of theoretical and experimental studies.
However, most of the theoretical research considered the single-band and
collective approximation, so the density shift of the system at higher
temperatures can not be analyzed accurately. Here, we design a numerical
algorithm that combines Monte Carlo sampling and exact diagonalization and name
it as Multi-Band Sampling Exact Diagonalization (MBSED). The MBSED method
considers the collision of atoms between multi-bands, so it can provide the
density shift of an optical lattice clock with higher precision. Such an
algorithm will benefit the numerical simulation of an optical lattice clock,
and may also be used in other platforms of quantum metrology. In addition,
through our numerical simulation, we also found that the density shift of Rabi
spectrum is slightly non-linear with atom number.
