EigenSpace

Description

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.

Quick access

Types:

sparse_estate, sparse_espace

Variables:

state_list

Routines:

es_insert_state(), es_add_state(), es_return_dvector(), es_return_cvector(), es_delete_espace(), es_return_sector(), es_return_energy()

Used modules

  • 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_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_sector: Contains procedures to construct the symmetry sectors corresponding to a given set of quantum numbers \(\vec{Q}\), in particular it allocated and build the sector_map connecting the states of a given sector with the corresponding Fock ones.

Types

  • type  ed_eigenspace/sparse_estate

    A single element of the linked list sparse_espace. The sparse_estate gather all the information relative to a single eigen-state of the Hamiltonian spectrum. It includes a logical itwin and pointer twin to identiy the equivalent state in the twin sector, i.e. a degenerate state with opposite quantum numbers, without actually storing the eigenvector.

    Type fields:
    • cvec (•) [complex, allocatable] – double complex eigen-vector

    • dvec (•) [real, allocatable] – double precision eigen-vector

    • e [real] – energy of the eigen-state, used to order the list

    • itwin [logical, optional/default=.false.] – twin sector logical label

    • next [sparse_estate, pointer/optional/default=>null()]

    • sector [integer] – Symmetry sector index

    • twin [sparse_estate, pointer/optional/default=>null()]

  • type  ed_eigenspace/sparse_espace

    Ordered single linked list storing the lower part of the Hamiltonian spectrum state by state.

    Type fields:
    • emax [real] – The maximum energy of the list, fixed by the condition \(e^{-\beta {\rm emax}}<\) cutoff

    • emin [real] – The minimum energy of the list, i.e. the groundstate energy

    • root [sparse_estate, pointer/optional/default=>null()]

    • size [integer] – The current size of the list

    • status [logical, optional/default=.false.] – Allocation status of the list

Variables

Subroutines and functions

interface  ed_eigenspace/es_insert_state(space, e, vec, sector, twin)

Insert a sparse_estate into the sparse_espace using e, vec, sector and optionally a itwin label

Parameters:
  • space [sparse_espace, inout]

  • e [real, in] – The eigenenergy of the state to be added

  • vec (•) [real, complex, in] – The eigenvector of the state to be added

  • sector [integer, in] – The symmetry sector of the state to be added

  • twin [logical] – wiggled arrow pointing to the twin sparse_estate

interface  ed_eigenspace/es_add_state(espace, e, vec, sector[, twin, size, verbose])

Insert a sparse_estate into the sparse_espace using e, vec, sector and optionally a itwin label optionally filling the list respecting the energy threshold limit.

Parameters:
  • espace [sparse_espace, inout]

  • e [real, in] – The eigenenergy of the state to be added

  • vec (•) [real, complex, in] – The eigenvector of the state to be added

  • sector [integer, in] – The symetry sector index of the state to be added

Options:
  • twin [logical, in] – The twin state lable [optional]

  • size [integer, in] – The size threshold of the list [optional]

  • verbose [logical, in]

interface  ed_eigenspace/es_return_dvector(space, vector, mpicomm[, n])

Returns the double precision vector of a given sparse_estate indicated by the position n in the list. If MPI execution is active the vector is returned already split in chunks assigned to each thread according to the current parallel algorithm. Should the sparse_estate correspond to a twin state, the vector is reconstructed on the fly using twin pointer and suitable reordering (as the basis of the two symmetry sector with opposite quantum numbers do have different ordering in general).

Parameters:
  • space [sparse_espace, in]

  • vector (•) [real, allocatable] – The selected eigen-vector

  • mpicomm [integer]

Options:

n [integer, in] – The position in the list corresponding to the vector to be returned

interface  ed_eigenspace/es_return_cvector(space, vector, mpicomm[, n])

Returns the double complex vector of a given sparse_estate indicated by the position n in the list. If MPI execution is active the vector is returned already split in chunks assigned to each thread according to the current parallel algorithm. Should the sparse_estate correspond to a twin state, the vector is reconstructed on the fly using twin pointer and suitable reordering (as the basis of the two symmetry sector with opposite quantum numbers do have different ordering in general).

Parameters:
  • space [sparse_espace, in]

  • vector (•) [complex, allocatable]

  • mpicomm [integer]

Options:

n [integer, in]

subroutine  ed_eigenspace/es_delete_espace(space)

Destroys the list of states.

Parameters:

space [sparse_espace, inout] – the eigenspace to clear

function  ed_eigenspace/es_return_sector(space[, n])

Returns the symmetry sector index of the indicated sparse_estate in the list. If no position is indicated it returns the energy of the last state.

Parameters:

space [sparse_espace, in]

Options:

n [integer, in] – positions of the indicated sparse_estate in the list

Return:

sector [integer] – the symmetry sector index of the indicated sparse_estate in the list

function  ed_eigenspace/es_return_energy(space[, n])

Returns the eigen-energy of the indicated sparse_estate in the list. If no position is indicated it returns the energy of the last state.

Parameters:

space [sparse_espace, in]

Options:

n [integer, in] – positions of the indicated sparse_estate in the list

Return:

egs [real] – eigen-energy of the indicated sparse_estate in the list