The EDIpack2 Fortran Library
Here we give an overview of the structure of the EDIpack2 library, with a detailed description of the relevant modules and procedures.
Library Frontend
The EDIPACK2
module represents the main user interface (or Fortran API)
of the EDIpack2 library. This modules gives access to all the
available procedures and variables as needed to solve quantum impurity problems.
Core Solver Routines
The module ED_MAIN
wraps the EDIpack2 algorithm into
three functions, one for each step: initialization, solution and finalization.
General Environment
This part of the library includes a set of modules which contain variables or procedures serving the rest of the code. The set includes:
ED_INPUT_VARS
which defines global input variables and input read method.
ED_VARS_GLOBAL
containing global shared variables and classes,such as the key class effective_bath
which gathers the different bath components according to value of bath_type
and ed_mode
.
ED_AUX_FUNX
defining procedures which are used throughout the code.
ED_SETUP
which handles global memory (de)allocation and the evaluation of the dimensions of the symmetry sectors.
ED_PARSE_UMATRIX
which describes how a custom interaction Hamiltonian can be initialized.
Classes
This is a group of modules implementing different classes which are used throughout the software to deal with special needs. The group includes:
The ED_SPARSE_MATRIX
class, which contains the implementation of a
suitable Compact Row Stored (CRS) sparse matrix, used to store the sparse Hamiltonians in each symmetry
sector.
The ED_EIGENSPACE
class, which implements an ordered
single linked list to efficiently store the lower part of the energy spectrum.
The ED_GFMATRIX
class which stores the
results of the dynamical Lanczos calculation of dynamical correlation
functions in terms of weights and poles of the Kallen-Lehmann representation.
Symmetry Sectors
The ED_SECTOR
module implements the construction of the symmetry
sectors for the three sets of quantum numbers \(\vec{Q}\) considered in EDIpack2, that we
recall are:
\(\vec{Q}=[\vec{N}_\uparrow,\vec{N}_\downarrow]\) for which either the number of total or orbital spin up and down electrons is conserved: NORMAL
\(\vec{Q}=S_z\) with conserved total magnetization: SUPERConducting
\(\vec{Q}=N_{\rm tot}\) where spin degrees freedom is not fully conserved: NON-SU(2)
Quantum Impurity Bath
In EDIpack2 the bath is handled using a Reverse Communication Strategy. All the procedures designed to define or handle the discretized bath as well as those to evaluate suitable functions of the bath are grouped in set of modules.
Hamiltonian
This part of the EDIpack2 code implements the setup of the
sector Hamiltonian in each operational modes, corresponding to the
choice of one of the symmetries implemented in the code selected by the variable ed_mode
= normal, superc, nosu2
. See
ED_SECTOR
for more info about the symmetries implemented in
the code.
Any of three different mode is implemented in a distinct class of modules performing all the operations required for the construction of the Hamiltonian and the definition of the corresponding matrix vector product, required by the Arpack/Lanczos.
Exact Diagonalization
This part of the EDIpack2 code implements the exact
diagonalization of the general, single-site, multi-orbital quantum
impurity problem in each of the specific symmetry implemented in the
code. The operational modes are selected by the variable
ed_mode
= normal, superc, nosu2
(see
ED_SECTOR
for more info about the symmetries implemented
in the code).
As above, we implemented the three different channels in distinct class of modules.
Green's Functions
This part of the EDIpack2 code implements the calculation of the
impurity interacting Green's functions, self-energy functions and
impurity susceptibilities. Calculations are performed in each operational mode, corresponding to the
choice of the specific symmetry implemented in the code, i.e. which
quantum numbers are to be conserved. The operational modes are selected
by the variable ed_mode
= normal, superc, nosu2
(see
ED_SECTOR
for more info about the symmetries implemented in
the code).
Susceptibilities
This part of the EDIpack2 code implements the calculation of the
impurity susceptibilities in different physical channels: spin,
charge, pair and excitonic. The calculations are performed for
ed_mode
= normal
.
Observables
This part of the EDIpack2 code implements the calculation of the
impurity observables and static correlations, such as density,
internal energy or double occupation. Calculations are performed in
each operational mode, corresponding to the choice of the specific
symmetry implemented in the code, i.e. which quantum numbers are to be
conserved. The operational modes are selected by the variable
ed_mode
= normal, superc, nosu2
. The observables
are printed in plain text files and are accessible to the user
through the routines lited in ED_IO
(see
ED_SECTOR
for more info about the symmetries implemented in
the code).
Reduced Density Matrix
This part of the EDIpack2 code implements the calculation of the
impurity Reduced Density Matrix (RDM). Calculations are performed in
each operational mode, corresponding to the choice of the specific
symmetry implemented in the code, i.e. which quantum numbers are to be
conserved. The operational modes are selected by the variable
ed_mode
= normal, superc, nosu2
.
The evaluation of the RDM exploit an efficient sparse algorithm to
avoid tracing over the exponentially many bath configuration.
The RDM is saved to file and made available to the user
through the routines listed in ED_IO
.
Input/Output
This module provides access to the results of the exact diagonalization. All quantities such as dynamical response functions, self-energy components or impurity observables can be retrieved using specific functions. Additionally we provide procedure to perform on-the-fly re-calculation of the impurity Green's functions and self-energy on a given arbitrary set of points in the complex frequency domain.
Bath Optimization
In this module we provide to the user a generic function
ed_chi2_fitgf()
performing the minimization of a user provided
Weiss field against the corresponding model of non-interacting
Anderson Green's function with the aim of updating the user bath parameters.