  With the path integral approach, the thermal average in a
multi-electronic-state quantum systems can be approximated by the ring polymer
representation on an extended configuration space, where the additional degrees
of freedom are associated with the surface index of each bead. The primary goal
of this work is to propose a more efficient sampling algorithm for the
calculation of such thermal averages. We reformulate the extended ring polymer
approximation according to the configurations of the surface indexes, and by
introducing a proper reference measure, the reformulation is recast as a ratio
of two expectations of function expansions. By quantitatively estimating the
sub-estimators, and minimizing the total variance of the sampled average, we
propose a multi-level Monte Carlo path integral molecular dynamics method
(MLMC-PIMD) to achieve an optimal balance of computational cost and accuracy.
