Comprehensive theoretical reference for YAMBO's real-time dynamics module
The YAMBO real-time (RT) module implements non-equilibrium many-body dynamics by solving the Kadanoff-Baym equations (KBE) for the time-dependent density matrix. This allows simulation of:
The real-time module uses the lesser Green's function (density matrix) as the fundamental quantity:
G^<_{nm}(k,t,t') = i⟨c†_m(k,t')c_n(k,t)⟩
where:
- n,m are band indices
- k is the crystal momentum
- t,t' are time arguments
- c†, c are creation/annihilation operators
YAMBO uses the time-diagonal (equal-time) approximation:
G^<_{nm}(k,t) ≡ G^<_{nm}(k,t,t)
This reduces the two-time Green's function to a density matrix:
ρ_{nm}(k,t) = -iG^<_{nm}(k,t)
Physical interpretation:
- Diagonal elements: ρ_{nn}(k,t) = f_n(k,t) (occupation factors)
- Off-diagonal elements: ρ_{nm}(k,t) (coherences between states n and m)
The time evolution is governed by the Kadanoff-Baym equation:
i∂G^<(t)/∂t - [H^RT(t), G^<(t)] = Σ^scatt(t)
or equivalently for the density matrix:
i∂ρ(t)/∂t = [H^RT(t), ρ(t)] - iΣ^scatt(t)
Components:
- H^RT(t): Time-dependent Hamiltonian (mean-field + external field)
- [H,ρ]: Commutator (coherent evolution)
- Σ^scatt(t): Collision self-energy (dissipation, scattering)
The complete Kadanoff-Baym equations include:
1. Lesser component:
i∂G^<(t)/∂t = [H^RT(t), G^<(t)] + Σ^scatt(t)
2. Greater component:
i∂G^>(t)/∂t = [H^RT(t), G^>(t)] + Σ^scatt(t)
3. Relation:
G^>(t) - G^<(t) = G^R(t) - G^A(t)
where G^R (retarded) and G^A (advanced) are determined by causality.
In the time-diagonal approximation:
G^<_{nm}(k,t) = i f_{nm}(k,t)
where f_{nm} is the generalized occupation matrix:
- f_{nn} = f_n(k,t): Occupation of state n
- f_{nm} (n≠m): Coherence between states n and m
In band representation:
i∂f_{nm}(k,t)/∂t = Σ_l [H^RT_{nl}(k,t)f_{lm}(k,t) - f_{nl}(k,t)H^RT_{lm}(k,t)]
- i[Σ^scatt]_{nm}(k,t)
Diagonal elements (populations):
∂f_n(k,t)/∂t = 2Im[Σ_l H^RT_{nl}(k,t)f_{ln}(k,t)] - [Σ^scatt]_{nn}(k,t)
Off-diagonal elements (coherences):
i∂f_{nm}(k,t)/∂t = (E_n - E_m)f_{nm} + Σ_l [H^RT_{nl}f_{lm} - f_{nl}H^RT_{lm}]
- i[Σ^scatt]_{nm}
The RT Hamiltonian is decomposed as:
H^RT(t) = H^EQ + ΔΣ^Hxc[G(t)] + H^ext(t)
Components:
H^EQ:
H^EQ_{nm}(k) = δ_{nm} E_n(k)Time-independent reference
Mean-field correction ΔΣ^Hxc[G(t)]:
ΔΣ^Hxc = Σ^Hxc[G(t)] - Σ^Hxc[G_ref]
Depends on instantaneous density ρ(r,t)
External perturbation H^ext(t):
H^ext = A(t)·p (velocity gauge)
H^ext = E(t)·r (length gauge)
The mean-field self-energy is computed from the time-dependent density:
ρ(r,t) = Σ_{n,k} f_n(k,t)|ψ_{nk}(r)|²
Hartree term:
V^H(r,t) = ∫ dr' ρ(r',t)/|r-r'|
Exchange-correlation term:
V^xc(r,t) = δE^xc[ρ]/δρ(r,t)
Matrix elements:
[ΔΣ^Hxc]_{nm}(k,t) = ⟨ψ_{nk}|V^H(t) + V^xc(t)|ψ_{mk}⟩
- ⟨ψ_{nk}|V^H_ref + V^xc_ref|ψ_{mk}⟩
Strategy (a): Kernel-based (collision integrals)
ΔΣ^Hxc = K·[G(t) - G_ref]
Strategy (b): Direct functional evaluation
ΔΣ^Hxc = Σ^Hxc[ρ(t)] - Σ^Hxc[ρ_ref]
The formal solution is:
G^<(t+Δt) = U(t+Δt,t) G^<(t) U†(t+Δt,t) + ∫_t^{t+Δt} dt' U(t+Δt,t') Σ^scatt(t') U†(t+Δt,t')
where U(t',t) is the time evolution operator:
U(t',t) = T exp[-i∫_t^{t'} H^RT(τ)dτ]
First-order explicit:
G^<(t+Δt) = G^<(t) - iΔt[H^RT(t), G^<(t)] + Δt Σ^scatt(t)
Properties: - ✅ Simple, fast - ✅ Explicit (no matrix inversion) - ❌ First-order accurate: error ~ O(Δt²) - ❌ Requires small time steps for stability - ❌ Does not preserve unitarity
Stability condition:
Δt < 2/|E_max - E_min|
Magnus expansion:
G^<(t+Δt) = exp(-iH^RT Δt) G^<(t) exp(+iH^RT Δt)
Expanded as:
G^<(t+Δt) = G^<(t) - iΔt[H,G^<] - (Δt)²/2[H,[H,G^<]]
- i(Δt)³/6[H,[H,[H,G^<]]] + ...
Implementation:
G_1 = G^<
G_2 = [H, G_1]
G_3 = [H, G_2]
...
G^<(t+Δt) = Σ_{n=0}^{N_max} (-iΔt)^n/n! G_{n+1}
Properties: - ✅ Higher-order accurate (up to 6th order) - ✅ Preserves unitarity better than Euler - ✅ Allows larger time steps - ❌ More expensive per step (multiple commutators) - ❌ Requires Hamiltonian to be slowly varying
Typical order: N_max = 4 or 6
Implicit Crank-Nicolson scheme:
(1 + iH^RT Δt/2) G^<(t+Δt) + G^<(t+Δt) (1 - iH^RT Δt/2)
= (1 - iH^RT Δt/2) G^<(t) + G^<(t) (1 + iH^RT Δt/2)
Rearranged:
(1 + iH Δt/2) G^<(t+Δt) (1 - iH Δt/2)^{-1} = (1 - iH Δt/2) G^<(t) (1 + iH Δt/2)^{-1}
Properties: - ✅ Unconditionally stable (no time step restriction) - ✅ Second-order accurate - ✅ Preserves unitarity exactly - ❌ Requires matrix inversion at each step - ❌ More expensive per step
Best for: Stiff problems, large time steps
Exact evolution in eigenbasis:
Diagonalize Hamiltonian:
H^RT(t) = U(t) E(t) U†(t)
Transform density matrix:
G̃^<(t) = U†(t) G^<(t) U(t)
Evolve in diagonal basis:
G̃^<_{nm}(t+Δt) = G̃^<_{nm}(t) exp[-i(E_n - E_m)Δt]
Transform back:
G^<(t+Δt) = U(t) G̃^<(t+Δt) U†(t)
Properties: - ✅ Exact for time-independent H - ✅ Preserves unitarity exactly - ❌ Very expensive (diagonalization at each step) - ❌ Only practical for small systems
Each integrator can be combined with multi-step schemes:
RK2 (Runge-Kutta 2nd order):
G_1 = U(Δt/2, H[G(t)]) G(t)
G(t+Δt) = U(Δt, H[G_1]) G(t)
HEUN:
G_1 = U(Δt, H[G(t)]) G(t)
G_2 = U(Δt, H[G_1]) G(t)
G(t+Δt) = (G_1 + G_2)/2
RK4 (Runge-Kutta 4th order):
k_1 = -i[H[G(t)], G(t)]
k_2 = -i[H[G(t) + k_1 Δt/2], G(t) + k_1 Δt/2]
k_3 = -i[H[G(t) + k_2 Δt/2], G(t) + k_2 Δt/2]
k_4 = -i[H[G(t) + k_3 Δt], G(t) + k_3 Δt]
G(t+Δt) = G(t) + Δt(k_1 + 2k_2 + 2k_3 + k_4)/6
The coupling to electromagnetic fields depends on the gauge choice.
Maxwell equations:
E(t) = -∂A(t)/∂t - ∇φ(t)
B(t) = ∇×A(t)
where:
- E(t): Electric field
- A(t): Vector potential
- φ(t): Scalar potential
Gauge condition: ∇·A = 0, φ = 0
Hamiltonian:
H^RT = (p + A(t))²/2m + V(r)
= p²/2m + A(t)·p/m + A²(t)/2m + V(r)
Minimal coupling:
H^ext = A(t)·p/m + A²(t)/2m
Matrix elements:
H^ext_{nm}(k,t) = A(t)·p_{nm}(k)/m - δ_{nm} A²(t)/2m
where p_{nm}(k) = ⟨ψ_{nk}|p|ψ_{mk}⟩ is the momentum matrix element.
Relation to velocity:
v_{nm}(k) = p_{nm}(k)/m + (1/m)⟨ψ_{nk}|[V^NL, r]|ψ_{mk}⟩
The second term is the non-local pseudopotential correction.
YAMBO implementation:
- If l_velocity_gauge_corr = .true.: Use p_{nm} (correctly gauged pseudopotential)
- If l_velocity_gauge_corr = .false.: Use v_{nm} (approximate, linear expansion)
Advantages: - ✅ Natural for periodic systems - ✅ Preserves crystal momentum - ✅ Efficient for plane-wave basis
Disadvantages:
- ❌ Requires momentum matrix elements
- ❌ Diamagnetic term A²/2m can be large
Gauge transformation:
A → A' = A + ∇χ
φ → φ' = φ - ∂χ/∂t
Choose χ = -r·A(t) to eliminate A:
Hamiltonian:
H^RT = p²/2m + V(r) + E(t)·r
Matrix elements:
H^ext_{nm}(k,t) = E(t)·r_{nm}(k)
where r_{nm}(k) = ⟨ψ_{nk}|r|ψ_{mk}⟩ is the position matrix element.
Dipole approximation: Valid when wavelength λ >> lattice constant a:
exp(iq·r) ≈ 1 + iq·r
Advantages: - ✅ Simpler (no diamagnetic term) - ✅ Direct physical interpretation (dipole coupling) - ✅ Easier to implement
Disadvantages: - ❌ Breaks translational invariance in periodic systems - ❌ Requires position matrix elements (ill-defined in periodic systems) - ❌ Only valid for long-wavelength fields
The two gauges are physically equivalent but differ in: - Numerical implementation - Convergence properties - Computational cost
Relation between matrix elements:
r_{nm}(k) = i p_{nm}(k)/(E_n(k) - E_m(k)) (n ≠ m)
This is the dipole approximation in the velocity gauge.
YAMBO supports various field envelopes:
1. Gaussian pulse:
E(t) = E_0 exp[-(t-t_0)²/(2σ²)] cos(ω_0 t + φ)
2. Sin² envelope:
E(t) = E_0 sin²(πt/T) cos(ω_0 t + φ) for 0 < t < T
3. Constant (CW):
E(t) = E_0 cos(ω_0 t + φ)
4. Delta kick:
E(t) = E_0 δ(t)
The collision term Σ^scatt(t) describes irreversible processes:
Σ^scatt_{nm}(k,t) = Σ^{el-el}_{nm} + Σ^{el-ph}_{nm} + Σ^{el-photon}_{nm}
Screened Coulomb interaction:
Σ^{el-el}_{nm}(k,t) = Σ_{k',n',m'} W_{nn',mm'}(k,k',t)
× [f_{n'}(k',t)f_{m'}(k',t) - f_n(k,t)f_m(k,t)]
where W is the screened Coulomb interaction.
Approximations:
Static screening (SEX):
W(ω) = W(ω=0)
Plasmon-pole (PPA):
W(ω) = Ω²/(ω² - ω_p²)
Full frequency-dependent:
W(ω) = ε^{-1}(ω) v(q)
Relaxation time approximation:
Σ^{el-el}_{nn}(k,t) = -[f_n(k,t) - f^eq_n(k)]/τ_{el-el}(k)
Electron-phonon coupling:
Σ^{el-ph}_{nm}(k,t) = Σ_{k',ν} |g_{nm}^ν(k,k')|²
× [(n_ν(k-k',t) + f_m(k',t))δ(E_n(k) - E_m(k') - ω_ν)
+ (n_ν(k-k',t) + 1 - f_m(k',t))δ(E_n(k) - E_m(k') + ω_ν)]
where:
- g^ν: Electron-phonon matrix element
- n_ν: Phonon occupation
- ω_ν: Phonon frequency
Relaxation time approximation:
Σ^{el-ph}_{nn}(k,t) = -[f_n(k,t) - f^eq_n(k)]/τ_{el-ph}(k)
Radiative recombination:
Σ^{el-photon}_{nm}(k,t) = -γ_{rad} [f_n(k,t)f_m(k,t) - f^eq_n f^eq_m]
where γ_{rad} is the radiative recombination rate.
Pure dephasing (T₂ processes):
Σ^{deph}_{nm}(k,t) = -f_{nm}(k,t)/T_2 (n ≠ m)
Destroys coherences without affecting populations.
Definition:
J(t) = -e Σ_{n,k} f_n(k,t) v_n(k)
where v_n(k) = ∇_k E_n(k) is the group velocity.
Including off-diagonal elements:
J(t) = -e Σ_{n,m,k} f_{nm}(k,t) v_{nm}(k)
Velocity gauge:
J(t) = -e Σ_{n,m,k} f_{nm}(k,t) [p_{nm}(k)/m - δ_{nm} A(t)]
The second term is the diamagnetic current.
Time integral of current:
P(t) = ∫_0^t J(t') dt'
Direct calculation:
P(t) = -e Σ_{n,k} f_n(k,t) r_n(k)
Total energy:
E_tot(t) = E_kin(t) + E_H(t) + E_xc(t) + E_ext(t)
Kinetic energy:
E_kin(t) = Σ_{n,k} f_n(k,t) E^KS_n(k)
Hartree energy:
E_H(t) = (1/2) ∫ dr dr' ρ(r,t)ρ(r',t)/|r-r'|
Exchange-correlation energy:
E_xc(t) = ∫ dr ε_xc[ρ(r,t)] ρ(r,t)
External field energy:
E_ext(t) = -P(t)·E(t)
Electron density:
n_e(t) = Σ_{n∈CB,k} f_n(k,t)
Hole density:
n_h(t) = Σ_{n∈VB,k} [1 - f_n(k,t)]
Carrier temperature: Fit to Fermi-Dirac distribution:
f_n(k,t) ≈ 1/(1 + exp[(E_n(k) - μ(t))/(k_B T(t))])
Von Neumann entropy:
S(t) = -k_B Σ_{n,k} [f_n(k,t) ln f_n(k,t) + (1-f_n(k,t)) ln(1-f_n(k,t))]
Measures the degree of thermalization.
Spin magnetization:
M_s(t) = μ_B Σ_{n,k,σ} σ f_{nσ}(k,t)
Orbital magnetization:
M_L(t) = -(e/2m) Σ_{n,k} f_n(k,t) ⟨ψ_{nk}|r×p|ψ_{nk}⟩
Hamiltonian:
H^RT(t) = H^EQ + H^ext(t)
No mean-field corrections: ΔΣ^Hxc = 0
Properties: - ✅ Simplest, fastest - ❌ No screening, no many-body effects - ❌ Unphysical for interacting systems
Mean-field self-energy:
ΔΣ^H_{nm}(k,t) = ⟨ψ_{nk}|V^H[ρ(t)] - V^H[ρ_ref]|ψ_{mk}⟩
Hartree potential:
V^H(r,t) = ∫ dr' ρ(r',t)/|r-r'|
Properties: - ✅ Includes classical Coulomb repulsion - ✅ Screening effects - ❌ No exchange, no correlation
Mean-field self-energy:
ΔΣ^Hxc_{nm}(k,t) = ⟨ψ_{nk}|V^H[ρ(t)] + V^xc[ρ(t)] - V^H[ρ_ref] - V^xc[ρ_ref]|ψ_{mk}⟩
Exchange-correlation potential:
V^xc(r,t) = δE^xc[ρ]/δρ(r,t)
Functionals: - LDA: Local density approximation (e.g., PZ, PW) - GGA: Generalized gradient approximation (e.g., PBE, BLYP)
Properties: - ✅ Includes exchange and correlation - ✅ Computationally efficient - ❌ Approximate (local/semi-local) - ❌ Underestimates band gaps
Screened exchange self-energy:
Σ^SEX_{nm}(k,t) = -Σ_{k',m'} W_{nm,m'm'}(k,k',t=0) f_{m'}(k',t)
where W is the statically screened Coulomb interaction.
Properties: - ✅ Includes dynamical screening - ✅ Better band gaps than DFT - ❌ Requires W from equilibrium GW - ❌ Only valid for small perturbations
COHSEX = COH + SEX:
Σ^COHSEX = Σ^COH + Σ^SEX
COH (Coulomb hole):
Σ^COH_{nm}(k) = (1/2) Σ_{k',m'} [W_{nm,m'm'}(k,k',ω=0) - v_{nm,m'm'}(k,k')]
Properties: - ✅ Static approximation to GW - ✅ Includes correlation - ❌ Less accurate than full GW
| Approximation | Hartree | Exchange | Correlation | Screening | Cost |
|---|---|---|---|---|---|
| IP | ❌ | ❌ | ❌ | ❌ | Low |
| TD-Hartree | ✅ | ❌ | ❌ | Static | Low |
| TDDFT-LDA | ✅ | ✅ | ✅ | Implicit | Low |
| TDDFT-GGA | ✅ | ✅ | ✅ | Implicit | Medium |
| TDSEX | ✅ | ✅ | ❌ | Static | High |
| TDCOHSEX | ✅ | ✅ | ✅ | Static | High |
Main driver: RT_driver.F
RT_driver
├── RT_initialize ! Setup, allocate memory
├── RT_start_and_restart ! Initial conditions or restart
├── Time loop
│ ├── RT_Hamiltonian ! Build H^RT(t)
│ ├── RT_Integrator ! Propagate G^<(t) → G^<(t+Δt)
│ ├── RT_relaxation ! Compute scattering terms
│ ├── RT_Observables ! Compute J, P, E, etc.
│ └── RT_output_and_IO ! Write to disk
└── RT_free ! Cleanup
Density matrix:
complex(SP) :: G_lesser(nb1:nb2, nb1:nb2, nk, n_sp_pol, n_mem_steps)
nb1:nb2: Band rangenk: Number of k-pointsn_sp_pol: Spin polarizations (1 or 2)n_mem_steps: Circular buffer sizeHamiltonian:
complex(SP) :: Ho_plus_Sigma(nb1:nb2, nb1:nb2, nk, n_sp_pol)
Observables:
type RT_observables_t
real(SP) :: J(3, n_time_steps) ! Current
real(SP) :: P(3, n_time_steps) ! Polarization
real(SP) :: E_tot(n_time_steps) ! Total energy
real(SP) :: E_kin(n_time_steps) ! Kinetic energy
real(SP) :: entropy(n_time_steps) ! Entropy
end type
Circular buffer:
i_MEM_now = mod(i_time, G_MEM_steps) + 1
i_MEM_prev = mod(i_time-1, G_MEM_steps) + 1
i_MEM_old = mod(i_time-2, G_MEM_steps) + 1
Stores only last G_MEM_steps time steps in memory.
MPI distribution:
- k-points: Distributed over PAR_COM_Xk_ibz
- Bands: Distributed over PAR_COM_bands
- G-vectors: Distributed over PAR_COM_G
OpenMP threading: - Band loops - k-point loops - FFT operations
GPU acceleration: - Matrix-matrix multiplications (commutators) - FFT transforms - Density computation
Criterion:
Δt_new = Δt_old × min(treshold / max_change, safety_factor)
where max_change is the maximum relative change in:
- Occupations: |f_n(t) - f_n(t-Δt)|/f_n(t)
- Hamiltonian: |H(t) - H(t-Δt)|/|H(t)|
Typical values:
- treshold = 0.01 (1% change)
- safety_factor = 1.5
For near-resonant excitation, remove fast oscillations:
Transformation:
G̃^<(t) = exp(iω_0 t) G^<(t) exp(-iω_0 t)
H̃^RT(t) = H^RT(t) - ω_0
Equation of motion:
i∂G̃^<(t)/∂t = [H̃^RT(t), G̃^<(t)]
Allows much larger time steps when ω_0 ≈ E_gap.
L.V. Keldysh, Sov. Phys. JETP 20, 1018 (1965)
Real-Time TDDFT:
M.A.L. Marques et al., Time-Dependent Density Functional Theory (Springer, 2006)
Non-Equilibrium Green's Functions:
G. Stefanucci and R. van Leeuwen, Nonequilibrium Many-Body Theory of Quantum Systems (Cambridge, 2013)
YAMBO Real-Time:
E. Hairer et al., Solving Ordinary Differential Equations (Springer, 1993)
Gauge Choices:
M. Lewenstein et al., Phys. Rev. A 49, 2117 (1994)
Ultrafast Carrier Dynamics:
E. Perfetto et al., Phys. Rev. Lett. 110, 087001 (2013)
Transient Absorption:
| Physical Quantity | YAMBO Variable | Units | Description |
|---|---|---|---|
| Lesser Green's function | G_lesser |
- | Density matrix |
| Hamiltonian | Ho_plus_Sigma |
Ha | RT Hamiltonian |
| Equilibrium Hamiltonian | H_EQ |
Ha | DFT/QP energies |
| External field | A_tot |
a.u. | Vector potential |
| Current | J_tot |
e·a.u./fs | Current density |
| Polarization | P_tot |
e·a.u. | Polarization |
| Time step | RT_step |
fs | Integration time step |
| Total time | NE_tot_time |
fs | Simulation duration |
| Density | rho_n |
e/a.u.³ | Electron density |
| Hartree potential | V_hartree_sc |
Ha | Hartree potential |
| XC potential | V_xc_sc |
Ha | XC potential |
| Occupations | RT_levels%f |
- | Occupation factors |
| System | Integrator | Time Step | Total Time |
|---|---|---|---|
| Bulk Si (IP) | EULER | 0.01 fs | 10 fs |
| Bulk Si (TDDFT) | EXP | 0.05 fs | 50 fs |
| 2D MoS₂ (TDSEX) | INV | 0.1 fs | 100 fs |
| Molecules | RK4 | 0.001 fs | 1 fs |
| Process | Field Strength | Wavelength | Duration |
|---|---|---|---|
| Linear response | 10⁻⁴ a.u. | 800 nm | 10 fs |
| Non-linear optics | 10⁻³ a.u. | 800 nm | 5 fs |
| High-harmonic generation | 10⁻² a.u. | 1600 nm | 2 fs |
| Strong-field ionization | 10⁻¹ a.u. | 800 nm | 1 fs |
Conversion: 1 a.u. = 5.14 × 10¹¹ V/m