Hybrid Gauge RT-TDDFT: An Algorithmic Innovation with Both Efficiency and Accuracy
Abstract
Recently, Zhao Haotian, a PhD candidate at the University of Science and Technology of China, and Professor He Lixin proposed and implemented a Hybrid Gauge Real-Time Time-Dependent Density Functional Theory (Hybrid gauge rt-TDDFT) applicable to atomic orbital basis sets in the domestic open-source density functional theory software ABACUS. Based on the traditional velocity gauge, this method introduces a time-varying phase dependent on the vector potential, effectively overcoming the systematic errors caused by the incompleteness of the local basis set and providing consistent and reliable simulation results in both periodic and non-periodic systems. At the same time, this method significantly improves the calculation efficiency in periodic systems, offering a new solution that combines accuracy and efficiency for first-principles real-time dynamics simulations under the action of an electric field.
Introduction
Real-time time-dependent density functional theory (rt-TDDFT) is an important theoretical method for studying the electronic dynamics of materials in excited states and under the drive of external fields. It is widely used in frontier fields such as nonlinear optical responses, ultrafast spectroscopy, and charge and energy transport. Compared with linear response methods, rt-TDDFT can directly track the quantum dynamics trajectory of electrons during time evolution, making it particularly suitable for strong-field excitation and non-linear processes far from equilibrium. Therefore, it has become a key means for studying phenomena such as light-matter interaction and carrier relaxation. However, conducting rt-TDDFT calculations in periodic systems still faces challenges. The direct application of the traditional velocity gauge in numerical atomic orbital (NAO) basis sets ignores the internal phase changes of orbitals caused by the vector potential, resulting in systematic errors that seriously affect the calculation accuracy of key physical quantities such as current responses and nonlinear optics. To solve this problem, Zhao Haotian and He Lixin proposed the hybrid gauge algorithm. By explicitly introducing the local phase correction induced by the vector potential, it effectively overcomes the limitations of the velocity gauge in local basis sets and constructs a rigorous and efficient theoretical framework, providing a new solution for the study of ultrafast electron dynamics in periodic systems.
Hybrid Gauge Theory
In rt-TDDFT, we can simulate the dynamic response of a system under external excitations such as an electric field by adding a time-dependent external field term to the Hamiltonian. The most commonly used is the length gauge, and its Hamiltonian form is relatively simple, containing only an additional scalar potential term:
1 | H = H_0 + E(t) \cdot r |
where $H_0
$is the Hamiltonian of the system itself, and $E(t)\cdot r
$ describes the interaction between the electric field and electrons. The corresponding time-dependent Kohn-Sham equation is:
1 | i\frac{\partial}{\partial t}\psi_{i}(r,t) = \left[-\frac{1}{2}\nabla^{2} + V_{KS}[\rho](r,t) + E(t) \cdot r\right]\psi_{i}(r,t) |
where $V_{KS}
$represents the Kohn-Sham effective potential, including electron-ion interaction, Hartree potential, exchange-correlation potential, etc. The length gauge is applicable to non-periodic systems. However, in periodic systems, this form destroys the periodic structure of the system, so it cannot be directly applied to calculations of crystal materials and other systems with periodic potential fields.To solve this problem, people usually use the method of gauge transformation to convert the Hamiltonian into the velocity gauge form. The electric field is derived from the time-dependent vector potential $A(t)
$:
1 | E(t)=-\frac{dA(t)}{dt} |
The Hamiltonian in the velocity gauge is:
1 | \hat{H} = \frac{1}{2} (p + A(t))^{2}+V_{l}^{ps}+V_{Hxc}+\tilde{V}_{nl}^{ps} |
Its equation of motion is:
1 | \begin{equation} i\frac{\partial}{\partial t} \tilde{\psi}_i(\boldsymbol{r}, t) = \tilde{H} \tilde{\psi}_i(\boldsymbol{r}, t) \end{equation} |
Theoretically, the length gauge and the velocity gauge are essentially equivalent, and they can be transformed into each other through the following gauge transformation:
1 | \tilde{\psi}(\boldsymbol{r},t)=e^{-iA(\boldsymbol{t})\cdot\boldsymbol{r}}\psi_i(\boldsymbol{r},t) |
1 | \tilde{H}=e^{-iA(\boldsymbol{t})\cdot\boldsymbol{r}}He^{iA\cdot\boldsymbol{r}} |
However, in actual calculations, because we use finite basis sets (such as atomic orbitals), this phase relationship cannot be perfectly expressed, resulting in differences in calculation results under the two gauges. For example, in the atomic orbital basis set, the wave functions of both the length gauge and the velocity gauge are written in the form of a linear combination of atomic orbitals (LCAO):
1 | \begin{align} \psi_n(\boldsymbol{r},t) &= \sum_{\mu} c_{n\mu}(t)\phi_{\mu}(\boldsymbol{r}) \\ \tilde{\psi}_n(\boldsymbol{r},t) &= \sum_{\mu} \tilde{c}_{n\mu}(t)\phi_{\mu}(\boldsymbol{r}) \end{align} |
Obviously, the wave function expression in the velocity gauge ignores the phase change inside the atomic orbitals caused by the vector potential, thus introducing systematic errors in the simulation, especially in the calculation of key physical quantities such as current and energy. Although the errors can be reduced by increasing the basis set, this will significantly increase the computational cost and severely limit the application efficiency of rt-TDDFT in periodic systems.
To compensate for the phase effect introduced by the gauge transformation, we introduce a phase factor dependent on the vector potential in front of each atomic orbital:
1 | \bar{\phi}_{\mu}(\boldsymbol{r}-\boldsymbol{\tau}_{\mu}-\boldsymbol{R}_{i},t)=e^{-i\boldsymbol{A}(t)\cdot\Delta\boldsymbol{r}_{\mu i}}\phi_{\mu}(\boldsymbol{r}-\boldsymbol{\tau}_{\mu}-\boldsymbol{R}_{i}) |
where $\boldsymbol{\tau}_{\mu}
$is the center position of the atomic orbital. The form of the wave function is:
1 | \begin{equation} \bar{\psi}_n(\boldsymbol{r},t)=\sum_{\mu} \bar{c}_{n\mu}(t)\bar{\phi}_{\mu}(\boldsymbol{r}) \end{equation} |
Under this phase correction, the Hamiltonian matrix and the overlap matrix of the orbitals can finally be obtained as:
1 | \begin{align} \tilde{H}_{\mu\nu}(\boldsymbol{R}_{i}) &= e^{-i\boldsymbol{A}(t)\cdot\boldsymbol{\tau}_{\mu 0,\nu i}}\langle\phi_{\mu 0}|H_{0}+\boldsymbol{E}(t)\cdot\Delta\boldsymbol{r}_{\nu i}|\phi_{\nu i}\rangle\\ \tilde{S}_{\mu\nu}(\boldsymbol{R}_{i}) &= e^{-i\boldsymbol{A}(t)\cdot\boldsymbol{\tau}_{\mu 0,\nu i}}S_{\mu\nu}(\boldsymbol{R}_{i}) \end{align} |
And the time-dependent Kohn-Sham equation is:
1 | i\sum_{\nu}\left(\frac{\partial}{\partial t}\bar{c}_{n\nu k}(t)\right)\bar{S}_{\mu\nu}(k,t)=\sum_{\nu} \bar{c}_{n\nu k}(t)\bar{H}_{\mu\nu}(k,t) |
The above transformation can be regarded as a gauge transformation. Since this gauge contains both the vector potential $A(t)
$ and the scalar field $E(t)
$, we call it the hybrid gauge. The Hamiltonian form in the hybrid gauge is similar to that in the length gauge, but its external field term $\boldsymbol{E}(t)\cdot\Delta\boldsymbol{r}_{\nu i}
$remains periodic, avoiding the defect of the length gauge that violates Bloch's theorem in periodic systems while retaining its advantage of simple calculation. Compared with the velocity gauge, the hybrid gauge also has significant advantages in computational efficiency, and it is more efficient in dealing with non-local potentials. Other physical quantities, such as charge density and current density, can also be processed in a similar way. Since there is a strict gauge transformation relationship between the hybrid gauge and the length gauge, the calculation results of the two are theoretically completely equivalent.
Results
Non - periodic Systems


