HPhi++  3.1.0
mltplyHubbardCore.cpp File Reference

Functions for Hubbard hamiltonian (Core) More...

#include <bitcalc.hpp>
#include "xsetmem.hpp"
#include "wrapperMPI.hpp"
#include "mltplyCommon.hpp"
#include "mltplyHubbardCore.hpp"

Go to the source code of this file.

Functions

int child_general_hopp_GetInfo (struct BindStruct *X, long int isite1, long int isite2, long int sigma1, long int sigma2)
 Compute mask for bit operation of hopping term. More...
 
int child_general_int_GetInfo (struct BindStruct *X, long int isite1, long int isite2, long int isite3, long int isite4, long int sigma1, long int sigma2, long int sigma3, long int sigma4, std::complex< double > tmp_V)
 Compute mask for bit operation of general interaction term. More...
 
int child_pairhopp_GetInfo (int iPairHopp, struct BindStruct *X)
 Compute mask for bit operation of pairhop term. More...
 
int child_exchange_GetInfo (int iExchange, struct BindStruct *X)
 Compute mask for bit operation of exchange term. More...
 
void GC_CisAis (long int j, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, long int is1_spin, std::complex< double > tmp_trans)
 Operation of \(t c_{i\sigma}^\dagger c_{i\sigma}\) (Grandcanonical) More...
 
void GC_AisCis (long int j, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, long int is1_spin, std::complex< double > tmp_trans)
 Operation of \(t c_{i\sigma} c_{i\sigma}^\dagger\) (Grandcanonical) More...
 
int X_CisAis (long int list_1_j, long int is1_spin)
 \(c_{is}\\dagger c_{is}\) term in Hubbard (canonical) More...
 
void CisAjt (long int j, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, struct BindStruct *X, long int is1_spin, long int is2_spin, long int sum_spin, long int diff_spin, std::complex< double > tmp_V)
 \(c_{is}^\dagger c_{jt}\) term for canonical Hubbard More...
 
void GC_CisAjt (long int j, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, long int is1_spin, long int is2_spin, long int sum_spin, long int diff_spin, std::complex< double > tmp_V, long int *tmp_off)
 \(c_{is}^\dagger c_{jt}\) term for grandcanonical Hubbard More...
 
int X_CisAjt (long int list_1_j, struct BindStruct *X, long int is1_spin, long int is2_spin, long int sum_spin, long int diff_spin, long int *tmp_off)
 Compute index of wavefunction of final state. More...
 
int X_GC_CisAjt (long int list_1_j, long int is1_spin, long int is2_spin, long int sum_spin, long int diff_spin, long int *tmp_off)
 Compute index of wavefunction of final state. More...
 
void child_exchange_element (long int j, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, struct BindStruct *X, long int *tmp_off)
 Compute exchange term of canonical-Hubbard. More...
 
void child_pairhopp_element (long int j, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, struct BindStruct *X, long int *tmp_off)
 Compute pairhopp term of canonical Hubbard system. More...
 
void GC_child_exchange_element (long int j, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, struct BindStruct *X, long int *tmp_off)
 Compute exchange term of grandcanonical Hubbard system. More...
 
void GC_child_pairhopp_element (long int j, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, struct BindStruct *X, long int *tmp_off)
 Compute pairhopp term of grandcanonical Hubbard system. More...
 
void child_CisAisCisAis_element (long int j, long int isite1, long int isite3, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1)
 Compute \(c_{is}^\dagger c_{is} c_{is}^\dagger c_{is}\) term of canonical Hubbard system. More...
 
void child_CisAisCjtAku_element (long int j, long int isite1, long int isite3, long int isite4, long int Bsum, long int Bdiff, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, struct BindStruct *X, long int *tmp_off)
 Compute \(c_{is}^\dagger c_{is} c_{jt}^\dagger c_{ku}\) term of canonical Hubbard system. More...
 
void child_CisAjtCkuAku_element (long int j, long int isite1, long int isite2, long int isite3, long int Asum, long int Adiff, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, struct BindStruct *X, long int *tmp_off)
 Compute \(c_{is}^\dagger c_{jt} c_{ku}^\dagger c_{ku}\) term of canonical Hubbard system. More...
 
void child_CisAjtCkuAlv_element (long int j, long int isite1, long int isite2, long int isite3, long int isite4, long int Asum, long int Adiff, long int Bsum, long int Bdiff, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, struct BindStruct *X, long int *tmp_off_2)
 Compute \(c_{is}^\dagger c_{jt} c_{ku}^\dagger c_{lv}\) term of canonical Hubbard system. More...
 
void GC_child_CisAisCisAis_element (long int j, long int isite1, long int isite3, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1)
 Compute \(c_{is}^\dagger c_{is} c_{is}^\dagger c_{is}\) term of grandcanonical Hubbard system. More...
 
void GC_child_CisAisCjtAku_element (long int j, long int isite1, long int isite3, long int isite4, long int Bsum, long int Bdiff, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, long int *tmp_off)
 Compute \(c_{is}^\dagger c_{is} c_{jt}^\dagger c_{ku}\) term of grandcanonical Hubbard system. More...
 
void GC_child_CisAjtCkuAku_element (long int j, long int isite1, long int isite2, long int isite3, long int Asum, long int Adiff, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, long int *tmp_off)
 Compute \(c_{is}^\dagger c_{jt} c_{ku}^\dagger c_{ku}\) term of grandcanonical Hubbard system. More...
 
void GC_child_CisAjtCkuAlv_element (long int j, long int isite1, long int isite2, long int isite3, long int isite4, long int Asum, long int Adiff, long int Bsum, long int Bdiff, std::complex< double > tmp_V, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, long int *tmp_off_2)
 Compute \(c_{is}^\dagger c_{jt} c_{ku}^\dagger c_{lv}\) term of grandcanonical Hubbard system. More...
 
void GC_Cis (long int j, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, long int is1_spin, std::complex< double > tmp_V, long int *tmp_off)
 Compute \(c_{is}^\dagger\) term of grandcanonical Hubbard system. More...
 
void GC_Ajt (long int j, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, long int is1_spin, std::complex< double > tmp_V, long int *tmp_off)
 Compute \(c_{jt}\) term of grandcanonical Hubbard system. More...
 
int X_Cis (long int j, long int is1_spin, long int *tmp_off, long int *list_1_org, long int *list_2_1_target, long int *list_2_2_target, long int _irght, long int _ilft, long int _ihfbit)
 Compute index of final wavefunction associatesd to \(c_{is}^\dagger\) term of canonical Hubbard system. More...
 
int X_Ajt (long int j, long int is1_spin, long int *tmp_off, long int *list_1_org, long int *list_2_1_target, long int *list_2_2_target, long int _irght, long int _ilft, long int _ihfbit)
 Compute index of final wavefunction associatesd to \(c_{jt}\) term of canonical Hubbard system. More...
 

Detailed Description

Functions for Hubbard hamiltonian (Core)

Definition in file mltplyHubbardCore.cpp.

Function Documentation

◆ child_CisAisCisAis_element()

void child_CisAisCisAis_element ( long int  j,
long int  isite1,
long int  isite3,
std::complex< double >  tmp_V,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1 
)

Compute \(c_{is}^\dagger c_{is} c_{is}^\dagger c_{is}\) term of canonical Hubbard system.

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]jIndex of initial wavefunction
[in]isite1Site 1
[in]isite3Site 3
[in]tmp_VCoupling constant
[in,out]tmp_v0Resulting wavefunction
[in]tmp_v1Wavefunction to be multiplied

Definition at line 629 of file mltplyHubbardCore.cpp.

References list_1, and X_CisAis().

Referenced by child_general_int(), and expec_cisajscktalt_Hubbard().

636  {
637  int tmp_sgn;
638  std::complex<double> dmv;
639  int one = 1;
640  tmp_sgn = X_CisAis(list_1[j], isite3);
641  tmp_sgn *= X_CisAis(list_1[j], isite1);
642  dmv = tmp_V * (std::complex<double>)tmp_sgn;
643  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[j][0], &one);
644 }/*std::complex<double> child_CisAisCisAis_element*/
int X_CisAis(long int list_1_j, long int is1_spin)
term in Hubbard (canonical)
long int * list_1
Definition: global.cpp:25

◆ child_CisAisCjtAku_element()

void child_CisAisCjtAku_element ( long int  j,
long int  isite1,
long int  isite3,
long int  isite4,
long int  Bsum,
long int  Bdiff,
std::complex< double >  tmp_V,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1,
struct BindStruct X,
long int *  tmp_off 
)

