21 #include "wrapperMPI.h" 22 #include "mltplyCommon.h" 23 #include "mltplyHubbardCore.h" 37 unsigned long int isite1,
38 unsigned long int isite2,
39 unsigned long int sigma1,
40 unsigned long int sigma2
46 X->Large.is1_spin =
X->Def.Tpow[2 * isite1 - 2 + sigma1];
47 X->Large.is2_spin =
X->Def.Tpow[2 * isite2 - 2 + sigma2];
51 if (isite1 > isite2) {
52 X->Large.A_spin = (
X->Def.Tpow[2 * isite1 - 2 + sigma1] -
X->Def.Tpow[2 * isite2 - 1 + sigma2]);
54 else if (isite1 < isite2) {
55 X->Large.A_spin = (
X->Def.Tpow[2 * isite2 - 2 + sigma2] -
X->Def.Tpow[2 * isite1 - 1 + sigma1]);
58 if (sigma1 > sigma2) {
59 X->Large.A_spin = (
X->Def.Tpow[2 * isite1 - 2 + sigma1] -
X->Def.Tpow[2 * isite2 - 1 + sigma2]);
62 X->Large.A_spin = (
X->Def.Tpow[2 * isite2 - 2 + sigma2] -
X->Def.Tpow[2 * isite1 - 1 + sigma1]);
68 X->Large.isA_spin =
X->Large.is1_spin +
X->Large.is2_spin;
80 long unsigned int isite1,
81 long unsigned int isite2,
82 long unsigned int isite3,
83 long unsigned int isite4,
84 long unsigned int sigma1,
85 long unsigned int sigma2,
86 long unsigned int sigma3,
87 long unsigned int sigma4,
90 long unsigned int is1_spin, is2_spin, is3_spin, is4_spin;
91 long unsigned int A_spin, B_spin;
92 long unsigned int isA_spin, isB_spin;
97 is1_spin =
X->Def.Tpow[2 * isite1 - 2 + sigma1];
98 is2_spin =
X->Def.Tpow[2 * isite2 - 2 + sigma2];
102 if (isite1 > isite2) {
103 A_spin = (
X->Def.Tpow[2 * isite1 - 2 + sigma1] -
X->Def.Tpow[2 * isite2 - 1 + sigma2]);
105 else if (isite2 > isite1) {
106 A_spin = (
X->Def.Tpow[2 * isite2 - 2 + sigma2] -
X->Def.Tpow[2 * isite1 - 1 + sigma1]);
109 if (sigma1 > sigma2) {
110 A_spin = (
X->Def.Tpow[2 * isite1 - 2 + sigma1] -
X->Def.Tpow[2 * isite2 - 1 + sigma2]);
113 A_spin = (
X->Def.Tpow[2 * isite2 - 2 + sigma2] -
X->Def.Tpow[2 * isite1 - 1 + sigma1]);
120 is3_spin =
X->Def.Tpow[2 * isite3 - 2 + sigma3];
121 is4_spin =
X->Def.Tpow[2 * isite4 - 2 + sigma4];
125 if (isite3 > isite4) {
126 B_spin = (
X->Def.Tpow[2 * isite3 - 2 + sigma3] -
X->Def.Tpow[2 * isite4 - 1 + sigma4]);
128 else if (isite3 < isite4) {
129 B_spin = (
X->Def.Tpow[2 * isite4 - 2 + sigma4] -
X->Def.Tpow[2 * isite3 - 1 + sigma3]);
132 if (sigma3 > sigma4) {
133 B_spin = (
X->Def.Tpow[2 * isite3 - 2 + sigma3] -
X->Def.Tpow[2 * isite4 - 1 + sigma4]);
136 B_spin = (
X->Def.Tpow[2 * isite4 - 2 + sigma4] -
X->Def.Tpow[2 * isite3 - 1 + sigma3]);
142 isA_spin = is1_spin + is2_spin;
143 isB_spin = is3_spin + is4_spin;
145 X->Large.is1_spin = is1_spin;
146 X->Large.is2_spin = is2_spin;
147 X->Large.is3_spin = is3_spin;
148 X->Large.is4_spin = is4_spin;
149 X->Large.isA_spin = isA_spin;
150 X->Large.isB_spin = isB_spin;
151 X->Large.A_spin = A_spin;
152 X->Large.B_spin = B_spin;
156 X->Large.tmp_V = tmp_V;
157 X->Large.isite1 = isite1;
158 X->Large.isite2 = isite2;
159 X->Large.isite3 = isite3;
160 X->Large.isite4 = isite4;
174 int isite1 =
X->Def.PairHopping[iPairHopp][0] + 1;
175 int isite2 =
X->Def.PairHopping[iPairHopp][1] + 1;
179 X->Large.tmp_J =
X->Def.ParaPairHopping[iPairHopp];
185 X->Large.is1_up =
X->Def.Tpow[2 * isite1 - 2];
186 X->Large.is1_down =
X->Def.Tpow[2 * isite1 - 1];
187 X->Large.is2_up =
X->Def.Tpow[2 * isite2 - 2];
188 X->Large.is2_down =
X->Def.Tpow[2 * isite2 - 1];
202 int isite1 =
X->Def.ExchangeCoupling[iExchange][0] + 1;
203 int isite2 =
X->Def.ExchangeCoupling[iExchange][1] + 1;
207 X->Large.tmp_J = -
X->Def.ParaExchangeCoupling[iExchange];
213 X->Large.is1_up =
X->Def.Tpow[2 * isite1 - 2];
214 X->Large.is1_down =
X->Def.Tpow[2 * isite1 - 1];
215 X->Large.is2_up =
X->Def.Tpow[2 * isite2 - 2];
216 X->Large.is2_down =
X->Def.Tpow[2 * isite2 - 1];
236 double complex *tmp_v0,
237 double complex *tmp_v1,
239 long unsigned int is1_spin,
240 double complex tmp_trans
242 long unsigned int A_ibit_tmp;
243 long unsigned int list_1_j;
245 double complex dam_pr;
248 A_ibit_tmp = (list_1_j & is1_spin) / is1_spin;
249 dmv = tmp_v1[j] * A_ibit_tmp;
250 if (
X->Large.mode == M_MLTPLY ||
X->Large.mode == M_CALCSPEC) {
251 tmp_v0[j] += dmv * tmp_trans;
253 dam_pr = dmv * conj(tmp_v1[j]);
263 double complex *tmp_v0,
264 double complex *tmp_v1,
266 long unsigned int is1_spin,
267 double complex tmp_trans
269 long unsigned int A_ibit_tmp;
270 long unsigned int list_1_j;
272 double complex dam_pr;
275 A_ibit_tmp = (list_1_j & is1_spin) / is1_spin;
276 dmv = tmp_v1[j] * (1 - A_ibit_tmp);
277 if (
X->Large.mode == M_MLTPLY ||
X->Large.mode == M_CALCSPEC) {
278 tmp_v0[j] += dmv * tmp_trans;
280 dam_pr = dmv * conj(tmp_v1[j]);
290 long unsigned int list_1_j,
292 long unsigned int is1_spin
297 A_ibit_tmp = (list_1_j & is1_spin) / is1_spin;
308 double complex *tmp_v0,
309 double complex *tmp_v1,
311 long unsigned int is1_spin,
312 long unsigned int is2_spin,
313 long unsigned int sum_spin,
314 long unsigned int diff_spin,
317 long unsigned int ibit_tmp_1, ibit_tmp_2;
318 long unsigned int bit, iexchg, off;
320 double complex dmv, dam_pr;
322 ibit_tmp_1 = (
list_1[j] & is1_spin);
323 ibit_tmp_2 = (
list_1[j] & is2_spin);
324 if (ibit_tmp_1 == 0 && ibit_tmp_2 != 0) {
325 bit =
list_1[j] & diff_spin;
327 iexchg =
list_1[j] ^ sum_spin;
338 dmv = sgn * tmp_v1[j];
339 if (
X->Large.mode == M_MLTPLY ||
X->Large.mode == M_CALCSPEC) {
340 tmp_v0[off] += tmp_V * dmv;
342 dam_pr = dmv * conj(tmp_v1[off]);
357 double complex *tmp_v0,
358 double complex *tmp_v1,
360 long unsigned int is1_spin,
361 long unsigned int is2_spin,
362 long unsigned int sum_spin,
363 long unsigned int diff_spin,
364 double complex tmp_V,
365 long unsigned int *tmp_off
367 long unsigned int list_1_j, list_1_off;
368 long unsigned int ibit_tmp_1, ibit_tmp_2;
369 long unsigned int bit;
371 double complex dmv, dam_pr;
374 ibit_tmp_1 = (list_1_j & is1_spin);
375 ibit_tmp_2 = (list_1_j & is2_spin);
378 if (ibit_tmp_1 == 0 && ibit_tmp_2 != 0) {
379 bit = list_1_j & diff_spin;
381 list_1_off = list_1_j ^ sum_spin;
382 *tmp_off = list_1_off;
383 dmv = sgn * tmp_v1[j];
384 if (
X->Large.mode == M_MLTPLY ||
X->Large.mode == M_CALCSPEC) {
385 tmp_v0[list_1_off + 1] += dmv * tmp_V;
387 dam_pr = dmv * conj(tmp_v1[list_1_off + 1]);
401 long unsigned int list_1_j,
403 long unsigned int is1_spin,
404 long unsigned int is2_spin,
405 long unsigned int sum_spin,
406 long unsigned int diff_spin,
407 long unsigned int *tmp_off
409 long unsigned int off;
412 sgn =
X_GC_CisAjt(list_1_j,
X, is1_spin, is2_spin, sum_spin, diff_spin, tmp_off);
433 long unsigned int list_1_j,
435 long unsigned int is1_spin,
436 long unsigned int is2_spin,
437 long unsigned int sum_spin,
438 long unsigned int diff_spin,
439 long unsigned int *tmp_off
441 long unsigned int ibit_tmp_1, ibit_tmp_2;
442 long unsigned int bit, off;
445 ibit_tmp_1 = (list_1_j & is1_spin);
446 ibit_tmp_2 = (list_1_j & is2_spin);
448 if (ibit_tmp_1 == 0 && ibit_tmp_2 != 0) {
449 bit = list_1_j & diff_spin;
451 off = list_1_j ^ sum_spin;
475 double complex *tmp_v0,
476 double complex *tmp_v1,
478 long unsigned int *tmp_off
480 long unsigned int off;
481 long unsigned int ibit1_up, ibit2_up, ibit1_down, ibit2_down;
483 long unsigned int iexchg;
484 long unsigned int is1_up =
X->Large.is1_up;
485 long unsigned int is2_up =
X->Large.is2_up;
486 long unsigned int is1_down =
X->Large.is1_down;
487 long unsigned int is2_down =
X->Large.is2_down;
488 long unsigned int irght =
X->Large.irght;
489 long unsigned int ilft =
X->Large.ilft;
490 long unsigned int ihfbit =
X->Large.ihfbit;
491 double complex tmp_J =
X->Large.tmp_J;
492 int mode =
X->Large.mode;
493 double complex dam_pr = 0;
495 ibit1_up =
list_1[j] & is1_up;
496 ibit2_up =
list_1[j] & is2_up;
497 ibit1_down =
list_1[j] & is1_down;
498 ibit2_down =
list_1[j] & is2_down;
500 if (ibit1_up == 0 && ibit1_down != 0 && ibit2_up != 0 && ibit2_down == 0) {
501 iexchg =
list_1[j] - (is1_down + is2_up);
502 iexchg += (is1_up + is2_down);
507 dmv = tmp_J * tmp_v1[j];
508 if (mode == M_MLTPLY) {
511 dam_pr += dmv * conj(tmp_v1[off]);
513 else if (ibit1_up != 0 && ibit1_down == 0 && ibit2_up == 0 && ibit2_down != 0) {
514 iexchg =
list_1[j] - (is1_up + is2_down);
515 iexchg += (is1_down + is2_up);
520 dmv = tmp_J * tmp_v1[j];
521 if (mode == M_MLTPLY) {
524 dam_pr += dmv * conj(tmp_v1[off]);
536 double complex *tmp_v0,
537 double complex *tmp_v1,
539 long unsigned int *tmp_off
541 long unsigned int off;
542 long unsigned int ibit1_up, ibit2_up, ibit1_down, ibit2_down;
544 long unsigned int iexchg;
545 long unsigned int is1_up =
X->Large.is1_up;
546 long unsigned int is2_up =
X->Large.is2_up;
547 long unsigned int is1_down =
X->Large.is1_down;
548 long unsigned int is2_down =
X->Large.is2_down;
549 long unsigned int irght =
X->Large.irght;
550 long unsigned int ilft =
X->Large.ilft;
551 long unsigned int ihfbit =
X->Large.ihfbit;
552 double complex tmp_J =
X->Large.tmp_J;
553 int mode =
X->Large.mode;
554 double complex dam_pr = 0;
556 ibit1_up =
list_1[j] & is1_up;
557 ibit2_up =
list_1[j] & is2_up;
558 ibit1_down =
list_1[j] & is1_down;
559 ibit2_down =
list_1[j] & is2_down;
561 if (ibit1_up == 0 && ibit1_down == 0 && ibit2_up != 0 && ibit2_down != 0) {
562 iexchg =
list_1[j] - (is2_up + is2_down);
563 iexchg += (is1_up + is1_down);
569 dmv = tmp_J * tmp_v1[j];
570 if (mode == M_MLTPLY ||
X->Large.mode == M_CALCSPEC) {
573 dam_pr += dmv * conj(tmp_v1[off]);
585 double complex *tmp_v0,
586 double complex *tmp_v1,
588 long unsigned int *tmp_off
590 long unsigned int ibit1_up, ibit2_up, ibit1_down, ibit2_down;
592 long unsigned int iexchg;
593 long unsigned int is1_up =
X->Large.is1_up;
594 long unsigned int is2_up =
X->Large.is2_up;
595 long unsigned int is1_down =
X->Large.is1_down;
596 long unsigned int is2_down =
X->Large.is2_down;
597 long unsigned int list_1_j, list_1_off;
598 double complex tmp_J =
X->Large.tmp_J;
599 int mode =
X->Large.mode;
600 double complex dam_pr = 0;
603 ibit1_up = list_1_j & is1_up;
604 ibit2_up = list_1_j & is2_up;
605 ibit1_down = list_1_j & is1_down;
606 ibit2_down = list_1_j & is2_down;
608 if (ibit1_up == 0 && ibit1_down != 0 && ibit2_up != 0 && ibit2_down == 0) {
610 iexchg = list_1_j - (is1_down + is2_up);
611 iexchg += (is1_up + is2_down);
613 *tmp_off = list_1_off;
615 dmv = tmp_J * tmp_v1[j];
616 if (mode == M_MLTPLY) {
617 tmp_v0[list_1_off + 1] += dmv;
619 dam_pr += dmv * conj(tmp_v1[list_1_off + 1]);
621 else if (ibit1_up != 0 && ibit1_down == 0 && ibit2_up == 0 && ibit2_down != 0) {
622 iexchg = list_1_j - (is1_up + is2_down);
623 iexchg += (is1_down + is2_up);
625 *tmp_off = list_1_off;
627 dmv = tmp_J * tmp_v1[j];
628 if (mode == M_MLTPLY) {
629 tmp_v0[list_1_off + 1] += dmv;
631 dam_pr += dmv * conj(tmp_v1[list_1_off + 1]);
643 double complex *tmp_v0,
644 double complex *tmp_v1,
646 long unsigned int *tmp_off
648 long unsigned int ibit1_up, ibit2_up, ibit1_down, ibit2_down;
650 long unsigned int iexchg;
651 long unsigned int is1_up =
X->Large.is1_up;
652 long unsigned int is2_up =
X->Large.is2_up;
653 long unsigned int is1_down =
X->Large.is1_down;
654 long unsigned int is2_down =
X->Large.is2_down;
655 long unsigned int list_1_j, list_1_off;
656 double complex tmp_J =
X->Large.tmp_J;
657 int mode =
X->Large.mode;
659 double complex dam_pr = 0 + 0 * I;
662 ibit1_up = list_1_j & is1_up;
664 ibit2_up = list_1_j & is2_up;
666 ibit1_down = list_1_j & is1_down;
668 ibit2_down = list_1_j & is2_down;
670 if (ibit1_up == 0 && ibit1_down == 0 && ibit2_up != 0 && ibit2_down != 0) {
671 iexchg = list_1_j - (is2_up + is2_down);
672 iexchg += (is1_up + is1_down);
674 *tmp_off = list_1_off;
675 dmv = tmp_J * tmp_v1[j];
676 if (mode == M_MLTPLY ||
X->Large.mode == M_CALCSPEC) {
677 tmp_v0[list_1_off + 1] += dmv;
679 dam_pr += dmv * conj(tmp_v1[list_1_off + 1]);
692 long unsigned int isite1,
693 long unsigned int isite3,
694 double complex tmp_V,
695 double complex *tmp_v0,
696 double complex *tmp_v1,
698 long unsigned int *tmp_off
702 double complex dam_pr = 0 + 0 * I;
705 dmv = tmp_V * tmp_v1[j] * tmp_sgn;
706 if (
X->Large.mode == M_MLTPLY ||
X->Large.mode == M_CALCSPEC) {
709 dam_pr = conj(tmp_v1[j]) * dmv;
721 long unsigned int isite1,
722 long unsigned int isite3,
723 long unsigned int isite4,
724 long unsigned int Bsum,
725 long unsigned int Bdiff,
726 double complex tmp_V,
727 double complex *tmp_v0,
728 double complex *tmp_v1,
730 long unsigned int *tmp_off
734 double complex dam_pr = 0 + 0 * I;
735 tmp_sgn =
X_CisAjt(
list_1[j],
X, isite3, isite4, Bsum, Bdiff, tmp_off);
739 dmv = tmp_V * tmp_v1[j] * tmp_sgn;
740 if (
X->Large.mode == M_MLTPLY ||
X->Large.mode == M_CALCSPEC) {
741 tmp_v0[*tmp_off] += dmv;
743 dam_pr = conj(tmp_v1[*tmp_off]) * dmv;
757 long unsigned int isite1,
758 long unsigned int isite2,
759 long unsigned int isite3,
760 long unsigned int Asum,
761 long unsigned int Adiff,
762 double complex tmp_V,
763 double complex *tmp_v0,
764 double complex *tmp_v1,
766 long unsigned int *tmp_off
770 double complex dam_pr;
774 tmp_sgn *=
X_CisAjt(
list_1[j],
X, isite1, isite2, Asum, Adiff, tmp_off);
776 dmv = tmp_V * tmp_v1[j] * tmp_sgn;
777 if (
X->Large.mode == M_MLTPLY ||
X->Large.mode == M_CALCSPEC) {
778 tmp_v0[*tmp_off] += dmv;
780 dam_pr = conj(tmp_v1[*tmp_off]) * dmv;
794 long unsigned int isite1,
795 long unsigned int isite2,
796 long unsigned int isite3,
797 long unsigned int isite4,
798 long unsigned int Asum,
799 long unsigned int Adiff,
800 long unsigned int Bsum,
801 long unsigned int Bdiff,
802 double complex tmp_V,
803 double complex *tmp_v0,
804 double complex *tmp_v1,
806 long unsigned int *tmp_off_2
809 long unsigned int tmp_off_1;
812 double complex dam_pr = 0;
816 tmp_sgn *=
X_CisAjt(tmp_off_1,
X, isite1, isite2, Asum, Adiff, tmp_off_2);
818 dmv = tmp_V * tmp_v1[j] * tmp_sgn;
819 if (
X->Large.mode == M_MLTPLY ||
X->Large.mode == M_CALCSPEC) {
820 tmp_v0[*tmp_off_2] += dmv;
822 dam_pr = conj(tmp_v1[*tmp_off_2]) * dmv;
837 long unsigned int isite1,
838 long unsigned int isite3,
839 double complex tmp_V,
840 double complex *tmp_v0,
841 double complex *tmp_v1,
843 long unsigned int *tmp_off
847 double complex dam_pr = 0;
851 dmv = tmp_V * tmp_v1[j] * tmp_sgn;
852 if (
X->Large.mode == M_MLTPLY ||
X->Large.mode == M_CALCSPEC) {
855 dam_pr = conj(tmp_v1[j]) * dmv;
868 long unsigned int isite1,
869 long unsigned int isite3,
870 long unsigned int isite4,
871 long unsigned int Bsum,
872 long unsigned int Bdiff,
873 double complex tmp_V,
874 double complex *tmp_v0,
875 double complex *tmp_v1,
877 long unsigned int *tmp_off
881 double complex dam_pr = 0 + 0 * I;
882 tmp_sgn =
X_GC_CisAjt((j - 1),
X, isite3, isite4, Bsum, Bdiff, tmp_off);
884 tmp_sgn *=
X_CisAis(*tmp_off,
X, isite1);
886 dmv = tmp_V * tmp_v1[j] * tmp_sgn;
887 if (
X->Large.mode == M_MLTPLY ||
X->Large.mode == M_CALCSPEC) {
888 tmp_v0[*tmp_off + 1] += dmv;
890 dam_pr = conj(tmp_v1[*tmp_off + 1]) * dmv;
904 long unsigned int isite1,
905 long unsigned int isite2,
906 long unsigned int isite3,
907 long unsigned int Asum,
908 long unsigned int Adiff,
909 double complex tmp_V,
910 double complex *tmp_v0,
911 double complex *tmp_v1,
913 long unsigned int *tmp_off
917 double complex dam_pr = 0 + 0 * I;
920 tmp_sgn *=
X_GC_CisAjt((j - 1),
X, isite1, isite2, Asum, Adiff, tmp_off);
922 dmv = tmp_V * tmp_v1[j] * tmp_sgn;
923 if (
X->Large.mode == M_MLTPLY ||
X->Large.mode == M_CALCSPEC) {
924 tmp_v0[*tmp_off + 1] += dmv;
926 dam_pr = conj(tmp_v1[*tmp_off + 1]) * dmv;
940 long unsigned int isite1,
941 long unsigned int isite2,
942 long unsigned int isite3,
943 long unsigned int isite4,
944 long unsigned int Asum,
945 long unsigned int Adiff,
946 long unsigned int Bsum,
947 long unsigned int Bdiff,
948 double complex tmp_V,
949 double complex *tmp_v0,
950 double complex *tmp_v1,
952 long unsigned int *tmp_off_2
955 long unsigned int tmp_off_1;
957 double complex dam_pr = 0 + 0 * I;
959 tmp_sgn =
X_GC_CisAjt((j - 1),
X, isite3, isite4, Bsum, Bdiff, &tmp_off_1);
961 tmp_sgn *=
X_GC_CisAjt(tmp_off_1,
X, isite1, isite2, Asum, Adiff, tmp_off_2);
963 dmv = tmp_V * tmp_v1[j] * tmp_sgn;
964 if (
X->Large.mode == M_MLTPLY ||
X->Large.mode == M_CALCSPEC) {
965 tmp_v0[*tmp_off_2 + 1] += dmv;
967 dam_pr = conj(tmp_v1[*tmp_off_2 + 1]) * dmv;
983 double complex *tmp_v0,
984 double complex *tmp_v1,
985 long unsigned int is1_spin,
986 double complex tmp_V,
987 long unsigned int *tmp_off
989 long unsigned int list_1_j, list_1_off;
990 long unsigned int ibit_tmp_1;
991 long unsigned int bit;
993 double complex dmv, dam_pr;
997 ibit_tmp_1 = (list_1_j & is1_spin);
1003 if (ibit_tmp_1 == 0) {
1005 bit = list_1_j - (list_1_j & (2 * is1_spin - 1));
1011 list_1_off = list_1_j | is1_spin;
1012 *tmp_off = list_1_off;
1013 dmv = ipsgn * sgn * tmp_v1[j];
1015 tmp_v0[list_1_off + 1] += dmv * tmp_V;
1017 dam_pr = dmv * conj(tmp_v1[list_1_off + 1]);
1033 long unsigned int j,
1034 double complex *tmp_v0,
1035 double complex *tmp_v1,
1036 long unsigned int is1_spin,
1037 double complex tmp_V,
1038 long unsigned int *tmp_off
1040 long unsigned int list_1_j, list_1_off;
1041 long unsigned int ibit_tmp_1;
1042 long unsigned int bit;
1044 double complex dmv, dam_pr;
1048 ibit_tmp_1 = (list_1_j & is1_spin);
1053 if (ibit_tmp_1 == is1_spin) {
1055 bit = list_1_j - (list_1_j & (2 * is1_spin - 1));
1061 list_1_off = list_1_j ^ is1_spin;
1062 *tmp_off = list_1_off;
1063 dmv = ipsgn * sgn * tmp_v1[j];
1065 tmp_v0[list_1_off + 1] += dmv * tmp_V;
1067 dam_pr = dmv * conj(tmp_v1[list_1_off + 1]);
1083 long unsigned int j,
1084 long unsigned int is1_spin,
1085 long unsigned int *tmp_off,
1087 long unsigned int *list_2_1_target,
1088 long unsigned int *list_2_2_target,
1089 long unsigned int _irght,
1090 long unsigned int _ilft,
1091 long unsigned int _ihfbit
1093 long unsigned int list_1_j, list_1_off;
1094 long unsigned int ibit_tmp_1;
1095 long unsigned int bit;
1100 ibit_tmp_1 = (list_1_j & is1_spin);
1106 if (ibit_tmp_1 == 0) {
1108 bit = list_1_j - (list_1_j & (2 * is1_spin - 1));
1114 list_1_off = list_1_j | is1_spin;
1116 if(
GetOffComp(list_2_1_target, list_2_2_target, list_1_off, _irght, _ilft, _ihfbit, tmp_off)!=
TRUE){
1137 long unsigned int j,
1138 long unsigned int is1_spin,
1139 long unsigned int *tmp_off,
1141 long unsigned int *list_2_1_target,
1142 long unsigned int *list_2_2_target,
1143 long unsigned int _irght,
1144 long unsigned int _ilft,
1145 long unsigned int _ihfbit
1147 long unsigned int list_1_j, list_1_off;
1148 long unsigned int ibit_tmp_1;
1149 long unsigned int bit;
1154 ibit_tmp_1 = (list_1_j & is1_spin);
1159 if (ibit_tmp_1 != 0) {
1161 bit = list_1_j - (list_1_j & (2 * is1_spin - 1));
1167 list_1_off = list_1_j ^ is1_spin;
1168 if(
GetOffComp(list_2_1_target, list_2_2_target, list_1_off, _irght, _ilft, _ihfbit, tmp_off)!=
TRUE){
int X_CisAis(long unsigned int list_1_j, struct BindStruct *X, long unsigned int is1_spin)
term in Hubbard (canonical)
int X_CisAjt(long unsigned int list_1_j, struct BindStruct *X, long unsigned int is1_spin, long unsigned int is2_spin, long unsigned int sum_spin, long unsigned int diff_spin, long unsigned int *tmp_off)
Compute index of wavefunction of final state.
int child_general_int_GetInfo(int iInterAll, struct BindStruct *X, long unsigned int isite1, long unsigned int isite2, long unsigned int isite3, long unsigned int isite4, long unsigned int sigma1, long unsigned int sigma2, long unsigned int sigma3, long unsigned int sigma4, double complex tmp_V)
Compute mask for bit operation of general interaction term.
double complex child_CisAjtCkuAku_element(long unsigned int j, long unsigned int isite1, long unsigned int isite2, long unsigned int isite3, long unsigned int Asum, long unsigned int Adiff, double complex tmp_V, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off)
Compute term of canonical Hubbard system.
double complex child_pairhopp_element(long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off)
Compute pairhopp term of canonical Hubbard system.
double complex CisAjt(long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int is1_spin, long unsigned int is2_spin, long unsigned int sum_spin, long unsigned int diff_spin, double complex tmp_V)
term for canonical Hubbard
double complex GC_child_pairhopp_element(long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off)
Compute pairhopp term of grandcanonical Hubbard system.
double complex GC_CisAjt(long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int is1_spin, long unsigned int is2_spin, long unsigned int sum_spin, long unsigned int diff_spin, double complex tmp_V, long unsigned int *tmp_off)
term for grandcanonical Hubbard
double complex child_exchange_element(long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off)
Compute exchange term of canonical-Hubbard.
double complex GC_child_exchange_element(long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off)
Compute exchange term of grandcanonical Hubbard system.
int X_Cis(long unsigned int j, long unsigned int is1_spin, long unsigned int *tmp_off, long unsigned int *list_1_org, long unsigned int *list_2_1_target, long unsigned int *list_2_2_target, long unsigned int _irght, long unsigned int _ilft, long unsigned int _ihfbit)
Compute index of final wavefunction associatesd to term of canonical Hubbard system.
double complex GC_AisCis(long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int is1_spin, double complex tmp_trans)
Operation of (Grandcanonical)
int child_pairhopp_GetInfo(int iPairHopp, struct BindStruct *X)
Compute mask for bit operation of pairhop term.
double complex GC_Ajt(long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, long unsigned int is1_spin, double complex tmp_V, long unsigned int *tmp_off)
Compute term of grandcanonical Hubbard system.
long unsigned int * list_1_org
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 GC_child_CisAisCisAis_element(long unsigned int j, long unsigned int isite1, long unsigned int isite3, double complex tmp_V, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off)
Compute term of grandcanonical Hubbard system.
double complex X_Ajt(long unsigned int j, long unsigned int is1_spin, long unsigned int *tmp_off, long unsigned int *list_1_org, long unsigned int *list_2_1_target, long unsigned int *list_2_2_target, long unsigned int _irght, long unsigned int _ilft, long unsigned int _ihfbit)
Compute index of final wavefunction associatesd to term of canonical Hubbard system.
long unsigned int * list_1
int X_GC_CisAjt(long unsigned int list_1_j, struct BindStruct *X, long unsigned int is1_spin, long unsigned int is2_spin, long unsigned int sum_spin, long unsigned int diff_spin, long unsigned int *tmp_off)
Compute index of wavefunction of final state.
int child_general_hopp_GetInfo(struct BindStruct *X, unsigned long int isite1, unsigned long int isite2, unsigned long int sigma1, unsigned long int sigma2)
Compute mask for bit operation of hopping term.
double complex child_CisAisCisAis_element(long unsigned int j, long unsigned int isite1, long unsigned int isite3, double complex tmp_V, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off)
Compute term of canonical Hubbard system.
long unsigned int * list_2_2
int myrank
Process ID, defined in InitializeMPI()
double complex GC_Cis(long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, long unsigned int is1_spin, double complex tmp_V, long unsigned int *tmp_off)
Compute term of grandcanonical Hubbard system.
int child_exchange_GetInfo(int iExchange, struct BindStruct *X)
Compute mask for bit operation of exchange term.
double complex GC_child_CisAisCjtAku_element(long unsigned int j, long unsigned int isite1, long unsigned int isite3, long unsigned int isite4, long unsigned int Bsum, long unsigned int Bdiff, double complex tmp_V, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off)
Compute term of grandcanonical Hubbard system.
void SgnBit(const long unsigned int org_bit, int *sgn)
function of getting fermion sign (64 bit)
double complex GC_child_CisAjtCkuAku_element(long unsigned int j, long unsigned int isite1, long unsigned int isite2, long unsigned int isite3, long unsigned int Asum, long unsigned int Adiff, double complex tmp_V, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off)
Compute term of grandcanonical Hubbard system.
double complex child_CisAjtCkuAlv_element(long unsigned int j, long unsigned int isite1, long unsigned int isite2, long unsigned int isite3, long unsigned int isite4, long unsigned int Asum, long unsigned int Adiff, long unsigned int Bsum, long unsigned int Bdiff, double complex tmp_V, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off_2)
Compute term of canonical Hubbard system.
double complex GC_CisAis(long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int is1_spin, double complex tmp_trans)
Operation of (Grandcanonical)
double complex GC_child_CisAjtCkuAlv_element(long unsigned int j, long unsigned int isite1, long unsigned int isite2, long unsigned int isite3, long unsigned int isite4, long unsigned int Asum, long unsigned int Adiff, long unsigned int Bsum, long unsigned int Bdiff, 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 Hubbard system.
double complex child_CisAisCjtAku_element(long unsigned int j, long unsigned int isite1, long unsigned int isite3, long unsigned int isite4, long unsigned int Bsum, long unsigned int Bdiff, double complex tmp_V, double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, long unsigned int *tmp_off)
Compute term of canonical Hubbard system.