For non-periodic systems, all three gauges can be applied. The figure above shows the response current of the $H_{2}CO_{3}
$ molecule under Gaussian pulse excitation and its corresponding absorption spectrum. It can be seen that the results given by the length gauge and the hybrid gauge are completely consistent, verifying their theoretical equivalence. In contrast, there is a significant deviation between the response current calculated by the velocity gauge and those of the length gauge and the hybrid gauge. In particular, its corresponding spectrum shows significant divergence behavior in the low - frequency region, reflecting the systematic errors introduced by the velocity gauge in the local basis set. Although this error can be alleviated by increasing the basis set size, the resulting computational cost also increases significantly. Therefore, the authors proposed an empirical correction method that can significantly reduce the errors caused by the velocity gauge while maintaining a low computational cost.
Periodic Systems
To test the applicability of the hybrid gauge in periodic systems and under strong fields, we also tested the linear and nonlinear response behaviors of the Si system.


The figure above shows the response current of the Si unit cell under strong Gaussian pulse excitation and its corresponding high - order harmonic spectrum. As the maximum field strength increases from $10^{10},W/cm^{2}
$ to $10^{13},W/cm^{2}
$, the current signal gradually deviates from the fundamental frequency of the external field, exhibiting an increasingly enhanced nonlinear response characteristic. Meanwhile, the 1st, 3rd, 5th, and 7th harmonic signals appear successively in the high - order harmonic spectrum.
The above results indicate that the hybrid gauge is applicable in different physical scenarios, including non - periodic and periodic systems, as well as strong - field and weak - field perturbations. It demonstrates good versatility and accuracy. Compared with the velocity gauge, it shows higher computational accuracy and efficiency in periodic systems. It can achieve stable and reliable real - time dynamics simulations under small basis set conditions, providing solid theoretical and technical support for the subsequent development of rt - TDDFT methods based on NAO.
Summary
In this paper, a Hybrid Gauge Real-Time Time-Dependent Density Functional Theory (Hybrid gauge rt-TDDFT) based on atomic orbital basis sets is proposed and implemented. It effectively overcomes the systematic error problem of the velocity gauge in local basis sets, and demonstrates excellent accuracy and computational efficiency under various physical conditions, such as non-periodic and periodic systems, strong fields and weak fields. This method not only provides a reliable means for real-time electron dynamics simulations with small basis sets, but also lays a solid foundation for the further development and expansion of the domestic first-principles software ABACUS.
The relevant results were recently published in Journal of Chemical Theory and Computation, and the link to the paper is as follows: https://doi.org/10.1021/acs.jctc.5c00111