Compute \(c_{is}^\dagger c_{is} c_{jt}^\dagger c_{ku}\) term of canonical Hubbard system.

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]jIndex of initial wavefunction
[in]isite1Site 1
[in]isite3Site 3
[in]isite4Site 4
[in]BsumBit mask for hopping
[in]BdiffBit mask for Fermion sign
[in]tmp_VCoupling constant
[in,out]tmp_v0Resulting wavefunction
[in]tmp_v1Wavefunction to be multiplied
[in,out]X
[out]tmp_offIndex of final wavefunction

Definition at line 651 of file mltplyHubbardCore.cpp.

References list_1, X_CisAis(), and X_CisAjt().

Referenced by child_general_int(), and expec_cisajscktalt_Hubbard().

663  {
664  int tmp_sgn;
665  std::complex<double> dmv;
666  int one = 1;
667  tmp_sgn = X_CisAjt(list_1[j], X, isite3, isite4, Bsum, Bdiff, tmp_off);
668  if (tmp_sgn != 0) {
669  tmp_sgn *= X_CisAis(list_1[*tmp_off], isite1);
670  if (tmp_sgn != 0) {
671  dmv = tmp_V * (std::complex<double>)tmp_sgn;
672  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[*tmp_off][0], &one);
673  }
674  }
675 }/*std::complex<double> child_CisAisCjtAku_element*/
int X_CisAis(long int list_1_j, long int is1_spin)
term in Hubbard (canonical)
int X_CisAjt(long int list_1_j, struct BindStruct *X, long int is1_spin, long int is2_spin, long int sum_spin, long int diff_spin, long int *tmp_off)
Compute index of wavefunction of final state.
long int * list_1
Definition: global.cpp:25

◆ child_CisAjtCkuAku_element()

void child_CisAjtCkuAku_element ( long int  j,
long int  isite1,
long int  isite2,
long int  isite3,
long int  Asum,
long int  Adiff,
std::complex< double >  tmp_V,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1,
struct BindStruct X,
long int *  tmp_off 
)

Compute \(c_{is}^\dagger c_{jt} c_{ku}^\dagger c_{ku}\) term of canonical Hubbard system.

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]jIndex of initial wavefunction
[in]isite1Site 1
[in]isite2Site 2
[in]isite3Site 3
[in]AsumBit mask for hopping
[in]AdiffBit mask for Fermion sign
[in]tmp_VCoupling constant
[in,out]tmp_v0Resulting wavefunction
[in]tmp_v1Wavefunction to be multiplied
[in,out]X
[out]tmp_offIndex of final wavefunction

Definition at line 682 of file mltplyHubbardCore.cpp.

References list_1, X_CisAis(), and X_CisAjt().

Referenced by child_general_int(), and expec_cisajscktalt_Hubbard().

694  {
695  int tmp_sgn;
696  std::complex<double> dmv;
697  int one = 1;
698  tmp_sgn = X_CisAis(list_1[j], isite3);
699  if (tmp_sgn != 0) {
700  tmp_sgn *= X_CisAjt(list_1[j], X, isite1, isite2, Asum, Adiff, tmp_off);
701  if (tmp_sgn != 0) {
702  dmv = tmp_V * (std::complex<double>)tmp_sgn;
703  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[*tmp_off][0], &one);
704  }
705  }
706 }/*std::complex<double> child_CisAjtCkuAku_element*/
int X_CisAis(long int list_1_j, long int is1_spin)
term in Hubbard (canonical)
int X_CisAjt(long int list_1_j, struct BindStruct *X, long int is1_spin, long int is2_spin, long int sum_spin, long int diff_spin, long int *tmp_off)
Compute index of wavefunction of final state.
long int * list_1
Definition: global.cpp:25

◆ child_CisAjtCkuAlv_element()

void child_CisAjtCkuAlv_element ( long int  j,
long int  isite1,
long int  isite2,
long int  isite3,
long int  isite4,
long int  Asum,
long int  Adiff,
long int  Bsum,
long int  Bdiff,
std::complex< double >  tmp_V,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1,
struct BindStruct X,
long int *  tmp_off_2 
)

Compute \(c_{is}^\dagger c_{jt} c_{ku}^\dagger c_{lv}\) term of canonical Hubbard system.

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]jIndex of initial wavefunction
[in]isite1Site 1
[in]isite2Site 2
[in]isite3Site 3
[in]isite4Site 4
[in]AsumBit mask for hopping
[in]AdiffBit mask for Fermion sign
[in]BsumBit mask for hopping
[in]BdiffBit mask for Fermion sign
[in]tmp_VCoupling constant
[in,out]tmp_v0Resulting wavefunction
[in]tmp_v1Wavefunction to be multiplied
[in,out]X
[out]tmp_off_2Index of final wavefunction

Definition at line 713 of file mltplyHubbardCore.cpp.

References list_1, X_CisAjt(), and X_GC_CisAjt().

Referenced by child_general_int(), and expec_cisajscktalt_Hubbard().

728  {
729  int tmp_sgn;
730  long int tmp_off_1;
731  int one = 1;
732 
733  std::complex<double> dmv;
734  tmp_sgn = X_GC_CisAjt(list_1[j], isite3, isite4, Bsum, Bdiff, &tmp_off_1);
735 
736  if (tmp_sgn != 0) {
737  tmp_sgn *= X_CisAjt(tmp_off_1, X, isite1, isite2, Asum, Adiff, tmp_off_2);
738  if (tmp_sgn != 0) {
739  dmv = tmp_V * (std::complex<double>)tmp_sgn;
740  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[*tmp_off_2][0], &one);
741  }
742  }
743 }/*std::complex<double> child_CisAjtCkuAlv_element*/
int X_GC_CisAjt(long int list_1_j, long int is1_spin, long int is2_spin, long int sum_spin, long int diff_spin, long int *tmp_off)
Compute index of wavefunction of final state.
int X_CisAjt(long int list_1_j, struct BindStruct *X, long int is1_spin, long int is2_spin, long int sum_spin, long int diff_spin, long int *tmp_off)
Compute index of wavefunction of final state.
long int * list_1
Definition: global.cpp:25

◆ child_exchange_element()

void child_exchange_element ( long int  j,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1,
struct BindStruct X,
long int *  tmp_off 
)

Compute exchange term of canonical-Hubbard.

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]jIndex of initial wavefunction
[in,out]tmp_v0\(v_0 = H v_1\)
[in]tmp_v1Vector to be producted
[in,out]X
tmp_off[off] Index of wavefunction of final state

Definition at line 442 of file mltplyHubbardCore.cpp.

References GetOffComp(), LargeList::ihfbit, LargeList::ilft, LargeList::irght, LargeList::is1_down, LargeList::is1_up, LargeList::is2_down, LargeList::is2_up, BindStruct::Large, list_1, list_2_1, list_2_2, and LargeList::tmp_J.

Referenced by child_exchange().

448  {
449  long int off;
450  long int ibit1_up, ibit2_up, ibit1_down, ibit2_down;
451  std::complex<double> dmv;
452  long int iexchg;
453  long int is1_up = X->Large.is1_up;
454  long int is2_up = X->Large.is2_up;
455  long int is1_down = X->Large.is1_down;
456  long int is2_down = X->Large.is2_down;
457  long int irght = X->Large.irght;
458  long int ilft = X->Large.ilft;
459  long int ihfbit = X->Large.ihfbit;
460  std::complex<double> tmp_J = X->Large.tmp_J;
461  int one = 1;
462 
463  ibit1_up = list_1[j] & is1_up;
464  ibit2_up = list_1[j] & is2_up;
465  ibit1_down = list_1[j] & is1_down;
466  ibit2_down = list_1[j] & is2_down;
467 
468  if (ibit1_up == 0 && ibit1_down != 0 && ibit2_up != 0 && ibit2_down == 0) {
469  iexchg = list_1[j] - (is1_down + is2_up);
470  iexchg += (is1_up + is2_down);
471  if(GetOffComp(list_2_1, list_2_2, iexchg, irght, ilft, ihfbit, &off)!=TRUE){
472  return;
473  }
474  *tmp_off = off;
475  dmv = tmp_J;
476  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[off][0], &one);
477  }
478  else if (ibit1_up != 0 && ibit1_down == 0 && ibit2_up == 0 && ibit2_down != 0) {
479  iexchg = list_1[j] - (is1_up + is2_down);
480  iexchg += (is1_down + is2_up);
481  if(GetOffComp(list_2_1, list_2_2, iexchg, irght, ilft, ihfbit, &off)!=TRUE){
482  return;
483  }
484  *tmp_off = off;
485  dmv = tmp_J;
486  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[off][0], &one);
487  }
488 }/*std::complex<double> child_exchange_element*/
long int is1_down
Mask used in the bit oeration.
Definition: struct.hpp:327
long int * list_2_1
Definition: global.cpp:27
long int * list_2_2
Definition: global.cpp:28
long int is1_up
Mask used in the bit oeration.
Definition: struct.hpp:326
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.hpp:397
std::complex< double > tmp_J
Coupling constant.
Definition: struct.hpp:324
long int irght
Used for Ogata-Lin ???
Definition: struct.hpp:344
long int ilft
Used for Ogata-Lin ???
Definition: struct.hpp:345
int GetOffComp(long int *_list_2_1, long int *_list_2_2, long int _ibit, const long int _irght, const long int _ilft, const long int _ihfbit, long int *_ioffComp)
function of getting off-diagonal component
Definition: bitcalc.cpp:195
long int ihfbit
Used for Ogata-Lin ???
Definition: struct.hpp:346
long int is2_down
Mask used in the bit oeration.
Definition: struct.hpp:329
long int * list_1
Definition: global.cpp:25
long int is2_up
Mask used in the bit oeration.
Definition: struct.hpp:328

