To compute and analyze vibrationally resolved electronic spectra at zero temperature, we have recently implemented the on-the-fly *ab initio* extended thawed Gaussian approximation [A. Patoz *et al.*, J. Phys. Chem. Lett. **9**, 2367 (2018)], which accounts for anharmonicity, mode–mode coupling, and Herzberg–Teller effects. Here, we generalize this method in order to evaluate spectra at non-zero temperature. In line with thermo-field dynamics, we transform the von Neumann evolution of the coherence component of the density matrix to the Schrödinger evolution of a wavefunction in an augmented space with twice as many degrees of freedom. Due to the efficiency of the extended thawed Gaussian approximation, this increase in the number of coordinates results in nearly no additional computational cost. More specifically, compared to the original, zero-temperature approach, the finite-temperature method requires no additional *ab initio* electronic structure calculations. At the same time, the new approach allows for a clear distinction among finite-temperature, anharmonicity, and Herzberg–Teller effects on spectra. We show, on a model Morse system, the advantages of the finite-temperature thawed Gaussian approximation over the commonly used global harmonic methods and apply it to evaluate the symmetry-forbidden absorption spectrum of benzene, where all of the aforementioned effects contribute.

## I. INTRODUCTION

Vibrationally resolved electronic spectra have, for a very long time, been used to learn more about electronic and vibrational states of molecules, their potential energy surfaces, and light-induced dynamics of nuclei.^{1–4} The computational methods for simulating such spectra are, therefore, an essential tool in physical chemistry.

The most widespread is the global harmonic method,^{5–7} which employs the harmonic approximation for both ground- and excited-state potential energy surfaces. Within the framework of the global harmonic approximation, one can easily account for non-Condon and finite-temperature effects.^{8–12} This approximation, however, neglects the effects of anharmonicity, which can significantly alter molecular spectra. Other quantum^{13–16} and semiclassical^{4,15,17–20} methods do include anharmonicity effects on spectra, but at a substantial computational cost. Recently, we have been investigating the thawed Gaussian approximation (TGA),^{21–24} an efficient semiclassical method that accounts partially for anharmonicity and requires no initial knowledge of the potential energy surface. The method has been extended to include non-Condon effects, namely, to account for the Herzberg–Teller contribution to the transition dipole moment.^{25–27} Unfortunately, as a wavepacket propagation method, it has been limited to computing spectra in the zero-temperature limit, where only the ground vibrational state is populated initially.

To account for non-zero temperature, one typically employs the density matrix formalism, where a number of numerically exact^{28–30} and approximate^{31–37} approaches exist. Otherwise, typical wavefunction-based methods can be used in combination with statistical sampling of initial conditions.^{38–44} Thermo-field dynamics^{45,46} offers an alternative way to make wavefunction-based methods applicable at finite temperature: the problem, which seemingly requires the von Neumann equation for the density matrix, is mapped to a time-dependent Schrödinger equation with twice as many degrees of freedom. Recently, the thermo-field dynamics was employed in chemistry for solving the coupled electronic-vibrational dynamics,^{47–50} electronic structure,^{51} and vibronic spectroscopy^{11} problems. The application to vibronic spectroscopy, which is of central interest to this work, was, however, restricted to the global harmonic approximation.

Here, we combine the extended thawed Gaussian wavepacket propagation with the thermo-field dynamics in order to include both anharmonicity and finite-temperature effects. Due to the favorable scaling of the thawed Gaussian approximation with the system’s size, the new method adds nearly no additional cost to the original, zero-temperature approach. To illustrate the accuracy achieved by going beyond both global harmonic and zero-temperature approximations, we test the method on a set of Morse potentials with different degrees of anharmonicity and at different temperatures. Finally, we apply it to evaluate the spectrum corresponding to the symmetry-forbidden electronic transition S_{1} ← S_{0} ($A\u03031B2u\u2190X\u03031A1g$) of benzene and demonstrate that the simultaneous inclusion of Herzberg–Teller, anharmonicity, and finite-temperature effects is needed to reproduce the experimental spectrum.

## II. THEORY

