Skip to content

Expectation value of MPO tensor #320

Description

@borisdevos

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:

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions