The exact factorization (EF) approach to coupled electron-ion dynamics recasts the time-dependent molecular Schrödinger equation as two coupled equations, one for the nuclear wavefunction and one for the conditional electronic wavefunction. The potentials appearing in these equations have provided insight into non-adiabatic processes, and new practical non-adiabatic dynamics methods have been formulated starting from these equations. Here, we provide a first demonstration of a self-consistent solution of the exact equations, with a preliminary analysis of their stability and convergence properties. The equations have an unprecedented mathematical form, involving a Hamiltonian outside the class of Hermitian Hamiltonians usually encountered in time-propagation, and so the usual numerical methods for time-dependent Schrödinger fail when applied in a straightforward way to the EF equations. We find an approach that enables stable propagation long enough to witness non-adiabatic behavior in a model system before non-trivial instabilities take over. Implications for the development and analysis of EF-based methods are discussed.

## I. INTRODUCTION

The exact factorization (EF) of the time-dependent molecular Schrödinger equation^{1,2} is an exact reformulation of the quantum dynamics of interacting electronic and nuclear systems. The molecular wavefunction is expressed as a single product of a nuclear wavefunction and an electronic wavefunction that is conditionally dependent on the nuclear coordinate, with two coupled equations describing their motion. Many interesting exact properties of the formalism have been uncovered in recent studies, e.g., Refs. 1–22, shedding light on the nature of interactions between dynamical quantum subsystems as well as on interactions between quantum and classical subsystems beyond adiabatic treatments. From a practical viewpoint, the EF equations provide a rigorous starting point for methods for non-adiabatic dynamics and already we have seen the development of mixed quantum-classical approaches,^{23–26} with successful applications in photochemical dynamics,^{27} as well as density functionalizations.^{17,18}

Regarding the exact EF equations, prior studies of the exact features were based on first solving the original full molecular Schrödinger equation and then extracting the exact coupling terms from inverting the exact EF equations. That is, a direct numerical solution of the coupled exact EF equations was avoided. Indeed, the stability and convergence properties of these equations remained unexplored, properties which are of interest when developing further EF-based approximations. In this paper, we discuss unique challenges that a self-consistent numerical solution of the exact coupled EF equations pose, given a numerical solution for a model problem, and present a preliminary analysis of their stability. We show that the usual numerical methods developed for the time-dependent Schrödinger equation fail when applied to the EF equations and investigate these failures with a preliminary formal analysis. We show how we were able to obtain a stable numerical propagation for long enough to witness non-adiabatic behavior in the model system before non-trivial instabilities kill the calculation.

This paper is structured as follows: Sec. II briefly reviews the EF formalism. Section III then discusses aspects that a numerical solution needs to consider, before discussing such a solution for a model problem in Sec. IV. A preliminary analysis of the well-posedness of the EF equations is given in Sec. V, before we conclude in Sec. VI.

## II. THE EXACT FACTORIZATION EQUATIONS

In the EF approach,^{1,2,28–30} the exact molecular wavefunction is written as a single product of a marginal wavefunction *χ* and a conditional wavefunction Φ_{R}, as

subject to the partial normalization condition (PNC)

Here, *R* represents the set of all nuclear coordinates and *r* represents the electronic coordinates. The factorization above is unique up to a phase-transformation that depends only the nuclear coordinates and time

Notice that Eq. (1) has the same form as the wavefunction in the Born-Oppenheimer approximation, but Eq. (1) is “exact,” as proven in the earlier studies, and the equations that the two parts *χ* and Φ_{R} satisfy differ from that in the Born-Oppenheimer equation. These equations may be derived by inserting Eq. (1) into the Dirac-Frenkel action and applying the variational principle,^{1,2,31,32} and, for one nuclear degree of freedom and one electronic degree of freedom, we have the form

where time-dependent potential energy surface (TDPES) *ε*(*R*, *t*), vector potential *A*(*R*, *t*), and coupling operator *Û*_{en} are given by

with ⟨…⟩_{r} indicating an inner product only over the electronic space. The potentials $V\u2009\u2009exte$ and $V\u2009\u2009extn$ represent potentials that are externally applied to the coupled system of electrons and nuclei, e.g., a laser field, and *Ĥ*_{BO} is the usual Born-Oppenheimer Hamiltonian consisting of electronic kinetic energy, electron-electron, electron-nuclear, and nuclear-nuclear Coulomb potentials. Note that atomic units are used throughout, and *M* denotes the effective mass of the nuclear coordinate. Under the phase-transformation of Eq. (3), the potentials *ε* and *A* transform in a gauge-like way

The TDPES can be separated into a gauge-independent (GI) term and a gauge-dependent (GD) term *ε*(*R*, *t*) = *ε*_{GD}(*R*, *t*) + *ε*_{GI}(*R*, *t*), where *ε*_{GD}(*R*, *t*) = ⟨*ϕ*_{R}(*t*)| − *i∂*_{t}*ϕ*_{R}(*t*)⟩ and *ε*_{GI}(*R*, *t*) are the remaining terms of Eq. (6). The three terms in Eqs. (6)–(8) capture the entire coupling of the electrons and nuclei; through them, the solution of the electronic equation depends on the nuclear wavefunction, and the solution of the nuclear wavefunction depends on the electronic wavefunction. References 1, 2, 5, 6, 9, 11, and 33, for example, have emphasized the significance of *ε* and *A* in yielding the exact nuclear dynamics. In contrast to the Born-Huang expansion, which is also exact, here, the exact nuclear dynamics is achieved with a single potential energy surface rather than an infinite number of them, and a single vector potential coupling rather than an infinite number of first and second-order couplings. Wavepacket branching and decoherence are captured and a central role is played by *Û*_{en}.