### A. Extended thawed Gaussian approximation for zero-temperature spectra

Before turning to vibrationally resolved electronic spectra at finite temperature, let us briefly describe the original, zero-temperature approach based on the extended thawed Gaussian approximation.

The absorption spectrum at zero temperature can be computed as the Fourier transform,^{33,52,53}

of the correlation function,

where |1, g⟩ is the ground (“g”) vibrational state of the ground (“1”) electronic state, *ℏω*_{1,g} is its energy, *Ĥ*_{2} is the nuclear Hamiltonian corresponding to the excited (subscript “2”) electronic state, and $\mu ^$ is the transition dipole moment $\mu ^21=\mu \u2192^21\u22c5\u03f5\u2192$ projected on the polarization $\u03f5\u2192$ of the external electric field. In other words, to compute the spectrum, one has to evolve the nuclear wavefunction $|\varphi 0\u2009=\mu ^|1,g\u2009$ on the excited-state surface, which is, in general, a challenging task that scales exponentially with the number of atoms.

Different exact quantum^{42,54–57} and semiclassical^{19,58–74} methods were developed for solving the problem of wavepacket propagation. Sometimes, the region of the excited-state potential energy surface explored by the evolved wavepacket is fairly harmonic, meaning that it can be well approximated by a second-order Taylor expansion in nuclear coordinates about a reference geometry; we call this the *global harmonic approximation*. Then, the correlation function (2) can be obtained analytically.^{8–10,75,76} Moreover, in this case, the excited-state surface is easily constructed from a single Hessian calculation. The prevalence of the global harmonic method in the vibronic spectroscopy literature^{7,8,10,75–79} testifies, on the one hand, to its applicability in a wide range of molecules and, on the other hand, to the absence of accessible alternatives that can account for anharmonicity effects. Often, due to the reduced resolution of electronic spectra, even such a crude approximation, which would nowadays be almost unacceptable for the simulation of vibrational (infrared) spectra, is considered appropriate.

To account for the anharmonicity effects on the spectrum at least approximately, we recommend using the simple and efficient semiclassical *thawed Gaussian approximation*.^{21} In contrast to many other exact or approximate quantum dynamics methods, this method is computationally feasible even for rather large molecules and can be employed in a “black-box” fashion, i.e., it requires little human input. In particular, the thawed Gaussian approximation requires only local potential energy information along the classical trajectory (as described below) and, therefore, supports an on-the-fly implementation where the potential energy is provided by an *ab initio* electronic structure calculation.

Within the thawed Gaussian approximation,^{21} the wavepacket is assumed to be a complex Gaussian function,

parameterized by the time-dependent *D*-dimensional real vectors *q*_{t} and *p*_{t}, *D* × *D* complex symmetric matrix *A*_{t}, and complex number *γ*_{t}; *D* is the number of degrees of freedom. The time dependence of the matrix *A*_{t} implies that the width of the thawed Gaussian wavepacket changes with time, as opposed to the *frozen* Gaussian ansatz where the width remains constant. Wavepacket (3) solves exactly the Schrödinger equation,

where $T(p)=12pT\u22c5m\u22121\u22c5p$ is the kinetic energy and

is the *local harmonic approximation* of the true potential energy *V*(*q*) about *q*_{t}, if the time-dependent parameters of *ψ*_{t} satisfy the following equations of motion:^{21}

In these equations, *V*′(*q*_{t}) and *V*″(*q*_{t}) denote, respectively, the gradient and Hessian of the potential energy evaluated at *q*_{t}, *m* is the symmetric mass matrix, and *L*_{t} = *T*(*p*_{t}) − *V*(*q*_{t}) is the Lagrangian. Note that due to the local harmonic approximation, Eq. (4) is a *nonlinear* Schrödinger equation because the potential *V*_{LHA}(*q*) depends on the wavefunction through the parameter *q*_{t} [Eq. (5)], i.e., *V*_{LHA}(*q*) ≡ *V*_{LHA}(*q*; *q*_{t}) ≡ *V*_{LHA}(*q*; *ψ*_{t}).

