+2 votes
asked by (650 points)

This is a supplement for a former question : http://itensor.org/support/357/problems-about-1-d-bose-fermi-mixture-when-using-dmrg
I have done a minimal modification to "BoseFermiMix.h" file by adding a private "Args" object in the definition of class BoseFermiMix. The modified part of the code is presented as follow

class BoseFermiMix
{
    IQIndex s;
private:
    Args args_site;

public:
    BoseFermiMix() {}
    BoseFermiMix(IQIndex I): s(I) {}
    BoseFermiMix(int n, Args const& args=Args::global())
    {
        args_site=Args::global();
        if(n%2==1) // spinless fermion
        {
            s=IQIndex(nameint("site=",n),
                Index(nameint("Em",n),1,Site), QN("Sz=",0,"Nf=",0), // vaccum
                Index(nameint("f1",n),1,Site), QN("Sz=",0,"Nf=",1) // 1 fermion
                );  
            args_site.add("Fermion_Site?",true);
        }
        else // spinless boson (3 boson/site at most)
        {
            s=IQIndex(nameint("site=",n),
            Index(nameint("Em",n),1,Site),QN("Sz=",0,"Nb=",0),
            Index(nameint("b1",n),1,Site),QN("Sz=",0,"Nb=",1),
            Index(nameint("b2",n),1,Site),QN("Sz=",0,"Nb=",2),
            Index(nameint("b3",n),1,Site),QN("Sz=",0,"Nb=",3)
            );
            args_site.add("Fermion_Site?",false);
        }
    }

The new-added Args object "argssite" is {"FermionSite",true} when this site is fermion (on odd site). And the Jordan-Wigner string operator "F" is now relying on the flag given by "args_site" as we presented below

else if ((opname=="F" || opname=="FermiPhase") && (args_site.getBool("Fermion_Site?")))
        {
            Op.set(Em,EmP,1);
            Op.set(f1,f1P,-1);
        }
        else if ((opname=="F" || opname=="FermiPhase") && !(args_site.getBool("Fermion_Site?")))
        {
            Op.set(Em,EmP,1);
            Op.set(f1,f1P,1);
        }

that is, "F" is identity when this site is boson, normal Jordan-Wigner operator F when this site is fermion.
It seems the problem is solved but I still have the following mistakes
(1) dmrg runs so quickly (less than 1 s) even for large particle number (N=2000) and small cut-off (1E-15).
(2) the result it gives is different each time
(3) Entropy at center bond is always zero (all very small)
Another problem, which may give us some implication, is that : if I set all fermion parameters (such as fermion hopping and Bose-fermi interaction) to be zero, than this model shall give the same result as spinless Bose-Hubbard model. (fermion now has no effect on the system and all boson lies on even site ). In fact, I wrote a siteset file "BoseHubbard.h" to describe spinless BoseHubbard model I believe it is right.

#ifndef __ITENSOR_BOSEHUBBARD__H
#define __ITENSOR_BOSEHUBBARD__H
#include "itensor/mps/siteset.h"
#include <cmath>

namespace itensor
{
class BoseHubbard;
using BH=BasicSiteSet<BoseHubbard>;

auto Sqrt3=1.7320508075688772;

class BoseHubbard
{
    IQIndex s;

public:
    BoseHubbard() {}
    BoseHubbard(IQIndex I): s(I) {}
    BoseHubbard(int n, Args const& args=Args::global())
    {
        // spinless boson (3 boson/site at most)
        s=IQIndex(nameint("site=",n),
            Index(nameint("Emp",n),1,Site),QN("Sz=",0,"Nb=",0),
            Index(nameint("b1",n),1,Site),QN("Sz=",0,"Nb=",1),
            Index(nameint("b2",n),1,Site),QN("Sz=",0,"Nb=",2),
            Index(nameint("b3",n),1,Site),QN("Sz=",0,"Nb=",3)
            );
    }

    IQIndex index() const {return s;}

    IQIndexVal state(std::string const& state)
    {
        if (state=="Emp")
        {
            return s(1);
        }
        else if (state=="b1")
        {
            return s(2);
        }
        else if (state=="b2")
        {
            return s(3);
        }
        else if (state=="b3")
        {
            return s(4);
        }
    }

    IQTensor op(std::string const& opname, Args const& args) const
    {
        auto sP=prime(s);

        IQIndexVal
        Em(s(1)),EmP(sP(1)),
        b1(s(2)),b1P(sP(2)),
        b2(s(3)),b2P(sP(3)),
        b3(s(4)),b3P(sP(4));

        IQTensor Op(dag(s),sP);
        // boson single-site operator
        if (opname=="Nb")
        {
            Op.set(b1,b1P,1);
            Op.set(b2,b2P,2);
            Op.set(b3,b3P,3);
        }
        else if (opname=="Ab")
        {
            Op.set(Em,b1P,1);
            Op.set(b1,b2P,Sqrt2);
            Op.set(b2,b3P,Sqrt3);
        }
        else if (opname=="Adagb")
        {
            Op.set(b1,EmP,1);
            Op.set(b2,b1P,Sqrt2);
            Op.set(b3,b2P,Sqrt3);
        }
        else if (opname=="Id")
        {
            Op.set(Em,EmP,1);
            Op.set(b1,b1P,1);
            Op.set(b2,b2P,1);
            Op.set(b3,b3P,1);
        }
        else
        {
            Error("Operator " + opname + " name not recognized !");
        }

        return Op;
    }

 };
}
#endif

unfortunately, result given by "BoseFermiMix.h" is still not right compared to "BoseHubbard.h" and it also have the faults given in (1) and (3) above. ((2) is solved)

1 Answer

+1 vote
answered by (70.1k points)

Hi Junjie,
Thanks for working on this some more on your own. The solution you did with the argssite is very close to what I was meaning by adding a "flag" to the BoseFermiMix site. The only change I would suggest is that the flag doesn't need to be an Args object. It could just be a simple boolean variable. So when you define Args argssite; you could instead just define bool isfermi = true; (always good to put a default). Then in the constructor set isfermi = true; for fermion sites and false for boson sites, and check this boolean in the op function when making the "F" operator.

Now I will try to understand your other issues, but they are hard for me to assess without running the code myself. For example, you say that BoseFermiMix is "not right" compared to BoseHubbard but I'm not sure for example which one is right or what the right answer should be without having some specific numbers.

So I will try running the code myself to see what I find. When DMRG runs really fast and gives a small entanglement, it's usually because either the initial state is too trivial (like a vacuum state, say) or because the Hamiltonian has some sort of flaw, such as the absence of hopping terms that prevent the particles from spreading out over the system.

Miles

Welcome to ITensor Support Q&A, where you can ask questions and receive answers from other members of the community.

Formatting Tips:
  • To format code, indent by four spaces
  • To format inline LaTeX, surround it by @@ on both sides
  • To format LaTeX on its own line, surround it by $$ above and below
  • For LaTeX, it may be necessary to backslash-escape underscore characters to obtain proper formatting. So for example writing \sum\_i to represent a sum over i.
If you cannot register due to firewall issues (e.g. you cannot see the capcha box) please email Miles Stoudenmire to ask for an account.

To report ITensor bugs, please use the issue tracker.

Categories

...