Free Green’s Functions
We provide a number of tools for calculating Green’s functions for non-interacting systems, either from a single-particle Hamiltonian or from a given spectral function.
Equilibrium Green’s functions for a given density of states
In many applications (for representing a fermionic bath, for example), one needs to construct Green’s functions with a given density of states (DoS) \(A(\omega)\):
where \(g_\omega(t,t')\) is the single-orbital noninteracting Green’s function with energy \(\omega\). The latter is defined as (\(F_\xi(x)=1/(e^{\beta x}-\xi)\) is the Fermi/Bose distribution):
\(g_\omega^M (\tau) = - e^{-\tau(\omega-\mu)} F_\xi(-(\omega-\mu))\)
\(g_\omega^R (t,t') = -i e^{-i(t-t')\omega}\)
\(g_\omega^< (t,t') = -i\xi e^{-i(t-t')\omega} F_\xi(\omega-\mu)\)
\(g_\omega^{\rceil} (t,\tau) = -i\xi e^{-it\omega} e^{\tau(\omega-\mu)} F_\xi(\omega-\mu)\)
This task is accomplished by cntr::green_equilibrium:
|
Computes the free Green’s function with given density of states |
The user provides the inverse temperature beta, the time step h and the chemical potential mu (set to 0.0 by default). Parameters limit and nn determine the adaptive sampling method implemented in fourier. Use the default settings unless there is a special reason not to. dos is an object representing a DoS class. This can represent an arbitrary density of states. As a useful example to show the minimal call properties, we provide the Bethe DoS \(A(\omega) = V^2/(2\pi) \sqrt{ 4 V^2 - \omega^2}\), represented by the class:
class bethedos {
public:
double hi_; // Higher edge of the density of states
double lo_; // Lower edge of the density of states
double V_; // 4V corresponds to the bandwidth
bethedos() {
V_ = 1;
lo_ = -2;
hi_ = 2;
}
double operator()(double x) {
double arg = 4.0 * V_ * V_ - x * x;
double num = V_ * V_ * 3.14159265358979323846 * 2;
return (arg < 0 ? 0.0 : sqrt(arg) / num);
}
};
The member variables lo_, hi_ and the function double operator()(double x) are the basic building blocks for any DoS class. For constructing a Green’s function for a Bethe DoS with band width of 1 centered around \(\omega=0\), we would use the following code:
// define parameters, nt, ntau, beta, ...
// define herm_matrix G
cntr::bethedos dos;
dos.V_ = 0.25;
dos.lo_ = -0.5;
dos.hi_ = 0.5;
cntr::green_equilibrium(G, dos, beta, h);
We also provide the function cntr::green_equilibrium_bethe, which constructs the Green’s function for the Bethe DoS with V_=1.0 without invoking the dos class directly.
Another example of a useful DoS is a smoothened box-like shape \(A(\omega) = C (f_\nu(\omega-b) - f_\nu(\omega-a))\), where \(f_\nu(\omega)\) is a Fermi function with effective temperature \(\nu\), while \([a, b]\) defines the interval for the DoS. Further details can be found in the documentation of cntr::smooth_box.
Green’s function for a constant or time-dependent Hamiltonian
Another often encountered example is the Green’s function of a single-particle Hamiltonian \(\epsilon(t)\), defined by:
We provide routines for both constant and time-dependent Hamiltonians:
|
Computes the free Green’s function for constant Hamiltonian |
|
Computes the free Green’s function for constant Hamiltonian |
|
Computes the free Green’s function for the time-dependent Hamiltonian |
|
Computes the free Green’s function for the time-dependent Hamiltonian |
|
Computes the free Green’s function for the time-dependent Hamiltonian |
In the routines with a
tstp-argument,GGcan beherm_matrix_timestep<T>orherm_matrix<T>For a time-dependent Hamiltonian,
epsstores the Hamiltonian at all times. The Green’s function is obtained by numerically solving the equation of motion. The numerical parameters (cf_order,SolveOrder,fixHam) are explained in the second example below.
Example 1: The Green’s function for a time-independent Hamiltonian can be constructed as follows:
int nt=100;
int ntau=100;
int size1=2;
double mu=0.0;
double h=0.05;
double beta=10.0;
GREEN G(nt,ntau,size1,FERMION);
cdmatrix eps0(size1,size1);
// define the Hamiltonian
eps0(0,0) = -1.0;
eps0(0,1) = 0.5 + 0.5*II;
eps0(1,0) = std::conj(eps(0,1));
eps0(1,1) = 1.0;
// construct GF
cntr:::green_from_H(G, mu, eps0, beta, h);
Example 2: For time-dependent Hamiltonians, we have implemented the commutator-free decomposition of the time-evolution operator in second (cf_order=2) and fourth (cf_order=4) order. By default, the fourth-order scheme is used. The method requires the evaluation of \(\epsilon(t)\) at times between the interval \([(n-1) h, n h]\); thus, we use polynomial interpolation of order SolveOrder. By default, the maximum order is used. The following example shows how to use cntr::green_from_H for this case:
// define nt, ntau, h, beta, mu ...
int size1=2;
cdmatrix eps0(size1,size1);
// defines eps0 as in the above example
cdmatrix eps1(size1,size1);
eps1(0,1) = 1.0;
eps1(1,0) = 1.0;
GREEN G(nt,ntau,size1,FERMION);
CFUNC eps(nt, size1);
eps.set_value(-1, eps0);
cdmatrix eps_at_t(size1,size1);
for(int tstp=0; tstp<=nt; tstp++){
eps_at_t = eps0 + sin(tstp*h)*eps1;
eps.set_value(tstp, eps_at_t);
}
cntr::green_from_H(G, mu, eps, beta, h, true);
A typical example where the Hamiltonian is not yet known at a certain time step is a time-dependent mean-field calculation, where the density matrix at \(t_n = nh\) is needed to construct \(\epsilon(n h)\). For this purpose, we have implemented a polynomial extrapolation as a predictor for \(\epsilon(n h)\), triggered by the argument fixHam=False. In contrast, fixHam=True indicates that \(\epsilon(n h)\) is already known and an interpolation in \([(n-1) h, n h]\) can be employed. The following code snippet exemplifies a corresponding predictor-corrector scheme:
// define nt, ntau, h, beta, mu ...
// define SolveOrder
GREEN G(nt,ntau,size1,FERMION);
CFUNC eps(nt, size1);
// determine eps, G for time steps tstp=-1,...,SolveOrder
for(int tstp=SolveOrder+1; tstp<=nt; tstp++){
// predictor
cntr::green_from_H(tstp, G, mu, eps, beta, h, false, SolveOrder);
// update density from G at tstp, update eps at tstp
// corrector
cntr::green_from_H(tstp, G, mu, eps, beta, h, true, SolveOrder);
}
Bosonic Green’s functions
All the above functions work for fermionic or bosonic Green’s functions. However, for problems with electron-phonon coupling (or similar effects), we provide functions for calculating the free phonon propagator \(D_0(t,t') = -i\langle T_\mathcal{C} \hat{X}(t)\hat{X}(t')\rangle\), with \(\hat{X} = (\hat{a} + \hat{a}^\dagger)/\sqrt{2}\):
|
Computes the free phonon-type propagator with frequency |
|
Computes the free phonon-type propagator with frequency |
|
Computes the free phonon-type propagator with frequency |