## III. *A PRIORI* NUMERICAL CONSIDERATIONS

Here, we make some observations that will inform our attempt to solve Eqs. (4)–(8) self-consistently for a model system.

### A. Reality of potentials *ε*(*R*, *t*) and *A*(*R*, *t*)

The equation for the nuclear wavefunction is of the Schrödinger-form provided the potentials *A*(*R*, *t*) and *ε*(*R*, *t*) are real. The reality of the potentials ensures that the Hamiltonian in the nuclear equation is Hermitian and consequently that the norm of the nuclear wavefunction is preserved during the time-evolution. However, the potentials *A*(*R*, *t*) and *ε*(*R*, *t*) are determined by the solution of the electronic equation, which does not have a Schrödinger form but has a Hamiltonian to which notions of hermiticity do not technically apply (see also Sec. III B). Nevertheless, norm-conservation in the electronic equation is still a meaningful concept; indeed, it is particularly important for the electronic equation, given the role of the PNC of Eq. (2) in ensuring that the factorization is unique. Propagation under the exact EF equations does conserve the partial norm,^{31,32} and in this subsection, we show how this directly ensures the scalar and vector potentials that drive the nuclear equation are real. When the equations are discretized in a numerical simulation, additional considerations need to be made.

To see why the partial norm condition of the electronic wavefunction assures us that the scalar and vector potentials in the Schrödinger equation for the nuclear wavefunction are real, we first observe that

where *λ* could represent *R* or *t*, i.e., a parameter of the electronic wavefunction. So the expectation value on the right-hand side will be purely real if the PNC is satisfied. Taking *λ* = *R*, the expectation value appearing on the right-hand side becomes the vector potential *A*(*R*, *t*) and hence the PNC condition ensures *A*(*R*, *t*) is real. Taking *λ* = *t*, the expectation value on right-hand side becomes the gauge-dependent part of the scalar potential, *ε*_{GD}(*R*, *t*); hence, the PNC condition ensures *ε*_{GD}(*R*, *t*) is real. The first two terms in the gauge-independent part $\epsilon GI(R,t)=\u27e8\varphi R|\u0124BO+V^exte+\xdb\u2009\u2009en|\varphi R\u27e9r$ are real due to the operators *Ĥ*_{BO} and $V^exte$ being Hermitian, while the last term can be shown to be $\u27e8\varphi R|\xdb\u2009\u2009en|\varphi R\u27e9r=\u27e8\u2207R\varphi R|\u2207R\varphi R\u27e9r\u2212A2/2M$ upon making use of the definition of the vector potential to cancel some terms. Thus, we have shown that the potentials *ε*(*R*, *t*) and *A*(*R*, *t*) appearing in the Schrödinger equation for the nuclear wavefunction are real, provided that the PNC is satisfied.

However, while the above arguments hold for the exact (continuous) case, there is no guarantee that they will always hold for a numerical solution because of discretization. For a given discretization, the analog of the relation Eq. (10) requires a certain additional choice of the discrete points at which to evaluate the integral. For example, consider the simplest discrete version of Eq. (10) taking *λ* = *R*: letting $\varphi iJ(n)$ represent the conditional electronic wavefunction with *i*, *J*, *n* as the index for *r*, *R*, *t*, respectively,

The term inside the parentheses in the last line corresponds to $\u27e8\varphi R(r,t)|\u2212i\u2207R\varphi R(r,t)\u27e9r=A(R,t)$. As in the continuous case, the fact that the norm is independent of *R* ensures that *A*(*R*, *t*) is real, but here only provided one takes the midpoint in *R*-space to evaluate ⟨*ϕ*_{R}(*r*, *t*)|, i.e., the average $\varphi i,J+1(n)*+\varphi i,J(n)*/2.$

One can do the same calculation with time indices

Here, the term in parentheses is $\u27e8\varphi R(r,t)|\u2212i\u2202t\varphi R(r,t)\u27e9r=\epsilon GD$. Again, as in the continuous case, PNC implies Im(*ε*_{GD}) = 0 provided ⟨*ϕ*_{R}(*r*, *t*)| is evaluated precisely at the midpoint in time.

In practice, we used higher-order discretizations in both space and time (see shortly) for which a more complex additional condition would be required to guarantee that satisfaction of the PNC implies reality of the potentials. However, we found that neglecting to require the potentials to be real (via choosing appropriate time/space points as discussed above) did not yield a large error, with the spatial-grid and time-steps we used, i.e., that any imaginary part in the potentials was small. A cruder fix that we tried was to simply to redefine the potentials, e.g., *A*(*R*, *t*) → Re*A*(*R*, *t*) and ∇_{R}*A*(*R*, *t*) → Re∇_{R}*A*(*R*, *t*), but this did not appear to make much difference in the calculations for which we were able to propagate for a significant amount of time.

### B. Hermiticity and partial norm conservation

Having discussed the subtleties in ensuring the reality of the potentials in the numerics assuming we have a propagation scheme that conserves the PNC, we now turn to what such a propagation scheme should be.

