TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
gf_tutorial_2.cpp
1#include <triqs/gfs.hpp>
2#include <triqs/mesh.hpp>
3using namespace triqs;
4using namespace triqs::gfs;
5
6int main() {
7 // Number of time-points to be used
8 int n_times = 101;
9
10 // Create a real-time mesh on interval [tmin, tmax]
11 double tmin = 0, tmax = 10;
12 auto t_mesh = mesh::retime{tmin, tmax, n_times};
13
14 // Create a imaginary-time mesh
15 double beta = 1;
16 auto tau_mesh = mesh::imtime{beta, Fermion, n_times};
17
18 // Create Green function g[t,tau] on product-mesh with values of shape (2,2,2)
19 auto g = gf<prod<retime, imtime>, tensor_valued<3>>{t_mesh * tau_mesh, {2, 2, 2}};
20}
The owning Green's function container.
Definition gf.hpp:194
Imaginary time mesh type.
Definition imtime.hpp:68
Real time mesh type.
Definition retime.hpp:70
Umbrella header for the Green's function library.
Umbrella header for the TRIQS mesh types.
Target type for a complex tensor-valued Green's function.
Definition targets.hpp:83