◆ child_exchange_GetInfo()

int child_exchange_GetInfo ( int  iExchange,
struct BindStruct X 
)

Compute mask for bit operation of exchange term.

Returns
Error-code, always return 0
Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)

Copy coupling constant (LargeList::tmp_J)

Compute mask for checking occupations of \((i_1,\uparrow)\) (LargeList::is1_up), \((i_1,\downarrow)\) (LargeList::is1_down) \((i_2,\uparrow)\) (LargeList::is2_up), \((i_2,\downarrow)\) (LargeList::is2_down)

Parameters
[in]iExchangeIndex of exchange interaction
[in,out]X

Definition at line 196 of file mltplyHubbardCore.cpp.

References BindStruct::Def, DefineList::ExchangeCoupling, LargeList::is1_down, LargeList::is1_up, LargeList::is2_down, LargeList::is2_up, BindStruct::Large, DefineList::ParaExchangeCoupling, LargeList::tmp_J, and DefineList::Tpow.

Referenced by mltplyHubbard(), and mltplyHubbardGC().

199  {
200  int isite1 = X->Def.ExchangeCoupling[iExchange][0] + 1;
201  int isite2 = X->Def.ExchangeCoupling[iExchange][1] + 1;
205  X->Large.tmp_J = -X->Def.ParaExchangeCoupling[iExchange];
211  X->Large.is1_up = X->Def.Tpow[2 * isite1 - 2];
212  X->Large.is1_down = X->Def.Tpow[2 * isite1 - 1];
213  X->Large.is2_up = X->Def.Tpow[2 * isite2 - 2];
214  X->Large.is2_down = X->Def.Tpow[2 * isite2 - 1];
215 
216  return 0;
217 }/*int child_exchange_GetInfo*/
struct DefineList Def
Definision of system (Hamiltonian) etc.
Definition: struct.hpp:395
long int is1_down
Mask used in the bit oeration.
Definition: struct.hpp:327
int ** ExchangeCoupling
[DefineList::NExchangeCoupling][2] Index of exchange term. malloc in setmem_def().
Definition: struct.hpp:146
long int is1_up
Mask used in the bit oeration.
Definition: struct.hpp:326
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.hpp:397
std::complex< double > tmp_J
Coupling constant.
Definition: struct.hpp:324
double * ParaExchangeCoupling
[DefineList::NExchangeCoupling] Coupling constant of exchange term. malloc in setmem_def().
Definition: struct.hpp:148
long int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
Definition: struct.hpp:90
long int is2_down
Mask used in the bit oeration.
Definition: struct.hpp:329
long int is2_up
Mask used in the bit oeration.
Definition: struct.hpp:328

◆ child_general_hopp_GetInfo()

int child_general_hopp_GetInfo ( struct BindStruct X,
long int  isite1,
long int  isite2,
long int  sigma1,
long int  sigma2 
)

Compute mask for bit operation of hopping term.

Returns
Error-code, always return 0
Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)

Compute mask for checking occupations of \((i_1,\sigma_1)\) (LargeList::is1_spin) and \((i_2,\sigma_2)\) (LargeList::is2_spin)

Compute mask for Fermion sign (LargeList::A_spin)

Compute mask for hopping (LargeList::isA_spin)

Parameters
[in,out]X
[in]isite1Site index
[in]isite2Site index
[in]sigma1Spin index
[in]sigma2Spin index

Definition at line 34 of file mltplyHubbardCore.cpp.

References LargeList::A_spin, BindStruct::Def, LargeList::is1_spin, LargeList::is2_spin, LargeList::isA_spin, BindStruct::Large, and DefineList::Tpow.

Referenced by expec_cisajs_Hubbard(), expec_cisajs_HubbardGC(), GetPairExcitedStateHubbard(), GetPairExcitedStateHubbardGC(), mltplyHalfSpinGC(), mltplyHubbard(), and mltplyHubbardGC().

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*/
struct DefineList Def
Definision of system (Hamiltonian) etc.
Definition: struct.hpp:395
long int is2_spin
Mask used in the bit oeration.
Definition: struct.hpp:334
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.hpp:397
long int A_spin
Mask used in the bit oeration.
Definition: struct.hpp:342
long int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
Definition: struct.hpp:90
long int is1_spin
Mask used in the bit oeration.
Definition: struct.hpp:333
long int isA_spin
Mask used in the bit oeration.
Definition: struct.hpp:347

◆ child_general_int_GetInfo()

int child_general_int_GetInfo ( struct BindStruct X,
long int  isite1,
long int  isite2,
long int  isite3,
long int  isite4,
long int  sigma1,
long int  sigma2,
long int  sigma3,
long int  sigma4,
std::complex< double >  tmp_V 
)

Compute mask for bit operation of general interaction term.

Returns
Error-code, always return 0
Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)

Compute mask for checking occupations of \((i_1,\sigma_1)\) (LargeList::is1_spin) and \((i_2,\sigma_2)\) (LargeList::is2_spin)

Compute mask for Fermion sign (LargeList::A_spin)

Compute mask for checking occupations of \((i_3,\sigma_3)\) (LargeList::is3_spin) and \((i_4,\sigma_4)\) (LargeList::is4_spin)

Compute mask for Fermion sign (LargeList::B_spin)

Compute mask for hopping (LargeList::isA_spin, LargeList::isB_spin)

Copy coupling constant (LargeList::tmp_V)

Parameters
[in,out]X
[in]isite1Site index
[in]isite2Site index
[in]isite3Site index
[in]isite4Site index
[in]sigma1Spin index
[in]sigma2Spin index
[in]sigma3Spin index
[in]sigma4Spin index
[in]tmp_VCoupling constant

Definition at line 76 of file mltplyHubbardCore.cpp.

References LargeList::A_spin, LargeList::B_spin, BindStruct::Def, LargeList::is1_spin, LargeList::is2_spin, LargeList::is3_spin, LargeList::is4_spin, LargeList::isA_spin, LargeList::isB_spin, LargeList::isite1, LargeList::isite2, LargeList::isite3, LargeList::isite4, BindStruct::Large, LargeList::tmp_V, and DefineList::Tpow.

Referenced by expec_cisajscktalt_Hubbard(), expec_cisajscktalt_HubbardGC(), mltplyHubbard(), and mltplyHubbardGC().

87  {
88  long int is1_spin, is2_spin, is3_spin, is4_spin;
89  long int A_spin, B_spin;
90  long int isA_spin, isB_spin;
95  is1_spin = X->Def.Tpow[2 * isite1 - 2 + sigma1];
96  is2_spin = X->Def.Tpow[2 * isite2 - 2 + sigma2];
100  if (isite1 > isite2) {
101  A_spin = (X->Def.Tpow[2 * isite1 - 2 + sigma1] - X->Def.Tpow[2 * isite2 - 1 + sigma2]);
102  }
103  else if (isite2 > isite1) {
104  A_spin = (X->Def.Tpow[2 * isite2 - 2 + sigma2] - X->Def.Tpow[2 * isite1 - 1 + sigma1]);
105  }
106  else {//isite1=isite2
107  if (sigma1 > sigma2) {
108  A_spin = (X->Def.Tpow[2 * isite1 - 2 + sigma1] - X->Def.Tpow[2 * isite2 - 1 + sigma2]);
109  }
110  else {
111  A_spin = (X->Def.Tpow[2 * isite2 - 2 + sigma2] - X->Def.Tpow[2 * isite1 - 1 + sigma1]);
112  }
113  }
118  is3_spin = X->Def.Tpow[2 * isite3 - 2 + sigma3];
119  is4_spin = X->Def.Tpow[2 * isite4 - 2 + sigma4];
123  if (isite3 > isite4) {
124  B_spin = (X->Def.Tpow[2 * isite3 - 2 + sigma3] - X->Def.Tpow[2 * isite4 - 1 + sigma4]);
125  }
126  else if (isite3 < isite4) {
127  B_spin = (X->Def.Tpow[2 * isite4 - 2 + sigma4] - X->Def.Tpow[2 * isite3 - 1 + sigma3]);
128  }
129  else {//isite3=isite4
130  if (sigma3 > sigma4) {
131  B_spin = (X->Def.Tpow[2 * isite3 - 2 + sigma3] - X->Def.Tpow[2 * isite4 - 1 + sigma4]);
132  }
133  else {
134  B_spin = (X->Def.Tpow[2 * isite4 - 2 + sigma4] - X->Def.Tpow[2 * isite3 - 1 + sigma3]);
135  }
136  }
140  isA_spin = is1_spin + is2_spin;
141  isB_spin = is3_spin + is4_spin;
142 
143  X->Large.is1_spin = is1_spin;
144  X->Large.is2_spin = is2_spin;
145  X->Large.is3_spin = is3_spin;
146  X->Large.is4_spin = is4_spin;
147  X->Large.isA_spin = isA_spin;
148  X->Large.isB_spin = isB_spin;
149  X->Large.A_spin = A_spin;
150  X->Large.B_spin = B_spin;
154  X->Large.tmp_V = tmp_V;
155  X->Large.isite1 = isite1;
156  X->Large.isite2 = isite2;
157  X->Large.isite3 = isite3;
158  X->Large.isite4 = isite4;
159 
160  return 0;
161 }/*int child_general_int_GetInfo*/
struct DefineList Def
Definision of system (Hamiltonian) etc.
Definition: struct.hpp:395
long int is2_spin
Mask used in the bit oeration.
Definition: struct.hpp:334
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.hpp:397
int isite2
Is it realy used ???
Definition: struct.hpp:338
long int is4_spin
Mask used in the bit oeration.
Definition: struct.hpp:336
int isite3
Is it realy used ???
Definition: struct.hpp:339
long int A_spin
Mask used in the bit oeration.
Definition: struct.hpp:342
long int B_spin
Mask used in the bit oeration.
Definition: struct.hpp:343
int isite4
Is it realy used ???
Definition: struct.hpp:340
long int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
Definition: struct.hpp:90
long int is3_spin
Mask used in the bit oeration.
Definition: struct.hpp:335
long int is1_spin
Mask used in the bit oeration.
Definition: struct.hpp:333
long int isA_spin
Mask used in the bit oeration.
Definition: struct.hpp:347
long int isB_spin
Mask used in the bit oeration.
Definition: struct.hpp:348
int isite1
Is it realy used ???
Definition: struct.hpp:337
std::complex< double > tmp_V
Coupling constant.
Definition: struct.hpp:349

◆ child_pairhopp_element()

void child_pairhopp_element ( long int  j,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1,
struct BindStruct X,
long int *  tmp_off 
)

Compute pairhopp term of canonical Hubbard system.

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]jIndex of initial wavefunction
[in,out]tmp_v0Resulting wavefunction
[in]tmp_v1Wavefunction to be multiplied
[in,out]X
[out]tmp_offIndex of final wavefunction

Definition at line 494 of file mltplyHubbardCore.cpp.

References GetOffComp(), LargeList::ihfbit, LargeList::ilft, LargeList::irght, LargeList::is1_down, LargeList::is1_up, LargeList::is2_down, LargeList::is2_up, BindStruct::Large, list_1, list_2_1, list_2_2, and LargeList::tmp_J.

Referenced by child_pairhopp().

500  {
501  long int off;
502  long int ibit1_up, ibit2_up, ibit1_down, ibit2_down;
503  std::complex<double> dmv;
504  long int iexchg;
505  long int is1_up = X->Large.is1_up;
506  long int is2_up = X->Large.is2_up;
507  long int is1_down = X->Large.is1_down;
508  long int is2_down = X->Large.is2_down;
509  long int irght = X->Large.irght;
510  long int ilft = X->Large.ilft;
511  long int ihfbit = X->Large.ihfbit;
512  std::complex<double> tmp_J = X->Large.tmp_J;
513  int one = 1;
514 
515  ibit1_up = list_1[j] & is1_up;
516  ibit2_up = list_1[j] & is2_up;
517  ibit1_down = list_1[j] & is1_down;
518  ibit2_down = list_1[j] & is2_down;
519 
520  if (ibit1_up == 0 && ibit1_down == 0 && ibit2_up != 0 && ibit2_down != 0) {
521  iexchg = list_1[j] - (is2_up + is2_down);
522  iexchg += (is1_up + is1_down);
523 
524  if(GetOffComp(list_2_1, list_2_2, iexchg, irght, ilft, ihfbit, &off)!=TRUE){
525  return;
526  }
527  *tmp_off = off;
528  dmv = tmp_J;
529  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[off][0], &one);
530  }
531 }/*std::complex<double> child_pairhopp_element*/
long int is1_down
Mask used in the bit oeration.
Definition: struct.hpp:327
long int * list_2_1
Definition: global.cpp:27
long int * list_2_2
Definition: global.cpp:28
long int is1_up
Mask used in the bit oeration.
Definition: struct.hpp:326
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.hpp:397
std::complex< double > tmp_J
Coupling constant.
Definition: struct.hpp:324
long int irght
Used for Ogata-Lin ???
Definition: struct.hpp:344
long int ilft
Used for Ogata-Lin ???
Definition: struct.hpp:345
int GetOffComp(long int *_list_2_1, long int *_list_2_2, long int _ibit, const long int _irght, const long int _ilft, const long int _ihfbit, long int *_ioffComp)
function of getting off-diagonal component
Definition: bitcalc.cpp:195
long int ihfbit
Used for Ogata-Lin ???
Definition: struct.hpp:346
long int is2_down
Mask used in the bit oeration.
Definition: struct.hpp:329
long int * list_1
Definition: global.cpp:25
long int is2_up
Mask used in the bit oeration.
Definition: struct.hpp:328

◆ child_pairhopp_GetInfo()

int child_pairhopp_GetInfo ( int  iPairHopp,
struct BindStruct X 
)

Compute mask for bit operation of pairhop term.

Returns
Error-code, always return 0
Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)

Copy coupling constant (LargeList::tmp_J)

Compute mask for checking occupations of \((i_1,\uparrow)\) (LargeList::is1_up), \((i_1,\downarrow)\) (LargeList::is1_down) \((i_2,\uparrow)\) (LargeList::is2_up), \((i_2,\downarrow)\) (LargeList::is2_down)

Parameters
[in]iPairHoppIndex of pairhopp interaction
[in,out]X

Definition at line 168 of file mltplyHubbardCore.cpp.

References BindStruct::Def, LargeList::is1_down, LargeList::is1_up, LargeList::is2_down, LargeList::is2_up, BindStruct::Large, DefineList::PairHopping, DefineList::ParaPairHopping, LargeList::tmp_J, and DefineList::Tpow.

Referenced by mltplyHubbard(), and mltplyHubbardGC().

171  {
172  int isite1 = X->Def.PairHopping[iPairHopp][0] + 1;
173  int isite2 = X->Def.PairHopping[iPairHopp][1] + 1;
177  X->Large.tmp_J = X->Def.ParaPairHopping[iPairHopp];
183  X->Large.is1_up = X->Def.Tpow[2 * isite1 - 2];
184  X->Large.is1_down = X->Def.Tpow[2 * isite1 - 1];
185  X->Large.is2_up = X->Def.Tpow[2 * isite2 - 2];
186  X->Large.is2_down = X->Def.Tpow[2 * isite2 - 1];
187 
188  return 0;
189 }/*int child_pairhopp_GetInfo*/
struct DefineList Def
Definision of system (Hamiltonian) etc.
Definition: struct.hpp:395
long int is1_down
Mask used in the bit oeration.
Definition: struct.hpp:327
long int is1_up
Mask used in the bit oeration.
Definition: struct.hpp:326
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.hpp:397
std::complex< double > tmp_J
Coupling constant.
Definition: struct.hpp:324
int ** PairHopping
[DefineList::NPairHopping][2] Index of pair-hopping. malloc in setmem_def().
Definition: struct.hpp:140
long int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
Definition: struct.hpp:90
double * ParaPairHopping
[DefineList::NPairHopping] Coupling constant of pair-hopping term. malloc in setmem_def().
Definition: struct.hpp:142
long int is2_down
Mask used in the bit oeration.
Definition: struct.hpp:329
long int is2_up
Mask used in the bit oeration.
Definition: struct.hpp:328

