Hi,
using the MPS and MPO classes and methods, I find some behaviour which is contradictory to what I think should happen. Therefore, I wanted to make sure to use these classes in a valid way (which I meanwhile doubt a lot):
What I want to do: I want to contract a periodic MPS with a periodic MPO a couple of times (both with arbitrary bond dimension, physical as well as virtual, such that the builders such as AutoMPO don't seem adequate to me?).
What I do: So I initialize my site set sites
and initialize sets of virtual indices once for the MPS and once for the MPO mpo_inds
and mps_inds
. I initialize an MPO and MPS object
MPS myMPS (sites)
MPO myMPO (sites)
then for each site site_
I create tensors mps_A
and mpo_A
that fullfill my index structure defined in mps_inds
and mpo_inds
. Then I simply set
myMPS.Aref(site_) = mps_A;
myMPO.Aref(site_) = mpo_A;
What I would expect: So now I would expect that using exactApplyMPO
should yield the same result (modulo gauge invariance) as initializing a new MPS defined through tensors of the form mps_A * mpo_A
(combining the double index to a new index and building an adequate index set for the MPS build this way etc ...)
However, after normalizing each of the states I find that:
overlapC(myMPS_, myOtherMPS) = 0.86 - 0.95
whilst
overlapC(myMPS_, myMPS_)=overlapC(myOtherMPS, myOtherMPS) = 0.99 - 1.0
where myOtherMPS
is the manually defined contraction, whilst myMPS_
is the result from exactApply(myMPS, myMPO, myMPS_)
.
So, to me it seems that 1) obviously the states myMPS_
and myOtherMPS
aren't the same whilst 2) they stay surprisingly close (still about 90% +- 5% overlap) all the time (where I do use randomly generated ITensors for the MPO and MPS initialization).
What is it that I am misusing, or how to do this in the correct way?
Best wishes,
Alex