As mentioned in Sec. III A, although the equation for the nuclear wavefunction is of the Schrödinger-form, for which efficient and accurate propagation schemes have been well-studied, the equation for the electronic equation is not. The form of the coupling potential *U*_{en}[*ϕ*, *χ*] is unprecedented in the literature: it is non-linear and also has operators which act on the parametric dependence of the conditional electronic wavefunction. The operator connects conditional electronic states associated with a given nuclear configuration to those associated with neighboring nuclear coordinates. It is not possible to define a Hermitian conjugate, a feature that is only compounded by its non-linearity; the notion of operator Hermiticity is not meaningful for general non-linear operators while a notion of Hermiticity can be rescued for such operators however, in the context of expectation values, as in Ref. 34.

One of the most salient consequences of Hermiticity of the Hamiltonian in the usual Schrödinger equation is that it guarantees norm-conservation. As mentioned in Sec. III A, non-linear Hamiltonians may still preserve the norm and the Hamiltonian in the electronic equation does. This is particularly important for uniqueness of the EF approach and for ensuring that the coupling potentials appearing in the Schrödinger equation for the nuclear wavefunction are real.

A commonly used time propagator for evolving the Schrödinger equation is the Crank-Nicolson (CN) propagator,^{35} which conserves the norm when the Hamiltonian is Hermitian. Considering a general discretized wavefunction $\psi i(n)$, with *n*, *i* being the time and spatial index, respectively, CN yields for the projection of the time-evolution ⟨*ψ*(*t*)| − *i∂*_{t}*ψ*(*t*)⟩,

which is real for Hermitian Hamiltonians *H* (often evaluated at the midpoint in time for time-dependent and/or non-linear *H*).

We now consider the application of CN for the electronic equation. We start by expanding Eq. (4) and grouping terms two by two in the following way:

such that each line contains two terms that cancel each other if one takes the expectation value over the conditional wavefunction. Now, we take the inner product with ⟨*ϕ*_{R}(*r*, *t*)| to obtain the analog of Eq. (13). Then for partial norm conservation, one only has to show that Im(*ε*_{GD}) = 0, with *ε*_{GD} defined in Eq. (12). But in this case, it is more complicated than the usual case in Eq. (13) as the zero imaginary part does not come from Hermiticity of the matrix. Rather, it results from exact cancellation of terms when the equation is projected on ⟨*ϕ*_{R}(*r*, *t*)|. For example, $\u27e8\varphi R(t)|\u22121M\u2207R\chi (R,t)\chi (R,t)\u22c5\u2207R|\varphi R(t)\u27e9r$ should cancel exactly $\u27e8\varphi R(t)|i1M\u2207R\chi (R,t)\chi (R,t)\u22c5A(R,t)|\varphi R(t)\u27e9r$. This obviously cancels in the continuous case from the definition of *A*(*R*, *t*), but in the discrete case, we have to define each element carefully. For example, if one defines

to conserve the norm in a Crank-Nicolson fashion, then we have to use an alternative definition of *A* that we call *Ã*(*R*, *t*) here. We define *Ã*(*R*, *t*) by the requirement that ⟨*ϕ*_{R}|∇_{R}*ϕ*_{R}⟩ = *iÃ*⟨*ϕ*_{R}|*ϕ*_{R}⟩, where *ϕ*_{R}(*t*) is defined as in Eq. (15). This leads to the unique choice

with $N(R,t)$ being the partial norm of the time midpoint

which is not equal to one. Choosing this definition does not enforce that *Ã*(*R*, *t*) is real though it is equivalent to the definition following Eq. (11) when both Δ*t* and Δ*R* go to zero. Using the definition of Eq. (16) and renormalizing the average values of the form $\u27e8\varphi R(t)|O|\varphi R(t)\u27e9r$ that appear in Eq. (14) by $N(R,t)$ would allow Im(*ε*_{GD}) to be zero and the partial norm to be conserved during the propagation. The main problem with this approach is dependence of many quantities on the next time step with $\varphi i,J(n+1)$ which would create a highly non-linear equation to solve during the propagation.

The analysis above demonstrates the challenge of discretizing the EF equations in a way that remains faithful to the norm-conservation aspects of the exact equations. In an alternative approach, one could consider instead discretizing first and then factorizing; however, this presents it own challenges in identifying separate equations with clear definitions for the potentials; some preliminary work in this direction is presented in Appendix A.

In our numerical investigations, we use a standard fourth-order Runge-Kutta RK45 scheme (see Sec. III E), with a small enough time step and grid spacing that errors in partial norm conservation were small over the duration of our simulation. We found that enforcing a crude “norm-conservation correction” in our propagation in the form of

generally improved the stability and accuracy of the dynamics.

### C. EF expansion in the Born-Oppenheimer basis

Generally, a numerical solution of Eqs. (4)–(8) requires spatial grids for the nuclear coordinate *R* and for the electronic coordinate *r*. Since electronic wavefunctions vary on the scale of tenths of an Angstrom while extending over a few Angstroms at least (more when the system evolves to more highly excited states or partially ionizes), the size of the electronic grid can limit the efficiency of the time-propagation. In some cases, the numerics can be made more tractable by using a basis for the electronic equation; the choice of an optimal basis depends on the physics of the problem, but for cases where external perturbations are weak and the system is initially well-described by one or a few BO states, expanding the conditional electronic wavefunction in a truncated BO basis can make the numerical simulation simpler and faster.

The equation of motion for the electronic system then turns into coupled equations for basis coefficients, *C*_{j}(*R*, *t*), where