◆ CisAjt()

void CisAjt ( long int  j,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1,
struct BindStruct X,
long int  is1_spin,
long int  is2_spin,
long int  sum_spin,
long int  diff_spin,
std::complex< double >  tmp_V 
)

\(c_{is}^\dagger c_{jt}\) term for canonical Hubbard

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]jIndex of wavefunction
[in,out]tmp_v0\(v_0 = H v_1\)
[in]tmp_v1Vector to be producted
[in,out]X
[in]is1_spinMask for occupation of (is)
[in]is2_spinMask for occupation of (jt)
[in]sum_spinMask for hopping
[in]diff_spinMask for Fermion sign
[in]tmp_VHopping integral

Definition at line 291 of file mltplyHubbardCore.cpp.

References GetOffComp(), LargeList::ihfbit, LargeList::ilft, LargeList::irght, BindStruct::Large, list_1, list_2_1, list_2_2, and SgnBit().

Referenced by child_general_hopp(), X_child_CisAjtCkuAku_Hubbard_MPI(), and X_child_CisAjtCkuAlv_Hubbard_MPI().

301  {
302  long int ibit_tmp_1, ibit_tmp_2;
303  long int bit, iexchg, off;
304  int sgn;
305  std::complex<double> dmv;
306  int one = 1;
307 
308  ibit_tmp_1 = (list_1[j] & is1_spin);
309  ibit_tmp_2 = (list_1[j] & is2_spin);
310  if (ibit_tmp_1 == 0 && ibit_tmp_2 != 0) {
311  bit = list_1[j] & diff_spin;
312  SgnBit(bit, &sgn); // Fermion sign
313  iexchg = list_1[j] ^ sum_spin;
314 
315  if(GetOffComp(list_2_1, list_2_2, iexchg, X->Large.irght, X->Large.ilft, X->Large.ihfbit, &off)==FALSE){
316  return;
317  }
318  dmv = (std::complex<double>)sgn * tmp_V;
319  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[off][0], &one);
320  }
321  else {
322  return;
323  }
324 }
long int * list_2_1
Definition: global.cpp:27
long int * list_2_2
Definition: global.cpp:28
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.hpp:397
long int irght
Used for Ogata-Lin ???
Definition: struct.hpp:344
long int ilft
Used for Ogata-Lin ???
Definition: struct.hpp:345
int GetOffComp(long int *_list_2_1, long int *_list_2_2, long int _ibit, const long int _irght, const long int _ilft, const long int _ihfbit, long int *_ioffComp)
function of getting off-diagonal component
Definition: bitcalc.cpp:195
long int ihfbit
Used for Ogata-Lin ???
Definition: struct.hpp:346
long int * list_1
Definition: global.cpp:25
void SgnBit(const long int org_bit, int *sgn)
function of getting fermion sign (64 bit)
Definition: bitcalc.cpp:338

◆ GC_AisCis()

void GC_AisCis ( long int  j,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1,
long int  is1_spin,
std::complex< double >  tmp_trans 
)

Operation of \(t c_{i\sigma} c_{i\sigma}^\dagger\) (Grandcanonical)

Author
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]jIndex of element of wavefunction
[in,out]tmp_v0Result vector
[in]tmp_v1Input producted vector
[in]is1_spinMask for occupation of \((i \sigma)\)
[in]tmp_transTransfer integral

Definition at line 253 of file mltplyHubbardCore.cpp.

Referenced by GetPairExcitedStateHubbardGC().

259  {
260  long int A_ibit_tmp;
261  long int list_1_j;
262  std::complex<double> dmv;
263  int one = 1;
264 
265  list_1_j = j - 1;
266  A_ibit_tmp = (list_1_j & is1_spin) / is1_spin;
267  dmv = tmp_trans * (std::complex<double>)(1 - A_ibit_tmp);
268  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[j][0], &one);
269 }/*std::complex<double> GC_AisCis*/

◆ GC_Ajt()

void GC_Ajt ( long int  j,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1,
long int  is1_spin,
std::complex< double >  tmp_V,
long int *  tmp_off 
)

Compute \(c_{jt}\) term of grandcanonical Hubbard system.

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Youhei Yamaji (The University of Tokyo)
Parameters
[in]jIndex of initial wavefunction
[in]tmp_v0Resulting wavefunction
[in]tmp_v1Wavefunction to be multiplied
[in]is1_spinBit mask
[in]tmp_VCoupling constant
[in]tmp_offIndex of final wavefunction

Definition at line 919 of file mltplyHubbardCore.cpp.

References myrank, and SgnBit().

Referenced by GetSingleExcitedStateHubbardGC().

926  {
927  long int list_1_j, list_1_off;
928  long int ibit_tmp_1;
929  long int bit;
930  int sgn, ipsgn;
931  std::complex<double> dmv;
932  int one = 1;
933 
934  list_1_j = j - 1;
935 
936  ibit_tmp_1 = (list_1_j & is1_spin);
937  // is1_spin >= 1
938 
939  *tmp_off = 0;
940 
941  if (ibit_tmp_1 == is1_spin) {
942  // able to create an electron at the is1_spin state
943  bit = list_1_j - (list_1_j & (2 * is1_spin - 1));
944  SgnBit(bit, &sgn); // Fermion sign
945  ipsgn = 1;
946 #ifdef __MPI
947  SgnBit(myrank, &ipsgn); // Fermion sign
948 #endif
949  list_1_off = list_1_j ^ is1_spin;
950  *tmp_off = list_1_off;
951  dmv = (std::complex<double>)(ipsgn * sgn) * tmp_V;
952  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[list_1_off + 1][0], &one);
953  }
954  else {
955  return;
956  }
957 }/*std::complex<double> GC_Ajt*/
int myrank
Process ID, defined in InitializeMPI()
Definition: global.cpp:73
void SgnBit(const long int org_bit, int *sgn)
function of getting fermion sign (64 bit)
Definition: bitcalc.cpp:338

◆ GC_child_CisAisCisAis_element()

void GC_child_CisAisCisAis_element ( long int  j,
long int  isite1,
long int  isite3,
std::complex< double >  tmp_V,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1 
)

Compute \(c_{is}^\dagger c_{is} c_{is}^\dagger c_{is}\) term of grandcanonical Hubbard system.

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]jIndex of initial wavefunction
[in]isite1Site 1
[in]isite3Site 3
[in]tmp_VCoupling constant
[in,out]tmp_v0Resulting wavefunction
[in]tmp_v1Wavefunction to be multiplied

Definition at line 751 of file mltplyHubbardCore.cpp.

References X_CisAis().

Referenced by expec_cisajscktalt_HubbardGC(), and GC_child_general_int().

758  {
759  int tmp_sgn;
760  std::complex<double> dmv;
761  int one = 1;
762  tmp_sgn = X_CisAis(j - 1, isite3);
763  tmp_sgn *= X_CisAis(j - 1, isite1);
764  if (tmp_sgn != 0) {
765  dmv = tmp_V * (std::complex<double>)tmp_sgn;
766  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[j][0], &one);
767  }
768 }/*std::complex<double> GC_child_CisAisCisAis_element*/
int X_CisAis(long int list_1_j, long int is1_spin)
term in Hubbard (canonical)

◆ GC_child_CisAisCjtAku_element()

void GC_child_CisAisCjtAku_element ( long int  j,
long int  isite1,
long int  isite3,
long int  isite4,
long int  Bsum,
long int  Bdiff,
std::complex< double >  tmp_V,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1,
long int *  tmp_off 
)

Compute \(c_{is}^\dagger c_{is} c_{jt}^\dagger c_{ku}\) term of grandcanonical Hubbard system.

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]jIndex of initial wavefunction
[in]isite1Site 1
[in]isite3Site 3
[in]isite4Site 4
[in]BsumBit mask for hopping
[in]BdiffBit mask for Fermion sign
[in]tmp_VCoupling constant
[in,out]tmp_v0Resulting wavefunction
[in]tmp_v1Wavefunction to be multiplied
[out]tmp_offIndex of final wavefunction

Definition at line 775 of file mltplyHubbardCore.cpp.

References X_CisAis(), and X_GC_CisAjt().

Referenced by expec_cisajscktalt_HubbardGC(), and GC_child_general_int().

