0 votes
asked by (120 points)

Hi Miles,

iTensor is amazing! I haven’t played with it since we were all in Sherbrooke and I’m blown away by the examples and how simple it is to get something useful up and running. I think my question arises from a lack of understanding of IQIndex and IQMPS.

I’m thinking about spinless fermions with nearest neighbor interactions, i.e.:

N = 8;
auto sites = Spinless(N,{"ConserveNf",true});
AutoMPO ampo(sites);
for(int j = 1; j < N;++j)
    ampo += -1.0,"Cdag",j,"C",j+1;
    ampo += -1.0,"Cdag",j+1,"C",j;
ampo += 0.765,"N",j+1,"N",j;
auto H = IQMPO(ampo);

After getting the ground state as per the https://github.com/ITensor/ITensor/blob/master/sample/iqdmrg.cc sample code:

auto state = InitState(sites);
 for(int i = 1; i <= N; ++i)
     if(i%2 == 0) state.set(i,"Emp");
     else         state.set(i,"Occ");
auto psi = IQMPS(state);

auto sweeps = Sweeps(5);
sweeps.maxm() = 10,20,100,100,200;
sweeps.cutoff() = 1E-10;
sweeps.niter() = 2;
sweeps.noise() = 1E-7,1E-8,0.0;

auto energy = dmrg(psi,H,sweeps,"Quiet");

I’m trying to figure out if it is possible to compute the entanglement entropy for “each local particle number block” i.e. I know that the reduced density matrix must commute with the particle number operator for the spatial subregion n, so ρA is block diagonal in n.

Is there a way to use IQIndex or 'Proj' to get the wavefunction projected into a fixed number of particles subsector in the subregion (corresponding to 1/2 the sites)?

Thanks in advance for any help!


Please log in or register to answer this question.

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.