161 #include "mfmemory.h" 162 #include "mltplyCommon.h" 163 #include "mltplySpin.h" 164 #include "CalcTime.h" 165 #include "mltplySpinCore.h" 166 #include "mltplyHubbardCore.h" 167 #include "mltplyMPISpin.h" 168 #include "mltplyMPISpinCore.h" 169 #include "mltplyMPIBoost.h" 177 double complex *tmp_v0,
178 double complex *tmp_v1
181 if (
X->Def.iFlgGeneralSpin ==
FALSE)
194 double complex *tmp_v0,
195 double complex *tmp_v1
198 long unsigned int isite1, isite2, sigma1, sigma2;
199 long unsigned int sigma3, sigma4;
201 double complex dam_pr;
203 double complex tmp_V;
214 for (i = 0; i <
X->Def.NInterAll_OffDiagonal; i+=2) {
215 if (
X->Def.InterAll_OffDiagonal[i][0] + 1 >
X->Def.Nsite &&
216 X->Def.InterAll_OffDiagonal[i][4] + 1 >
X->Def.Nsite) {
221 else if (
X->Def.InterAll_OffDiagonal[i][4] + 1 >
X->Def.Nsite) {
226 else if (
X->Def.InterAll_OffDiagonal[i][0] + 1 >
X->Def.Nsite) {
233 for (ihermite = 0; ihermite<2; ihermite++) {
235 isite1 =
X->Def.InterAll_OffDiagonal[idx][0] + 1;
236 isite2 =
X->Def.InterAll_OffDiagonal[idx][4] + 1;
237 sigma1 =
X->Def.InterAll_OffDiagonal[idx][1];
238 sigma2 =
X->Def.InterAll_OffDiagonal[idx][3];
239 sigma3 =
X->Def.InterAll_OffDiagonal[idx][5];
240 sigma4 =
X->Def.InterAll_OffDiagonal[idx][7];
241 tmp_V =
X->Def.ParaInterAll_OffDiagonal[idx];
244 X->Large.prdct += dam_pr;
254 for (i = 0; i <
X->Def.NExchangeCoupling; i++) {
256 if (
X->Def.ExchangeCoupling[i][0] + 1 >
X->Def.Nsite &&
257 X->Def.ExchangeCoupling[i][1] + 1 >
X->Def.Nsite) {
260 X->Def.ExchangeCoupling[i][0], sigma1, sigma2,
261 X->Def.ExchangeCoupling[i][1], sigma2, sigma1,
262 X->Def.ParaExchangeCoupling[i],
X, tmp_v0, tmp_v1);
265 else if (
X->Def.ExchangeCoupling[i][1] + 1 >
X->Def.Nsite) {
268 X->Def.ExchangeCoupling[i][0], sigma1, sigma2,
269 X->Def.ExchangeCoupling[i][1], sigma2, sigma1,
270 X->Def.ParaExchangeCoupling[i],
X, tmp_v0, tmp_v1);
273 else if (
X->Def.ExchangeCoupling[i][0] + 1 >
X->Def.Nsite) {
276 X->Def.ExchangeCoupling[i][1], sigma2, sigma1,
277 X->Def.ExchangeCoupling[i][0], sigma1, sigma2,
278 conj(
X->Def.ParaExchangeCoupling[i]),
X, tmp_v0, tmp_v1);
287 X->Large.prdct += dam_pr;
301 double complex *tmp_v0,
302 double complex *tmp_v1
306 long unsigned int off = 0;
307 long unsigned int tmp_off = 0;
308 long unsigned int tmp_off2 = 0;
309 long unsigned int ihfbit=0;
310 long unsigned int isite1, isite2, sigma1, sigma2;
311 long unsigned int sigma3, sigma4;
313 double complex dam_pr;
316 double complex tmp_V;
317 double complex dmv=0;
320 long unsigned int i_max;
321 i_max =
X->Check.idim_max;
331 ihfbit =
X->Check.sdim;
332 for (i = 0; i <
X->Def.NInterAll_OffDiagonal; i += 2) {
333 if (
X->Def.InterAll_OffDiagonal[i][0] + 1 >
X->Def.Nsite &&
334 X->Def.InterAll_OffDiagonal[i][4] + 1 >
X->Def.Nsite) {
339 else if (
X->Def.InterAll_OffDiagonal[i][4] + 1 >
X->Def.Nsite) {
344 else if (
X->Def.InterAll_OffDiagonal[i][0] + 1 >
X->Def.Nsite) {
351 for (ihermite = 0; ihermite < 2; ihermite++) {
353 isite1 =
X->Def.InterAll_OffDiagonal[idx][0] + 1;
354 isite2 =
X->Def.InterAll_OffDiagonal[idx][4] + 1;
355 sigma1 =
X->Def.InterAll_OffDiagonal[idx][1];
356 sigma2 =
X->Def.InterAll_OffDiagonal[idx][3];
357 sigma3 =
X->Def.InterAll_OffDiagonal[idx][5];
358 sigma4 =
X->Def.InterAll_OffDiagonal[idx][7];
359 tmp_V =
X->Def.ParaInterAll_OffDiagonal[idx];
361 #pragma omp parallel for default(none) reduction(+:dam_pr) \ 362 private(j, tmp_sgn, dmv, off, tmp_off, tmp_off2) \ 363 firstprivate(i_max, isite1, isite2, sigma1, sigma2, sigma3, sigma4, X, tmp_V, ihfbit) \ 364 shared(tmp_v0, tmp_v1, list_1, list_2_1, list_2_2) 365 for (j = 1; j <= i_max; j++) {
367 if (tmp_sgn ==
TRUE) {
369 if (tmp_sgn ==
TRUE) {
371 dmv = tmp_v1[j] * tmp_V;
372 if (
X->Large.mode == M_MLTPLY) {
375 dam_pr += conj(tmp_v1[off]) * dmv;
379 X->Large.prdct += dam_pr;
395 double complex *tmp_v0,
396 double complex *tmp_v1
399 if (
X->Def.iFlgGeneralSpin ==
FALSE)
404 if(iret != 0)
return iret;
406 if(
X->Boost.flgBoost == 1)
418 double complex *tmp_v0,
419 double complex *tmp_v1
423 long unsigned int off = 0;
424 long unsigned int is1_spin = 0;
425 long unsigned int isite1, isite2, sigma1, sigma2;
426 long unsigned int sigma3, sigma4;
427 double complex dam_pr;
428 double complex tmp_trans;
431 double complex tmp_V;
434 long unsigned int i_max;
435 i_max =
X->Check.idim_max;
443 for (i = 0; i <
X->Def.EDNTransfer; i+=2 ) {
444 if(
X->Def.EDGeneralTransfer[i][0]+1 >
X->Def.Nsite){
446 if(
X->Def.EDGeneralTransfer[i][1]==
X->Def.EDGeneralTransfer[i][3]){
447 fprintf(stderr,
"Transverse_OffDiagonal component is illegal.\n");
452 X->Def.EDGeneralTransfer[i][0],
X->Def.EDGeneralTransfer[i][1],
453 X->Def.EDGeneralTransfer[i][3], -
X->Def.EDParaGeneralTransfer[i],
461 for(ihermite=0; ihermite<2; ihermite++){
463 isite1 =
X->Def.EDGeneralTransfer[idx][0] + 1;
464 isite2 =
X->Def.EDGeneralTransfer[idx][2] + 1;
465 sigma1 =
X->Def.EDGeneralTransfer[idx][1];
466 sigma2 =
X->Def.EDGeneralTransfer[idx][3];
467 tmp_trans = -
X->Def.EDParaGeneralTransfer[idx];
473 fprintf(stderr,
"Transverse_OffDiagonal component is illegal.\n");
478 is1_spin =
X->Def.Tpow[isite1 - 1];
479 #pragma omp parallel for default(none) reduction(+:dam_pr) \ 480 private(j, tmp_sgn) firstprivate(i_max, is1_spin, sigma2, X,off, tmp_trans) \ 481 shared(tmp_v0, tmp_v1) 482 for (j = 1; j <= i_max; j++) {
485 tmp_v0[off+1] += tmp_v1[j]*tmp_trans;
486 dam_pr += tmp_trans * conj(tmp_v1[off + 1]) * tmp_v1[j];
493 X->Large.prdct += dam_pr;
500 for (i = 0; i <
X->Def.NInterAll_OffDiagonal; i += 2) {
501 if (
X->Def.InterAll_OffDiagonal[i][0] + 1 >
X->Def.Nsite &&
502 X->Def.InterAll_OffDiagonal[i][4] + 1 >
X->Def.Nsite) {
507 else if (
X->Def.InterAll_OffDiagonal[i][4] + 1 >
X->Def.Nsite) {
512 else if (
X->Def.InterAll_OffDiagonal[i][0] + 1 >
X->Def.Nsite) {
519 for (ihermite = 0; ihermite < 2; ihermite++) {
521 isite1 =
X->Def.InterAll_OffDiagonal[idx][0] + 1;
522 isite2 =
X->Def.InterAll_OffDiagonal[idx][4] + 1;
523 sigma1 =
X->Def.InterAll_OffDiagonal[idx][1];
524 sigma2 =
X->Def.InterAll_OffDiagonal[idx][3];
525 sigma3 =
X->Def.InterAll_OffDiagonal[idx][5];
526 sigma4 =
X->Def.InterAll_OffDiagonal[idx][7];
527 tmp_V =
X->Def.ParaInterAll_OffDiagonal[idx];
530 X->Large.prdct += dam_pr;
540 for (i = 0; i <
X->Def.NExchangeCoupling; i++) {
542 if (
X->Def.ExchangeCoupling[i][0] + 1 >
X->Def.Nsite &&
543 X->Def.ExchangeCoupling[i][1] + 1 >
X->Def.Nsite){
546 X->Def.ExchangeCoupling[i][0], sigma1, sigma2,
547 X->Def.ExchangeCoupling[i][1], sigma2, sigma1,
548 X->Def.ParaExchangeCoupling[i],
X, tmp_v0, tmp_v1);
551 else if (
X->Def.ExchangeCoupling[i][1] + 1 >
X->Def.Nsite) {
554 X->Def.ExchangeCoupling[i][0], sigma1, sigma2,
555 X->Def.ExchangeCoupling[i][1], sigma2, sigma1,
556 X->Def.ParaExchangeCoupling[i],
X, tmp_v0, tmp_v1);
559 else if (
X->Def.ExchangeCoupling[i][0] + 1 >
X->Def.Nsite) {
562 X->Def.ExchangeCoupling[i][1], sigma2, sigma1,
563 X->Def.ExchangeCoupling[i][0], sigma1, sigma2,
564 conj(
X->Def.ParaExchangeCoupling[i]),
X, tmp_v0, tmp_v1);
573 X->Large.prdct += dam_pr;
580 for (i = 0; i <
X->Def.NPairLiftCoupling; i++) {
582 if (
X->Def.PairLiftCoupling[i][0] + 1 >
X->Def.Nsite &&
583 X->Def.PairLiftCoupling[i][1] + 1 >
X->Def.Nsite) {
586 X->Def.PairLiftCoupling[i][0], sigma1, sigma2,
587 X->Def.PairLiftCoupling[i][1], sigma1, sigma2,
588 X->Def.ParaPairLiftCoupling[i],
X, tmp_v0, tmp_v1);
591 else if (
X->Def.PairLiftCoupling[i][1] + 1 >
X->Def.Nsite) {
594 X->Def.PairLiftCoupling[i][0], sigma1, sigma2,
595 X->Def.PairLiftCoupling[i][1], sigma1, sigma2,
596 X->Def.ParaPairLiftCoupling[i],
X, tmp_v0, tmp_v1);
599 else if (
X->Def.PairLiftCoupling[i][0] + 1 >
X->Def.Nsite) {
602 X->Def.PairLiftCoupling[i][1], sigma1, sigma2,
603 X->Def.PairLiftCoupling[i][0], sigma1, sigma2,
604 conj(
X->Def.ParaPairLiftCoupling[i]),
X, tmp_v0, tmp_v1);
613 X->Large.prdct += dam_pr;
627 double complex *tmp_v0,
628 double complex *tmp_v1
632 long unsigned int off = 0;
633 long unsigned int tmp_off = 0;
634 long unsigned int isite1, isite2, sigma1, sigma2;
635 long unsigned int sigma3, sigma4;
636 double complex dam_pr;
637 double complex tmp_trans;
641 double complex tmp_V;
642 double complex dmv=0;
645 long unsigned int i_max;
646 i_max =
X->Check.idim_max;
654 for (i = 0; i <
X->Def.EDNTransfer; i += 2) {
655 isite1 =
X->Def.EDGeneralTransfer[i][0] + 1;
656 isite2 =
X->Def.EDGeneralTransfer[i][2] + 1;
657 sigma1 =
X->Def.EDGeneralTransfer[i][1];
658 sigma2 =
X->Def.EDGeneralTransfer[i][3];
659 tmp_trans = -
X->Def.EDParaGeneralTransfer[idx];
661 if (isite1 == isite2) {
662 if (sigma1 != sigma2) {
663 if (isite1 >
X->Def.Nsite) {
665 isite1 - 1, sigma1, sigma2, tmp_trans,
X, tmp_v0, tmp_v1);
666 X->Large.prdct += dam_pr;
669 for (ihermite = 0; ihermite<2; ihermite++) {
671 isite1 =
X->Def.EDGeneralTransfer[idx][0] + 1;
672 isite2 =
X->Def.EDGeneralTransfer[idx][2] + 1;
673 sigma1 =
X->Def.EDGeneralTransfer[idx][1];
674 sigma2 =
X->Def.EDGeneralTransfer[idx][3];
675 tmp_trans = -
X->Def.EDParaGeneralTransfer[idx];
679 #pragma omp parallel for default(none) reduction(+:dam_pr) \ 680 private(j, tmp_sgn, num1) firstprivate(i_max, isite1, sigma1, sigma2, X, off, tmp_trans) \ 681 shared(tmp_v0, tmp_v1) 682 for (j = 1; j <= i_max; j++) {
684 j - 1, isite1, sigma2, sigma1, &off,
X->Def.SiteToBit,
X->Def.Tpow);
686 tmp_v0[off + 1] += tmp_v1[j] * tmp_trans;
687 dam_pr += conj(tmp_v1[off + 1]) * tmp_v1[j] * tmp_trans;
690 X->Large.prdct += dam_pr;
695 fprintf(stderr,
"Error: Transverse_Diagonal component must be absorbed !");
708 for (i = 0; i<
X->Def.NInterAll_OffDiagonal; i += 2) {
709 if (
X->Def.InterAll_OffDiagonal[i][0] + 1 >
X->Def.Nsite &&
710 X->Def.InterAll_OffDiagonal[i][4] + 1 >
X->Def.Nsite) {
715 else if (
X->Def.InterAll_OffDiagonal[i][4] + 1 >
X->Def.Nsite) {
720 else if (
X->Def.InterAll_OffDiagonal[i][0] + 1 >
X->Def.Nsite) {
727 for (ihermite = 0; ihermite < 2; ihermite++) {
729 isite1 =
X->Def.InterAll_OffDiagonal[idx][0] + 1;
730 isite2 =
X->Def.InterAll_OffDiagonal[idx][4] + 1;
731 sigma1 =
X->Def.InterAll_OffDiagonal[idx][1];
732 sigma2 =
X->Def.InterAll_OffDiagonal[idx][3];
733 sigma3 =
X->Def.InterAll_OffDiagonal[idx][5];
734 sigma4 =
X->Def.InterAll_OffDiagonal[idx][7];
735 tmp_V =
X->Def.ParaInterAll_OffDiagonal[idx];
738 if (sigma1 == sigma2) {
739 if (sigma3 == sigma4) {
740 fprintf(stderr,
"InterAll_OffDiagonal component is illegal.\n");
745 #pragma omp parallel for default(none) reduction(+:dam_pr) \ 746 private(j, tmp_sgn, dmv, off) \ 747 firstprivate(i_max, isite1, isite2, sigma1, sigma3, sigma4, X, tmp_V) \ 748 shared(tmp_v0, tmp_v1) 749 for (j = 1; j <= i_max; j++) {
751 j - 1, isite2, sigma4, sigma3, &off,
X->Def.SiteToBit,
X->Def.Tpow);
752 if (tmp_sgn ==
TRUE) {
754 if (tmp_sgn ==
TRUE) {
755 dmv = tmp_v1[j] * tmp_V;
756 if (
X->Large.mode == M_MLTPLY) {
757 tmp_v0[off + 1] += dmv;
759 dam_pr += conj(tmp_v1[off + 1]) * dmv;
765 else if (sigma3 == sigma4) {
767 #pragma omp parallel for default(none) reduction(+:dam_pr) \ 768 private(j, tmp_sgn, dmv, off, tmp_off) \ 769 firstprivate(i_max, isite1, isite2, sigma1, sigma2, sigma3, sigma4, X, tmp_V) \ 770 shared(tmp_v0, tmp_v1) 771 for (j = 1; j <= i_max; j++) {
773 if (tmp_sgn ==
TRUE) {
775 j - 1, isite1, sigma2, sigma1, &off,
X->Def.SiteToBit,
X->Def.Tpow);
776 if (tmp_sgn ==
TRUE) {
777 dmv = tmp_v1[j] * tmp_V;
778 if (
X->Large.mode == M_MLTPLY) {
779 tmp_v0[off + 1] += dmv;
781 dam_pr += conj(tmp_v1[off + 1]) * dmv;
787 #pragma omp parallel for default(none) reduction(+:dam_pr) \ 788 private(j, tmp_sgn, dmv, off, tmp_off) \ 789 firstprivate(i_max, isite1, isite2, sigma1, sigma2, sigma3, sigma4, X, tmp_V) \ 790 shared(tmp_v0, tmp_v1) 791 for (j = 1; j <= i_max; j++) {
793 j - 1, isite2, sigma4, sigma3, &tmp_off,
X->Def.SiteToBit,
X->Def.Tpow);
794 if (tmp_sgn ==
TRUE) {
796 tmp_off, isite1, sigma2, sigma1, &off,
X->Def.SiteToBit,
X->Def.Tpow);
797 if (tmp_sgn ==
TRUE) {
798 dmv = tmp_v1[j] * tmp_V;
799 if (
X->Large.mode == M_MLTPLY) {
800 tmp_v0[off + 1] += dmv;
802 dam_pr += conj(tmp_v1[off + 1]) * dmv;
807 X->Large.prdct += dam_pr;
824 double complex *tmp_v0,
825 double complex *tmp_v1
830 double complex dam_pr;
833 double complex* tmp_v2;
834 double complex* tmp_v3;
837 long unsigned int i_max;
838 i_max =
X->Check.idim_max;
841 c_malloc1(tmp_v2, i_max+1);
842 c_malloc1(tmp_v3, i_max+1);
846 #pragma omp parallel for default(none) reduction(+:dam_pr) \ 847 private(j) shared(tmp_v1,tmp_v0) firstprivate(i_max) 848 for(j=1;j<=i_max;j++)
849 dam_pr += conj(tmp_v1[j])*tmp_v0[j];
850 X->Large.prdct += dam_pr;
853 c_free1(tmp_v2, i_max+1);
854 c_free1(tmp_v3, i_max+1);
871 double complex *tmp_v0,
872 double complex *tmp_v1,
876 long unsigned int i_max =
X->Large.i_max;
877 long unsigned int off = 0;
878 double complex dam_pr = 0;
880 #pragma omp parallel for default(none) reduction(+:dam_pr) \ 881 firstprivate(i_max, X,off) private(j) shared(tmp_v0, tmp_v1) 882 for (j = 1; j <= i_max; j++)
893 double complex *tmp_v0,
894 double complex *tmp_v1,
898 long unsigned int i_max =
X->Large.i_max;
899 long unsigned int off = 0;
900 double complex dam_pr = 0;
902 #pragma omp parallel for default(none) reduction(+:dam_pr) \ 903 firstprivate(i_max, X,off) private(j) shared(tmp_v0, tmp_v1) 904 for (j = 1; j <= i_max; j++)
915 double complex *tmp_v0,
916 double complex *tmp_v1,
920 long unsigned int i_max =
X->Large.i_max;
921 long unsigned int off = 0;
922 double complex dam_pr = 0;
924 #pragma omp parallel for default(none) reduction(+:dam_pr) \ 925 firstprivate(i_max, X,off) private(j) shared(tmp_v0, tmp_v1) 926 for (j = 1; j <= i_max; j++)
937 double complex *tmp_v0,
938 double complex *tmp_v1,
941 double complex dam_pr, tmp_V, dmv;
942 long unsigned int j, i_max;
943 long unsigned int org_sigma2, org_sigma4;
944 long unsigned int isA_up, isB_up;
945 long unsigned int tmp_off = 0;
948 i_max =
X->Large.i_max;
949 org_sigma2 =
X->Large.is2_spin;
950 org_sigma4 =
X->Large.is4_spin;
951 tmp_V =
X->Large.tmp_V;
952 isA_up =
X->Large.is1_up;
953 isB_up =
X->Large.is2_up;
956 #pragma omp parallel for default(none) reduction(+:dam_pr) private(j, tmp_sgn, dmv) \ 957 firstprivate(i_max,X,isA_up,isB_up,org_sigma2,org_sigma4,tmp_off,tmp_V) shared(tmp_v1, tmp_v0) 958 for (j = 1; j <= i_max; j++) {
961 dmv = tmp_v1[j] * tmp_sgn * tmp_V;
962 tmp_v0[tmp_off] += dmv;
963 dam_pr += conj(tmp_v1[tmp_off]) * dmv;
975 double complex *tmp_v0,
976 double complex *tmp_v1,
979 double complex dam_pr, tmp_V;
980 long unsigned int j, i_max;
981 long unsigned int org_isite1, org_isite2;
982 long unsigned int org_sigma1, org_sigma2, org_sigma3, org_sigma4;
983 long unsigned int isA_up, isB_up;
984 long unsigned int tmp_off = 0;
986 i_max =
X->Large.i_max;
987 org_isite1 =
X->Large.isite1;
988 org_isite2 =
X->Large.isite2;
989 org_sigma1 =
X->Large.is1_spin;
990 org_sigma2 =
X->Large.is2_spin;
991 org_sigma3 =
X->Large.is3_spin;
992 org_sigma4 =
X->Large.is4_spin;
993 tmp_V =
X->Large.tmp_V;
995 isA_up =
X->Def.Tpow[org_isite1 - 1];
996 isB_up =
X->Def.Tpow[org_isite2 - 1];
998 #pragma omp parallel default(none) reduction(+:dam_pr) \ 999 private(j) shared(tmp_v0, tmp_v1) \ 1000 firstprivate(i_max,X,isA_up,isB_up,org_sigma1,org_sigma2,org_sigma3,org_sigma4,tmp_off, tmp_V) 1002 if (org_sigma1 == org_sigma2 && org_sigma3 == org_sigma4) {
1004 for (j = 1; j <= i_max; j++)
1006 j, isA_up, isB_up, org_sigma2, org_sigma4, tmp_V, tmp_v0, tmp_v1,
X);
1008 else if (org_sigma1 == org_sigma2 && org_sigma3 != org_sigma4) {
1010 for (j = 1; j <= i_max; j++)
1012 j, org_sigma2, org_sigma4, isA_up, isB_up, tmp_V, tmp_v0, tmp_v1,
X, &tmp_off);
1014 else if (org_sigma1 != org_sigma2 && org_sigma3 == org_sigma4) {
1016 for (j = 1; j <= i_max; j++)
1018 j, org_sigma2, org_sigma4, isA_up, isB_up, tmp_V, tmp_v0, tmp_v1,
X, &tmp_off);
1020 else if (org_sigma1 != org_sigma2 && org_sigma3 != org_sigma4) {
1022 for (j = 1; j <= i_max; j++)
1024 j, org_sigma2, org_sigma4, isA_up, isB_up, tmp_V, tmp_v0, tmp_v1,
X, &tmp_off);
void StartTimer(int n)
function for initializing elapse time [start]
double complex GC_child_exchange_spin(double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X)
Compute exchange term of spin Hamiltonian (grandcanonical)
int mltplyGeneralSpin(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Driver function for General Spin hamiltonian.
void GC_child_general_int_spin_MPIsingle(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
General interaction term in the Spin model + GC When both site1 and site2 are in the inter process re...
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.
double complex GC_child_pairlift_spin(double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X)
Compute pair-lift term of spin Hamiltonian (grandcanonical)
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.
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.
double complex child_exchange_spin(double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X)
Compute exchange term of spin Hamiltonian (canonical)
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.
void StopTimer(int n)
function for calculating elapse time [elapse time=StartTimer-StopTimer]
double complex X_GC_child_CisAitCiuAiv_spin_MPIsingle(int org_isite1, int org_ispin1, int org_ispin2, int org_isite3, int org_ispin3, int org_ispin4, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Exchange and Pairlifting term in Spin model + GC When only site2 is in the inter process region...
double complex X_GC_child_CisAit_spin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, double complex tmp_trans, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Hopping term in Spin + GC When both site1 and site2 are in the inter process region.
int mltplySpinGC(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Driver function for Spin hamiltonian.
int ConvertToList1GeneralSpin(const long unsigned int org_ibit, const long unsigned int ihlfbit, long unsigned int *_ilist1Comp)
function of converting component to list_1
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 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.
void child_general_int_spin_MPIBoost(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1, double complex *tmp_v2, double complex *tmp_v3)
double complex X_GC_child_CisAit_GeneralSpin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, double complex tmp_trans, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Compute term in the grandcanonical general spin system when both site is in the inter process region...
int child_pairlift_spin_GetInfo(int iPairLift, struct BindStruct *X)
Set parameters for the bit operation of spin-pairlift term.
void child_general_int_GeneralSpin_MPIdouble(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
General interaction term in the Spin model + GC When both site1 and site2 are in the inter process re...
int mltplyHalfSpin(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Driver function for Spin 1/2 hamiltonian.
int mltplyHalfSpinGC(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Driver function for Spin 1/2 Hamiltonian (grandcanonical)
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.
void GC_child_general_int_spin_MPIdouble(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
General interaction term in the Spin model + GC When both site1 and site2 are in the inter process re...
void child_general_int_spin_MPIdouble(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Exchange term in Spin model When both site1 and site2 are in the inter process region.
int mltplyGeneralSpinGC(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Driver function for General Spin hamiltonian (grandcanonical)
long unsigned int * list_1
double complex child_general_int_spin(double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X)
Compute Inter-All term of spin Hamiltonian (canonical)
int mltplySpinGCBoost(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Driver function for Spin hamiltonian (Boost)
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.
void GC_child_general_int_GeneralSpin_MPIsingle(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
General interaction term in the Spin model + GC When both site1 and site2 are in the inter process re...
double complex GC_child_general_int_spin(double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X)
Compute Inter-All term of spin Hamiltonian (grandcanonical)
int BitCheckGeneral(const long unsigned int org_bit, const unsigned int org_isite, const unsigned int target_ispin, const long int *SiteToBit, const long unsigned int *Tpow)
bit check function for general spin
double complex X_child_general_int_spin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, int org_isite3, int org_ispin3, int org_ispin4, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Exchange term in Spin model When both site1 and site2 are in the inter process region.
double complex X_child_general_int_spin_MPIsingle(int org_isite1, int org_ispin1, int org_ispin2, int org_isite3, int org_ispin3, int org_ispin4, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
int GetOffCompGeneralSpin(const long unsigned int org_ibit, const int org_isite, const int org_ispin, const int off_ispin, long unsigned int *_ioffComp, const long int *SiteToBit, const long unsigned int *Tpow)
function of getting off-diagonal component for general spin
void child_general_int_spin_MPIsingle(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Exchange term in Spin model When only site2 is in the inter process region.
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 X_GC_child_CisAitCiuAiv_spin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, int org_isite3, int org_ispin3, int org_ispin4, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
term in Spin model + GC. When both site1 and site2 are in the inter process region.
int mltplySpin(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Driver function for Spin hamiltonian.
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.
void child_general_int_GeneralSpin_MPIsingle(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
General interaction term in the Spin model + GC When both site1 and site2 are in the inter process re...
void GC_child_general_int_GeneralSpin_MPIdouble(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
General interaction term in the Spin model + GC When both site1 and site2 are in the inter process re...