To construct the initial wavepacket, the ground-state potential energy surface *V*_{1}(*q*) is assumed to be harmonic in the vicinity of its minimum *q*_{eq}, i.e., the ground-state Hamiltonian is approximated as

where $K=V1\u2032\u2032(qeq)$ is the symmetric force-constant matrix and *∂*_{q} = *∂*/*∂q*. In position representation, the lowest eigenstate *ψ*_{0}(*q*) of the Hamiltonian (10) is a Gaussian (3) with parameters

where $\Omega =m\u22121/2\u22c5K\u22c5m\u22121/2$. This initial wavefunction *ψ*_{0}(*q*) is then evolved by solving differential equations (6)–(9) with *V* = *V*_{2} (the excited-state potential energy).

The thawed Gaussian wavepacket (3) is not suited to treat non-Condon effects, i.e., the effects due to the dependence of the transition dipole moment *μ*(*q*) on nuclear coordinates *q*. Within the Herzberg–Teller approximation—the simplest extension of the Condon approximation—the transition dipole moment is assumed to be a linear function,^{80}

where *μ*′(*q*_{eq}) is the gradient of *μ* with respect to nuclear coordinates at the equilibrium geometry. Then, *ϕ*_{0}(*q*) = *μ*(*q*)*ψ*_{0}(*q*) is no longer a Gaussian wavepacket. Fortunately, the *extended* thawed Gaussian ansatz,^{25,81}

which is a special case of Hagedorn’s “Gaussian times a polynomial” wavepacket,^{82–84} solves the same Schrödinger equation [Eq. (4)] as *ψ*_{t}(*q*), provided that the Gaussian parameters evolve, as before, according to Eqs. (6)–(9) and, in addition,

Hence, with the extended thawed Gaussian approximation, one can include the Herzberg–Teller contribution at nearly no additional computational cost.

### B. Vibrationally resolved electronic spectra at finite temperature

At non-zero temperature, the dipole–dipole correlation function needed in vibronic spectroscopy is

where $\rho ^=e\u2212\beta \u01241/Tr(e\u2212\beta \u01241)$ is the vibrational density operator and *β* = 1/*k*_{B}*T*. Note that in Eq. (19), we assumed that only the ground electronic state is populated in the thermal equilibrium, which is usually justified by the large energy gap between the ground and first excited electronic states. Because the time evolution in Eq. (19) involves two different Hamiltonians, an obvious classical analog of Eq. (19) is missing, which, in turn, hinders the development of classical-like or semiclassical approximations for *C*(*t*). Here, we demonstrate that by transforming the problem to the one of wavepacket dynamics in an augmented space, one can easily make use of the existing semiclassical methods for solving the time-dependent Schrödinger equation.

The correlation function can be re-written as

where

$q\xaf=(q,q\u2032)T$is a 2*D*-dimensional coordinate vector, and

is a Hamiltonian in $q\xaf$ coordinates. In Eq. (20), we used the relation $[\rho ^,\u01241]=0$ and the cyclic property of the trace; in Eq. (21), we introduced the position representation in *q* and *q*′ coordinates; in going from (25) to (26), we used the fact that the two Hamiltonians *H*_{1}(*q*′) and *H*_{2}(*q*) commute because they act on different coordinates; finally, Eq. (22) follows from (21) because

and $(\rho ^1/2)\u2020=\rho ^1/2$.

Equation (22) has a remarkable interpretation—the dipole–dipole correlation function *C*(*t*) for a *D*-dimensional system at finite temperature *T* can be thought of as a wavepacket autocorrelation function of $\varphi \xaft(q\xaf)$ evolved with the Hamiltonian $H\xaf(q\xaf)$ according to the Schrödinger equation,

which describes an effective 2*D*-dimensional system at zero temperature.

The approach described here is, despite the explicit use of the position representation, equivalent to the thermo-field dynamics, as presented in Ref. 11. Indeed, the final result does not depend on the representation,

where $|q\xaf\u2009=|q\u2009|q\u0303\u2032\u2009$ is a general position state in the augmented direct-product Hilbert space and $|q\u0303\u2009$ denotes a position state in the “fictitious” (or “tilde”) Hilbert space. In Appendix A, we derive Eq. (31) using the standard thermo-field dynamics notation and without invoking the position representation.

In principle, any known method for solving the time-dependent Schrödinger equation can be applied to obtain $\varphi \xaft$. However, the doubled number of coordinates adds a substantial, if not prohibitive, computational cost to the already large cost of zero-temperature calculations with exponentially scaling exact quantum methods. In the following, we therefore employ the extended thawed Gaussian approximation, which scales favorably with the number of degrees of freedom.

### C. Extended thawed Gaussian approximation for finite-temperature spectra

To solve Eq. (30) with the (extended) thawed Gaussian approximation, we must first identify $\varphi \xaf0$ and the local harmonic approximation to the potential energy $V\xaf(q\xaf)=V2(q)\u2212V1(q\u2032)$.

If we assume, as in Sec. II A, that the ground-state surface *V*_{1} is harmonic [Eq. (10)], a general off-diagonal matrix element $\rho 1/2(q,q\u2032)\u2261\rho 1/2(q\xaf)$ of $\rho ^1/2$ is a Gaussian (3) parameterized with 2*D*-dimensional vectors,

a 2*D* × 2*D* matrix,

composed of *D* × *D* submatrices

and a scalar

See Appendix B for the derivation of Eqs. (32)–(35). The harmonic approximation for the ground-state potential energy surface is justified in the vicinity of its minimum and, therefore, for the construction of the equilibrium vibrational density matrix. In fact, even in fairly anharmonic systems, the Gaussian density matrix often serves as a good starting point for semiclassical approximations.^{85–88} Next, we assume $\mu ^$ to be diagonal in position representation,

and employ the Herzberg–Teller approximation [Eq. (15)] to obtain

With these initial values, we propagate the time-dependent parameters $q\xaft$, $p\xaft$, *Ā*_{t}, and $\gamma \xaft$ according to Eqs. (6)–(9) and $b\xaft$ according to Eq. (18). The potential energy, its gradient, and its Hessian are given by

while the *D* × *D* mass matrix *m* is replaced by the 2*D* × 2*D* matrix,

where *q*_{t} and $qt\u2032$ are *D*-dimensional vectors composed of the first and second halves of coordinates of $q\xaft$, i.e., $q\xaft=(qt,qt\u2032)T$. Interestingly, the classical equations of motion [Eqs. (6) and (7)] for the parameters $q\xaft$ and $p\xaft$ are solved by propagating two independent trajectories in *D* spatial dimensions: the first trajectory evolves *q*_{t} and *p*_{t} with the excited-state Hamiltonian *H*_{2}, while the second trajectory evolves $qt\u2032$ and $pt\u2032$ with the negative of the ground-state Hamiltonian, −*H*_{1}, due to the negative signs of mass in Eq. (42) and gradient in Eq. (40). Because the second trajectory is at a fixed point, i.e., at the minimum of the ground-state potential energy *V*_{1} with zero momentum, it shows no dynamics. As a result, one requires only a single excited-state classical trajectory, to evolve the first *D* coordinates of $q\xaft$, and Hessians of the excited-state potential energy surface along this trajectory, which is the same as in the original zero-temperature approach; no further potential energy evaluations are needed to account for the temperature effects.

Finally, let us note that an alternative approach to finite-temperature spectra with Gaussian wavepackets has been proposed in Ref. 12. There, the authors proposed a similar scheme to directly evolve the coherence $\rho ^\mu (t)=exp(\u2212i\u01242t/\u210f)\mu ^\rho ^exp(i\u01241t/\u210f)$ in position representation with the doubled number of degrees of freedom. Then, the correlation function is evaluated simply as $C(t)=Tr[\mu ^\u2020\rho ^\mu (t)]$. Their method, combined with the local harmonic approximation, is equivalent to ours and gives the same correlation function. In contrast to our approach, the method of Ref. 12 has so far been used to compute vibronic spectra only in systems described with globally harmonic potential energy surfaces, where it is equivalent to the global harmonic approximation for vibronic spectra, which is much simpler because analytical expressions for *C*(*t*) exist.^{10,75} Our approach based on thermo-field dynamics has the advantage of reducing the transition dipole autocorrelation function to the simpler and well-known expression (31) for the wavepacket autocorrelation, thus making it very easy to implement the finite-temperature treatment of vibronic spectra into the standard zero-temperature wavefunction-based codes, which typically contain procedures for computing the wavepacket autocorrelation.

## III. COMPUTATIONAL DETAILS

### A. Morse potential

To test the accuracy of the proposed method, we construct a one-dimensional model system consisting of a ground-state harmonic potential and an excited-state Morse potential. The ground-state surface is assumed harmonic to exclude the error (or error cancellation) due to using an approximate initial vibrational state—this is rarely an issue with zero-temperature methods because the harmonic approximation typically holds in the vicinity of the potential minimum but could affect the results at higher temperatures. In the current model, the error of the results obtained with the thawed Gaussian approximation is only due to the anharmonicity of the excited-state potential energy surface.

A set of Morse potentials,

was constructed by fixing the equilibrium position *q*_{2}, minimum energy *V*_{2}(*q*_{2}), and frequency $\omega 2=V2\u2032\u2032(q2)/m$ at *q*_{2} and by varying the anharmonicity parameter *χ*. We set the minimum of the ground-state harmonic potential to zero (*q*_{1} = 0) and its frequency to *ω*_{1} = 1, while the excited-state Morse parameters were *q*_{2} = 1.5, *ω*_{2} = 0.9, and *V*(*q*_{2}) = 10. Mass was set to *m* = 1. The level of anharmonicity was tuned by changing the parameter *χ* in the range between 0.01 and 0.02 in steps of 0.001.

The exact spectrum was computed by evaluating Franck–Condon factors by numerical integration, which is feasible for this one-dimensional model system since both harmonic and Morse vibrational eigenfunctions are known analytically. The adiabatic harmonic model,

which is constructed about the minimum of the potential energy surface, is the same for all constructed Morse potentials because it does not depend on *χ*. Since the (extended) thawed Gaussian approximation is exact for harmonic potentials, it was used to compute the adiabatic harmonic spectra. For both harmonic and thawed Gaussian dynamics calculations, the time step was 0.1 and the total simulation time was 1000, i.e., 10 000 steps in total were taken. Gaussian broadening with the half-width at half-maximum of 0.1 was applied to all spectra. Spectra were evaluated at scaled temperatures *T*_{ω} = 0, 0.5, and 1, where *T*_{ω} = *k*_{B}*T*/*ℏω*_{1} = 1/*βℏω*_{1} (e.g., for an average molecular vibration of *ω* = 1000 cm^{−1}, *T*_{ω} = 1 corresponds to the temperature *T* ≈ 1439 K). A constant transition dipole moment *μ* = 1 was used.

To compare reference (*σ*_{ref}) and approximate (*σ*) spectra, we used the spectral contrast angle *θ*, defined through its cosine as

where *σ*_{1} · *σ*_{2} = ∫*dωσ*_{1}(*ω*)*σ*_{2}(*ω*) is the inner product of two spectra and $\u2225\sigma \u2225=\sigma \u22c5\sigma $ is the associated norm. In all calculations, the reference was the exact spectrum, while the approximate spectra were computed with the adiabatic global harmonic and thawed Gaussian approximations.

### B. On-the-fly *ab initio* calculations

The S_{1} ← S_{0} absorption spectrum of benzene was computed with adiabatic harmonic, vertical harmonic, and thawed Gaussian approximations. In short, the adiabatic harmonic model is, as described above, obtained by the second-order Taylor expansion of the excited-state potential energy surface about its minimum, while for the vertical harmonic model, the same expansion is performed about the ground-state minimum.

Density functional theory was used for the optimization and Hessian calculation of the ground electronic state, while its time-dependent version was employed for the excited-state optimization, energy, gradient, and Hessian calculations. We used the B3LYP functional with the ultrafine grid and 6-31+G(d,p) basis set, as implemented in the Gaussian09^{89} package. For the thawed Gaussian propagation, we used a second-order symplectic integrator with a time step of 8 a.u. (≈0.2 fs) and 10 000 steps in total. The Hessian of the potential energy was evaluated every four steps and interpolated in between, as done previously in Ref. 25. The ground-state surface was assumed to be harmonic. The gradient of the electronic transition dipole moment was computed numerically by the second-order finite difference method with a step of 10^{−4} Å.^{25}

The computed correlation functions were multiplied by an exponential damping function *e*^{−t/τ} with *τ* = 18 000 a.u., resulting in a Lorentzian line shape with the half-width at half-maximum of ≈12.2 cm^{−1}. To facilitate comparison with the experimental spectrum, computed spectra were shifted and scaled to match the experimental spectrum of Ref. 90 at its highest peak (data taken from the MPI-Mainz UV/VIS Spectral Atlas^{91,92}).

Finally, let us emphasize that the finite-temperature treatment of spectra requires no additional electronic structure evaluations, i.e., the same *ab initio* data could be reused to compute the benzene spectrum at any given temperature. We evaluated the spectra at zero temperature and at the temperature of the experiment (*T* = 298 K).

## IV. RESULTS AND DISCUSSION

### A. Morse potential

Thawed Gaussian and global harmonic spectra were compared with the exact result (see Fig. 1). Already for the system with weak anharmonicity (left panels, *χ* = 0.01), the thawed Gaussian approximation provides a more accurate spectrum than the harmonic method. The difference is seen mainly in the intensities of the high-frequency peaks. Since the adiabatic harmonic model describes well the region around the potential minimum, it can recover the positions and intensities of peaks corresponding to transitions between vibrational states with small quantum numbers. In contrast, the harmonic approximation breaks down for vibrational states with more quanta, resulting in incorrect intensities of high-frequency transitions. The effect of anharmonicity on the peak positions becomes significant for *χ* = 0.02, and even the thawed Gaussian approximation is inadequate. Nevertheless, it is still more accurate than the adiabatic harmonic model, which has no dependence on *χ* (harmonic spectra are, clearly, the same for different *χ* at a given temperature). In typical molecular systems, the peaks are often left unresolved due to the short excited-state lifetime or inhomogeneous broadening. Then, the intensities play an important role in recovering the overall shape of the spectrum, whereas even an error of tens of reciprocal centimeters in peak positions can be tolerated.

In contrast to the global harmonic method, the thawed Gaussian approximation can result in non-physical negative spectral features, which are due to the nonlinear character of the Schrödinger equation (4). This is a well-known disadvantage of the method and was discussed in more detail elsewhere.^{23,24} In the studied Morse system, a negative peak overlaps with the hot band around *ω* = 9, resulting in a poor description of this spectral region at higher temperatures. In a way, the gain in accuracy in the high-frequency part of the spectrum is accompanied by a loss in accuracy in the frequency region below the 0–0 transition.

To compare the global harmonic and thawed Gaussian methods quantitatively, we measure the error of an approximate spectrum with the spectral contrast angle between the approximate and exact spectra (see Fig. 2). The thawed Gaussian approximation gives more accurate spectra than the harmonic approximation for all anharmonicities and at all temperatures studied. However, an interesting trend is observed: the harmonic approximation becomes more accurate as the temperature increases, whereas the thawed Gaussian approximation keeps the same degree of accuracy at all temperatures. The main reason for such behavior is closely related to the discussion above. As the temperature increases, the intensity of hot bands below the 0–0 transition grows, and they become more relevant in measuring the error. Hence, the adiabatic harmonic method gains on accuracy, unlike the thawed Gaussian approximation, which always loses on accuracy in the low-frequency part of the spectrum. However, such behavior of the global harmonic method is not general; if the ground-state potential energy surface were anharmonic, high-temperature spectra would also reflect the effects neglected in the global harmonic models—those of ground-state anharmonicity on the initial density matrix.

### B. Absorption spectrum of benzene

The symmetry-forbidden S_{1} ← S_{0} transition in benzene is a well-known example of the Herzberg–Teller effect,^{1,2} where the spectrum arises only due to the coordinate dependence of the transition dipole moment, which is zero by symmetry at the equilibrium geometry. As such, it has been studied extensively both from the experimental^{90,93–97} and theoretical^{34,98–104} points of view. The spectrum is a challenge for computational methods because it is highly resolved, exhibits Herzberg–Teller effects, and contains hot bands due to finite temperature. Although benzene is typically considered to be a rigid molecule, we have recently shown that the anharmonicity affects significantly the intensities of the peaks in the main progression of the spectrum.^{25,26} However, our previous work assumed zero temperature, therefore neglecting the weak hot bands present in the experimental spectrum.

Here, we complement our earlier result with the new finite-temperature extended thawed Gaussian method. First, we demonstrate [Fig. 3(a)] the effect of non-zero temperature on the spectrum. Whereas the original, zero-temperature extended thawed Gaussian approximation neglects completely the weak, but non-negligible, hot bands, the finite-temperature approach reproduces all features of the spectrum. The inaccuracy in the frequencies of the peaks is most likely due to the electronic structure method used; we will discuss this later. Nevertheless, Fig. 3(a) clearly shows the difference in the spectra computed without and with finite-temperature effects.

We argue that the benzene absorption spectrum is affected by the anharmonicity of the excited-state potential energy surface. This effect is best demonstrated by the difference in spectra based on two global harmonic models: if the potential energy surface were harmonic, the second-order expansion of the potential energy about any molecular geometry would result in the same spectrum. As shown in Fig. 3(b), in benzene, the adiabatic harmonic method is much more accurate than the vertical; in general, either of the two methods can be more appropriate.^{22,23,105} The extended thawed Gaussian approximation outperforms not only the vertical harmonic approach, whose spectrum is completely off, but also the adiabatic harmonic approximation, which fails to produce accurate peak intensities.

Figure 3(c) shows the importance of treating the Herzberg–Teller effect with the extended thawed Gaussian approximation. Since the transition is symmetry-forbidden, i.e., *μ*(*q*_{eq}) = 0, the spectrum computed within the Condon approximation [*μ*(*q*) ≈ *μ*(*q*_{eq})] vanishes, whereas the full, Herzberg–Teller treatment reproduces the experimental spectrum.

In computational chemistry, vibrational scaling factors,^{106} which we denote by *f*, are often used to empirically correct for systematic errors in the vibrational frequencies computed with electronic structure methods. In vibronic spectroscopy, such scaling, applied to ground- and excited-state frequencies, can modify both peak positions and intensities.^{10} However, the effect on intensities is often weak; indeed, the adiabatic harmonic spectrum with scaled vibrational frequencies (red, dashed line in Fig. 4) exhibits almost perfect peak positions, but still the same errors in intensities as the adiabatic harmonic spectrum of Fig. 3(b). For comparison—and for comparison only—we show an analogous, “corrected” spectrum computed with the extended thawed Gaussian approximation (blue, solid line in Fig. 4). Since the simple procedure of scaling the vibrational frequencies is not applicable in this case, we scale directly the frequency axis by *f*, which corrects peak positions but leaves intensities unchanged. The results imply that the subtle anharmonicity effects on spectral intensities, described well with the on-the-fly semiclassical thawed Gaussian method, cannot be captured even with the corrected harmonic potential.

## V. CONCLUSION

In conclusion, we have presented a new approach to compute vibronic spectra at finite temperature within the framework of the thawed Gaussian approximation. The proposed method describes partially the effect of anharmonicity on the spectrum and at the same time includes all effects treated in the conventional global harmonic approach—mode–mode coupling, non-zero temperature, and Herzberg–Teller contribution to the transition dipole moment. Most importantly, the inclusion of finite temperature comes at no additional computational cost or deterioration in accuracy. Hence, the proposed procedure provides a viable route to systematically improve on global harmonic simulations at any temperature. Finally, this on-the-fly *ab initio* semiclassical approach to thermo-field dynamics could inspire other quantum or semiclassical “direct dynamics” methods for computing spectra at finite temperatures.

## DATA AVAILABILITY

The data that support the findings of this study are available from the corresponding author upon reasonable request.

## ACKNOWLEDGMENTS

The authors would like to thank Maxim Gelin for introducing them to thermo-field dynamics and Lipeng Chen for helpful discussions. The financial support from the European Research Council (ERC) under the European Union’s Horizon 2020 Research and Innovation Programme (Grant Agreement No. 683069—MOLEQULE) is gratefully acknowledged.

### APPENDIX A: RELATION TO THERMO-FIELD DYNAMICS

Following Suzuki,^{45} let us define

where $|kk\u0303\u2009$ denotes a basis vector of a space obtained as a direct product of “physical” (with basis {|*k*⟩}) and “fictitious” (with basis${|k\u0303\u2009}$) Hilbert spaces. In general, we use tilde ^{̃} to denote an element of (or an operator acting on) the “fictitious” Hilbert space and bar ^{¯} (as opposed to bold font used in Ref. 47) for the direct-product space. The physical and fictitious states are related through the conjugation rule^{45}

which results in

for arbitrary complex numbers *u*_{1} and *u*_{2}, states |*α*⟩ and |*α*′⟩, and operator *Â*. Next, the so-called thermal vacuum is defined as

where $\rho ^$ is the density operator and acts only on the physical Hilbert space. Then, the correlation function, defined in Eq. (19), can be written as

where $|\varphi \xaf0\u2009=\mu ^|0\xaf(\beta )\u2009$ and

The proof goes as follows:

i.e., the position representation of state $|\varphi \xaf0\u2009$ introduced in this appendix is the function defined in Eq. (23) of the main text. Indeed,

where we again used Eq. (A3) with *Â* being the identity operator.

### APPENDIX B: DERIVATION OF THE INITIAL-STATE PARAMETERS

Here, we derive expressions (32)–(35) for the Gaussian parameters of *ρ*^{1/2}(*q*, *q*′). First, recall that the matrix element *ρ*(*q*, *q*′) of the thermal density operator in a one-dimensional harmonic oscillator

with mass *m* and frequency *ω* is^{107}

Using Eq. (B2), we now derive the expression for the matrix element *ρ*(*q*, *q*′) in a *D*-dimensional coupled harmonic oscillator,

where *m* and *K* are *D* × *D* symmetric mass and force-constant matrices, respectively, and *q*_{eq} is the equilibrium position at which the potential energy has its minimum.

The first step consists in transforming *q* to the mass-scaled normal-mode coordinates *Q* = *O*^{T} · *m*^{1/2} · (*q* − *q*_{eq}), where *O* is the orthogonal matrix diagonalizing the mass-scaled force-constant matrix, i.e., $OT\u22c5m\u22121/2\u22c5K\u22c5m\u22121/2\u22c5O=\Omega diag2$ with a real diagonal matrix Ω_{diag}. This leads to the uncoupled Hamiltonian,

where $\u0124i=12P^i2+12\omega i2Qi^2$ and *ω*_{i} are the diagonal elements of Ω_{diag}. The density matrix element of this uncoupled *D*-dimensional harmonic oscillator is

where

are 2*D* × 2*D* matrices composed of *D* × *D* diagonal sub-matrices.

Transformation back to the original coordinates *q* yields

with

To find *ρ*^{1/2}(*q*, *q*′), we rewrite it as

and hence, the initial value *Ā*_{0} needed for the extended thawed Gaussian propagation is given by *Ā*_{β/2}, where *Ā*_{β} is defined by Eqs. (B16), (B18), and (B19), which proves Eqs. (32)–(34). To find the initial value $\gamma \xaf0$, we can avoid computing the traces in Eq. (B20) explicitly and instead recognize that *ρ*^{1/2}(*q*, *q*′) must be normalized as

Therefore, $\gamma \xaf0$ can be computed from *Ā*_{0} in analogy to Eq. (14) for the wavepacket (3), i.e.,

where we used that the initial width matrix *Ā*_{0} is *Ā*_{β/2} and that

(in particular, the determinant is independent of *ℏ* and temperature) because

In this derivation, we used the relation^{108}

valid for arbitrary invertible matrices A and B, the relation