HPhi++
3.1.0
|
Functions for spin Hamiltonian (Core) More...
#include <bitcalc.hpp>
#include "xsetmem.hpp"
#include "wrapperMPI.hpp"
#include "mltplyCommon.hpp"
#include "mltplySpinCore.hpp"
Go to the source code of this file.
Functions | |
int | child_exchange_spin_GetInfo (int iExchange, struct BindStruct *X) |
Set parameters for the bit operation of spin-exchange term. More... | |
int | child_pairlift_spin_GetInfo (int iPairLift, struct BindStruct *X) |
Set parameters for the bit operation of spin-pairlift term. More... | |
int | child_general_int_spin_GetInfo (struct BindStruct *X, long int isite1, long int isite2, long int sigma1, long int sigma2, long int sigma3, long int sigma4, std::complex< double > tmp_V) |
Set parameters for the bit operation of spin-general interaction term. More... | |
int | X_Spin_CisAit (long int j, struct BindStruct *X, long int is1_spin, long int sigma2, long int *tmp_off) |
Compute index of final wavefunction by \(c_{is}^\dagger c_{it}\) term. More... | |
int | X_Spin_CisAis (long int j, long int is1_spin, long int sigma1) |
Compute the spin state with bit mask is1_spin. More... | |
int | X_SpinGC_CisAis (long int j, long int is1_spin, long int sigma1) |
Compute the grandcanonical spin state with bit mask is1_spin. More... | |
int | X_SpinGC_CisAit (long int j, long int is1_spin, long int sigma2, long int *tmp_off) |
Compute index of final wavefunction by \(c_{is}^\dagger c_{it}\) term (grandcanonical). More... | |
int | X_child_exchange_spin_element (long int j, struct BindStruct *X, long int isA_up, long int isB_up, long int sigmaA, long int sigmaB, long int *tmp_off) |
Compute index of final wavefunction associated to spin-exchange term. More... | |
void | child_exchange_spin_element (long int j, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, struct BindStruct *X, long int *tmp_off) |
Multiply Hamiltonian of exchange term of canonical spin system. More... | |
void | GC_child_exchange_spin_element (long int j, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, struct BindStruct *X, long int *tmp_off) |
Multiply Hamiltonian of exchange term of grandcanonical spin system. More... | |
void | GC_child_pairlift_spin_element (long int j, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, struct BindStruct *X, long int *tmp_off) |
Multiply Hamiltonian of pairlift term of grandcanonical spin system. More... | |
void | child_CisAisCisAis_spin_element (long int j, long int isA_up, long int isB_up, long int org_sigma2, long int org_sigma4, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1) |
Compute \(c_{is}^\dagger c_{is} c_{is}^\dagger c_{is}\) term of canonical spsin system. More... | |
void | GC_child_CisAisCisAis_spin_element (long int j, long int isA_up, long int isB_up, long int org_sigma2, long int org_sigma4, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1) |
Compute \(c_{is}^\dagger c_{is} c_{is}^\dagger c_{is}\) term of grandcanonical spsin system. More... | |
void | GC_child_CisAisCitAiu_spin_element (long int j, long int org_sigma2, long int org_sigma4, long int isA_up, long int isB_up, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, long int *tmp_off) |
Compute \(c_{is}^\dagger c_{is} c_{it}^\dagger c_{iu}\) term of grandcanonical spsin system. More... | |
void | GC_child_CisAitCiuAiu_spin_element (long int j, long int org_sigma2, long int org_sigma4, long int isA_up, long int isB_up, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, long int *tmp_off) |
Compute \(c_{is}^\dagger c_{it} c_{iu}^\dagger c_{iu}\) term of grandcanonical spsin system. More... | |
void | GC_child_CisAitCiuAiv_spin_element (long int j, long int org_sigma2, long int org_sigma4, long int isA_up, long int isB_up, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, long int *tmp_off_2) |
Compute \(c_{is}^\dagger c_{it} c_{iu}^\dagger c_{iv}\) term of grandcanonical spsin system. More... | |
Functions for spin Hamiltonian (Core)
Definition in file mltplySpinCore.cpp.
void child_CisAisCisAis_spin_element | ( | long int | j, |
long int | isA_up, | ||
long int | isB_up, | ||
long int | org_sigma2, | ||
long int | org_sigma4, | ||
std::complex< double > | tmp_V, | ||
int | nstate, | ||
std::complex< double > ** | tmp_v0, | ||
std::complex< double > ** | tmp_v1 | ||
) |
Compute \(c_{is}^\dagger c_{is} c_{is}^\dagger c_{is}\) term of canonical spsin system.
[in] | j | Index of initial wavefunction |
[in] | isA_up | Bit mask for spin 1 |
[in] | isB_up | Bit mask for spin 2 |
[in] | org_sigma2 | Target for spin 1 |
[in] | org_sigma4 | Target for spin 2 |
[in] | tmp_V | Coupling constatnt |
[in] | tmp_v0 | Resulting wavefunction |
[in] | tmp_v1 | Wavefunction to be multiplied |
Definition at line 357 of file mltplySpinCore.cpp.
References X_Spin_CisAis().
Referenced by expec_cisajscktalt_SpinHalf().
void child_exchange_spin_element | ( | long int | j, |
int | nstate, | ||
std::complex< double > ** | tmp_v0, | ||
std::complex< double > ** | tmp_v1, | ||
struct BindStruct * | X, | ||
long int * | tmp_off | ||
) |
Multiply Hamiltonian of exchange term of canonical spin system.
[in] | j | Index of initial wavefunction |
[out] | tmp_v0 | Resulting wavefunction |
[in] | tmp_v1 | Wavefunction to be multiplied |
[in,out] | X | |
[out] | tmp_off | Index of final wavefunction |
Definition at line 266 of file mltplySpinCore.cpp.
References GetOffComp(), LargeList::ihfbit, LargeList::ilft, LargeList::irght, LargeList::isA_spin, BindStruct::Large, list_1, list_2_1, list_2_2, and LargeList::tmp_J.
Referenced by child_exchange_spin().
int child_exchange_spin_GetInfo | ( | int | iExchange, |
struct BindStruct * | X | ||
) |
Set parameters for the bit operation of spin-exchange term.
Set the exchange coupling constant (LargeList::tmp_J)
Set the bit mask for computing spin state of both site (LargeList::is1_up, LargeList::is2_up)
Set the bit mask for exchange 2 spins (LargeList::isA_spin)
[in] | iExchange | Counter of exchange interaction |
[in,out] | X |
Definition at line 35 of file mltplySpinCore.cpp.
References BindStruct::Def, DefineList::ExchangeCoupling, LargeList::is1_up, LargeList::is2_up, LargeList::isA_spin, BindStruct::Large, DefineList::ParaExchangeCoupling, LargeList::tmp_J, and DefineList::Tpow.
Referenced by mltplyHalfSpin(), and mltplyHalfSpinGC().
int child_general_int_spin_GetInfo | ( | struct BindStruct * | X, |
long int | isite1, | ||
long int | isite2, | ||
long int | sigma1, | ||
long int | sigma2, | ||
long int | sigma3, | ||
long int | sigma4, | ||
std::complex< double > | tmp_V | ||
) |
Set parameters for the bit operation of spin-general interaction term.
Set the pairlift coupling constant (LargeList::tmp_J)
Set the bit mask for computing spin state of both site (LargeList::is1_up, LargeList::is2_up)
Set the bit mask for general interaction (LargeList::is1_spin, LargeList::is2_spin, LargeList::is3_spin, LargeList::is4_spin)
[in,out] | X | |
[in] | isite1 | Site 1 |
[in] | isite2 | Site 2 |
[in] | sigma1 | Sigma 1, final state of site 1 |
[in] | sigma2 | Sigma 3, initial state of site 1 |
[in] | sigma3 | Sigma 3, final state of site 2 |
[in] | sigma4 | Sigma 4, initial state of site 2 |
[in] | tmp_V | General interaction constatnt |
Definition at line 91 of file mltplySpinCore.cpp.
References BindStruct::Def, LargeList::is1_spin, LargeList::is1_up, LargeList::is2_spin, LargeList::is2_up, LargeList::is3_spin, LargeList::is4_spin, LargeList::isite1, LargeList::isite2, BindStruct::Large, LargeList::tmp_V, and DefineList::Tpow.
Referenced by mltplyHalfSpin(), and mltplyHalfSpinGC().
int child_pairlift_spin_GetInfo | ( | int | iPairLift, |
struct BindStruct * | X | ||
) |
Set parameters for the bit operation of spin-pairlift term.
Set the pairlift coupling constant (LargeList::tmp_J)
Set the bit mask for computing spin state of both site (LargeList::is1_up, LargeList::is2_up)
Set the bit mask for exchange 2 spins (LargeList::isA_spin)
Definition at line 63 of file mltplySpinCore.cpp.
References BindStruct::Def, LargeList::is1_up, LargeList::is2_up, LargeList::isA_spin, BindStruct::Large, DefineList::PairLiftCoupling, DefineList::ParaPairLiftCoupling, LargeList::tmp_J, and DefineList::Tpow.
Referenced by mltplyHalfSpinGC().
void GC_child_CisAisCisAis_spin_element | ( | long int | j, |
long int | isA_up, | ||
long int | isB_up, | ||
long int | org_sigma2, | ||
long int | org_sigma4, | ||
std::complex< double > | tmp_V, | ||
int | nstate, | ||
std::complex< double > ** | tmp_v0, | ||
std::complex< double > ** | tmp_v1 | ||
) |
Compute \(c_{is}^\dagger c_{is} c_{is}^\dagger c_{is}\) term of grandcanonical spsin system.
[in] | j | Index of initial wavefunction |
[in] | isA_up | Bit mask for spin 1 |
[in] | isB_up | Bit mask for spin 2 |
[in] | org_sigma2 | Target for spin 1 |
[in] | org_sigma4 | Target for spin 2 |
[in] | tmp_V | Coupling constatnt |
[in] | tmp_v0 | Resulting wavefunction |
[in] | tmp_v1 | Wavefunction to be multiplied |
Definition at line 386 of file mltplySpinCore.cpp.
References X_SpinGC_CisAis().
Referenced by expec_cisajscktalt_SpinGCHalf(), and GC_child_general_int_spin().
void GC_child_CisAisCitAiu_spin_element | ( | long int | j, |
long int | org_sigma2, | ||
long int | org_sigma4, | ||
long int | isA_up, | ||
long int | isB_up, | ||
std::complex< double > | tmp_V, | ||
int | nstate, | ||
std::complex< double > ** | tmp_v0, | ||
std::complex< double > ** | tmp_v1, | ||
long int * | tmp_off | ||
) |
Compute \(c_{is}^\dagger c_{is} c_{it}^\dagger c_{iu}\) term of grandcanonical spsin system.
[in] | j | Index of initial wavefunction |
[in] | org_sigma2 | Target for spin 1 |
[in] | org_sigma4 | Target for spin 2 |
[in] | isA_up | Bit mask for spin 1 |
[in] | isB_up | Bit mask for spin 2 |
[in] | tmp_V | Coupling constatnt |
[in] | tmp_v0 | Resulting wavefunction |
[in] | tmp_v1 | Wavefunction to be multiplied |
[out] | tmp_off | Index of final wavefunction |
Definition at line 413 of file mltplySpinCore.cpp.
References X_SpinGC_CisAis(), and X_SpinGC_CisAit().
Referenced by expec_cisajscktalt_SpinGCHalf(), and GC_child_general_int_spin().
void GC_child_CisAitCiuAiu_spin_element | ( | long int | j, |
long int | org_sigma2, | ||
long int | org_sigma4, | ||
long int | isA_up, | ||
long int | isB_up, | ||
std::complex< double > | tmp_V, | ||
int | nstate, | ||
std::complex< double > ** | tmp_v0, | ||
std::complex< double > ** | tmp_v1, | ||
long int * | tmp_off | ||
) |
Compute \(c_{is}^\dagger c_{it} c_{iu}^\dagger c_{iu}\) term of grandcanonical spsin system.
[in] | j | Index of initial wavefunction |
[in] | org_sigma2 | Target for spin 1 |
[in] | org_sigma4 | Target for spin 2 |
[in] | isA_up | Bit mask for spin 1 |
[in] | isB_up | Bit mask for spin 2 |
[in] | tmp_V | Coupling constatnt |
[in] | tmp_v0 | Resulting wavefunction |
[in] | tmp_v1 | Wavefunction to be multiplied |
[out] | tmp_off | Index of final wavefunction |
Definition at line 442 of file mltplySpinCore.cpp.
References X_SpinGC_CisAis(), and X_SpinGC_CisAit().
Referenced by expec_cisajscktalt_SpinGCHalf(), and GC_child_general_int_spin().
void GC_child_CisAitCiuAiv_spin_element | ( | long int | j, |
long int | org_sigma2, | ||
long int | org_sigma4, | ||
long int | isA_up, | ||
long int | isB_up, | ||
std::complex< double > | tmp_V, | ||
int | nstate, | ||
std::complex< double > ** | tmp_v0, | ||
std::complex< double > ** | tmp_v1, | ||
long int * | tmp_off_2 | ||
) |
Compute \(c_{is}^\dagger c_{it} c_{iu}^\dagger c_{iv}\) term of grandcanonical spsin system.
[in] | j | Index of initial wavefunction |
[in] | org_sigma2 | Target for spin 1 |
[in] | org_sigma4 | Target for spin 2 |
[in] | isA_up | Bit mask for spin 1 |
[in] | isB_up | Bit mask for spin 2 |
[in] | tmp_V | Coupling constatnt |
[in] | tmp_v0 | Resulting wavefunction |
[in] | tmp_v1 | Wavefunction to be multiplied |
[out] | tmp_off_2 | Index of final wavefunction |
Definition at line 471 of file mltplySpinCore.cpp.
References X_SpinGC_CisAit().
Referenced by expec_cisajscktalt_SpinGCHalf(), and GC_child_general_int_spin().
void GC_child_exchange_spin_element | ( | long int | j, |
int | nstate, | ||
std::complex< double > ** | tmp_v0, | ||
std::complex< double > ** | tmp_v1, | ||
struct BindStruct * | X, | ||
long int * | tmp_off | ||
) |
Multiply Hamiltonian of exchange term of grandcanonical spin system.
[in] | j | Index of initial wavefunction |
[out] | tmp_v0 | Resulting wavefunction |
[in] | tmp_v1 | Wavefunction to be multiplied |
[in,out] | X | |
[out] | tmp_off | Index of final wavefunction |
Definition at line 299 of file mltplySpinCore.cpp.
References LargeList::isA_spin, BindStruct::Large, and LargeList::tmp_J.
Referenced by GC_child_exchange_spin().
void GC_child_pairlift_spin_element | ( | long int | j, |
int | nstate, | ||
std::complex< double > ** | tmp_v0, | ||
std::complex< double > ** | tmp_v1, | ||
struct BindStruct * | X, | ||
long int * | tmp_off | ||
) |
Multiply Hamiltonian of pairlift term of grandcanonical spin system.
[in] | j | Index of initial wavefunction |
[out] | tmp_v0 | Resulting wavefunction |
[in] | tmp_v1 | Wavefunction to be multiplied |
[in,out] | X | |
[out] | tmp_off | Index of final wavefunction |
Definition at line 329 of file mltplySpinCore.cpp.
References LargeList::isA_spin, BindStruct::Large, and LargeList::tmp_J.
Referenced by GC_child_pairlift_spin().
int X_child_exchange_spin_element | ( | long int | j, |
struct BindStruct * | X, | ||
long int | isA_up, | ||
long int | isB_up, | ||
long int | sigmaA, | ||
long int | sigmaB, | ||
long int * | tmp_off | ||
) |
Compute index of final wavefunction associated to spin-exchange term.
[in] | j | Index of initial wavefunction |
[in,out] | X | |
[in] | isA_up | Bit mask for spin 1 |
[in] | isB_up | Bit mask for spin 2 |
[in] | sigmaA | Target of spin 1 |
[in] | sigmaB | Target of spin 2 |
[out] | tmp_off | Index of final wavefunction |
Definition at line 233 of file mltplySpinCore.cpp.
References GetOffComp(), LargeList::ihfbit, LargeList::ilft, LargeList::irght, BindStruct::Large, list_1, list_2_1, and list_2_2.
Referenced by child_general_int_spin(), and expec_cisajscktalt_SpinHalf().
int X_Spin_CisAis | ( | long int | j, |
long int | is1_spin, | ||
long int | sigma1 | ||
) |
Compute the spin state with bit mask is1_spin.
[in] | j | Index of wavefunction |
[in] | is1_spin | Bit mask |
[in] | sigma1 | Target spin state |
Definition at line 163 of file mltplySpinCore.cpp.
References list_1.
Referenced by child_CisAisCisAis_spin_element(), expec_cisajs_SpinHalf(), expec_cisajscktalt_SpinHalf(), GetPairExcitedStateHalfSpin(), SetDiagonalInterAll(), and SetDiagonalTEInterAll().
int X_Spin_CisAit | ( | long int | j, |
struct BindStruct * | X, | ||
long int | is1_spin, | ||
long int | sigma2, | ||
long int * | tmp_off | ||
) |
Compute index of final wavefunction by \(c_{is}^\dagger c_{it}\) term.
[in] | j | Index of initial wavefunction |
[in,out] | X | |
[in] | is1_spin | Bit mask for computing spin state |
[in] | sigma2 | Spin state at site 2 |
[out] | tmp_off | Index of final wavefunction |
Definition at line 138 of file mltplySpinCore.cpp.
References GetOffComp(), LargeList::ihfbit, LargeList::ilft, LargeList::irght, BindStruct::Large, list_1_org, list_2_1, list_2_2, and X_SpinGC_CisAit().
Referenced by GetPairExcitedStateHalfSpin().
int X_SpinGC_CisAis | ( | long int | j, |
long int | is1_spin, | ||
long int | sigma1 | ||
) |
Compute the grandcanonical spin state with bit mask is1_spin.
[in] | j | Index of wavefunction |
[in] | is1_spin | Bit mask |
[in] | sigma1 | Target spin state |
Definition at line 179 of file mltplySpinCore.cpp.
Referenced by expec_cisajs_SpinGCHalf(), expec_cisajs_SpinHalf(), expec_cisajscktalt_SpinHalf(), GC_child_CisAisCisAis_spin_element(), GC_child_CisAisCitAiu_spin_element(), GC_child_CisAitCiuAiu_spin_element(), GetPairExcitedStateHalfSpin(), SetDiagonalInterAll(), SetDiagonalTEInterAll(), totalspin_Spin(), totalspin_SpinGC(), X_GC_child_CisAisCjuAju_spin_MPIdouble(), X_GC_child_CisAisCjuAju_spin_MPIsingle(), X_GC_child_CisAisCjuAjv_spin_MPIdouble(), and X_GC_child_CisAitCjuAju_spin_MPIdouble().
int X_SpinGC_CisAit | ( | long int | j, |
long int | is1_spin, | ||
long int | sigma2, | ||
long int * | tmp_off | ||
) |
Compute index of final wavefunction by \(c_{is}^\dagger c_{it}\) term (grandcanonical).
[in] | j | Index of wavefunction |
[in] | is1_spin | Bit mask for computing spin state |
[in] | sigma2 | Spin state at site 2 |
[out] | tmp_off | Index of final wavefunction |
Definition at line 198 of file mltplySpinCore.cpp.
Referenced by expec_cisajs_SpinGCHalf(), GC_child_CisAisCitAiu_spin_element(), GC_child_CisAitCiuAiu_spin_element(), GC_child_CisAitCiuAiv_spin_element(), mltplyHalfSpinGC(), X_GC_child_CisAitCiuAiv_spin_MPIsingle(), and X_Spin_CisAit().