Skip to content

Samples

n-chikano edited this page Jul 12, 2018 · 67 revisions

In the following, we demonstrate how to use irbasis database. The irbasis database is available in Python and C++. irbasis can calculate the IR basis functions, its Fourier transform, the derivatives and corresponding singular values.

Usage of interface (Python, C++)

Python

You can download api.py and save it to your working directory. Then, type the following statement

python api.py

C++

You can download api.cpp and save it to your working directory. You can build the sample program as follows (see compile.sh).

g++ api.cpp -I /usr/local/include -L /usr/local/lib -lhdf5 -DNDEBUG -O3

When running the executable, irbasis.h5 must exist in your working directory.

Plotting the IR basis function (Python)

This sample code uv.py plots the IR basis functions u(x) and v(y) for Lambda = 1000 and fermions.

Fig Fig

Computing expansion coefficients by numerical integration(Python)

In this sample, we demonstrate how to compute expansion coefficients of a given imaginary-time Green's function G_l. We choose the insulator-like spectrum with the pole at \omega = 2 as the model. The technical details are given in Appendix B of N. Chikano et al. arXiv:*****.

The parameters are beta = 100, Lambda = 1000 with fermions. You can simply download gl.py and save it to your directory. Then, type

python gl.py 

This python file draws the figure which plots the absolute value of expansion coefficients G_l with respect to l.

Fig

Converting data from imaginary-time domain to Matsubara frequency via IR(Python)

In this sample, we demonstrate how to transform an imaginary-time Green function to one with the Matsubara frequency i\omega_n. We choose the insulator-like spectrum with the pole at \omega = 2 as the model. The parameters are beta = 100, Lambda = 1000 with fermions.

You can simply download giwn.py and save it to your directory. Then, type

python giwn.py 

This python file draws the figure which plots the exact G(i\omega_n) and converted G(I\omega_n) from imaginary-time domain. The former is calculated by G(I\omega_n) = 1/(I\omega_n - pole).

Fig

Clone this wiki locally