  A numerical method to calculate optical conductivity based on a pump-probe
setup is presented. Its validity and limits are tested and demonstrated via the
concrete numerical simulations on the half-filled one-dimensional extended
Hubbard model both in equilibrium and out of equilibrium. By employing either a
step- or a Gaussian-like probing vector potential, it is found that in
nonequilibrium, the method in the narrow-probe-pulse limit can be identified
with variant types of linear response theory, which, in equilibrium, produce
identical results. The observation reveals the underlying probe-pulse
dependence of the optical conductivity calculations in nonequilibrium, which
may have its applications in the theoretical analysis of ultrafast spectroscopy
measurements.
