| HΦ
    3.1.0
    | 
Functions for spin Hamiltonian (Core) More...
#include <bitcalc.h>#include "mfmemory.h"#include "xsetmem.h"#include "wrapperMPI.h"#include "mltplyCommon.h"#include "mltplySpinCore.h"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 unsigned int isite1, long unsigned int isite2, long unsigned int sigma1, long unsigned int sigma2, long unsigned int sigma3, long unsigned int sigma4, double complex tmp_V) | 
| Set parameters for the bit operation of spin-general interaction term.  More... | |
| int | X_Spin_CisAit (long unsigned int j, struct BindStruct *X, long unsigned int is1_spin, long unsigned int sigma2, long unsigned int *list_1_Org_, long unsigned int *list_2_1_, long unsigned int *list_2_2_, long unsigned int *tmp_off) | 
| Compute index of final wavefunction by \(c_{is}^\dagger c_{it}\) term.  More... | |
| int | X_Spin_CisAis (long unsigned int j, struct BindStruct *X, long unsigned int is1_spin, long unsigned int sigma1) | 
| Compute the spin state with bit mask is1_spin.  More... | |
| int | X_SpinGC_CisAis (long unsigned int j, struct BindStruct *X, long unsigned int is1_spin, long unsigned int sigma1) | 
| Compute the grandcanonical spin state with bit mask is1_spin.  More... | |
| int | X_SpinGC_CisAit (long unsigned int j, struct BindStruct *X, long unsigned int is1_spin, long unsigned int sigma2, long unsigned int *tmp_off) | 
| Compute index of final wavefunction by \(c_{is}^\dagger c_{it}\) term (grandcanonical).  More... | |
| int | X_child_exchange_spin_element (long unsigned int j, struct BindStruct *X, long unsigned int isA_up, long unsigned int isB_up, long unsigned int sigmaA, long unsigned int sigmaB, long unsigned int *tmp_off) | 
| Compute index of final wavefunction associated to spin-exchange term.  More... | |
| double complex | child_exchange_spin_element (long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off) | 
| Multiply Hamiltonian of exchange term of canonical spin system.  More... | |
| double complex | GC_child_exchange_spin_element (long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off) | 
| Multiply Hamiltonian of exchange term of grandcanonical spin system.  More... | |
| double complex | GC_child_pairlift_spin_element (long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off) | 
| Multiply Hamiltonian of pairlift term of grandcanonical spin system.  More... | |
| double complex | child_CisAisCisAis_spin_element (long unsigned int j, long unsigned int isA_up, long unsigned int isB_up, long unsigned int org_sigma2, long unsigned int org_sigma4, double complex tmp_V, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X) | 
| Compute \(c_{is}^\dagger c_{is} c_{is}^\dagger c_{is}\) term of canonical spsin system.  More... | |
| double complex | GC_child_CisAisCisAis_spin_element (long unsigned int j, long unsigned int isA_up, long unsigned int isB_up, long unsigned int org_sigma2, long unsigned int org_sigma4, double complex tmp_V, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X) | 
| Compute \(c_{is}^\dagger c_{is} c_{is}^\dagger c_{is}\) term of grandcanonical spsin system.  More... | |
| double complex | GC_child_CisAisCitAiu_spin_element (long unsigned int j, long unsigned int org_sigma2, long unsigned int org_sigma4, long unsigned int isA_up, long unsigned int isB_up, double complex tmp_V, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off) | 
| Compute \(c_{is}^\dagger c_{is} c_{it}^\dagger c_{iu}\) term of grandcanonical spsin system.  More... | |
| double complex | GC_child_CisAitCiuAiu_spin_element (long unsigned int j, long unsigned int org_sigma2, long unsigned int org_sigma4, long unsigned int isA_up, long unsigned int isB_up, double complex tmp_V, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off) | 
| Compute \(c_{is}^\dagger c_{it} c_{iu}^\dagger c_{iu}\) term of grandcanonical spsin system.  More... | |
| double complex | GC_child_CisAitCiuAiv_spin_element (long unsigned int j, long unsigned int org_sigma2, long unsigned int org_sigma4, long unsigned int isA_up, long unsigned int isB_up, double complex tmp_V, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned 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.c.
| double complex child_CisAisCisAis_spin_element | ( | long unsigned int | j, | 
| long unsigned int | isA_up, | ||
| long unsigned int | isB_up, | ||
| long unsigned int | org_sigma2, | ||
| long unsigned int | org_sigma4, | ||
| double complex | tmp_V, | ||
| double complex * | tmp_v0, | ||
| double complex * | tmp_v1, | ||
| struct BindStruct * | X | ||
| ) | 
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 | 
| [in,out] | X | 
Definition at line 392 of file mltplySpinCore.c.
References X, and X_Spin_CisAis().
Referenced by expec_cisajscktalt_SpinHalf().
| double complex child_exchange_spin_element | ( | long unsigned int | j, | 
| double complex * | tmp_v0, | ||
| double complex * | tmp_v1, | ||
| struct BindStruct * | X, | ||
| long unsigned 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 274 of file mltplySpinCore.c.
References GetOffComp(), list_1, list_2_1, list_2_2, and X.
Referenced by child_exchange_spin(), and makeHam().
| 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 36 of file mltplySpinCore.c.
References X.
Referenced by makeHam(), mltplyHalfSpin(), and mltplyHalfSpinGC().
| int child_general_int_spin_GetInfo | ( | struct BindStruct * | X, | 
| long unsigned int | isite1, | ||
| long unsigned int | isite2, | ||
| long unsigned int | sigma1, | ||
| long unsigned int | sigma2, | ||
| long unsigned int | sigma3, | ||
| long unsigned int | sigma4, | ||
| double complex | 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 92 of file mltplySpinCore.c.
References X.
Referenced by makeHam(), 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 64 of file mltplySpinCore.c.
References X.
Referenced by makeHam(), and mltplyHalfSpinGC().
| double complex GC_child_CisAisCisAis_spin_element | ( | long unsigned int | j, | 
| long unsigned int | isA_up, | ||
| long unsigned int | isB_up, | ||
| long unsigned int | org_sigma2, | ||
| long unsigned int | org_sigma4, | ||
| double complex | tmp_V, | ||
| double complex * | tmp_v0, | ||
| double complex * | tmp_v1, | ||
| struct BindStruct * | X | ||
| ) | 
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 | 
| [in,out] | X | 
Definition at line 427 of file mltplySpinCore.c.
References X, and X_SpinGC_CisAis().
Referenced by expec_cisajscktalt_SpinGCHalf(), GC_child_general_int_spin(), and makeHam().
| double complex GC_child_CisAisCitAiu_spin_element | ( | long unsigned int | j, | 
| long unsigned int | org_sigma2, | ||
| long unsigned int | org_sigma4, | ||
| long unsigned int | isA_up, | ||
| long unsigned int | isB_up, | ||
| double complex | tmp_V, | ||
| double complex * | tmp_v0, | ||
| double complex * | tmp_v1, | ||
| struct BindStruct * | X, | ||
| long unsigned 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 | 
| [in,out] | X | |
| [out] | tmp_off | Index of final wavefunction | 
Definition at line 460 of file mltplySpinCore.c.
References X, X_SpinGC_CisAis(), and X_SpinGC_CisAit().
Referenced by expec_cisajscktalt_SpinGCHalf(), GC_child_general_int_spin(), and makeHam().
| double complex GC_child_CisAitCiuAiu_spin_element | ( | long unsigned int | j, | 
| long unsigned int | org_sigma2, | ||
| long unsigned int | org_sigma4, | ||
| long unsigned int | isA_up, | ||
| long unsigned int | isB_up, | ||
| double complex | tmp_V, | ||
| double complex * | tmp_v0, | ||
| double complex * | tmp_v1, | ||
| struct BindStruct * | X, | ||
| long unsigned 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 | 
| [in,out] | X | |
| [out] | tmp_off | Index of final wavefunction | 
Definition at line 495 of file mltplySpinCore.c.
References X, X_SpinGC_CisAis(), and X_SpinGC_CisAit().
Referenced by expec_cisajscktalt_SpinGCHalf(), GC_child_general_int_spin(), and makeHam().
| double complex GC_child_CisAitCiuAiv_spin_element | ( | long unsigned int | j, | 
| long unsigned int | org_sigma2, | ||
| long unsigned int | org_sigma4, | ||
| long unsigned int | isA_up, | ||
| long unsigned int | isB_up, | ||
| double complex | tmp_V, | ||
| double complex * | tmp_v0, | ||
| double complex * | tmp_v1, | ||
| struct BindStruct * | X, | ||
| long unsigned 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 | 
| [in,out] | X | |
| [out] | tmp_off_2 | Index of final wavefunction | 
Definition at line 530 of file mltplySpinCore.c.
References X, and X_SpinGC_CisAit().
Referenced by expec_cisajscktalt_SpinGCHalf(), GC_child_general_int_spin(), and makeHam().
| double complex GC_child_exchange_spin_element | ( | long unsigned int | j, | 
| double complex * | tmp_v0, | ||
| double complex * | tmp_v1, | ||
| struct BindStruct * | X, | ||
| long unsigned 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 315 of file mltplySpinCore.c.
References X.
Referenced by GC_child_exchange_spin(), and makeHam().
| double complex GC_child_pairlift_spin_element | ( | long unsigned int | j, | 
| double complex * | tmp_v0, | ||
| double complex * | tmp_v1, | ||
| struct BindStruct * | X, | ||
| long unsigned 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 353 of file mltplySpinCore.c.
References X.
Referenced by GC_child_pairlift_spin(), and makeHam().
| int X_child_exchange_spin_element | ( | long unsigned int | j, | 
| struct BindStruct * | X, | ||
| long unsigned int | isA_up, | ||
| long unsigned int | isB_up, | ||
| long unsigned int | sigmaA, | ||
| long unsigned int | sigmaB, | ||
| long unsigned 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 240 of file mltplySpinCore.c.
References GetOffComp(), list_1, list_2_1, list_2_2, and X.
Referenced by child_general_int_spin(), expec_cisajscktalt_SpinHalf(), and makeHam().
| int X_Spin_CisAis | ( | long unsigned int | j, | 
| struct BindStruct * | X, | ||
| long unsigned int | is1_spin, | ||
| long unsigned int | sigma1 | ||
| ) | 
Compute the spin state with bit mask is1_spin.
| [in] | j | Index of wavefunction | 
| [in,out] | X | |
| [in] | is1_spin | Bit mask | 
| [in] | sigma1 | Target spin state | 
Definition at line 167 of file mltplySpinCore.c.
References list_1.
Referenced by child_CisAisCisAis_spin_element(), expec_cisajs_SpinHalf(), expec_cisajscktalt_SpinHalf(), GetPairExcitedStateHalfSpin(), makeHam(), SetDiagonalInterAll(), and SetDiagonalTEInterAll().
| int X_Spin_CisAit | ( | long unsigned int | j, | 
| struct BindStruct * | X, | ||
| long unsigned int | is1_spin, | ||
| long unsigned int | sigma2, | ||
| long unsigned int * | list_1_Org_, | ||
| long unsigned int * | list_2_1_, | ||
| long unsigned int * | list_2_2_, | ||
| long unsigned 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 | 
| [in] | list_1_Org_ | Similar to list_1 | 
| [in] | list_2_1_ | Similar to list_2_1 | 
| [in] | list_2_2_ | Similar to list_2_2 | 
| [out] | tmp_off | Index of final wavefunction | 
Definition at line 139 of file mltplySpinCore.c.
References GetOffComp(), X, and X_SpinGC_CisAit().
Referenced by GetPairExcitedStateHalfSpin().
| int X_SpinGC_CisAis | ( | long unsigned int | j, | 
| struct BindStruct * | X, | ||
| long unsigned int | is1_spin, | ||
| long unsigned int | sigma1 | ||
| ) | 
Compute the grandcanonical spin state with bit mask is1_spin.
| [in] | j | Index of wavefunction | 
| [in,out] | X | |
| [in] | is1_spin | Bit mask | 
| [in] | sigma1 | Target spin state | 
Definition at line 184 of file mltplySpinCore.c.
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(), GetPairExcitedStateHalfSpinGC(), 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 unsigned int | j, | 
| struct BindStruct * | X, | ||
| long unsigned int | is1_spin, | ||
| long unsigned int | sigma2, | ||
| long unsigned int * | tmp_off | ||
| ) | 
Compute index of final wavefunction by \(c_{is}^\dagger c_{it}\) term (grandcanonical).
| [in] | j | Index of 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 204 of file mltplySpinCore.c.
Referenced by expec_cisajs_SpinGCHalf(), GC_child_CisAisCitAiu_spin_element(), GC_child_CisAitCiuAiu_spin_element(), GC_child_CisAitCiuAiv_spin_element(), GetPairExcitedStateHalfSpinGC(), makeHam(), mltplyHalfSpinGC(), X_GC_child_CisAitCiuAiv_spin_MPIsingle(), and X_Spin_CisAit().