  Today's most popular techniques for accurately calculating the dynamics of
the reduced density operator in an open quantum system, either require, or gain
great computational benefits, from representing the bath response function a(t)
in the form a(t)={\Sigma}_k^K p_k e^{O_k t} . For some of these techniques, the
number of terms in the series K plays the lead role in the computational cost
of the calculation, and is therefore often a limiting factor in simulating open
quantum system dynamics. We present an open source MATLAB program called
BATHFIT 1, whose input is any spectral distribution functions J(w) or bath
response function, and whose output attempts to be the set of parameters
{p_k,w_k}_k=1^K such that for a given value of K, the series {\Sigma}_k^k p_k
e^{O_k t} is as close as possible to a(t). This should allow the user to
represent a(t) as accurately as possible with as few parameters as possible.
The program executes non-linear least squares fitting, and for a very wide
variety of spectral distribution functions, competent starting parameters are
used for these fits. For most forms of J(w), these starting parameters, and the
exact a(t) corresponding to the given J(w), are calculated using the recent
Pade decomposition technique - therefore this program can also be used to
merely implement the Pade decomposition for these spectral distribution
functions; and it can also be used just to efficiently and accurately calculate
a(t) for any given J(w) . The program also gives the J(w) corresponding to a
given a(t), which may allow one to assess the quality (in the w-domain) of a
representation of a(t) being used. Finally, the program can calculate the
discretized influence functional coefficients for any J(w), and this is
computed very efficiently for most forms of J(w) by implementing the recent
technique published in [Quantum Physics Letters (2012) 1 (1) pg. 35].