786  {
787  int tmp_sgn;
788  std::complex<double> dmv;
789  int one = 1;
790  tmp_sgn = X_GC_CisAjt((j - 1), isite3, isite4, Bsum, Bdiff, tmp_off);
791  if (tmp_sgn != 0) {
792  tmp_sgn *= X_CisAis(*tmp_off, isite1);
793  if (tmp_sgn != 0) {
794  dmv = tmp_V * (std::complex<double>)tmp_sgn;
795  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[*tmp_off + 1][0], &one);
796  }
797  }
798 }/*std::complex<double> GC_child_CisAisCjtAku_element*/
int X_GC_CisAjt(long int list_1_j, long int is1_spin, long int is2_spin, long int sum_spin, long int diff_spin, long int *tmp_off)
Compute index of wavefunction of final state.
int X_CisAis(long int list_1_j, long int is1_spin)
term in Hubbard (canonical)

◆ GC_child_CisAjtCkuAku_element()

void GC_child_CisAjtCkuAku_element ( long int  j,
long int  isite1,
long int  isite2,
long int  isite3,
long int  Asum,
long int  Adiff,
std::complex< double >  tmp_V,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1,
long int *  tmp_off 
)

Compute \(c_{is}^\dagger c_{jt} c_{ku}^\dagger c_{ku}\) term of grandcanonical Hubbard system.

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]jIndex of initial wavefunction
[in]isite1Site 1
[in]isite2Site 2
[in]isite3Site 3
[in]AsumBit mask for hopping
[in]AdiffBit mask for Fermion sign
[in]tmp_VCoupling constant
[in,out]tmp_v0Resulting wavefunction
[in]tmp_v1Wavefunction to be multiplied
[out]tmp_offIndex of final wavefunction

Definition at line 805 of file mltplyHubbardCore.cpp.

References X_CisAis(), and X_GC_CisAjt().

Referenced by expec_cisajscktalt_HubbardGC(), and GC_child_general_int().

816  {
817  int tmp_sgn;
818  std::complex<double> dmv;
819  int one = 1;
820  tmp_sgn = X_CisAis(j - 1, isite3);
821  if (tmp_sgn != 0) {
822  tmp_sgn *= X_GC_CisAjt(j - 1, isite1, isite2, Asum, Adiff, tmp_off);
823  if (tmp_sgn != 0) {
824  dmv = tmp_V * (std::complex<double>)tmp_sgn;
825  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[*tmp_off + 1][0], &one);
826  }/*if (tmp_sgn != 0)*/
827  }/*if (tmp_sgn != 0)*/
828 }/*std::complex<double> GC_child_CisAjtCkuAku_element*/
int X_GC_CisAjt(long int list_1_j, long int is1_spin, long int is2_spin, long int sum_spin, long int diff_spin, long int *tmp_off)
Compute index of wavefunction of final state.
int X_CisAis(long int list_1_j, long int is1_spin)
term in Hubbard (canonical)

◆ GC_child_CisAjtCkuAlv_element()

void GC_child_CisAjtCkuAlv_element ( long int  j,
long int  isite1,
long int  isite2,
long int  isite3,
long int  isite4,
long int  Asum,
long int  Adiff,
long int  Bsum,
long int  Bdiff,
std::complex< double >  tmp_V,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1,
long int *  tmp_off_2 
)

Compute \(c_{is}^\dagger c_{jt} c_{ku}^\dagger c_{lv}\) term of grandcanonical Hubbard system.

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]jIndex of initial wavefunction
[in]isite1Site 1
[in]isite2Site 2
[in]isite3Site 3
[in]isite4Site 4
[in]AsumBit mask for hopping
[in]AdiffBit mask for Fermion sign
[in]BsumBit mask for hopping
[in]BdiffBit mask for Fermion sign
[in]tmp_VCoupling constant
[in,out]tmp_v0Resulting wavefunction
[in]tmp_v1Wavefunction to be multiplied
[out]tmp_off_2Index of final wavefunction

Definition at line 835 of file mltplyHubbardCore.cpp.

References X_GC_CisAjt().

Referenced by expec_cisajscktalt_HubbardGC(), and GC_child_general_int().

849  {
850  int tmp_sgn;
851  long int tmp_off_1;
852  std::complex<double> dmv;
853  int one = 1;
854 
855  tmp_sgn = X_GC_CisAjt(j - 1, isite3, isite4, Bsum, Bdiff, &tmp_off_1);
856  if (tmp_sgn != 0) {
857  tmp_sgn *= X_GC_CisAjt(tmp_off_1, isite1, isite2, Asum, Adiff, tmp_off_2);
858  if (tmp_sgn != 0) {
859  dmv = tmp_V * (std::complex<double>)tmp_sgn;
860  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[*tmp_off_2 + 1][0], &one);
861  }
862  }
863 }/*std::complex<double> GC_child_CisAjtCkuAlv_element*/
int X_GC_CisAjt(long int list_1_j, long int is1_spin, long int is2_spin, long int sum_spin, long int diff_spin, long int *tmp_off)
Compute index of wavefunction of final state.

◆ GC_child_exchange_element()

void GC_child_exchange_element ( long int  j,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1,
struct BindStruct X,
long int *  tmp_off 
)

Compute exchange term of grandcanonical Hubbard system.

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]jIndex of initial wavefunction
[in,out]tmp_v0Resulting wavefunction
[in]tmp_v1Wavefunction to be multiplied
[in,out]X
[out]tmp_offIndex of final wavefunction

Definition at line 537 of file mltplyHubbardCore.cpp.

References LargeList::is1_down, LargeList::is1_up, LargeList::is2_down, LargeList::is2_up, BindStruct::Large, and LargeList::tmp_J.

Referenced by GC_child_exchange().

543  {
544  long int ibit1_up, ibit2_up, ibit1_down, ibit2_down;
545  std::complex<double> dmv;
546  long int iexchg;
547  long int is1_up = X->Large.is1_up;
548  long int is2_up = X->Large.is2_up;
549  long int is1_down = X->Large.is1_down;
550  long int is2_down = X->Large.is2_down;
551  long int list_1_j, list_1_off;
552  std::complex<double> tmp_J = X->Large.tmp_J;
553  int one = 1;
554 
555  list_1_j = j - 1;
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;
560 
561  if (ibit1_up == 0 && ibit1_down != 0 && ibit2_up != 0 && ibit2_down == 0) {
562 
563  iexchg = list_1_j - (is1_down + is2_up);
564  iexchg += (is1_up + is2_down);
565  list_1_off = iexchg;
566  *tmp_off = list_1_off;
567 
568  dmv = tmp_J;
569  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[list_1_off + 1][0], &one);
570  }
571  else if (ibit1_up != 0 && ibit1_down == 0 && ibit2_up == 0 && ibit2_down != 0) {
572  iexchg = list_1_j - (is1_up + is2_down);
573  iexchg += (is1_down + is2_up);
574  list_1_off = iexchg;
575  *tmp_off = list_1_off;
576 
577  dmv = tmp_J;
578  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[list_1_off + 1][0], &one);
579  }
580 }/*std::complex<double> GC_child_exchange_element*/
long int is1_down
Mask used in the bit oeration.
Definition: struct.hpp:327
long int is1_up
Mask used in the bit oeration.
Definition: struct.hpp:326
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.hpp:397
std::complex< double > tmp_J
Coupling constant.
Definition: struct.hpp:324
long int is2_down
Mask used in the bit oeration.
Definition: struct.hpp:329
long int is2_up
Mask used in the bit oeration.
Definition: struct.hpp:328

◆ GC_child_pairhopp_element()

void GC_child_pairhopp_element ( long int  j,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1,
struct BindStruct X,
long int *  tmp_off 
)

Compute pairhopp term of grandcanonical Hubbard system.

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]jIndex of initial wavefunction
[in,out]tmp_v0Resulting wavefunction
[in]tmp_v1Wavefunction to be multiplied
[in,out]X
[out]tmp_offIndex of final wavefunction

Definition at line 586 of file mltplyHubbardCore.cpp.

References LargeList::is1_down, LargeList::is1_up, LargeList::is2_down, LargeList::is2_up, BindStruct::Large, and LargeList::tmp_J.

Referenced by GC_child_pairhopp().

