+1 vote
asked by (230 points)

Dear ITensor developers:

I am consider about the time evolution of electron wave packet in interacting model. First I got the ground state using static DMRG, the electron packet for example,

h^{\dagger}\left(k{0}\right)=\sum_{j} a_{j} e^{i k{0} j} c^{\dagger}_{j}

then I try to use the AutoMPO, toMPO, and applyMPO get the excited state $\left|\Psi{e}\right\rangle=h^{\dagger}\left(k{0}\right)\left|\Psi_{0}\right\rangle$, but the ITENSOR give me the errors
I = (dim=2|id=932|"l=39,Link")
1: 2 QN()
Q = QN({"Nf",1,-1},{"Sz",1})
From line 683, file index.cc
Index does not contain given QN block.

the minimal code is:
auto [energy, psi] = dmrg(H, psi0, sweeps);
auto AmpoTemp = AutoMPO(sites);// Hubbard Model
for (auto b : range1(int(N)))
AmpoTemp += Coefficent, "Cup", b;
auto Htemp=toMPO(AmpoTemp);
auto NewPsi=applyMPO(Htemp,psi,{"Method=","DensityMatrix","MaxDim=",1000,"Cutoff=",1E-8});// |y>=h|x>

If I change the Cup to Nup, it works. I want to know why and how to fix it. Many thanks!

1 Answer

+1 vote
answered by (70.1k points)
selected by
Best answer

Hi, I'm not sure I totally see what you are asking, but is your question about doing the following steps:
1. compute the ground state
2. act on the ground state with an operator that creates an electron wave packet?

I think I see from your sample code that this is what you are trying to do.

Unfortunately there you may be running into a long-standing limitation of the AutoMPO system, which is that it does not correctly create a sum of single, fermionic C or Cdag operators. This is due to the necessity of including Jordan-Wigner string on all sites to the left of the operator, which is correctly handled for a pair of such operators but not currently for a single operator. So unfortunately it is a bug in ITensor just for this one case.

As a workaround for now, I could help you to make a custom code that creates the MPO you want, of the form \sumi ai Ci where ai is any set of coefficients and C_i is the electron annihilation operator. If you email me at mstoudenmire@flatironinstitute.org we can correspond about how to make this code. It is actually rather short code but you may need my help to make it correctly.


commented by (230 points)
Hi Miles, you got the points of my question.
commented by (70.1k points)
Here is the link to the custom code that makes an MPO which is a sum of coefficients times an electron creation or annihilation operator (of either spin):


To use it, pass the site set (set of site indices) for the MPO or your MPS, a string which should be either "Cup", "Cdn", "Cdagup", or "Cdagdn", and a std::vector of either real or complex coefficients. If you choose "Cup", say, then it will make an MPO equal to the following sum:

\sum_{j=1}^{N} w[j-1] Cup_j
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.