  A comprehensive picture of polaron and bipolaron physics is essential to
understand the optical absorption spectrum in many materials with
electron-phonon interactions. In particular, the finite-temperature properties
are of interest since they play an important role in many experiments. Here, we
combine the parallel two-site time-dependent variational principle algorithm
(p2TDVP) with local basis optimization (LBO) and purification to calculate
time-dependent current-current correlation functions. From this information, we
extract the optical conductivity for the Holstein polaron and bipolaron with
dispersive phonons at finite temperatures. For the polaron in the weak and
intermediate electron-phonon coupling regimes, we analyze the influence of
phonon dispersion relations on the spectra. For strong electron-phonon
coupling, the known result of an asymmetric Gaussian is reproduced for a flat
phonon band. For a finite phonon bandwidth, the center of the Gaussian is
either shifted to larger or smaller frequencies, depending on the sign of the
phonon hopping. We illustrate that this can be well understood by considering
the Born-Oppenheimer surfaces. A similar behavior is seen for the bipolaron for
strong coupling. For the bipolaron with weak and intermediate coupling
strengths and a flat phonon band, we obtain two very different spectra. The
latter also has a temperature-dependent resonance at a frequency below the
phonon frequency.