with the adiabatic BO states satisfying $\u0124BO(R,r)\varphi Rj,BO(r)=\epsilon j(R)\varphi Rj,BO(r)$, with *ε*^{j}(*R*) being the *j*th BO potential energy surface. Inserting this into the equation of motion for the conditional electronic wavefunction leads to (see Appendix B for details)

where the *i*th-projected *U*_{en} is

the non-adiabatic coupling terms are

and the remaining potential terms are

### D. Choice of gauge

While the EF equations are invariant under the gauge transform Eq. (3), the stability properties may not be. It is possible that a “best gauge” exists for the propagation of these equations, but for now, we simply choose the gauge such that

i.e., the gauge-dependent part of the time-dependent potential energy surface is set to zero.

The gauge condition Eq. (24) is not guaranteed to hold in a numerical solution, and we do not enforce it explicitly. We could attempt to impose the gauge condition in a first-order way, replacing

However, we found that this does not appreciably extend the integration time with the propagation method we used (<5 a.u. difference), even if it does ensure the system remains in the correct gauge for longer.

### E. Propagation scheme

An important choice for numerical time-evolution is the propagation algorithm. Much depends on this choice, and for general non-linear systems, it is not always clear why one might be more suitable than another. Since the equation for the nuclear wavefunction has the time-dependent Schrödinger form, the Crank-Nicolson (CN) propagator is the preferred choice given its stability and norm-conserving properties. As discussed extensively in Sec. III B, the electronic equation is not of this form and CN may not be the best choice due to the non-linearity. In our numerical investigations, we use two propagation schemes. For the majority of the presented results, we evolve the electronic system with the fourth-order Runge-Kutta (RK45) scheme, in which the *R* and *t*-dependent terms vary between the internal steps. Being a purely explicit integrator (that is, the function at the *n*th time step depends only on quantities from earlier time steps), it is known to be only conditionally stable, and so to investigate RK45’s robustness to this problem, we also test the simplest purely implicit scheme (for which the function at the *n*th step depends on later time steps so requiring a matrix inversion at each time step). Thus, we consider the backwards Euler (BE) method, as well as with the mixed explicit-implicit CN scheme.

The inconsistency in the order of accuracy in this comparison [*O*(Δ*t*^{5}) and *O*(Δ*t*^{2}) for RK45 and BE/CN, respectively] is somewhat intentional in that it allows us to investigate which is more important for a stable norm-conserving solution: accuracy or an implicit solver. For example, an implicit solver may have absolute stability over a large range of parameters but a low order method may expedite its exit from this region, whereas a more accurate method may be able to remain in its island of stability longer. A direct but preliminary analysis of the stability of the EF equations is carried out in Sec. V.

For the two implicit propagation schemes, BE and CN, a matrix solver is required: both BE and CN can be cast into the form $M\u22c5v=b$ for solution vector $v$. To avoid constructing matrices in memory, even when sparse, this equation is solved iteratively using the biconjugate gradient stabilized method (BiCGSTAB).^{36} This method assumes that $M$ is not a function of *v* and so requires linearization of the underlying equation. This is done by not updating the functions *A*(*R*, *t*) and *ε*(*R*, *t*) (which are non-linear in the electronic coefficients) between steps of the BiCGSTAB procedure, leaving only the coefficients themselves and their gradients, all linear functions, free to vary.

### F. Spatial discretization

The derivative operators, ∇_{R} and $\u2207R2$, are represented by five-point central finite-difference stencils, where the corresponding one-sided stencils are used at the boundaries. To prevent oscillations appearing at the tails of the nuclear wavefunction, *χ* and its first and second derivatives are set to zero at the boundaries.

## IV. NUMERICAL RESULTS

To investigate the propagation of the EF equations, we choose the one-dimensional Shin-Metiu system,^{5,33,37} which is a model of proton-coupled electron-transfer with one nuclear and one electronic coordinate. This model system has been instructive for studying different methods for non-adiabatic dynamics; in particular, the potentials that arise in the EF formalism have been studied and analyzed in this model, uncovering universal features such as steps in the TDPES bridging BO surfaces after a non-adiabatic event.^{5,33} In that work, the full TDSE was solved exactly, finding Ψ(*r*, *R*, *t*), and extracting the vector and scalar potentials *A*(*R*, *t*) and *ε*(*r*, *t*) via inversions. By contrast, here, we endeavor to directly solve the EF equations, with the potentials emerging on the fly during the propagation.

The Shin-Metiu model Hamiltonian corresponds to an electron and ion moving between two fixed ions at distance *L* = 19.0*a*_{0} apart

where the parameters *M* = 1836 a.u., *R*_{f} = 5.0*a*_{0}, *R*_{l} = 3.1*a*_{0}, and *R*_{r} = 4.0*a*_{0}. Figure 1 shows the lowest two BO surfaces and the corresponding non-zero non-adiabatic couplings, as defined in Eq. (22). The softened interparticle interactions in this model avoid any possible problems with Coulomb singularities.^{38}

The higher BO surfaces have a large enough energy separation from the first two such that, beginning with occupation only on the lowest two surfaces leads to only these two surfaces ever being appreciably occupied, at least for the duration of time that we consider. So we take a truncated basis of these two adiabatic levels for the electronic system. We take the same initial conditions as used in the earlier work,^{5,33} with the system starting on the upper BO electronic surface, *C*_{1}(*R*, 0) = 0, *C*_{2}(*R*, 0) = 1 ∀*R*, and with a gaussian nuclear wave function defined by $\chi \u2009(R,0)=exp[\u2212(R\u2212R0)2/2\sigma 2]$ with *R*_{0} = 4 and *σ*^{2} = 1/5.7.