592  {
593  long int ibit1_up, ibit2_up, ibit1_down, ibit2_down;
594  std::complex<double> dmv;
595  long int iexchg;
596  long int is1_up = X->Large.is1_up;
597  long int is2_up = X->Large.is2_up;
598  long int is1_down = X->Large.is1_down;
599  long int is2_down = X->Large.is2_down;
600  long int list_1_j, list_1_off;
601  std::complex<double> tmp_J = X->Large.tmp_J;
602  int one = 1;
603 
604  list_1_j = j - 1;
605 
606  ibit1_up = list_1_j & is1_up;
607 
608  ibit2_up = list_1_j & is2_up;
609 
610  ibit1_down = list_1_j & is1_down;
611 
612  ibit2_down = list_1_j & is2_down;
613 
614  if (ibit1_up == 0 && ibit1_down == 0 && ibit2_up != 0 && ibit2_down != 0) {
615  iexchg = list_1_j - (is2_up + is2_down);
616  iexchg += (is1_up + is1_down);
617  list_1_off = iexchg;
618  *tmp_off = list_1_off;
619  dmv = tmp_J;
620  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[list_1_off + 1][0], &one);
621  }
622 }
long int is1_down
Mask used in the bit oeration.
Definition: struct.hpp:327
long int is1_up
Mask used in the bit oeration.
Definition: struct.hpp:326
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.hpp:397
std::complex< double > tmp_J
Coupling constant.
Definition: struct.hpp:324
long int is2_down
Mask used in the bit oeration.
Definition: struct.hpp:329
long int is2_up
Mask used in the bit oeration.
Definition: struct.hpp:328

◆ GC_Cis()

void GC_Cis ( long int  j,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1,
long int  is1_spin,
std::complex< double >  tmp_V,
long int *  tmp_off 
)

Compute \(c_{is}^\dagger\) term of grandcanonical Hubbard system.

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Youhei Yamaji (The University of Tokyo)
Parameters
[in]jIndex of initial wavefunction
[in]tmp_v0Resulting wavefunction
[in]tmp_v1Wavefunction to be multiplied
[in]is1_spinBit mask
[in]tmp_VCoupling constant
[in]tmp_offIndex of final wavefunction

Definition at line 872 of file mltplyHubbardCore.cpp.

References myrank, and SgnBit().

Referenced by GetSingleExcitedStateHubbardGC().

879  {
880  long int list_1_j, list_1_off;
881  long int ibit_tmp_1;
882  long int bit;
883  int sgn, ipsgn;
884  std::complex<double> dmv;
885  int one = 1;
886 
887  list_1_j = j - 1;
888 
889  ibit_tmp_1 = (list_1_j & is1_spin);
890  // is1_spin >= 1
891  // is1_spin = Tpow[2*isite + ispin]
892 
893  *tmp_off = 0;
894 
895  if (ibit_tmp_1 == 0) {
896  // able to create an electron at the is1_spin state
897  bit = list_1_j - (list_1_j & (2 * is1_spin - 1));
898  SgnBit(bit, &sgn); // Fermion sign
899  ipsgn = 1;
900 #ifdef __MPI
901  SgnBit(myrank, &ipsgn); // Fermion sign
902 #endif
903  list_1_off = list_1_j | is1_spin; // OR
904  *tmp_off = list_1_off;
905  dmv = (std::complex<double>)(ipsgn * sgn) * tmp_V;
906  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[list_1_off + 1][0], &one);
907  }
908  else {
909  return;
910  }
911 }/*std::complex<double> GC_Cis*/
int myrank
Process ID, defined in InitializeMPI()
Definition: global.cpp:73
void SgnBit(const long int org_bit, int *sgn)
function of getting fermion sign (64 bit)
Definition: bitcalc.cpp:338

◆ GC_CisAis()

void GC_CisAis ( long int  j,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1,
long int  is1_spin,
std::complex< double >  tmp_trans 
)

Operation of \(t c_{i\sigma}^\dagger c_{i\sigma}\) (Grandcanonical)

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]jIndex of element of wavefunction
[in,out]tmp_v0Result vector
[in]tmp_v1Input producted vector
[in]is1_spinMask for occupation of \((i \sigma)\)
[in]tmp_transTransfer integral

Definition at line 231 of file mltplyHubbardCore.cpp.

Referenced by GC_child_general_hopp().

238  {
239  long int A_ibit_tmp;
240  long int list_1_j;
241  std::complex<double> dmv;
242  int one = 1;
243 
244  list_1_j = j - 1;
245  A_ibit_tmp = (list_1_j & is1_spin) / is1_spin;
246  dmv = tmp_trans * (std::complex<double>)A_ibit_tmp;
247  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[j][0], &one);
248 }/*std::complex<double> GC_CisAis*/

◆ GC_CisAjt()

void GC_CisAjt ( long int  j,
int  nstate,
std::complex< double > **  tmp_v0,
std::complex< double > **  tmp_v1,
long int  is1_spin,
long int  is2_spin,
long int  sum_spin,
long int  diff_spin,
std::complex< double >  tmp_V,
long int *  tmp_off 
)

\(c_{is}^\dagger c_{jt}\) term for grandcanonical Hubbard

Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]jIndex of wavefunction
[in]tmp_v0\(v_0 = H v_1\)
[in]tmp_v1Vector to be producted
[in]is1_spinMask for occupation of (is)
[in]is2_spinMask for occupation of (jt)
[in]sum_spinMask for hopping
[in]diff_spinMask for Fermion sign
[in]tmp_VHopping
[in]tmp_offIndex of wavefunction of final state

Definition at line 330 of file mltplyHubbardCore.cpp.

References SgnBit().

Referenced by GC_child_general_hopp(), X_GC_child_CisAjtCkuAku_Hubbard_MPI(), and X_GC_child_CisAjtCkuAlv_Hubbard_MPI().

340  {
341  long int list_1_j, list_1_off;
342  long int ibit_tmp_1, ibit_tmp_2;
343  long int bit;
344  int sgn;
345  std::complex<double> dmv;
346 
347  list_1_j = j - 1;
348  ibit_tmp_1 = (list_1_j & is1_spin);
349  ibit_tmp_2 = (list_1_j & is2_spin);
350  *tmp_off = 0;
351  int one = 1;
352 
353  if (ibit_tmp_1 == 0 && ibit_tmp_2 != 0) {
354  bit = list_1_j & diff_spin;
355  SgnBit(bit, &sgn); // Fermion sign
356  list_1_off = list_1_j ^ sum_spin;
357  *tmp_off = list_1_off;
358  dmv = (std::complex<double>)sgn * tmp_V;
359  zaxpy_(&nstate, &dmv, &tmp_v1[j][0], &one, &tmp_v0[list_1_off + 1][0], &one);
360  }
361  else {
362  return;
363  }
364 }/*std::complex<double> GC_CisAjt*/
void SgnBit(const long int org_bit, int *sgn)
function of getting fermion sign (64 bit)
Definition: bitcalc.cpp:338

◆ X_Ajt()

int X_Ajt ( long int  j,
long int  is1_spin,
long int *  tmp_off,
long int *  list_1_org,
long int *  list_2_1_target,
long int *  list_2_2_target,
long int  _irght,
long int  _ilft,
long int  _ihfbit 
)

Compute index of final wavefunction associatesd to \(c_{jt}\) term of canonical Hubbard system.

Returns
1 if electron (jt) exist, 0 if not.
Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Youhei Yamaji (The University of Tokyo)
Parameters
[in]jIndex of initial wavefunction
[in]is1_spinBit mask
[out]tmp_offIndex of final wavefunction
[in]list_1_orgSimilar to list_1
[in]list_2_1_targetSimilar to list_2_1
[in]list_2_2_targetSimilar to list_2_2
[in]_irghtSimilar to LargeList::irght
[in]_ilftSimilar to LargeList::ilft
[in]_ihfbitSimilar to LargeList::ihfbit

Definition at line 1020 of file mltplyHubbardCore.cpp.

References GetOffComp(), myrank, and SgnBit().

Referenced by GetSingleExcitedStateHubbard().

1030  {
1031  long int list_1_j, list_1_off;
1032  long int ibit_tmp_1;
1033  long int bit;
1034  int sgn, ipsgn;
1035 
1036  list_1_j = list_1_org[j];
1037 
1038  ibit_tmp_1 = (list_1_j & is1_spin);
1039 // is1_spin >= 1
1040 // is1_spin = Tpow[2*isite + ispin]
1041 
1042  *tmp_off = 0;
1043  if (ibit_tmp_1 != 0) {
1044  // able to delete an electron at the is1_spin state
1045  bit = list_1_j - (list_1_j & (2 * is1_spin - 1));
1046  SgnBit(bit, &sgn); // Fermion sign
1047  ipsgn = 1;
1048 #ifdef __MPI
1049  SgnBit(myrank, &ipsgn); // Fermion sign
1050 #endif
1051  list_1_off = list_1_j ^ is1_spin;
1052  if(GetOffComp(list_2_1_target, list_2_2_target, list_1_off, _irght, _ilft, _ihfbit, tmp_off)!=TRUE){
1053  *tmp_off=0;
1054  return 0;
1055  }
1056  sgn *= ipsgn;
1057  return(sgn);
1058  }
1059  else {
1060  *tmp_off = 0;
1061  return 0;
1062  }
1063 }/*std::complex<double> X_Ajt*/
long int * list_1_org
Definition: global.cpp:31
int GetOffComp(long int *_list_2_1, long int *_list_2_2, long int _ibit, const long int _irght, const long int _ilft, const long int _ihfbit, long int *_ioffComp)
function of getting off-diagonal component
Definition: bitcalc.cpp:195
int myrank
Process ID, defined in InitializeMPI()
Definition: global.cpp:73
void SgnBit(const long int org_bit, int *sgn)
function of getting fermion sign (64 bit)
Definition: bitcalc.cpp:338

