Replica bath setup

Description

In these module we implement the functions to set the matrix basis \(\{ \hat{O}_i \}_{i=1,\dots,N_{sym}}\) and the initial variational parameters \(\vec{\lambda}\) used to decompose each local bath hamiltonian for the replica and general bath types. Note that the two bath types share the very same matrix basis, yet for consistency we provide distinct interfaces to the two for each procedure.

Quick access

Routines:

allocate_hgeneral(), allocate_hreplica(), build_hgeneral(), build_hreplica(), deallocate_hgeneral(), deallocate_hreplica(), hgeneral_mask(), hreplica_mask(), print_hreplica(), read_hgeneral(), read_hreplica(), save_hgeneral(), save_hreplica(), set_hgeneral(), set_hreplica(), set_hsym_hgeneral(), set_hsym_hreplica(), set_linit_hgeneral(), set_linit_hreplica()

Used modules

  • ed_input_vars: User-accessible input variables

  • ed_vars_global: Global variable accessible throughout the code

  • ed_aux_funx: Assortment of auxiliary procedures required throughout the code

  • ed_bath_aux: Auxiliary routines for bath creation and manipulation

External modules

Subroutines and functions

interface  ed_bath_replica/set_hreplica(hvec, lvec)

This function sets the matrix basis \(\{ \hat{O}_i \}_{i=1,\dots,N_{sym}}\) used to decompose the single bath hamiltonian \(h^p\). It also sets the initial values of the variational parameters \(\vec{\lambda}\) in the replica ath type.

Input: Hvec
Input: lvec
  • rank-2, dimensions: [ nbath , nsym ]

  • rank-3, dimensions: [ nlat , nbath , nsym ]

Parameters:
  • hvec (various shapes) [complex] – [Nnambu*Nspin,Nnambu*Nspin,Norb,Norb,Nsym]

  • lvec (various shapes) [real] – [Nbath,Nsym]

interface  ed_bath_replica/allocate_hgeneral(nsym)

A clone of allocate_hreplica for the GENERAL bath

Parameters:

nsym [integer] – Number of elements in the matrix decomposition

interface  ed_bath_replica/deallocate_hgeneral()

A clone of deallocate_hreplica for the GENERAL bath

interface  ed_bath_replica/save_hgeneral(file)

A clone of save_hreplica for the GENERAL bath

Parameters:

file [character(len=*)] – Name of the file to store Hb

interface  ed_bath_replica/read_hgeneral(file)

A clone of read_hreplica for the GENERAL bath

Parameters:

file [character(len=*)] – Name of the file to store Hb

interface  ed_bath_replica/set_hgeneral(hvec, lvec)

A clone of set_hreplica for the GENERAL bath

Parameters:
  • hvec (various shapes) [complex] – [Nnambu*Nspin,Nnambu*Nspin,Norb,Norb,Nsym]

  • lvec (various shapes) [real] – [Nbath,Nsym]

interface  ed_bath_replica/set_linit_hgeneral(lvec)

A clone of set_linit_hreplica for the GENERAL bath

Parameters:

lvec (•, •) [real] – the input vector of bath parameters [Nsym,Nbath]

interface  ed_bath_replica/set_hsym_hgeneral(isym, hsym)

A clone of set_hsym_hreplica for the GENERAL bath

Parameters:
  • isym [integer]

  • hsym (•, •, •, •) [complex] – [Nambu*Nspin,Nambu*Nspin,Norb,Norb]

interface  ed_bath_replica/build_hgeneral([lvec])

A clone of build_hreplica for the GENERAL bath

Options:

lvec (•) [real] – The input vector of bath parameters

Result:

h (nnambu · nspin, nnambu · nspin, norb, norb) [complex] – The replica matrix

interface  ed_bath_replica/hgeneral_mask([wdiag, uplo])

A clone of hreplica_mask() for the GENERAL bath

Options:
  • wdiag [logical] – Flag to set the major diagonal to True

  • uplo [logical] – Flag to only set the upper triangular matrix

Result:

hmask (nnambu · nspin, nnambu · nspin, norb, norb) [logical] – The resulting logical matrix

subroutine  ed_bath_replica/allocate_hreplica(nsym)

Allocate global basis for Hb and the initial vector coefficient.

Parameters:

nsym [integer] – Number of elements in the matrix decomposition

subroutine  ed_bath_replica/deallocate_hreplica()

Deallocate the global Hb as well as the initial vector coefficient.

subroutine  ed_bath_replica/save_hreplica(file)

Save Hb to file.

Parameters:

file [character(len=*)] – Name of the file to store Hb

Use :

ed_input_vars (nspin, norb)

subroutine  ed_bath_replica/read_hreplica(file)

Read Hb from specified file.

Parameters:

file [character(len=*)] – Name of the file to store Hb

Use :

ed_input_vars (nspin, norb)

subroutine  ed_bath_replica/set_linit_hreplica(lvec)

This function is used to set the initial value of \(\lambda\) parameters in the bath Hamiltonian matrix decomposition

Parameters:

lvec (•, •) [real] – the input vector of bath parameters [Nsym,Nbath]

Use :

ed_input_vars (nspin, norb, nbath)

subroutine  ed_bath_replica/set_hsym_hreplica(isym, hsym)

This function is used to set a matrix element in the basis of the bath Hamiltonian matrix decomposition

Parameters:
  • isym [integer]

  • hsym (•, •, •, •) [complex] – [Nambu*Nspin,Nambu*Nspin,Norb,Norb]

Use :

ed_input_vars (nspin, norb, nbath)

function  ed_bath_replica/build_hreplica([lvec])

This function is used to reconstruct the local bath Hamiltonian from basis expansion given the vector of \(\vec{\lambda}\) parameters \(h^p=\sum_i \lambda^p_i O_i\). The resulting Hamiltonian has dimensions [ nspin , nspin , norb , norb ]

Options:

lvec (•) [real] – The input vector of bath parameters

Result:

h (nnambu · nspin, nnambu · nspin, norb, norb) [complex] – The replica matrix

Use :

ed_input_vars (nspin, norb, nbath)

subroutine  ed_bath_replica/print_hreplica(h[, file])

Prints the replica Hamiltonian to a file or to standard output

Parameters:

h (nnambu · nspin, nnambu · nspin, norb, norb) [complex] – The matrix to print

Options:

file [character(len=*)] – Filename

Use :

ed_input_vars (nspin, norb)

function  ed_bath_replica/hreplica_mask([wdiag, uplo])

Creates a logical matrix Hmask which is True where the bath replica matrix is nonzero. If wdiag is True the major diagonal is set to True - If uplo is True only the upper triangular part is kept, the rest is set to False

Options:
  • wdiag [logical] – Flag to set the major diagonal to True

  • uplo [logical] – Flag to only set the upper triangular matrix

Result:

hmask (nnambu · nspin, nnambu · nspin, norb, norb) [logical] – The resulting logical matrix

Use :

ed_input_vars (nspin, norb, nbath)