EigenSpace

The module ED_EIGENSPACE contains a class to store the energy spectrum of the quantum impurity problem in sparse_espace. Each instance of the class is a linked list of sparse_estate, each containing: eigenvectors, eigenvalues, symmetry sector index and twin states, i.e. states in sectors with exchanged quantum numbers which do have same energy. The module provides a number of procedures implementing natural operations over the sparse_espace, such as add or removing sparse_estate, returning eigenvector, eigenvalue or minimum/maximum of the energy.

Description

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

Quick access

Types:

sparse_estate, sparse_espace

Variables:

state_list

Routines:

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

Used modules

  • ed_vars_global: Global variable accessible throughout the code

  • ed_aux_funx: Assortment of auxiliary procedures required throughout the code

  • ed_sector: Routines for Fock space sectors creation and manipulation

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:
  • sector [integer] – Symmetry sector index

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

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

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

  • itwin [logical] – twin sector logical label

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

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

type  ed_eigenspace/sparse_espace

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

Type fields:
  • size [integer] – The current size of the list

  • 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

  • status [logical] – Allocation status of the list

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

Variables

ed_eigenspace/state_list

The shared instance of the sparse_espace used in the EDIpack2.0 library

Type:

sparse_espace

Attributes:

public

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] – The twin label of the state to be added

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

Result:

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

Result:

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