Impurity Problem Solution Routines

The module ED_MAIN contains the functions that initializes, launch and finalize the EDIpack2.0 solver for the quantum impurity problem.

The initialization, ed_init() setups and allocates all the internal variables and memory used in the code, which remain available to the user until ed_finalize() is called. The main function is ed_solve:() which aim to diagonalize the impurity problem, evaluate the dynamical response functions and local observables making them available to user through input/output procedures.

Description

Contains routine that initialize, run and finalize the Impurity model solver

Quick access

Routines:

ed_init_solver(), ed_solve(), ed_rebuild_gf(), ed_finalize_solver()

Used modules

  • sf_iotools

  • sf_timer

  • sf_misc

  • ed_input_vars: Contains all global input variables which can be set by the user through the input file. A specific preocedure ed_read_input() should be called to read the input file using parse_input_variable() procedure from SciFortran. All variables are automatically set to a default, looked for and updated by reading into the file and, sequentially looked for and updated from command line (std.input) using the notation variable_name=variable_value(s) (case independent).

  • ed_vars_global: Contains all variables, arrays and derived types instances shared throughout the code. Specifically, it contains definitions of the effective_bath, the gfmatrix and the sector data structures.

  • ed_eigenspace: A class implementing a data structure to efficiently store the low part of the Fock space spectrum, automatically spreading and retrieving the eigenstates among/from MPI threads.

  • ed_aux_funx: Hosts a number of auxiliary procedures required in different parts of the code. Specifically, it implements: creation/annihilation fermionic operators, binary decomposition of integer representation of Fock states and setup the local impurity Hamiltonian

  • ed_setup: Contains procedures to set up the Exact Diagonalization calculation, executing all internal consistency checks and allocation of the global memory.

  • ed_bath: Contains routines for setting, accessing, manipulating and clearing the bath of the Impurity problem.

  • ed_hamiltonian

  • ed_greens_functions

  • ed_chi_functions

  • ed_observables

  • ed_diag

Subroutines and functions

interface  ed_main/ed_init_solver(bath)

Initialize the Exact Diagonalization solver of EDIpack2.0. This procedure reserves and allocates all the memory required by the solver, performs all the consistency check and initializes the bath instance guessing or reading from a file. It requires as an input a double precision array of rank-1 [ nb ] for the single-impurity case or or rank-2 [ nb , nlat ] for the Real space DMFT case. nlat is the number of inequivalent impurity sites, while nb depends on the bath size and geometry and can be obtained from get_bath_dimension() .

Parameters:

bath (various shapes) [real, inout] – user bath input array

interface  ed_main/ed_solve(bath[, sflag, fmpi, mpi_lanc, uloc_ii, ust_ii, jh_ii, jp_ii, jx_ii, iflag])

Launch the Exact Diagonalizaton solver for the single-site and multiple-site (R-DMFT) quantum impurity problem. It requires as an input a double precision array of rank-1 [ nb ] for the single-impurity case or or rank-2 [ nb , nlat ] for the Real space DMFT case. nlat is the number of inequivalent impurity sites, while nb depends on the bath size and geometry and can be obtained from get_bath_dimension() .

The solution is achieved in this sequence:

  1. setup the MPI environment, if any

  2. Set the internal bath instance dmft_bath copying from the user provided input bath

  3. Get the low energy spectrum: call diagonalize_impurity()

  4. Get the impurity Green’s functions: call buildgf_impurity() (if sflag = .true. )

  5. Get the impurity susceptibilities, if any: call buildchi_impurity() (if sflag = .true. )

  6. Get the impurity observables: call observables_impurity()

  7. Get the impurity local energy: call local_energy_impurity()

  8. Delete MPI environment and deallocate used structures state_list and dmft_bath

Parameters:

bath (various shapes) [real, in] – user bath input array

Options:
  • sflag [logical] – flag to calculate ( .true. ) or not ( .false. ) Green’s functions and susceptibilities. Default .true. .

  • fmpi [logical] – flag to solve the impurity problem parallely ( .true. ) or not ( .false. ). Default .true. .

  • mpi_lanc [logical] – parallelization strategy flag: if .false. each core serially solves an inequivalent site, if .true. all cores parallely solve each site in sequence. Default .false. .

  • uloc_ii (size(bath, 1), norb) [real] – site-dependent values for uloc , overriding the ones in the input file. It has dimension [ nlat , norb ].

  • ust_ii (size(bath, 1)) [real] – site-dependent values for ust , overriding the ones in the input file. It has dimension [ nlat].

  • jh_ii (size(bath, 1)) [real] – site-dependent values for jh , overriding the ones in the input file. It has dimension [ nlat].

  • jp_ii (size(bath, 1)) [real] – site-dependent values for jp , overriding the ones in the input file. It has dimension [ nlat].

  • jx_ii (size(bath, 1)) [real] – site-dependent values for jx , overriding the ones in the input file. It has dimension [ nlat].

  • iflag [logical] – flag to calculate ( .true. ) or not ( .false. ) Green’s functions and susceptibilities. Default .true. .

interface  ed_main/ed_rebuild_gf(nlat)

Re-build the impurity Green’s functions and self-energies using the stored weights and poles from impgmatrix data structure, instead of calculating them from the ED routine. Store them in the global variables

  • impsmats / impgmats : normal, Matsubara axis

  • impsreal / impgreal : normal, real frequency axis

  • impsamats / impfmats : anomalous, Matsubara axis

  • impsareal / impfreal : anomalous, real-frequency axis

  • smats_ineq / gmats_ineq : normal, Matsubara axis, real-space DMFT

  • sreal_ineq / greal_ineq : normal, real frequency axis, real-space DMFT

  • samats_ineq / fmats_ineq : anomalous, Matsubara axis, real-space DMFT

  • sareal_ineq / freal_ineq : anomalous, real frequency axis, real-space DMFT

Parameters:

nlat [integer] – number of inequivalent impurity sites for real-space DMFT

interface  ed_main/ed_finalize_solver(nineq)

Finalize the Exact Diagonalization solver, clean up all the allocated memory.

Parameters:

nineq [integer] – number of inequivalent impurity sites for real-space DMFT