Taking into account the considerations of Sec. III, we now embark upon the exact self-consistent solution of the EF equations. A grid of 2000 *R*-points is used, corresponding to Δ*R* = 0.009, with a time step of, unless otherwise stated, Δ*t* = 0.1 a.u. We will compare the results of the EF simulation with the exact solution of the full two-dimensional TDSE with the CN propagator and the same finite difference stencils as above; here, we use the same time step and *R*-grid and a grid-spacing of 0.3 a.u. for the electronic coordinate.

A straightforward implementation of the CN propagation for *χ* together with the RK45 scheme for *C*_{i}(*R*, *t*) [including the norm-conservation correction Eq. (18)], unfortunately becomes unstable and unbounded to the point of failure after a very short time, *t*_{max} = 5 a.u., short enough that negligible dynamics have occurred. When we turned all the coupling terms to zero so that the equations reduced to BO dynamics, the instability vanished, and accurate propagation was obtained for long times, giving identical nuclear and conditional electronic densities as those obtained from the full solution of the electron-nuclear TDSE with zero coupling. This verifies that the problem lies in the coupling terms, and, in particular, the term ∇*χ*/*χ* appears to be problematic.

In the following, we describe different avenues to “tame” the instabilities, with varying degrees of success. Considering the best case scenario for different propagators, the maximum times for the simulation before it exploded were as follows: 370 a.u. for BE, 480 a.u. for CN, and 1490 a.u. for RK45. Below, the results for the RK45 simulation are studied.

### A. Masking the coupling terms

The instabilities are related to oscillations that initially develop away from the region of appreciable nuclear density before propagating inwards. In these regions, since *Re*∇*χ*/*χ* = ∇|*χ*|/|*χ*| can become unreliable, and, given that when the nuclear density is very small, the conditional electronic wavefunction has limited physical significance anyway, we apply a mask function which smoothly sets the coupling terms to zero far from the physical region.

The function used to generate the mask is defined in Appendix C and consists of a smooth step on either side of the physical region. The mask “tracks” the density throughout the simulation: we define the center of these steps to be the points at which the nuclear density drops below some threshold *κ* as we approach the physical region from the left and from the right. An example is depicted in Fig. 2 along with the density. Unless otherwise specified, the values of *κ* and *w* indicated in the caption are used.

Outlined in Secs. IV A 1–IV A 4 are different choices as to which terms to apply the mask and the results on the dynamics.

#### 1. Masking *U*_{en}(*t*_{max} = 610 a.u. with *κ* = 10^{−10})

Here, we apply a mask to the entire coupling term *U*_{en}(*r*, *R*) so that, for all *r*, at the values of *R* that have appreciable nuclear density (see above) the conditional electronic equation is as in Eq. (4) while book-ending either side of this region with purely Born-Oppenheimer dynamics for the conditional electronic wavefunction. The nuclear equation Eq. (5) is left unaltered.

With the mask parameters of Fig. 2, the calculation fails already at *t*_{max} = 610 a.u. Increasing the value of *κ* allows us to propagate a little further in time, and Fig. 3 shows the result of propagation with this masked *U*_{en}, depicting the nuclear density and TDPES at *t* = 790 a.u. for two values of the mask edge tolerance *κ*. This shows that despite the best efforts of the mask on *U*_{en} to keep the influence of noise in the coupling terms in the asymptotic regions at bay, errors still propagate into the region of non-trivial density causing the simulation to fail. The level of the rapid oscillations in ∇*χ*/*χ* that reaches the area of significant density is apparently not strongly affected by the width of the mask, even for the constrictive case of *κ* = 10^{−3}. A mask on *U*_{en} alone is not sufficient to prevent errors from accumulating in the simulation, and any such errors are not confined to the periphery.

#### 2. Masking *∂*_{t}*C*_{i}(*R*, *t*): (*t*_{max} = 340 a.u. with *κ* = 10^{−10})

An alternative way to mask the entire coupling term in the electronic equation is to directly mask the time-derivative of the electronic coefficients, that is, mask the entire right-hand side of Eq. (20). Figure 4 shows the result of masking the *∂*_{t}*C*_{i}(*R*, *t*) functions given in Eq. (21). Figure 4 shows that when the mask is placed on *∂*_{t}*C*_{i}(*R*, *t*), oscillations and spikes exist well inside the masked region even at relatively early times, and the simulation fails before appreciable density has reached the avoided-crossing region.

#### 3. Masking ∇*χ*/*χ* and *A*(*R*, *t*): (*t*_{max} = 1490 a.u. with *κ* = 10^{−10})

An alternative to the above two approaches is to mask ∇*χ*/*χ* directly as it is known to be a source of noise and instability early on. In fact, applying the same masking procedure as done above greatly improves the stability of the simulation and allows propagation long enough, to a time of *t*_{max} = 1220 a.u., to witness the non-adiabatic event of wavepacket splitting. Additionally, we found that this simulation could be extended further by placing a mask on the vector potential *A*(*R*, *t*) and its divergence ∇ · *A* at fixed points near boundaries. We use the same mask function as is placed on ∇*χ*/*χ*; however, in this case, we fix the start and the end of the mask to be a fixed distance, 100 grid points or 0.9 a.u., from the boundaries. This additional mask on the vector potential did not make a significant difference in the other cases above, but here, masking both *A*, ∇ · *A* and ∇*χ*/*χ* allowed us to propagate to *t*_{max} = 1490 a.u. We therefore define a moving mask on ∇*χ*/*χ* with *κ* = 10^{−10} and *w* = 50, as well as a fixed mask on the edges of the *A*(*R*, *t*) and ∇ · *A*(*R*, *t*) as the “best case scenario” which we will refer to repeatedly in what follows and what was plotted in Fig. 3 in black.

