# About the excited state of electron wave packet using the toMPO

+1 vote

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
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>
NewPsi.noPrime().normalize();

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

+1 vote
selected by

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.

Best,
Miles

commented by (230 points)
Hi Miles, you got the points of my question.
commented by (46.8k 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):

https://itensor.org/miles/c_mpo.h

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