HΦ  3.2.0
mltplyHubbardCore.c
Go to the documentation of this file.
1 /* HPhi - Quantum Lattice Model Simulator */
2 /* Copyright (C) 2015 The University of Tokyo */
3 /* This program is free software: you can redistribute it and/or modify */
4 /* it under the terms of the GNU General Public License as published by */
5 /* the Free Software Foundation, either version 3 of the License, or */
6 /* (at your option) any later version. */
7 
8 /* This program is distributed in the hope that it will be useful, */
9 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
10 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
11 /* GNU General Public License for more details. */
12 
13 /* You should have received a copy of the GNU General Public License */
14 /* along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 #include <bitcalc.h>
19 #include "xsetmem.h"
20 #include "wrapperMPI.h"
21 #include "mltplyCommon.h"
22 #include "mltplyHubbardCore.h"
23 
24 /******************************************************************************/
25 //[s] GetInfo functions
26 /******************************************************************************/
27 
35  struct BindStruct *X,
36  unsigned long int isite1,
37  unsigned long int isite2,
38  unsigned long int sigma1,
39  unsigned long int sigma2
40 ) {
45  X->Large.is1_spin = X->Def.Tpow[2 * isite1 - 2 + sigma1];
46  X->Large.is2_spin = X->Def.Tpow[2 * isite2 - 2 + sigma2];
50  if (isite1 > isite2) {
51  X->Large.A_spin = (X->Def.Tpow[2 * isite1 - 2 + sigma1] - X->Def.Tpow[2 * isite2 - 1 + sigma2]);
52  }
53  else if (isite1 < isite2) {
54  X->Large.A_spin = (X->Def.Tpow[2 * isite2 - 2 + sigma2] - X->Def.Tpow[2 * isite1 - 1 + sigma1]);
55  }
56  else {
57  if (sigma1 > sigma2) {
58  X->Large.A_spin = (X->Def.Tpow[2 * isite1 - 2 + sigma1] - X->Def.Tpow[2 * isite2 - 1 + sigma2]);
59  }
60  else {
61  X->Large.A_spin = (X->Def.Tpow[2 * isite2 - 2 + sigma2] - X->Def.Tpow[2 * isite1 - 1 + sigma1]);
62  }
63  }
68  return 0;
69 }/*int child_general_hopp_GetInfo*/
77  int iInterAll,
78  struct BindStruct *X,
79  long unsigned int isite1,
80  long unsigned int isite2,
81  long unsigned int isite3,
82  long unsigned int isite4,
83  long unsigned int sigma1,
84  long unsigned int sigma2,
85  long unsigned int sigma3,
86  long unsigned int sigma4,
87  double complex tmp_V
88 ) {
89  long unsigned int is1_spin, is2_spin, is3_spin, is4_spin;
90  long unsigned int A_spin, B_spin;
91  long unsigned int isA_spin, isB_spin;
96  is1_spin = X->Def.Tpow[2 * isite1 - 2 + sigma1];
97  is2_spin = X->Def.Tpow[2 * isite2 - 2 + sigma2];
101  if (isite1 > isite2) {
102  A_spin = (X->Def.Tpow[2 * isite1 - 2 + sigma1] - X->Def.Tpow[2 * isite2 - 1 + sigma2]);
103  }
104  else if (isite2 > isite1) {
105  A_spin = (X->Def.Tpow[2 * isite2 - 2 + sigma2] - X->Def.Tpow[2 * isite1 - 1 + sigma1]);
106  }
107  else {//isite1=isite2
108  if (sigma1 > sigma2) {
109  A_spin = (X->Def.Tpow[2 * isite1 - 2 + sigma1] - X->Def.Tpow[2 * isite2 - 1 + sigma2]);
110  }
111  else {
112  A_spin = (X->Def.Tpow[2 * isite2 - 2 + sigma2] - X->Def.Tpow[2 * isite1 - 1 + sigma1]);
113  }
114  }
119  is3_spin = X->Def.Tpow[2 * isite3 - 2 + sigma3];
120  is4_spin = X->Def.Tpow[2 * isite4 - 2 + sigma4];
124  if (isite3 > isite4) {
125  B_spin = (X->Def.Tpow[2 * isite3 - 2 + sigma3] - X->Def.Tpow[2 * isite4 - 1 + sigma4]);
126  }
127  else if (isite3 < isite4) {
128  B_spin = (X->Def.Tpow[2 * isite4 - 2 + sigma4] - X->Def.Tpow[2 * isite3 - 1 + sigma3]);
129  }
130  else {//isite3=isite4
131  if (sigma3 > sigma4) {
132  B_spin = (X->Def.Tpow[2 * isite3 - 2 + sigma3] - X->Def.Tpow[2 * isite4 - 1 + sigma4]);
133  }
134  else {
135  B_spin = (X->Def.Tpow[2 * isite4 - 2 + sigma4] - X->Def.Tpow[2 * isite3 - 1 + sigma3]);
136  }
137  }
141  isA_spin = is1_spin + is2_spin;
142  isB_spin = is3_spin + is4_spin;
143 
144  X->Large.is1_spin = is1_spin;
145  X->Large.is2_spin = is2_spin;
146  X->Large.is3_spin = is3_spin;
147  X->Large.is4_spin = is4_spin;
148  X->Large.isA_spin = isA_spin;
149  X->Large.isB_spin = isB_spin;
150  X->Large.A_spin = A_spin;
151  X->Large.B_spin = B_spin;
155  X->Large.tmp_V = tmp_V;
156  X->Large.isite1 = isite1;
157  X->Large.isite2 = isite2;
158  X->Large.isite3 = isite3;
159  X->Large.isite4 = isite4;
160 
161  return 0;
162 }/*int child_general_int_GetInfo*/
170  int iPairHopp,
171  struct BindStruct *X
172 ) {
173  int isite1 = X->Def.PairHopping[iPairHopp][0] + 1;
174  int isite2 = X->Def.PairHopping[iPairHopp][1] + 1;
178  X->Large.tmp_J = X->Def.ParaPairHopping[iPairHopp];
184  X->Large.is1_up = X->Def.Tpow[2 * isite1 - 2];
185  X->Large.is1_down = X->Def.Tpow[2 * isite1 - 1];
186  X->Large.is2_up = X->Def.Tpow[2 * isite2 - 2];
187  X->Large.is2_down = X->Def.Tpow[2 * isite2 - 1];
188 
189  return 0;
190 }/*int child_pairhopp_GetInfo*/
198  int iExchange,
199  struct BindStruct *X
200 ) {
201  int isite1 = X->Def.ExchangeCoupling[iExchange][0] + 1;
202  int isite2 = X->Def.ExchangeCoupling[iExchange][1] + 1;
206  X->Large.tmp_J = -X->Def.ParaExchangeCoupling[iExchange];
212  X->Large.is1_up = X->Def.Tpow[2 * isite1 - 2];
213  X->Large.is1_down = X->Def.Tpow[2 * isite1 - 1];
214  X->Large.is2_up = X->Def.Tpow[2 * isite2 - 2];
215  X->Large.is2_down = X->Def.Tpow[2 * isite2 - 1];
216 
217  return 0;
218 }/*int child_exchange_GetInfo*/
219 
220 /******************************************************************************/
221 //[e] GetInfo functions
222 /******************************************************************************/
223 
224 /******************************************************************************/
225 //[s] core routines
226 /******************************************************************************/
233 double complex GC_CisAis(
234  long unsigned int j,
235  double complex *tmp_v0,
236  double complex *tmp_v1,
237  struct BindStruct *X,
238  long unsigned int is1_spin,
239  double complex tmp_trans
240 ) {
241  long unsigned int A_ibit_tmp;
242  long unsigned int list_1_j;
243  double complex dmv;
244  double complex dam_pr;
245 
246  list_1_j = j - 1;
247  A_ibit_tmp = (list_1_j & is1_spin) / is1_spin;
248  dmv = tmp_v1[j] * A_ibit_tmp;
249  if (X->Large.mode == M_MLTPLY || X->Large.mode == M_CALCSPEC) {
250  tmp_v0[j] += dmv * tmp_trans;
251  }/*if (X->Large.mode == M_MLTPLY || X->Large.mode == M_CALCSPEC)*/
252  dam_pr = dmv * conj(tmp_v1[j]);
253  return dam_pr;
254 }/*double complex GC_CisAis*/
260 double complex GC_AisCis(
261  long unsigned int j,
262  double complex *tmp_v0,
263  double complex *tmp_v1,
264  struct BindStruct *X,
265  long unsigned int is1_spin,
266  double complex tmp_trans
267 ) {
268  long unsigned int A_ibit_tmp;
269  long unsigned int list_1_j;
270  double complex dmv;
271  double complex dam_pr;
272 
273  list_1_j = j - 1;
274  A_ibit_tmp = (list_1_j & is1_spin) / is1_spin;
275  dmv = tmp_v1[j] * (1 - A_ibit_tmp);
276  if (X->Large.mode == M_MLTPLY || X->Large.mode == M_CALCSPEC) {
277  tmp_v0[j] += dmv * tmp_trans;
278  }/*if (X->Large.mode == M_MLTPLY || X->Large.mode == M_CALCSPEC)*/
279  dam_pr = dmv * conj(tmp_v1[j]);
280  return dam_pr;
281 }/*double complex GC_AisCis*/
289  long unsigned int list_1_j,
290  struct BindStruct *X,
291  long unsigned int is1_spin
292 ) {
293  int A_ibit_tmp;
294 
295  // off = j
296  A_ibit_tmp = (list_1_j & is1_spin) / is1_spin;
297  return A_ibit_tmp;
298 }
305 double complex CisAjt(
306  long unsigned int j,
307  double complex *tmp_v0,
308  double complex *tmp_v1,
309  struct BindStruct *X,
310  long unsigned int is1_spin,
311  long unsigned int is2_spin,
312  long unsigned int sum_spin,
313  long unsigned int diff_spin,
314  double complex tmp_V
315 ) {
316  long unsigned int ibit_tmp_1, ibit_tmp_2;
317  long unsigned int bit, iexchg, off;
318  int sgn;
319  double complex dmv, dam_pr;
320 
321  ibit_tmp_1 = (list_1[j] & is1_spin);
322  ibit_tmp_2 = (list_1[j] & is2_spin);
323  if (ibit_tmp_1 == 0 && ibit_tmp_2 != 0) {
324  bit = list_1[j] & diff_spin;
325  SgnBit(bit, &sgn); // Fermion sign
326  iexchg = list_1[j] ^ sum_spin;
327 
328  if(GetOffComp(list_2_1, list_2_2, iexchg, X->Large.irght, X->Large.ilft, X->Large.ihfbit, &off)==FALSE){
329  return 0;
330  }
331 /*
332  if(X->Large.mode==M_CORR){
333  fprintf(stdout, "DEBUG-1: myrank=%d, org=%d, bit=%d, iexchg=%d, list_1[%d]=%d\n",
334  myrank, list_1[j], bit, iexchg, off, list_1[off]);
335  }
336 */
337  dmv = sgn * tmp_v1[j];
338  if (X->Large.mode == M_MLTPLY || X->Large.mode == M_CALCSPEC) { // for multply
339  tmp_v0[off] += tmp_V * dmv;
340  }
341  dam_pr = dmv * conj(tmp_v1[off]);
342  return dam_pr;
343  }
344  else {
345  return 0;
346  }
347 }
354 double complex GC_CisAjt(
355  long unsigned int j,
356  double complex *tmp_v0,
357  double complex *tmp_v1,
358  struct BindStruct *X,
359  long unsigned int is1_spin,
360  long unsigned int is2_spin,
361  long unsigned int sum_spin,
362  long unsigned int diff_spin,
363  double complex tmp_V,
364  long unsigned int *tmp_off
365 ) {
366  long unsigned int list_1_j, list_1_off;
367  long unsigned int ibit_tmp_1, ibit_tmp_2;
368  long unsigned int bit;
369  int sgn;
370  double complex dmv, dam_pr;
371 
372  list_1_j = j - 1;
373  ibit_tmp_1 = (list_1_j & is1_spin);
374  ibit_tmp_2 = (list_1_j & is2_spin);
375  *tmp_off = 0;
376 
377  if (ibit_tmp_1 == 0 && ibit_tmp_2 != 0) {
378  bit = list_1_j & diff_spin;
379  SgnBit(bit, &sgn); // Fermion sign
380  list_1_off = list_1_j ^ sum_spin;
381  *tmp_off = list_1_off;
382  dmv = sgn * tmp_v1[j];
383  if (X->Large.mode == M_MLTPLY || X->Large.mode == M_CALCSPEC) { // for multply
384  tmp_v0[list_1_off + 1] += dmv * tmp_V;
385  }
386  dam_pr = dmv * conj(tmp_v1[list_1_off + 1]);
387  return dam_pr;
388  }
389  else {
390  return 0;
391  }
392 }/*double complex GC_CisAjt*/
400  long unsigned int list_1_j,
401  struct BindStruct *X,
402  long unsigned int is1_spin,
403  long unsigned int is2_spin,
404  long unsigned int sum_spin,
405  long unsigned int diff_spin,
406  long unsigned int *tmp_off
407 ) {
408  long unsigned int off;
409  int sgn = 1;
410 
411  sgn = X_GC_CisAjt(list_1_j, X, is1_spin, is2_spin, sum_spin, diff_spin, tmp_off);
412  if (sgn != 0) {
413  if(GetOffComp(list_2_1, list_2_2, *tmp_off, X->Large.irght, X->Large.ilft, X->Large.ihfbit, &off)!=TRUE){
414  *tmp_off = 0;
415  return 0;
416  }
417  *tmp_off = off;
418  return sgn;
419  }
420  else {
421  *tmp_off = 0;
422  return 0;
423  }
424 }/*int X_CisAjt*/
432  long unsigned int list_1_j,
433  struct BindStruct *X,
434  long unsigned int is1_spin,
435  long unsigned int is2_spin,
436  long unsigned int sum_spin,
437  long unsigned int diff_spin,
438  long unsigned int *tmp_off
439 ) {
440  long unsigned int ibit_tmp_1, ibit_tmp_2;
441  long unsigned int bit, off;
442  int sgn = 1;
443 
444  ibit_tmp_1 = (list_1_j & is1_spin);
445  ibit_tmp_2 = (list_1_j & is2_spin);
446 
447  if (ibit_tmp_1 == 0 && ibit_tmp_2 != 0) {
448  bit = list_1_j & diff_spin;
449  SgnBit(bit, &sgn); // Fermion sign
450  off = list_1_j ^ sum_spin;
451  *tmp_off = off;
452  return sgn; // pm 1
453  }
454  else {
455  *tmp_off = 0;
456  return 0;
457  }
458 }
459 /******************************************************************************/
460 //[e] core routines
461 /******************************************************************************/
462 
463 /******************************************************************************/
464 //[s] child element functions
465 /******************************************************************************/
472 double complex child_exchange_element(
473  long unsigned int j,
474  double complex *tmp_v0,
475  double complex *tmp_v1,
476  struct BindStruct *X,
477  long unsigned int *tmp_off
478 ) {
479  long unsigned int off;
480  long unsigned int ibit1_up, ibit2_up, ibit1_down, ibit2_down;
481  double complex dmv;
482  long unsigned int iexchg;
483  long unsigned int is1_up = X->Large.is1_up;
484  long unsigned int is2_up = X->Large.is2_up;
485  long unsigned int is1_down = X->Large.is1_down;
486  long unsigned int is2_down = X->Large.is2_down;
487  long unsigned int irght = X->Large.irght;
488  long unsigned int ilft = X->Large.ilft;
489  long unsigned int ihfbit = X->Large.ihfbit;
490  double complex tmp_J = X->Large.tmp_J;
491  int mode = X->Large.mode;
492  double complex dam_pr = 0;
493 
494  ibit1_up = list_1[j] & is1_up;
495  ibit2_up = list_1[j] & is2_up;
496  ibit1_down = list_1[j] & is1_down;
497  ibit2_down = list_1[j] & is2_down;
498 
499  if (ibit1_up == 0 && ibit1_down != 0 && ibit2_up != 0 && ibit2_down == 0) {
500  iexchg = list_1[j] - (is1_down + is2_up);
501  iexchg += (is1_up + is2_down);
502  if(GetOffComp(list_2_1, list_2_2, iexchg, irght, ilft, ihfbit, &off)!=TRUE){
503  return 0;
504  }
505  *tmp_off = off;
506  dmv = tmp_J * tmp_v1[j];
507  if (mode == M_MLTPLY) {
508  tmp_v0[off] += dmv;
509  }
510  dam_pr += dmv * conj(tmp_v1[off]);
511  }
512  else if (ibit1_up != 0 && ibit1_down == 0 && ibit2_up == 0 && ibit2_down != 0) {
513  iexchg = list_1[j] - (is1_up + is2_down);
514  iexchg += (is1_down + is2_up);
515  if(GetOffComp(list_2_1, list_2_2, iexchg, irght, ilft, ihfbit, &off)!=TRUE){
516  return 0;
517  }
518  *tmp_off = off;
519  dmv = tmp_J * tmp_v1[j];
520  if (mode == M_MLTPLY) {
521  tmp_v0[off] += dmv;
522  }
523  dam_pr += dmv * conj(tmp_v1[off]);
524  }
525  return dam_pr;
526 }/*double complex child_exchange_element*/
533 double complex child_pairhopp_element(
534  long unsigned int j,
535  double complex *tmp_v0,
536  double complex *tmp_v1,
537  struct BindStruct *X,
538  long unsigned int *tmp_off
539 ) {
540  long unsigned int off;
541  long unsigned int ibit1_up, ibit2_up, ibit1_down, ibit2_down;
542  double complex dmv;
543  long unsigned int iexchg;
544  long unsigned int is1_up = X->Large.is1_up;
545  long unsigned int is2_up = X->Large.is2_up;
546  long unsigned int is1_down = X->Large.is1_down;
547  long unsigned int is2_down = X->Large.is2_down;
548  long unsigned int irght = X->Large.irght;
549  long unsigned int ilft = X->Large.ilft;
550  long unsigned int ihfbit = X->Large.ihfbit;
551  double complex tmp_J = X->Large.tmp_J;
552  int mode = X->Large.mode;
553  double complex dam_pr = 0;
554 
555  ibit1_up = list_1[j] & is1_up;
556  ibit2_up = list_1[j] & is2_up;
557  ibit1_down = list_1[j] & is1_down;
558  ibit2_down = list_1[j] & is2_down;
559 
560  if (ibit1_up == 0 && ibit1_down == 0 && ibit2_up != 0 && ibit2_down != 0) {
561  iexchg = list_1[j] - (is2_up + is2_down);
562  iexchg += (is1_up + is1_down);
563 
564  if(GetOffComp(list_2_1, list_2_2, iexchg, irght, ilft, ihfbit, &off)!=TRUE){
565  return 0;
566  }
567  *tmp_off = off;
568  dmv = tmp_J * tmp_v1[j];
569  if (mode == M_MLTPLY || X->Large.mode == M_CALCSPEC) {
570  tmp_v0[off] += dmv;
571  }
572  dam_pr += dmv * conj(tmp_v1[off]);
573  }
574  return dam_pr;
575 }/*double complex child_pairhopp_element*/
583  long unsigned int j,
584  double complex *tmp_v0,
585  double complex *tmp_v1,
586  struct BindStruct *X,
587  long unsigned int *tmp_off
588 ) {
589  long unsigned int ibit1_up, ibit2_up, ibit1_down, ibit2_down;
590  double complex dmv;
591  long unsigned int iexchg;
592  long unsigned int is1_up = X->Large.is1_up;
593  long unsigned int is2_up = X->Large.is2_up;
594  long unsigned int is1_down = X->Large.is1_down;
595  long unsigned int is2_down = X->Large.is2_down;
596  long unsigned int list_1_j, list_1_off;
597  double complex tmp_J = X->Large.tmp_J;
598  int mode = X->Large.mode;
599  double complex dam_pr = 0;
600 
601  list_1_j = j - 1;
602  ibit1_up = list_1_j & is1_up;
603  ibit2_up = list_1_j & is2_up;
604  ibit1_down = list_1_j & is1_down;
605  ibit2_down = list_1_j & is2_down;
606 
607  if (ibit1_up == 0 && ibit1_down != 0 && ibit2_up != 0 && ibit2_down == 0) {
608 
609  iexchg = list_1_j - (is1_down + is2_up);
610  iexchg += (is1_up + is2_down);
611  list_1_off = iexchg;
612  *tmp_off = list_1_off;
613 
614  dmv = tmp_J * tmp_v1[j];
615  if (mode == M_MLTPLY) {
616  tmp_v0[list_1_off + 1] += dmv;
617  }
618  dam_pr += dmv * conj(tmp_v1[list_1_off + 1]);
619  }
620  else if (ibit1_up != 0 && ibit1_down == 0 && ibit2_up == 0 && ibit2_down != 0) {
621  iexchg = list_1_j - (is1_up + is2_down);
622  iexchg += (is1_down + is2_up);
623  list_1_off = iexchg;
624  *tmp_off = list_1_off;
625 
626  dmv = tmp_J * tmp_v1[j];
627  if (mode == M_MLTPLY) {
628  tmp_v0[list_1_off + 1] += dmv;
629  }
630  dam_pr += dmv * conj(tmp_v1[list_1_off + 1]);
631  }
632  return dam_pr;
633 }/*double complex GC_child_exchange_element*/
641  long unsigned int j,
642  double complex *tmp_v0,
643  double complex *tmp_v1,
644  struct BindStruct *X,
645  long unsigned int *tmp_off
646 ) {
647  long unsigned int ibit1_up, ibit2_up, ibit1_down, ibit2_down;
648  double complex dmv;
649  long unsigned int iexchg;
650  long unsigned int is1_up = X->Large.is1_up;
651  long unsigned int is2_up = X->Large.is2_up;
652  long unsigned int is1_down = X->Large.is1_down;
653  long unsigned int is2_down = X->Large.is2_down;
654  long unsigned int list_1_j, list_1_off;
655  double complex tmp_J = X->Large.tmp_J;
656  int mode = X->Large.mode;
657 
658  double complex dam_pr = 0 + 0 * I;
659  list_1_j = j - 1;
660 
661  ibit1_up = list_1_j & is1_up;
662 
663  ibit2_up = list_1_j & is2_up;
664 
665  ibit1_down = list_1_j & is1_down;
666 
667  ibit2_down = list_1_j & is2_down;
668 
669  if (ibit1_up == 0 && ibit1_down == 0 && ibit2_up != 0 && ibit2_down != 0) {
670  iexchg = list_1_j - (is2_up + is2_down);
671  iexchg += (is1_up + is1_down);
672  list_1_off = iexchg;
673  *tmp_off = list_1_off;
674  dmv = tmp_J * tmp_v1[j];
675  if (mode == M_MLTPLY || X->Large.mode == M_CALCSPEC) {
676  tmp_v0[list_1_off + 1] += dmv;
677  }
678  dam_pr += dmv * conj(tmp_v1[list_1_off + 1]);
679  }
680  return dam_pr;
681 }
690  long unsigned int j,
691  long unsigned int isite1,
692  long unsigned int isite3,
693  double complex tmp_V,
694  double complex *tmp_v0,
695  double complex *tmp_v1,
696  struct BindStruct *X,
697  long unsigned int *tmp_off
698 ) {
699  int tmp_sgn;
700  double complex dmv;
701  double complex dam_pr = 0 + 0 * I;
702  tmp_sgn = X_CisAis(list_1[j], X, isite3);
703  tmp_sgn *= X_CisAis(list_1[j], X, isite1);
704  dmv = tmp_V * tmp_v1[j] * tmp_sgn;
705  if (X->Large.mode == M_MLTPLY || X->Large.mode == M_CALCSPEC) { // for multply
706  tmp_v0[j] += dmv;
707  }
708  dam_pr = conj(tmp_v1[j]) * dmv;
709  return dam_pr;
710 }/*double complex child_CisAisCisAis_element*/
719  long unsigned int j,
720  long unsigned int isite1,
721  long unsigned int isite3,
722  long unsigned int isite4,
723  long unsigned int Bsum,
724  long unsigned int Bdiff,
725  double complex tmp_V,
726  double complex *tmp_v0,
727  double complex *tmp_v1,
728  struct BindStruct *X,
729  long unsigned int *tmp_off
730 ) {
731  int tmp_sgn;
732  double complex dmv;
733  double complex dam_pr = 0 + 0 * I;
734  tmp_sgn = X_CisAjt(list_1[j], X, isite3, isite4, Bsum, Bdiff, tmp_off);
735  if (tmp_sgn != 0) {
736  tmp_sgn *= X_CisAis(list_1[*tmp_off], X, isite1);
737  if (tmp_sgn != 0) {
738  dmv = tmp_V * tmp_v1[j] * tmp_sgn;
739  if (X->Large.mode == M_MLTPLY || X->Large.mode == M_CALCSPEC) { // for multply
740  tmp_v0[*tmp_off] += dmv;
741  }
742  dam_pr = conj(tmp_v1[*tmp_off]) * dmv;
743  }
744  }
745  return dam_pr;
746 }/*double complex child_CisAisCjtAku_element*/
755  long unsigned int j,
756  long unsigned int isite1,
757  long unsigned int isite2,
758  long unsigned int isite3,
759  long unsigned int Asum,
760  long unsigned int Adiff,
761  double complex tmp_V,
762  double complex *tmp_v0,
763  double complex *tmp_v1,
764  struct BindStruct *X,
765  long unsigned int *tmp_off
766 ) {
767  int tmp_sgn;
768  double complex dmv;
769  double complex dam_pr;
770  dam_pr = 0;
771  tmp_sgn = X_CisAis(list_1[j], X, isite3);
772  if (tmp_sgn != 0) {
773  tmp_sgn *= X_CisAjt(list_1[j], X, isite1, isite2, Asum, Adiff, tmp_off);
774  if (tmp_sgn != 0) {
775  dmv = tmp_V * tmp_v1[j] * tmp_sgn;
776  if (X->Large.mode == M_MLTPLY || X->Large.mode == M_CALCSPEC) { // for multply
777  tmp_v0[*tmp_off] += dmv;
778  }
779  dam_pr = conj(tmp_v1[*tmp_off]) * dmv;
780  }
781  }
782  return dam_pr;
783 }/*double complex child_CisAjtCkuAku_element*/
792  long unsigned int j,
793  long unsigned int isite1,
794  long unsigned int isite2,
795  long unsigned int isite3,
796  long unsigned int isite4,
797  long unsigned int Asum,
798  long unsigned int Adiff,
799  long unsigned int Bsum,
800  long unsigned int Bdiff,
801  double complex tmp_V,
802  double complex *tmp_v0,
803  double complex *tmp_v1,
804  struct BindStruct *X,
805  long unsigned int *tmp_off_2
806 ) {
807  int tmp_sgn;
808  long unsigned int tmp_off_1;
809 
810  double complex dmv;
811  double complex dam_pr = 0;
812  tmp_sgn = X_GC_CisAjt(list_1[j], X, isite3, isite4, Bsum, Bdiff, &tmp_off_1);
813 
814  if (tmp_sgn != 0) {
815  tmp_sgn *= X_CisAjt(tmp_off_1, X, isite1, isite2, Asum, Adiff, tmp_off_2);
816  if (tmp_sgn != 0) {
817  dmv = tmp_V * tmp_v1[j] * tmp_sgn;
818  if (X->Large.mode == M_MLTPLY || X->Large.mode == M_CALCSPEC) { // for multply
819  tmp_v0[*tmp_off_2] += dmv;
820  }
821  dam_pr = conj(tmp_v1[*tmp_off_2]) * dmv;
822  }
823  }
824  return dam_pr;
825 }/*double complex child_CisAjtCkuAlv_element*/
826 //[s] Grand Canonical
835  long unsigned int j,
836  long unsigned int isite1,
837  long unsigned int isite3,
838  double complex tmp_V,
839  double complex *tmp_v0,
840  double complex *tmp_v1,
841  struct BindStruct *X,
842  long unsigned int *tmp_off
843 ) {
844  int tmp_sgn;
845  double complex dmv;
846  double complex dam_pr = 0;
847  tmp_sgn = X_CisAis(j - 1, X, isite3);
848  tmp_sgn *= X_CisAis(j - 1, X, isite1);
849  if (tmp_sgn != 0) {
850  dmv = tmp_V * tmp_v1[j] * tmp_sgn;
851  if (X->Large.mode == M_MLTPLY || X->Large.mode == M_CALCSPEC) { // for multply
852  tmp_v0[j] += dmv;
853  }
854  dam_pr = conj(tmp_v1[j]) * dmv;
855  }
856  return dam_pr;
857 }/*double complex GC_child_CisAisCisAis_element*/
866  long unsigned int j,
867  long unsigned int isite1,
868  long unsigned int isite3,
869  long unsigned int isite4,
870  long unsigned int Bsum,
871  long unsigned int Bdiff,
872  double complex tmp_V,
873  double complex *tmp_v0,
874  double complex *tmp_v1,
875  struct BindStruct *X,
876  long unsigned int *tmp_off
877 ) {
878  int tmp_sgn;
879  double complex dmv;
880  double complex dam_pr = 0 + 0 * I;
881  tmp_sgn = X_GC_CisAjt((j - 1), X, isite3, isite4, Bsum, Bdiff, tmp_off);
882  if (tmp_sgn != 0) {
883  tmp_sgn *= X_CisAis(*tmp_off, X, isite1);
884  if (tmp_sgn != 0) {
885  dmv = tmp_V * tmp_v1[j] * tmp_sgn;
886  if (X->Large.mode == M_MLTPLY || X->Large.mode == M_CALCSPEC) { // for multply
887  tmp_v0[*tmp_off + 1] += dmv;
888  }
889  dam_pr = conj(tmp_v1[*tmp_off + 1]) * dmv;
890  }
891  }
892  return dam_pr;
893 }/*double complex GC_child_CisAisCjtAku_element*/
902  long unsigned int j,
903  long unsigned int isite1,
904  long unsigned int isite2,
905  long unsigned int isite3,
906  long unsigned int Asum,
907  long unsigned int Adiff,
908  double complex tmp_V,
909  double complex *tmp_v0,
910  double complex *tmp_v1,
911  struct BindStruct *X,
912  long unsigned int *tmp_off
913 ) {
914  int tmp_sgn;
915  double complex dmv;
916  double complex dam_pr = 0 + 0 * I;
917  tmp_sgn = X_CisAis((j - 1), X, isite3);
918  if (tmp_sgn != 0) {
919  tmp_sgn *= X_GC_CisAjt((j - 1), X, isite1, isite2, Asum, Adiff, tmp_off);
920  if (tmp_sgn != 0) {
921  dmv = tmp_V * tmp_v1[j] * tmp_sgn;
922  if (X->Large.mode == M_MLTPLY || X->Large.mode == M_CALCSPEC) { // for multply
923  tmp_v0[*tmp_off + 1] += dmv;
924  }
925  dam_pr = conj(tmp_v1[*tmp_off + 1]) * dmv;
926  }/*if (tmp_sgn != 0)*/
927  }/*if (tmp_sgn != 0)*/
928  return dam_pr;
929 }/*double complex GC_child_CisAjtCkuAku_element*/
938  long unsigned int j,
939  long unsigned int isite1,
940  long unsigned int isite2,
941  long unsigned int isite3,
942  long unsigned int isite4,
943  long unsigned int Asum,
944  long unsigned int Adiff,
945  long unsigned int Bsum,
946  long unsigned int Bdiff,
947  double complex tmp_V,
948  double complex *tmp_v0,
949  double complex *tmp_v1,
950  struct BindStruct *X,
951  long unsigned int *tmp_off_2
952 ) {
953  int tmp_sgn;
954  long unsigned int tmp_off_1;
955  double complex dmv;
956  double complex dam_pr = 0 + 0 * I;
957 
958  tmp_sgn = X_GC_CisAjt((j - 1), X, isite3, isite4, Bsum, Bdiff, &tmp_off_1);
959  if (tmp_sgn != 0) {
960  tmp_sgn *= X_GC_CisAjt(tmp_off_1, X, isite1, isite2, Asum, Adiff, tmp_off_2);
961  if (tmp_sgn != 0) {
962  dmv = tmp_V * tmp_v1[j] * tmp_sgn;
963  if (X->Large.mode == M_MLTPLY || X->Large.mode == M_CALCSPEC) { // for multply
964  tmp_v0[*tmp_off_2 + 1] += dmv;
965  }
966  dam_pr = conj(tmp_v1[*tmp_off_2 + 1]) * dmv;
967  }
968  }
969  return dam_pr;
970 }/*double complex GC_child_CisAjtCkuAlv_element*/
971 //[e] Grand Canonical
980 double complex GC_Cis(
981  long unsigned int j,
982  double complex *tmp_v0,
983  double complex *tmp_v1,
984  long unsigned int is1_spin,
985  double complex tmp_V,
986  long unsigned int *tmp_off
987 ) {
988  long unsigned int list_1_j, list_1_off;
989  long unsigned int ibit_tmp_1;
990  long unsigned int bit;
991  int sgn, ipsgn;
992  double complex dmv, dam_pr;
993 
994  list_1_j = j - 1;
995 
996  ibit_tmp_1 = (list_1_j & is1_spin);
997  // is1_spin >= 1
998  // is1_spin = Tpow[2*isite + ispin]
999 
1000  *tmp_off = 0;
1001 
1002  if (ibit_tmp_1 == 0) {
1003  // able to create an electron at the is1_spin state
1004  bit = list_1_j - (list_1_j & (2 * is1_spin - 1));
1005  SgnBit(bit, &sgn); // Fermion sign
1006  ipsgn = 1;
1007 #ifdef MPI
1008  SgnBit(myrank, &ipsgn); // Fermion sign
1009 #endif
1010  list_1_off = list_1_j | is1_spin; // OR
1011  *tmp_off = list_1_off;
1012  dmv = ipsgn * sgn * tmp_v1[j];
1013  //if (X->Large.mode == M_MLTPLY) { // for multply
1014  tmp_v0[list_1_off + 1] += dmv * tmp_V;
1015  //}
1016  dam_pr = dmv * conj(tmp_v1[list_1_off + 1]);
1017  return dam_pr;
1018  }
1019  else {
1020  return 0;
1021  }
1022 }/*double complex GC_Cis*/
1031 double complex GC_Ajt(
1032  long unsigned int j,
1033  double complex *tmp_v0,
1034  double complex *tmp_v1,
1035  long unsigned int is1_spin,
1036  double complex tmp_V,
1037  long unsigned int *tmp_off
1038 ) {
1039  long unsigned int list_1_j, list_1_off;
1040  long unsigned int ibit_tmp_1;
1041  long unsigned int bit;
1042  int sgn, ipsgn;
1043  double complex dmv, dam_pr;
1044 
1045  list_1_j = j - 1;
1046 
1047  ibit_tmp_1 = (list_1_j & is1_spin);
1048  // is1_spin >= 1
1049 
1050  *tmp_off = 0;
1051 
1052  if (ibit_tmp_1 == is1_spin) {
1053  // able to create an electron at the is1_spin state
1054  bit = list_1_j - (list_1_j & (2 * is1_spin - 1));
1055  SgnBit(bit, &sgn); // Fermion sign
1056  ipsgn = 1;
1057 #ifdef MPI
1058  SgnBit(myrank, &ipsgn); // Fermion sign
1059 #endif
1060  list_1_off = list_1_j ^ is1_spin;
1061  *tmp_off = list_1_off;
1062  dmv = ipsgn * sgn * tmp_v1[j];
1063  //if (X->Large.mode == M_MLTPLY) { // for multply
1064  tmp_v0[list_1_off + 1] += dmv * tmp_V;
1065  //}
1066  dam_pr = dmv * conj(tmp_v1[list_1_off + 1]);
1067  return dam_pr;
1068  }
1069  else {
1070  return 0;
1071  }
1072 }/*double complex GC_Ajt*/
1081 int X_Cis(
1082  long unsigned int j,
1083  long unsigned int is1_spin,
1084  long unsigned int *tmp_off,
1085  long unsigned int *list_1_org,
1086  long unsigned int *list_2_1_target,
1087  long unsigned int *list_2_2_target,
1088  long unsigned int _irght,
1089  long unsigned int _ilft,
1090  long unsigned int _ihfbit
1091 ) {
1092  long unsigned int list_1_j, list_1_off;
1093  long unsigned int ibit_tmp_1;
1094  long unsigned int bit;
1095  int sgn, ipsgn;
1096 
1097  list_1_j = list_1_org[j];
1098 
1099  ibit_tmp_1 = (list_1_j & is1_spin);
1100  // is1_spin >= 1
1101  // is1_spin = Tpow[2*isite + ispin]
1102 
1103  *tmp_off = 0;
1104 
1105  if (ibit_tmp_1 == 0) {
1106  // able to create an electron at the is1_spin state
1107  bit = list_1_j - (list_1_j & (2 * is1_spin - 1));
1108  SgnBit(bit, &sgn); // Fermion sign
1109  ipsgn = 1;
1110 #ifdef MPI
1111  SgnBit(myrank, &ipsgn); // Fermion sign
1112 #endif
1113  list_1_off = list_1_j | is1_spin; // OR
1114 
1115  if(GetOffComp(list_2_1_target, list_2_2_target, list_1_off, _irght, _ilft, _ihfbit, tmp_off)!=TRUE){
1116  *tmp_off=0;
1117  return 0;
1118  }
1119  sgn *= ipsgn;
1120  return (sgn);
1121  }
1122  else {
1123  *tmp_off = 0;
1124  return 0;
1125  }
1126 }/*int X_Cis*/
1135 double complex X_Ajt(
1136  long unsigned int j,
1137  long unsigned int is1_spin,
1138  long unsigned int *tmp_off,
1139  long unsigned int *list_1_org,
1140  long unsigned int *list_2_1_target,
1141  long unsigned int *list_2_2_target,
1142  long unsigned int _irght,
1143  long unsigned int _ilft,
1144  long unsigned int _ihfbit
1145 ) {
1146  long unsigned int list_1_j, list_1_off;
1147  long unsigned int ibit_tmp_1;
1148  long unsigned int bit;
1149  int sgn, ipsgn;
1150 
1151  list_1_j = list_1_org[j];
1152 
1153  ibit_tmp_1 = (list_1_j & is1_spin);
1154 // is1_spin >= 1
1155 // is1_spin = Tpow[2*isite + ispin]
1156 
1157  *tmp_off = 0;
1158  if (ibit_tmp_1 != 0) {
1159  // able to delete an electron at the is1_spin state
1160  bit = list_1_j - (list_1_j & (2 * is1_spin - 1));
1161  SgnBit(bit, &sgn); // Fermion sign
1162  ipsgn = 1;
1163 #ifdef MPI
1164  SgnBit(myrank, &ipsgn); // Fermion sign
1165 #endif
1166  list_1_off = list_1_j ^ is1_spin;
1167  if(GetOffComp(list_2_1_target, list_2_2_target, list_1_off, _irght, _ilft, _ihfbit, tmp_off)!=TRUE){
1168  *tmp_off=0;
1169  return 0;
1170  }
1171  sgn *= ipsgn;
1172  return(sgn);
1173  }
1174  else {
1175  *tmp_off = 0;
1176  return 0;
1177  }
1178 }/*double complex X_Ajt*/
1179 
1180 /******************************************************************************/
1181 //[e] child element functions
1182 /******************************************************************************/
struct DefineList Def
Definision of system (Hamiltonian) etc.
Definition: struct.h:410
long unsigned int B_spin
Mask used in the bit oeration.
Definition: struct.h:342
int X_CisAis(long unsigned int list_1_j, struct BindStruct *X, long unsigned int is1_spin)
term in Hubbard (canonical)
long unsigned int ihfbit
Used for Ogata-Lin ???
Definition: struct.h:345
int ** ExchangeCoupling
[DefineList::NExchangeCoupling][2] Index of exchange term. malloc in setmem_def().
Definition: struct.h:146
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.
long unsigned int is2_up
Mask used in the bit oeration.
Definition: struct.h:327
long unsigned int is4_spin
Mask used in the bit oeration.
Definition: struct.h:335
long unsigned int isB_spin
Mask used in the bit oeration.
Definition: struct.h:347
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.
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.h:412
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.
long unsigned int is1_spin
Mask used in the bit oeration.
Definition: struct.h:332
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
int isite2
Is it realy used ???
Definition: struct.h:337
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.
int mode
multiply or expectation value.
Definition: struct.h:330
#define TRUE
Definition: global.h:26
long unsigned int is3_spin
Mask used in the bit oeration.
Definition: struct.h:334
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.
int isite3
Is it realy used ???
Definition: struct.h:338
int ** PairHopping
[DefineList::NPairHopping][2] Index of pair-hopping. malloc in setmem_def().
Definition: struct.h:140
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.
long unsigned int A_spin
Mask used in the bit oeration.
Definition: struct.h:341
double complex tmp_J
Coupling constant.
Definition: struct.h:323
long unsigned int is2_down
Mask used in the bit oeration.
Definition: struct.h:328
Bind.
Definition: struct.h:409
double * ParaExchangeCoupling
[DefineList::NExchangeCoupling] Coupling constant of exchange term. malloc in setmem_def().
Definition: struct.h:148
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)
long unsigned int is1_up
Mask used in the bit oeration.
Definition: struct.h:325
long unsigned int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
Definition: struct.h:90
long unsigned int ilft
Used for Ogata-Lin ???
Definition: struct.h:344
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
Definition: global.h:53
long unsigned int is1_down
Mask used in the bit oeration.
Definition: struct.h:326
long unsigned int * list_2_1
Definition: global.h:49
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
Definition: bitcalc.c:195
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.
#define FALSE
Definition: global.h:25
long unsigned int * list_1
Definition: global.h:47
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.
long unsigned int is2_spin
Mask used in the bit oeration.
Definition: struct.h:333
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.
int isite4
Is it realy used ???
Definition: struct.h:339
double complex tmp_V
Coupling constant.
Definition: struct.h:348
long unsigned int * list_2_2
Definition: global.h:50
double * ParaPairHopping
[DefineList::NPairHopping] Coupling constant of pair-hopping term. malloc in setmem_def().
Definition: struct.h:142
long unsigned int isA_spin
Mask used in the bit oeration.
Definition: struct.h:346
struct EDMainCalStruct X
Definition: struct.h:432
long unsigned int irght
Used for Ogata-Lin ???
Definition: struct.h:343
int myrank
Process ID, defined in InitializeMPI()
Definition: global.h:163
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.
int isite1
Is it realy used ???
Definition: struct.h:336
void SgnBit(const long unsigned int org_bit, int *sgn)
function of getting fermion sign (64 bit)
Definition: bitcalc.c:339
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.