◆ X_Cis()

int X_Cis ( long int  j,
long int  is1_spin,
long int *  tmp_off,
long int *  list_1_org,
long int *  list_2_1_target,
long int *  list_2_2_target,
long int  _irght,
long int  _ilft,
long int  _ihfbit 
)

Compute index of final wavefunction associatesd to \(c_{is}^\dagger\) term of canonical Hubbard system.

Returns
1 if electron (is) absent, 0 if not.
Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Youhei Yamaji (The University of Tokyo)
Parameters
[in]jIndex of initial wavefunction
[in]is1_spinBit mask
[out]tmp_offIndex of final wavefunction
[in]list_1_orgSimilar to list_1
[in]list_2_1_targetSimilar to list_2_1
[in]list_2_2_targetSimilar to list_2_2
[in]_irghtSimilar to LargeList::irght
[in]_ilftSimilar to LargeList::ilft
[in]_ihfbitSimilar to LargeList::ihfbit

Definition at line 966 of file mltplyHubbardCore.cpp.

References GetOffComp(), myrank, and SgnBit().

Referenced by GetSingleExcitedStateHubbard().

976  {
977  long int list_1_j, list_1_off;
978  long int ibit_tmp_1;
979  long int bit;
980  int sgn, ipsgn;
981 
982  list_1_j = list_1_org[j];
983 
984  ibit_tmp_1 = (list_1_j & is1_spin);
985  // is1_spin >= 1
986  // is1_spin = Tpow[2*isite + ispin]
987 
988  *tmp_off = 0;
989 
990  if (ibit_tmp_1 == 0) {
991  // able to create an electron at the is1_spin state
992  bit = list_1_j - (list_1_j & (2 * is1_spin - 1));
993  SgnBit(bit, &sgn); // Fermion sign
994  ipsgn = 1;
995 #ifdef __MPI
996  SgnBit(myrank, &ipsgn); // Fermion sign
997 #endif
998  list_1_off = list_1_j | is1_spin; // OR
999 
1000  if(GetOffComp(list_2_1_target, list_2_2_target, list_1_off, _irght, _ilft, _ihfbit, tmp_off)!=TRUE){
1001  *tmp_off=0;
1002  return 0;
1003  }
1004  sgn *= ipsgn;
1005  return (sgn);
1006  }
1007  else {
1008  *tmp_off = 0;
1009  return 0;
1010  }
1011 }/*int X_Cis*/
long int * list_1_org
Definition: global.cpp:31
int GetOffComp(long int *_list_2_1, long int *_list_2_2, long int _ibit, const long int _irght, const long int _ilft, const long int _ihfbit, long int *_ioffComp)
function of getting off-diagonal component
Definition: bitcalc.cpp:195
int myrank
Process ID, defined in InitializeMPI()
Definition: global.cpp:73
void SgnBit(const long int org_bit, int *sgn)
function of getting fermion sign (64 bit)
Definition: bitcalc.cpp:338

◆ X_CisAis()

int X_CisAis ( long int  list_1_j,
long int  is1_spin 
)

\(c_{is}\\dagger c_{is}\) term in Hubbard (canonical)

Returns
Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)

Definition at line 276 of file mltplyHubbardCore.cpp.

Referenced by child_CisAisCisAis_element(), child_CisAisCjtAku_element(), child_CisAjtCkuAku_element(), GC_child_CisAisCisAis_element(), GC_child_CisAisCjtAku_element(), GC_child_CisAjtCkuAku_element(), and X_child_CisAis_Hubbard_MPI().

279  {
280  int A_ibit_tmp;
281 
282  // off = j
283  A_ibit_tmp = (list_1_j & is1_spin) / is1_spin;
284  return A_ibit_tmp;
285 }

◆ X_CisAjt()

int X_CisAjt ( long int  list_1_j,
struct BindStruct X,
long int  is1_spin,
long int  is2_spin,
long int  sum_spin,
long int  diff_spin,
long int *  tmp_off 
)

Compute index of wavefunction of final state.

Returns
Fermion sign
Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]list_1_jSimiler to list_1 ?
[in]X
[in]is1_spinMask for occupation of (is)
[in]is2_spinMask for occupation of (jt)
[in]sum_spinMask for hopping
[in]diff_spinMask for Fermion sign
[in]tmp_offIndex of wavefunction of final state

Definition at line 371 of file mltplyHubbardCore.cpp.

References GetOffComp(), LargeList::ihfbit, LargeList::ilft, LargeList::irght, BindStruct::Large, list_2_1, list_2_2, and X_GC_CisAjt().

Referenced by child_CisAisCjtAku_element(), child_CisAjtCkuAku_element(), child_CisAjtCkuAlv_element(), and GetPairExcitedStateHubbard().

379  {
380  long int off;
381  int sgn = 1;
382 
383  sgn = X_GC_CisAjt(list_1_j, is1_spin, is2_spin, sum_spin, diff_spin, tmp_off);
384  if (sgn != 0) {
385  if(GetOffComp(list_2_1, list_2_2, *tmp_off, X->Large.irght, X->Large.ilft, X->Large.ihfbit, &off)!=TRUE){
386  *tmp_off = 0;
387  return 0;
388  }
389  *tmp_off = off;
390  return sgn;
391  }
392  else {
393  *tmp_off = 0;
394  return 0;
395  }
396 }/*int X_CisAjt*/
long int * list_2_1
Definition: global.cpp:27
long int * list_2_2
Definition: global.cpp:28
struct LargeList Large
Variables for Matrix-Vector product.
Definition: struct.hpp:397
long int irght
Used for Ogata-Lin ???
Definition: struct.hpp:344
int X_GC_CisAjt(long int list_1_j, long int is1_spin, long int is2_spin, long int sum_spin, long int diff_spin, long int *tmp_off)
Compute index of wavefunction of final state.
long int ilft
Used for Ogata-Lin ???
Definition: struct.hpp:345
int GetOffComp(long int *_list_2_1, long int *_list_2_2, long int _ibit, const long int _irght, const long int _ilft, const long int _ihfbit, long int *_ioffComp)
function of getting off-diagonal component
Definition: bitcalc.cpp:195
long int ihfbit
Used for Ogata-Lin ???
Definition: struct.hpp:346

◆ X_GC_CisAjt()

int X_GC_CisAjt ( long int  list_1_j,
long int  is1_spin,
long int  is2_spin,
long int  sum_spin,
long int  diff_spin,
long int *  tmp_off 
)

Compute index of wavefunction of final state.

Returns
Fermion sign
Author
Takahiro Misawa (The University of Tokyo)
Kazuyoshi Yoshimi (The University of Tokyo)
Parameters
[in]list_1_jlist_1 ?
[in]is1_spinMask for occupation of (is)
[in]is2_spinMask for occupation of (jt)
[in]sum_spinMask for hopping
[in]diff_spinMask for Fermion sign
[out]tmp_offIndex of wavefunction of final state

Definition at line 403 of file mltplyHubbardCore.cpp.

References SgnBit().

Referenced by child_CisAjtCkuAlv_element(), GC_child_CisAisCjtAku_element(), GC_child_CisAjtCkuAku_element(), GC_child_CisAjtCkuAlv_element(), GetSgnInterAll(), X_child_CisAjtCkuAlv_Hubbard_MPI(), X_CisAjt(), and X_GC_child_CisAjtCkuAlv_Hubbard_MPI().

410  {
411  long int ibit_tmp_1, ibit_tmp_2;
412  long int bit, off;
413  int sgn = 1;
414 
415  ibit_tmp_1 = (list_1_j & is1_spin);
416  ibit_tmp_2 = (list_1_j & is2_spin);
417 
418  if (ibit_tmp_1 == 0 && ibit_tmp_2 != 0) {
419  bit = list_1_j & diff_spin;
420  SgnBit(bit, &sgn); // Fermion sign
421  off = list_1_j ^ sum_spin;
422  *tmp_off = off;
423  return sgn; // pm 1
424  }
425  else {
426  *tmp_off = 0;
427  return 0;
428  }
429 }
void SgnBit(const long int org_bit, int *sgn)
function of getting fermion sign (64 bit)
Definition: bitcalc.cpp:338