HPhi++  3.1.0
PairExSpin.cpp
Go to the documentation of this file.
1 /* HPhi - Quantum Lattice Model Simulator */
2 /* Copyright (C) 2015 The University of Tokyo */
3 
4 /* This program is free software: you can redistribute it and/or modify */
5 /* it under the terms of the GNU General Public License as published by */
6 /* the Free Software Foundation, either version 3 of the License, or */
7 /* (at your option) any later version. */
8 
9 /* This program is distributed in the hope that it will be useful, */
10 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
11 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
12 /* GNU General Public License for more details. */
13 
14 /* You should have received a copy of the GNU General Public License */
15 /* along with this program. If not, see <http://www.gnu.org/licenses/>. */
16 /*-------------------------------------------------------------*/
17 #include "PairExSpin.hpp"
18 #include "bitcalc.hpp"
19 #include "wrapperMPI.hpp"
20 #include "mltplyMPISpinCore.hpp"
21 #include "mltplySpinCore.hpp"
22 #include "mltplyCommon.hpp"
23 #ifdef __MPI
24 #include "common/setmemory.hpp"
25 #endif
35  struct BindStruct *X,
36  int nstate,
37  std::complex<double> **tmp_v0,
38  std::complex<double> **tmp_v1,
39  int iEx
40 ) {
41  long int i, j;
42  long int isite1;
43  long int org_isite1, org_isite2, org_sigma1, org_sigma2;
44  long int tmp_off = 0;
45 
46  std::complex<double> tmp_trans = 0, dmv;
47  long int i_max;
48  int tmp_sgn, one = 1;
49 
50  i_max = X->Check.idim_maxOrg;
51 
52  for (i = 0; i < X->Def.NPairExcitationOperator[iEx]; i++) {
53  org_isite1 = X->Def.PairExcitationOperator[iEx][i][0] + 1;
54  org_isite2 = X->Def.PairExcitationOperator[iEx][i][2] + 1;
55  org_sigma1 = X->Def.PairExcitationOperator[iEx][i][1];
56  org_sigma2 = X->Def.PairExcitationOperator[iEx][i][3];
57  tmp_trans = X->Def.ParaPairExcitationOperator[iEx][i];
58  if (org_isite1 == org_isite2) {
59  if (org_isite1 > X->Def.Nsite) {
60  if (org_sigma1 == org_sigma2) { // longitudinal magnetic field
61  if (X->Def.PairExcitationOperator[iEx][i][4] == 0) {
62  X_GC_child_AisCis_spin_MPIdouble(org_isite1 - 1, org_sigma1, -tmp_trans, X, nstate, tmp_v0, tmp_v1);
63  }
64  else {
65  X_GC_child_CisAis_spin_MPIdouble(org_isite1 - 1, org_sigma1, tmp_trans, X, nstate, tmp_v0, tmp_v1);
66  }
67  }
68  else { // transverse magnetic field
69  //fprintf(stdoutMPI, "Debug: test, org_isite1=%d, org_sigma1=%d, orgsima_2=%d\n", org_isite1, org_sigma1, org_sigma2);
70  X_GC_child_CisAit_spin_MPIdouble(org_isite1 - 1, org_sigma1, org_sigma2, tmp_trans, X, nstate, tmp_v0, tmp_v1);
71  }
72  }
73  else {
74  isite1 = X->Def.Tpow[org_isite1 - 1];
75  if (org_sigma1 == org_sigma2) {
76  if (X->Def.PairExcitationOperator[iEx][i][4] == 0) {
77  // longitudinal magnetic field
78 #pragma omp parallel for default(none) private(j, tmp_sgn,dmv) \
79  firstprivate(i_max, isite1, org_sigma1, X,tmp_trans) shared(one,nstate,tmp_v0, tmp_v1)
80  for (j = 1; j <= i_max; j++) {
81  dmv = (1.0 - X_SpinGC_CisAis(j, isite1, org_sigma1))* (-tmp_trans);
82  zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[j], &one);
83  }
84  }
85  else {
86  // longitudinal magnetic field
87 #pragma omp parallel for default(none) private(j, tmp_sgn,dmv) \
88  firstprivate(i_max, isite1, org_sigma1, X,tmp_trans) shared(tmp_v0, tmp_v1,one,nstate)
89  for (j = 1; j <= i_max; j++) {
90  dmv = (std::complex<double>)X_SpinGC_CisAis(j, isite1, org_sigma1)* tmp_trans;
91  zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[j], &one);
92  }
93  }
94  }
95  else {
96  // transverse magnetic field
97  // fprintf(stdoutMPI, "Debug: isite1=%d, org_sigma2=%d\n", isite1, org_sigma2);
98 #pragma omp parallel for default(none) private(j, tmp_sgn, tmp_off,dmv) \
99  firstprivate(i_max, isite1, org_sigma2, X, tmp_trans) shared(tmp_v0, tmp_v1,one,nstate)
100  for (j = 1; j <= i_max; j++) {
101  tmp_sgn = X_SpinGC_CisAit(j, isite1, org_sigma2, &tmp_off);
102  if (tmp_sgn != 0) {
103  dmv = (std::complex<double>)tmp_sgn * tmp_trans;
104  zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[tmp_off + 1], &one);
105  }
106  }
107  }
108  }
109  }
110  else {
111  fprintf(stdoutMPI, "ERROR: hopping is not allowed in localized spin system\n");
112  return FALSE;
113  }
114  }
115  return TRUE;
116 }
126  struct BindStruct *X,
127  int nstate,
128  std::complex<double> **tmp_v0,
129  std::complex<double> **tmp_v1,
130  int iEx
131 ) {
132  long int i, j;
133  int num1;
134  long int org_isite1, org_isite2, org_sigma1, org_sigma2;
135  long int tmp_off = 0;
136  int one = 1;
137  std::complex<double> tmp_trans = 0, dmv;
138  long int i_max;
139  i_max = X->Check.idim_maxOrg;
140 
141  for (i = 0; i < X->Def.NPairExcitationOperator[iEx]; i++) {
142  org_isite1 = X->Def.PairExcitationOperator[iEx][i][0] + 1;
143  org_isite2 = X->Def.PairExcitationOperator[iEx][i][2] + 1;
144  org_sigma1 = X->Def.PairExcitationOperator[iEx][i][1];
145  org_sigma2 = X->Def.PairExcitationOperator[iEx][i][3];
146  tmp_trans = X->Def.ParaPairExcitationOperator[iEx][i];
147  if (org_isite1 == org_isite2) {
148  if (org_isite1 > X->Def.Nsite) {
149  if (org_sigma1 == org_sigma2) {
150  if (X->Def.PairExcitationOperator[iEx][i][4] == 0) {
151  // longitudinal magnetic field
152  X_GC_child_AisCis_GeneralSpin_MPIdouble(org_isite1 - 1, org_sigma1, -tmp_trans, X, nstate, tmp_v0, tmp_v1);
153  }
154  else {
155  X_GC_child_CisAis_GeneralSpin_MPIdouble(org_isite1 - 1, org_sigma1, tmp_trans, X, nstate, tmp_v0, tmp_v1);
156  }
157  }
158  else {
159  // transverse magnetic field
160  X_GC_child_CisAit_GeneralSpin_MPIdouble(org_isite1 - 1, org_sigma1, org_sigma2, tmp_trans, X, nstate, tmp_v0, tmp_v1);
161  }
162  }
163  else {//org_isite1 <= X->Def.Nsite
164  if (org_sigma1 == org_sigma2) {
165  if (X->Def.PairExcitationOperator[iEx][i][4] == 0) {
166  // longitudinal magnetic field
167 #pragma omp parallel for default(none) private(j,num1,dmv) \
168 firstprivate(i_max,org_isite1,org_sigma1,X,tmp_trans) shared(tmp_v0,tmp_v1,one,nstate)
169  for (j = 1; j <= i_max; j++) {
170  num1 = BitCheckGeneral(j - 1, org_isite1, org_sigma1, X->Def.SiteToBit, X->Def.Tpow);
171  dmv = -tmp_trans * (1.0 - num1);
172  zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[j], &one);
173  }
174  }
175  else {
176  // longitudinal magnetic field
177 #pragma omp parallel for default(none) private(j,num1,dmv) \
178  firstprivate(i_max,org_isite1,org_sigma1,X,tmp_trans) shared(tmp_v0,tmp_v1,one,nstate)
179  for (j = 1; j <= i_max; j++) {
180  num1 = BitCheckGeneral(j - 1, org_isite1, org_sigma1, X->Def.SiteToBit, X->Def.Tpow);
181  dmv = tmp_trans * (std::complex<double>)num1;
182  zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[j], &one);
183  }
184  }
185  }
186  else {
187  // transverse magnetic field
188 #pragma omp parallel for default(none) private(j,num1,dmv) \
189 firstprivate(i_max,org_isite1,org_sigma1,org_sigma2,X,tmp_off,tmp_trans) \
190 shared(tmp_v0,tmp_v1,one,nstate)
191  for (j = 1; j <= i_max; j++) {
192  num1 = GetOffCompGeneralSpin(j - 1, org_isite1, org_sigma2, org_sigma1, &tmp_off, X->Def.SiteToBit, X->Def.Tpow);
193  if (num1 != 0) {
194  dmv = tmp_trans * (std::complex<double>)num1;
195  zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[tmp_off + 1], &one);
196  }
197  }
198  }
199  }
200  }
201  else {
202  fprintf(stdoutMPI, "ERROR: hopping is not allowed in localized spin system\n");
203  return FALSE;
204  }
205  }
206  return TRUE;
207 }
217  struct BindStruct *X,
218  int nstate, std::complex<double> **tmp_v0,
219  std::complex<double> **tmp_v1,
220  int iEx
221 ) {
222 
223  int iret = 0;
224  if (X->Def.iFlgGeneralSpin == FALSE) {
225  iret = GetPairExcitedStateHalfSpinGC(X, nstate, tmp_v0, tmp_v1, iEx);
226  }
227  else {
228  iret = GetPairExcitedStateGeneralSpinGC(X, nstate, tmp_v0, tmp_v1, iEx);
229  }
230  return iret;
231 }
241  struct BindStruct *X,
242  int nstate,
243  std::complex<double> **tmp_v0,
244  std::complex<double> **tmp_v1,
245  int iEx
246 )
247 {
248  long int i, j;
249  long int isite1;
250  long int org_isite1, org_isite2, org_sigma1, org_sigma2;
251  long int tmp_off = 0;
252  std::complex<double> tmp_trans = 0, dmv;
253  long int i_max;
254  int num1, one = 1;
255  long int ibit1;
256  long int is1_up;
257 
258  i_max = X->Check.idim_maxOrg;
259 
260  for (i = 0; i < X->Def.NPairExcitationOperator[iEx]; i++) {
261  org_isite1 = X->Def.PairExcitationOperator[iEx][i][0] + 1;
262  org_isite2 = X->Def.PairExcitationOperator[iEx][i][2] + 1;
263  org_sigma1 = X->Def.PairExcitationOperator[iEx][i][1];
264  org_sigma2 = X->Def.PairExcitationOperator[iEx][i][3];
265  tmp_trans = X->Def.ParaPairExcitationOperator[iEx][i];
266  if (org_sigma1 == org_sigma2) {
267  if (org_isite1 == org_isite2) {
268  if (org_isite1 > X->Def.Nsite) {
269  is1_up = X->Def.Tpow[org_isite1 - 1];
270  ibit1 = X_SpinGC_CisAis((long int) myrank + 1, is1_up, org_sigma1);
271  if (X->Def.PairExcitationOperator[iEx][i][4] == 0) {
272  if (ibit1 == 0) {
273  dmv = -tmp_trans;
274 #pragma omp parallel for default(none) shared(tmp_v0, tmp_v1,one,nstate,dmv) \
275  firstprivate(i_max, tmp_trans) private(j)
276  for (j = 1; j <= i_max; j++) {
277  zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[j], &one);
278  }
279  }
280  }
281  else {
282  if (ibit1 != 0) {
283 #pragma omp parallel for default(none) shared(tmp_v0, tmp_v1,one,nstate) \
284  firstprivate(i_max, tmp_trans) private(j)
285  for (j = 1; j <= i_max; j++)
286  zaxpy_(&nstate, &tmp_trans, tmp_v1[j], &one, tmp_v0[j], &one);
287  }
288  }
289  }// org_isite1 > X->Def.Nsite
290  else {
291  isite1 = X->Def.Tpow[org_isite1 - 1];
292  if (org_isite1 == org_isite2 && org_sigma1 == org_sigma2 &&
293  X->Def.PairExcitationOperator[iEx][i][4] == 0) {
294 #pragma omp parallel for default(none) private(j,dmv) \
295 firstprivate(i_max,isite1,org_sigma1,X,tmp_trans) shared(tmp_v0,tmp_v1,one,nstate)
296  for (j = 1; j <= i_max; j++) {
297  dmv = (1.0 - X_Spin_CisAis(j, isite1, org_sigma1)) * (-tmp_trans);
298  zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[j], &one);
299  }
300  }
301  else {
302 #pragma omp parallel for default(none) private(j,dmv) \
303 firstprivate(i_max,isite1,org_sigma1,X,tmp_trans) shared(tmp_v0,tmp_v1,one,nstate)
304  for (j = 1; j <= i_max; j++) {
305  dmv = (std::complex<double>)X_Spin_CisAis(j, isite1, org_sigma1) * tmp_trans;
306  zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[j], &one);
307  }
308  }
309  }
310  }
311  else {
312  fprintf(stdoutMPI, "Error: isite1 must be equal to isite2 for Spin system. \n");
313  return FALSE;
314  }
315  }
316  else { //org_sigma1 != org_sigma2 // for the canonical case
317  if (org_isite1 > X->Def.Nsite) {//For MPI
318  X_child_CisAit_spin_MPIdouble(org_isite1 - 1, org_sigma2, tmp_trans,
319  X, nstate, tmp_v0, tmp_v1, i_max);
320  }
321  else {
322  isite1 = X->Def.Tpow[org_isite1 - 1];
323 #pragma omp parallel for default(none) private(j,tmp_off,num1,dmv) \
324 firstprivate(i_max,isite1,org_sigma2,X,tmp_trans,list_1_org,list_1,list_2_1,list_2_2) \
325 shared(tmp_v0,tmp_v1,one,nstate)
326  for (j = 1; j <= i_max; j++) {
327  num1 = X_Spin_CisAit(j, X, isite1, org_sigma2, &tmp_off);
328  if (num1 != 0) {
329  dmv = tmp_trans*(double)num1;
330  zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[tmp_off], &one);
331  }
332  }
333  }
334  }
335  }
336  return TRUE;
337 }
347  struct BindStruct *X,
348  int nstate,
349  std::complex<double> **tmp_v0,
350  std::complex<double> **tmp_v1,
351  int iEx
352 )
353 {
354  long int i, j;
355  long int org_isite1, org_isite2, org_sigma1, org_sigma2;
356  long int tmp_off = 0;
357  long int off = 0;
358  std::complex<double> tmp_trans = 0, dmv;
359  long int i_max;
360  int tmp_sgn, num1, one = 1;
361  i_max = X->Check.idim_maxOrg;
362 
363  for (i = 0; i < X->Def.NPairExcitationOperator[iEx]; i++) {
364  org_isite1 = X->Def.PairExcitationOperator[iEx][i][0] + 1;
365  org_isite2 = X->Def.PairExcitationOperator[iEx][i][2] + 1;
366  org_sigma1 = X->Def.PairExcitationOperator[iEx][i][1];
367  org_sigma2 = X->Def.PairExcitationOperator[iEx][i][3];
368  tmp_trans = X->Def.ParaPairExcitationOperator[iEx][i];
369  if (org_isite1 == org_isite2) {
370  if (org_isite1 > X->Def.Nsite) {
371  if (org_sigma1 == org_sigma2) {
372  // longitudinal magnetic field
373  num1 = BitCheckGeneral((long int) myrank,
374  org_isite1, org_sigma1, X->Def.SiteToBit, X->Def.Tpow);
375  if (X->Def.PairExcitationOperator[iEx][i][4] == 0) {
376  if (num1 == 0) {
377 #pragma omp parallel for default(none) private(j,dmv) \
378  firstprivate(i_max, tmp_trans) \
379  shared(tmp_v0, tmp_v1,one,nstate)
380  for (j = 1; j <= i_max; j++) {
381  dmv = -tmp_trans;
382  zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[j], &one);
383  }
384  }
385  }
386  else {
387  if (num1 != 0) {
388 #pragma omp parallel for default(none) private(j) \
389  firstprivate(i_max, tmp_trans) shared(tmp_v0, tmp_v1,one,nstate)
390  for (j = 1; j <= i_max; j++) {
391  zaxpy_(&nstate, &tmp_trans, tmp_v1[j], &one, tmp_v0[j], &one);
392  }
393  }
394  }
395  }//org_sigma1=org_sigma2
396  else {//org_sigma1 != org_sigma2
397  X_child_CisAit_GeneralSpin_MPIdouble(org_isite1 - 1, org_sigma1, org_sigma2,
398  tmp_trans, X, nstate, tmp_v0, tmp_v1, i_max);
399  }
400  }
401  else {//org_isite1 <= X->Def.Nsite
402  if (org_sigma1 == org_sigma2) {
403  // longitudinal magnetic field
404  if (X->Def.PairExcitationOperator[iEx][i][4] == 0) {
405 #pragma omp parallel for default(none) private(j, num1,dmv) \
406  firstprivate(i_max, org_isite1, org_sigma1, X, tmp_trans) \
407  shared(tmp_v0, tmp_v1, list_1,one,nstate)
408  for (j = 1; j <= i_max; j++) {
409  num1 = BitCheckGeneral(list_1[j], org_isite1, org_sigma1, X->Def.SiteToBit, X->Def.Tpow);
410  dmv = -tmp_trans * (1.0 - num1);
411  zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[j], &one);
412  }
413  }
414  else {
415 #pragma omp parallel for default(none) private(j, num1,dmv) \
416  firstprivate(i_max, org_isite1, org_sigma1, X, tmp_trans) \
417  shared(tmp_v0, tmp_v1, list_1,one,nstate)
418  for (j = 1; j <= i_max; j++) {
419  num1 = BitCheckGeneral(list_1[j], org_isite1, org_sigma1, X->Def.SiteToBit, X->Def.Tpow);
420  dmv = tmp_trans * (std::complex<double>)num1;
421  zaxpy_(&nstate, &dmv, tmp_v1[j], &one, tmp_v0[j], &one);
422  }
423  }
424  }//org_sigma1=org_sigma2
425  else {//org_sigma1 != org_sigma2
426 #pragma omp parallel for default(none) private(j, tmp_sgn, tmp_off) \
427  firstprivate(i_max, org_isite1, org_sigma1, org_sigma2, X, off, tmp_trans, myrank) \
428  shared(tmp_v0, tmp_v1, list_1_org, list_1,one,nstate)
429  for (j = 1; j <= i_max; j++) {
430  tmp_sgn = GetOffCompGeneralSpin(list_1_org[j], org_isite1, org_sigma2, org_sigma1, &off,
431  X->Def.SiteToBit, X->Def.Tpow);
432  if (tmp_sgn != FALSE) {
433  ConvertToList1GeneralSpin(off, X->Large.ihfbit, &tmp_off);
434  zaxpy_(&nstate, &tmp_trans, tmp_v1[j], &one, tmp_v0[tmp_off], &one);
435  }
436  }
437  }
438  }
439  }
440  else {
441  fprintf(stdoutMPI, "ERROR: hopping is not allowed in localized spin system\n");
442  return FALSE;
443  }//org_isite1 != org_isite2
444  }
445 
446  return TRUE;
447 }
457  struct BindStruct *X,
458  int nstate,
459  std::complex<double> **tmp_v0,
460  std::complex<double> **tmp_v1,
461  int iEx
462 ) {
463  int iret = 0;
464  if (X->Def.iFlgGeneralSpin == FALSE) {
465  iret = GetPairExcitedStateHalfSpin(X, nstate, tmp_v0, tmp_v1, iEx);
466  }
467  else {
468  iret = GetPairExcitedStateGeneralSpin(X, nstate, tmp_v0, tmp_v1, iEx);
469  }
470  return iret;
471 }
struct DefineList Def
Definision of system (Hamiltonian) etc.
Definition: struct.hpp:395
FILE * stdoutMPI
File pointer to the standard output defined in InitializeMPI()
Definition: global.cpp:75
void X_GC_child_AisCis_GeneralSpin_MPIdouble(int org_isite1, int org_ispin1, std::complex< double > tmp_trans, struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1)
Compute term in the grandcanonical general spin system when both site is in the inter process region...
int BitCheckGeneral(const long int org_bit, const int org_isite, const int target_ispin, const long int *SiteToBit, const long int *Tpow)
bit check function for general spin
Definition: bitcalc.cpp:392
void X_child_CisAit_GeneralSpin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, std::complex< double > tmp_trans, struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, long int idim_max)
Compute term in the canonical general spin system when both site is in the inter process region...
int X_Spin_CisAis(long int j, long int is1_spin, long int sigma1)
Compute the spin state with bit mask is1_spin.
int Nsite
Number of sites in the INTRA process region.
Definition: struct.hpp:56
long int idim_maxOrg
The local Hilbert-space dimention of original state for the spectrum.
Definition: struct.hpp:307
int X_SpinGC_CisAis(long int j, long int is1_spin, long int sigma1)
Compute the grandcanonical spin state with bit mask is1_spin.
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.hpp:397
void X_GC_child_CisAis_GeneralSpin_MPIdouble(int org_isite1, int org_ispin1, std::complex< double > tmp_trans, struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1)
Compute term in the grandcanonical general spin system when both site is in the inter process region...
int ConvertToList1GeneralSpin(const long int org_ibit, const long int ihlfbit, long int *_ilist1Comp)
function of converting component to list_1
Definition: bitcalc.cpp:285
int * NPairExcitationOperator
Number of pair excitaion operator for spectrum.
Definition: struct.hpp:190
long int * list_1_org
Definition: global.cpp:31
void X_GC_child_CisAit_GeneralSpin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, std::complex< double > tmp_trans, struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1)
Compute term in the grandcanonical general spin system when both site is in the inter process region...
int GetPairExcitedStateGeneralSpin(struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, int iEx)
Definition: PairExSpin.cpp:346
void X_child_CisAit_spin_MPIdouble(int org_isite1, int org_ispin2, std::complex< double > tmp_trans, struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, long int idim_max)
Hopping term in Spin + Canonical for CalcSpectrum When both site1 and site2 are in the inter process ...
std::complex< double > ** ParaPairExcitationOperator
[DefineList::NPairExcitationOperator] Coefficient of pair excitaion operator for spectrum. malloc in setmem_def().
Definition: struct.hpp:191
Bind.
Definition: struct.hpp:394
int GetOffCompGeneralSpin(const long int org_ibit, const int org_isite, const int org_ispin, const int off_ispin, long int *_ioffComp, const long int *SiteToBit, const long int *Tpow)
function of getting off-diagonal component for general spin
Definition: bitcalc.cpp:243
long int ihfbit
Used for Ogata-Lin ???
Definition: struct.hpp:346
void X_GC_child_CisAis_spin_MPIdouble(int org_isite1, int org_ispin1, std::complex< double > tmp_trans, struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1)
Hopping term in Spin + GC When both site1 and site2 are in the inter process region.
int myrank
Process ID, defined in InitializeMPI()
Definition: global.cpp:73
int iFlgGeneralSpin
Flag for the general (Sz/=1/2) spin.
Definition: struct.hpp:86
void X_GC_child_CisAit_spin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, std::complex< double > tmp_trans, struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1)
Hopping term in Spin + GC When both site1 and site2 are in the inter process region.
long int * SiteToBit
[DefineList::NsiteMPI] Similar to DefineList::Tpow. For general spin.
Definition: struct.hpp:94
long int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
Definition: struct.hpp:90
int GetPairExcitedStateSpinGC(struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, int iEx)
Calculation of pair excited state for Spin Grand canonical system.
Definition: PairExSpin.cpp:216
int X_SpinGC_CisAit(long int j, long int is1_spin, long int sigma2, long int *tmp_off)
Compute index of final wavefunction by term (grandcanonical).
int GetPairExcitedStateHalfSpinGC(struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, int iEx)
Definition: PairExSpin.cpp:34
int GetPairExcitedStateHalfSpin(struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, int iEx)
Definition: PairExSpin.cpp:240
void X_GC_child_AisCis_spin_MPIdouble(int org_isite1, int org_ispin1, std::complex< double > tmp_trans, struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1)
Hopping term in Spin + GC When both site1 and site2 are in the inter process region.
int GetPairExcitedStateSpin(struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, int iEx)
Definition: PairExSpin.cpp:456
int X_Spin_CisAit(long int j, struct BindStruct *X, long int is1_spin, long int sigma2, long int *tmp_off)
Compute index of final wavefunction by term.
int GetPairExcitedStateGeneralSpinGC(struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, int iEx)
Definition: PairExSpin.cpp:125
struct CheckList Check
Size of the Hilbert space.
Definition: struct.hpp:396
long int * list_1
Definition: global.cpp:25
int *** PairExcitationOperator
[DefineList::NPairExcitationOperator][5] Indices of pair excitaion operator for spectrum. malloc in setmem_def().
Definition: struct.hpp:187