21 #include "wrapperMPI.h" 22 #include "mltplyCommon.h" 23 #include "mltplySpinCore.h" 93 long unsigned int isite1,
94 long unsigned int isite2,
95 long unsigned int sigma1,
96 long unsigned int sigma2,
97 long unsigned int sigma3,
98 long unsigned int sigma4,
141 long unsigned int is1_spin,
142 long unsigned int sigma2,
143 long unsigned int *list_1_Org_,
144 long unsigned int *list_2_1_,
145 long unsigned int *list_2_2_,
146 long unsigned int *tmp_off
148 long unsigned int list_1_j;
149 long unsigned int off;
150 list_1_j = list_1_Org_[j];
169 long unsigned int is1_spin,
170 long unsigned int sigma1
174 A_ibit_tmp = ((
list_1[j] & is1_spin) / is1_spin) ^ (1 - sigma1);
186 long unsigned int is1_spin,
187 long unsigned int sigma1
190 long unsigned int list_1_j;
193 A_ibit_tmp = ((list_1_j & is1_spin) / is1_spin) ^ (1 - sigma1);
206 long unsigned int is1_spin,
207 long unsigned int sigma2,
208 long unsigned int *tmp_off
210 long unsigned int list_1_j, ibit_tmp_1;
214 ibit_tmp_1 = list_1_j & is1_spin;
215 if (ibit_tmp_1 == 0 && sigma2 == 0) {
216 *tmp_off = list_1_j + is1_spin;
219 else if (ibit_tmp_1 != 0 && sigma2 == 1) {
220 *tmp_off = list_1_j - is1_spin;
242 long unsigned int isA_up,
243 long unsigned int isB_up,
244 long unsigned int sigmaA,
245 long unsigned int sigmaB,
246 long unsigned int *tmp_off
248 long unsigned int iexchg, off;
252 long unsigned int ibit_tmp_A, ibit_tmp_B;
254 ibit_tmp_A = ((
list_1[j] & isA_up) / isA_up);
255 ibit_tmp_B = ((
list_1[j] & isB_up) / isB_up);
256 if (ibit_tmp_A == sigmaA && ibit_tmp_B == sigmaB) {
257 iexchg =
list_1[j] ^ (isA_up + isB_up);
275 double complex *tmp_v0,
276 double complex *tmp_v1,
278 long unsigned int *tmp_off
280 long unsigned int off;
282 long unsigned int iexchg;
289 double complex dam_pr = 0;
290 long unsigned int ibit_tmp;
292 ibit_tmp = (
list_1[j] & is_up);
293 if (ibit_tmp == 0 || ibit_tmp == is_up) {
297 iexchg =
list_1[j] ^ is_up;
300 dmv = tmp_J * tmp_v1[j];
301 if (mode == M_MLTPLY) {
304 dam_pr += dmv * conj(tmp_v1[off]);
316 double complex *tmp_v0,
317 double complex *tmp_v1,
319 long unsigned int *tmp_off
325 long unsigned int list_1_j, list_1_off;
327 double complex dam_pr = 0;
330 long unsigned int ibit_tmp;
331 ibit_tmp = (list_1_j & is_up);
332 if (ibit_tmp == 0 || ibit_tmp == is_up) {
336 list_1_off = list_1_j ^ is_up;
337 *tmp_off = list_1_off;
338 dmv = tmp_J * tmp_v1[j];
339 if (mode == M_MLTPLY) {
340 tmp_v0[list_1_off + 1] += dmv;
342 dam_pr += dmv * conj(tmp_v1[list_1_off + 1]);
354 double complex *tmp_v0,
355 double complex *tmp_v1,
357 long unsigned int *tmp_off
363 double complex dam_pr = 0;
364 long unsigned int list_1_off;
365 long unsigned int list_1_j = j - 1;
366 long unsigned int ibit_tmp;
368 ibit_tmp = (list_1_j & is_up);
369 if (ibit_tmp == 0 || ibit_tmp == is_up) {
370 list_1_off = list_1_j ^ is_up;
371 *tmp_off = list_1_off;
372 dmv = tmp_J * tmp_v1[j];
373 if (mode == M_MLTPLY) {
374 tmp_v0[list_1_off + 1] += dmv;
376 dam_pr += dmv * conj(tmp_v1[list_1_off + 1]);
393 long unsigned int isA_up,
394 long unsigned int isB_up,
395 long unsigned int org_sigma2,
396 long unsigned int org_sigma4,
397 double complex tmp_V,
398 double complex *tmp_v0,
399 double complex *tmp_v1,
404 double complex dam_pr = 0;
408 dmv = tmp_v1[j] * tmp_sgn * tmp_V;
412 dam_pr = conj(tmp_v1[j]) * dmv;
428 long unsigned int isA_up,
429 long unsigned int isB_up,
430 long unsigned int org_sigma2,
431 long unsigned int org_sigma4,
432 double complex tmp_V,
433 double complex *tmp_v0,
434 double complex *tmp_v1,
438 double complex dmv = 0;
439 double complex dam_pr = 0;
444 dmv = tmp_v1[j] * tmp_sgn * tmp_V;
448 dam_pr = conj(tmp_v1[j]) * dmv;
461 long unsigned int org_sigma2,
462 long unsigned int org_sigma4,
463 long unsigned int isA_up,
464 long unsigned int isB_up,
465 double complex tmp_V,
466 double complex *tmp_v0,
467 double complex *tmp_v1,
469 long unsigned int *tmp_off
473 double complex dam_pr = 0 + 0 * I;
478 dmv = tmp_v1[j] * tmp_sgn * tmp_V;
480 tmp_v0[*tmp_off + 1] += dmv;
482 dam_pr = conj(tmp_v1[*tmp_off + 1]) * dmv;
496 long unsigned int org_sigma2,
497 long unsigned int org_sigma4,
498 long unsigned int isA_up,
499 long unsigned int isB_up,
500 double complex tmp_V,
501 double complex *tmp_v0,
502 double complex *tmp_v1,
504 long unsigned int *tmp_off
508 double complex dam_pr = 0 + 0 * I;
513 dmv = tmp_v1[j] * tmp_sgn * tmp_V;
515 tmp_v0[*tmp_off + 1] += dmv;
517 dam_pr = conj(tmp_v1[*tmp_off + 1]) * dmv;
531 long unsigned int org_sigma2,
532 long unsigned int org_sigma4,
533 long unsigned int isA_up,
534 long unsigned int isB_up,
535 double complex tmp_V,
536 double complex *tmp_v0,
537 double complex *tmp_v1,
539 long unsigned int *tmp_off_2
542 long unsigned int tmp_off_1;
544 double complex dam_pr = 0 + 0 * I;
547 tmp_sgn *=
X_SpinGC_CisAit((tmp_off_1 + 1), X, isA_up, org_sigma2, tmp_off_2);
549 dmv = tmp_v1[j] * tmp_sgn * tmp_V;
551 tmp_v0[*tmp_off_2 + 1] += dmv;
553 dam_pr = conj(tmp_v1[*tmp_off_2 + 1]) * dmv;
struct DefineList Def
Definision of system (Hamiltonian) etc.
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.
long unsigned int ihfbit
Used for Ogata-Lin ???
int ** ExchangeCoupling
[DefineList::NExchangeCoupling][2] Index of exchange term. malloc in setmem_def().
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 term of grandcanonical spsin system.
long unsigned int is2_up
Mask used in the bit oeration.
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 term of grandcanonical spsin system.
long unsigned int is4_spin
Mask used in the bit oeration.
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.
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.
struct LargeList Large
Variables for Matrix-Vector product.
long unsigned int is1_spin
Mask used in the bit oeration.
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 term of grandcanonical spsin system.
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.
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.
int isite2
Is it realy used ???
int mode
multiply or expectation value.
long unsigned int is3_spin
Mask used in the bit oeration.
int child_pairlift_spin_GetInfo(int iPairLift, struct BindStruct *X)
Set parameters for the bit operation of spin-pairlift term.
int ** PairLiftCoupling
[DefineList::NPairHopping][2] Index of pair-lift term. malloc in setmem_def().
double complex tmp_J
Coupling constant.
double * ParaExchangeCoupling
[DefineList::NExchangeCoupling] Coupling constant of exchange term. malloc in setmem_def().
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 term of grandcanonical spsin system.
int child_exchange_spin_GetInfo(int iExchange, struct BindStruct *X)
Set parameters for the bit operation of spin-exchange term.
long unsigned int is1_up
Mask used in the bit oeration.
double * ParaPairLiftCoupling
[DefineList::NPairHopping] Coupling constant of pair-lift term. malloc in setmem_def().
long unsigned int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
long unsigned int ilft
Used for Ogata-Lin ???
long unsigned int * list_2_1
int GetOffComp(long unsigned int *_list_2_1, long unsigned int *_list_2_2, long unsigned int _ibit, const long unsigned int _irght, const long unsigned int _ilft, const long unsigned int _ihfbit, long unsigned int *_ioffComp)
function of getting off-diagonal component
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 term of canonical spsin system.
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 term.
long unsigned int * list_1
long unsigned int is2_spin
Mask used in the bit oeration.
double complex tmp_V
Coupling constant.
long unsigned int * list_2_2
long unsigned int isA_spin
Mask used in the bit oeration.
long unsigned int irght
Used for Ogata-Lin ???
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 term (grandcanonical).
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.
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.
int isite1
Is it realy used ???