#### 4. Discussion on the best case scenario

This solution is depicted in Fig. 5 at several times, showing the exact TDSE and EF nuclear densities, the two adiabatic surfaces, the TDPES, and the mask. In all panels, the solution agrees well with the direct TDSE solution. One sees the diabatic nature of the TDPES as the density passes through the avoided crossing region, followed by bridging of the two BO surfaces after passage through the avoided crossing region^{5} that accompanies the splitting of the nuclear wavepacket. We note that in the chosen gauge, the gauge-dependent part of the TDPES is zero, so no piecewise off-set is seen.^{33}

Noise in the TDPES becomes clearly visible from 1000 a.u. onwards and appears to arise initially where the density is small near the mask boundary; this is where *Re*∇*χ*/*χ* = ∇|*χ*|/|*χ*| is the largest. We found this also with different values of *κ* which broadens or narrows the mask.

To investigate whether simply having large values of ∇*χ*/*χ* instigates noise, we inserted an analytic form for ∇*χ*/*χ* into the electronic equation to see if unstable behavior persists. Naturally, if the term we use bears no relation to the true ∇*χ*/*χ*, then we are no longer solving the physical problem and any observations we make may have limited scope and utility. Still, it is instructive to understand the numerical properties of this system: with no mask, if ∇*χ*/*χ* is replaced by an analytic form, does the solution of the coupled EF equations still fail quickly? We fix ∇*χ*/*χ* to be purely real and have some artificial form. With this we evolve the electronic system, which is now totally decoupled from the nuclear system, and find that the simulation gives a catastrophically noisy TDPES almost immediately (<10 a.u.). Figure 6 shows simulations, with no masks, for three different forms of ∇*χ*/*χ* fed in to the electronic equation: (i) ∇*χ*(*R*, *t* = 0)/*χ*(*R*, *t* = 0), (ii) ∇*χ*(*R*, *t* = 0)/*χ*(*R*, *t* = 0) + *C* so that it has the same slope but is vertically shifted with *C* such that the maximum magnitude is on the right-hand boundary, and (iii) a Gaussian with a maximum at the peak density, which has the least physical resemblance to the actual function. From the results, we immediately observe that one can induce instability in the electronic system at a particular *R* simply by having ∇*χ*/*χ* have a large value there. Thus, this numerical exploration strongly suggests that a key source of instability in propagation of the exact EF equations is large ∇*χ*/*χ*. We come back to this point in the preliminary mathematical analysis of the equations in Sec. V.

### B. Reducing the time step

A common cause of noise and instability in numerical simulation is violation of a Courant-Friedrichs-Lewy (CFL) condition which provides an upper bound on the time step for a given grid spacing.^{39} To investigate this, we reduced the step size by an order of magnitude for the “best case scenario” simulation with the masked ∇*χ*/*χ* and *A*. Surprisingly, this simulation failed “earlier” at 1170 a.u. The TDPES and Re(∇*χ*/*χ*) at this time are plotted for both time steps in Fig. 7, showing that indeed the smaller Δ*t* choice develops oscillations and sharp features where the larger Δ*t* choice has none. A more detailed analysis of this situation is given in Sec. V.

## V. STABILITY ANALYSIS

The fact that reducing the time step causes the numerical solution to become unstable at shorter times indicates that the stability properties of the system of equations, Eqs. (4)–(8), are unusual and highly non-trivial. The electronic equation has an unprecedented form, whose mathematical and numerical properties are unknown. Do numerical methods exist in which the solution is stable and converged to the true solution? Here, we only begin to scratch the surface of the question of whether, once discretized in time and space, the equations are numerically stable, with standard propagation methods. We do not address here the separate question of whether the exact EF equations are mathematically well-posed.

The nuclear equation, Eq. (5), is a time-dependent Schrödinger equation for which stability properties are well-known for potentials that are possibly time-dependent but pre-determined (i.e., not determined by a self-consistent coupled solution as in the EF case). Specifically, we consider the equations for the electronic coefficients, *C*_{i}(*R*, *t*), which we place into a vector, (*C*_{1}(*R*, *t*), *C*_{2}(*R*, *t*), …, *C*_{k}(*R*, *t*)) (*k* truncated to 2 in our model system of Sec. IV but now we keep it general). Then, we write Eq. (20) as a matrix equation, “as if it was a linear” equation,

where underline denotes a matrix and we have separated out the terms as follows:

- $f\u03320$
has a Schrödinger structure, i.e., matrix proportional to

*δ*_{ij}with elements*ε*^{i}(**R**,*t*) −*ε*(**R**,*t*) − ∇^{2}/2*M*. This is diagonal in sense of not coupling different*C*_{i}, but it is not diagonal once*C*_{i}is resolved in*R*due to the Laplacian, i.e., it would be block-diagonal when writing each coefficient out on a grid (*C*_{1}(*R*_{1},*t*),*C*_{1}(*R*_{2},*t*), …,*C*_{1}(*R*_{N},*t*),*C*_{2}(*R*_{1},*t*),*C*_{2}(*R*_{2},*t*), …). - $f1\u0332$
contains all the other purely multiplicative terms (including those coupling the different

*C*_{i}’s via*d*_{ij}and $dij2$). - $g\u0332$
contains terms involving the first derivative ∇

_{R}and is not diagonal in*C*_{i}.

The actual equations for the coefficients are, however, not linear since *A*, *ε* depend on *C*_{i} [see Eq. (23)], but to simplify the analysis for a preliminary examination of stability, we consider these as just some functions of (*R*, *t*) and further, that they are determined ahead of time, i.e., they are not produced by some iteration with the nuclear equation as they would be in actuality. With this (big) simplification, what can we say about stability of numerical solutions of this system?

Discretizing in time, we write Eq. (27) as

where *n* = 0, 1, 2, … labels the time step. The system will be numerically stable if the magnitude of the eigenvalues of the amplification matrix G is bounded from below by 1. We will consider the simplest schemes: forward and backward Euler. From experience with the TDSE and the $f\u03320$ “backbone” of our equation, we do not expect that forward Euler will be stable, but it is nevertheless instructive to recall why.

The forward Euler (FE) method is defined by

and so

If we take just the TDSE-type terms, $f\u03320$, this is unconditionally unstable for any finite time step because then $K\u0332=f\u03320$, being Hermitian, has real eigenvalues, which leads to the (complex) eigenvalues of $G\u0332FE$: *λ*_{FE} = 1 − *i*Δ*tλ*_{K}, where *λ*_{K} are the (real) eigenvalues of $K\u0332$, so has magnitude $|\lambda FE|=1+\Delta t2\lambda K2$, greater than 1. With all the terms included in $K\u0332$, it will also not be stable, in general, especially given that at the early times the dynamics occurs on the first excited BO surface, with $f\u03320$ dominating $K\u0332$, until appreciable density approaches the avoided crossing.

We next consider an implicit method, as is usually done for TDSE, the simplest of which is the backward Euler (BE) method

Noting that eigenvalues of the matrix inverse are the inverse of the eigenvalues of the matrix, we see that for $K\u0332=f\u03320$, the eigenvalues have magnitude $|\lambda 0,BE|=11+\Delta t2\lambda K2\u22481\u2212\Delta t2\lambda K2/2$ which is less than one for any non-zero Δ*t*, so this is unconditionally stable as is well known for TDSE-form equations. For the remainder of this section, we consider only BE.

Now, we ask how the situation changes when the coupling terms in $f\u03321$ and $g\u0332$ are included. Because these terms are not Hermitian, the eigenvalues of $K\u0332$ are no longer guaranteed to be real. Their imaginary part, once multiplied by *i*Δ*t*, yields a correction to the real part of the eigenvalue of *G*_{BE}, decreasing or increasing it away from 1, as well as contributing to the imaginary part. To make the analysis tractable, we adopt two simplifications. First, we truncate the number of coefficients to two (as was relevant in the numerical example of Sec. IV). Second, we use a minimal spatial grid for the finite-difference derivatives, taking a three-point centered stencil for the Laplacian and a two-point centered stencil for the first derivative. Third, we consider all the other *R*-dependent functions (*ε*, *ε*_{i},*d*_{ij}, and $dij2$) as spatially uniform, which is not a bad approximation within the 3 × 3 spatial-grid truncation if our *R*-grid is fine enough. Although these approximations may seem drastic, they are valuable in that they straightforwardly lead to a preliminary analysis of the stability properties of the electronic equation. With these three approximations in hand, we write

where *A*_{i} and *B*_{i,j} are tridiagonal matrices in the basis $n\u22121,n,n+1$ with elements

where

and

For small Δ*t*, we find only one non-trivial eigenvalue, which in this small-Δ*t* limit, is

If this is greater than 1 for some (*R*, *t*) then the solution locally is exponentially increasing, leading to an instability; a similar result holds for the Forward Euler. The local stability, for small time-steps Δ*t*, then depends in a subtle way on the sign and size of

and if we were to try to define a CFL-condition, it would be a spatially and time-dependent condition, depending on the self-consistent solution of *χ* and *ϕ* at each time step and spatial *R*-point. This result relates back to our numerical observation that instability appears to be triggered when ∇|*χ*(*R*, *t*)|/|*χ*(*R*, *t*)| gets large in magnitude. If Δ*t* is chosen small enough, it is necessary at least for the term in Eq. (37) to be negative, but there is no obvious physical reason why these terms should be negative everywhere.

The analysis above relied heavily on simplifications, exploring only the simplest finite-difference and time-propagation schemes. It is quite possible that a more sophisticated numerical scheme can be developed that is unconditionally stable. The results of the analysis should therefore not be a deterrent to finding such a scheme but rather serve to point out that the stability conditions are far more complex than in most time-propagation schemes we have encountered.

## VI. CONCLUSIONS AND OUTLOOK

The potentials and coupling operator in the EF equations have already provided much insight into fundamental aspects of coupled dynamics of subsystems, while a mixed quantum-classical scheme based on them has already proven to be a soundly based approach for practical problems. The investigations here on the self-consistent numerical solution of the equations have fundamental interest but also a practical interest: it would be very useful in developing mixed quantum-classical approximations to test the effect of approximations made to the terms prior to making any classical or semiclassical approximation. However, this work has shown that such an endeavor is very challenging. Care must be taken to ensure that features as fundamental as having real potentials and partial norm conservation are generally robust in the numerical scheme, yet the structure of the electronic equation shows that the usual propagation methods will not respect this. These methods applied to propagate the EF equations become unstable rather quickly. We showed that the numerical instability can be tamed by using mask functions on the coupling term ∇*χ*/*χ* and the vector potential *A* such that numerically exact propagation of the EF equations in a model system can be achieved for a time long enough that non-adiabatic branching phenomena and wavepacket splitting can be observed. But even with the masks, instabilities kill the calculation soon after. The purpose of this work was not to present an exhaustive exploration of different algorithms but rather to illustrate some of the unforeseen challenges when attempting a direct solution. One cannot pinpoint one term that is the culprit causing the instability as we saw instabilities remain when ∇*χ*/*χ* was replaced with a smooth, analytic, function. That there is a complex interplay of terms is also suggested by our preliminary stability analysis exploring the CFL-condition for an implicit propagation scheme. We hope that this paper will motivate further work to take these developments further for a fuller understanding of the stability of the EF equations and approximations.

## ACKNOWLEDGMENTS

We thank Eric Cances for helpful discussions. We are grateful to the U.S. National Science Foundation Grant No. CHE-1566197 (L.L. and G.G.), the Department of Energy Office of Basic Energy Sciences, Division of Chemical Sciences, Geosciences and Biosciences Grant No. DE-SC0015344 (N.T.M. and G.G.), and the Research Corporation for Science Advancement Cottrell Scholar Seed Award (G.G.) for support of this work.

### APPENDIX A: FACTORIZATION FOLLOWING DISCRETIZATION

We saw in Sec. III B that discretization of the EF equations raises challenging issues for conventional time-propagators. Instead of factorizing and then discretizing, one can choose a certain discrete propagator for the full wavefunction first and then factorize the discrete equation. The two equations obtained this way should be numerically equivalent to the first equation.

Here, we start with the equation for $\Psi i,j(n+1)$ in the Crank-Nicolson scheme

We define the following compact notations:

Now, we write $\Psi i,j(n)=\chi j(n)\varphi i,j(n)$ and expand the operators *∂*_{t} and $T^n$ for the discretized wavefunctions. We write here the first and second order derivatives of a product of two arbitrary functions *g* and *f*

which can be written in a more compact way as

and

We see that the notion of midpoints (Sec. III A) appear again.

Using these equations, we rewrite Eq. (A1)

where $\varphi (n+1/2)=\varphi i,j(n+1)+\varphi i,j(n)2$. In the continuous case, one would take the inner product with ⟨*ϕ*_{R}(*r*, *t*)| to obtain the equation of motion for *χ*(*R*, *t*). In this case, the equivalent would be to multiply Eq. (A7) by $\varphi (n+1/2)/N$ and integrate (sum) over *i*. Contrary to the continuous case, in the discrete case, the right-hand side does not simplify and identifying quantities like *A*(*R*, *t*) or rewriting in a familiar form with a *Û*_{en} seems impossible. In this situation, we do not obtain the clean Schrödinger equation for *χ* and cannot write separate equations for the evolution of *ϕ*_{R} and *χ* as each depends on each other at the next step. Whether this is possible beginning with another norm-conserving discretization for the original Ψ instead of CN [Eq. (A1)] is left for future work, but it seems unlikely.

### APPENDIX B: EQUATION OF MOTION FOR *C*_{j}(*R*, *t*)

In the factorization Ψ(*r*, *R*, *t*) = *ϕ*_{R}(*r*, *t*)*χ*(*R*, *t*), the equation of motion for *ϕ*_{R}(*r*, *t*) is given by

with electronic Hamiltonian given by

In the following calculations for simplicity, we neglect the external potential as it does not enter into the Shin-Metiu test case currently under consideration. Rearranging terms in Eq. (8), we write the coupling potential as

where *A*(*R*, *t*) is the vector potential given by *A*(*R*, *t*) = ⟨*ϕ*_{R}(*r*, *t*)| − *i*∇_{R}*ϕ*_{R}(*r*, *t*)⟩.

We now expand the electronic wavefunction in terms of Born-Oppenheimer (BO) basis vectors as

where

with *ε*^{j}(*R*) being the *j*th BO surface. All spatial derivatives of *ϕ*_{R}(*r*, *t*) transform into spatial-derivatives of the basis, which, being time-independent, need only be computed once at the outset of the simulation, and are thus immune to error propagation over the course of the simulation.

For brevity, we now drop the “BO” superscript for the basis vectors and so henceforth all wavefunctions denoted by $\varphi Rj(r)$ are assumed to be BO vectors.

Projecting the electronic equation

onto the state $\varphi Ri(r)|$, we obtain

where we have used Eq. (B5) and orthogonality of the basis vectors to collapse a number of sums.

To compute $\u2211j\varphi Ri(r)|\xdbenCj(R,t)|\varphi Rj(r)$, we expand the derivatives of Eq. (B3)

Projecting onto state $\varphi Ri(r)|$, we get

### APPENDIX C: MASK FUNCTION

The mask function used in this work is defined by taking the product of two step functions, one stepping “up” on the left-hand side and the other “down” on the right-hand side. Defining *R*_{m} to be the position of a single one of these steps, *w* a measure of the steepness of the step, and *s* = 1 for a step up and *s* = −1 for a step down, the single-step function is defined by

where

Thus, to mask away the edges of a function as done for *U*_{en} and ∇*χ*/*χ*, one multiplies those functions by *m*(*R*, *R*_{L}, 1, *w*) × *m*(*R*, *R*_{R}, −1, *w*), where *R*_{L} and *R*_{R} are the left- and right-hand edges of the mask, respectively.