-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
Some context: I have a partition function tensor O. I find the boundary MPS fixed point psi (and environments envs) with VOMPS. I can get to the free energy through expectation_value(psi, InfiniteMPO([O]), envs).
I now have an MPO tensor E representing a different quantity (here some energy, but not a Hamiltonian term!) . I did the following:
mpo = InfiniteMPO([E]) # E is a (2,2) tensor map
expectation_value(psi, mpo, envs)However, this gives an incorrect result. I think this is because the environments get lost in the conversion to multiline things:
MPSKit.jl/src/algorithms/expval.jl
Line 138 in 8cf041f
| return prod(x -> expectation_value(x...), zip(parent(ψ), parent(mpo))) |
where there is a TODO noting this.
Edit: this is also flawed because I want the expectation value of replacing 1
O tensor with E, not a chain of Es.
The best I can do right now is
MPSKit.contract_mpo_expval(psi.AC[1], envs.GLs[1], E, envs.GRs[1], psi.AC[1])to get the right result.
Something similar to PEPSKit's contract_local_operator is probably what I want.
Metadata
Metadata
Assignees
Labels
No labels