ITensor / ITensors.jl

A Julia library for efficient tensor computations and tensor network calculations
https://itensor.org
Apache License 2.0
519 stars 120 forks source link

Generalize MPS addition to include MPO*MPS expressions #530

Open mtfishman opened 3 years ago

mtfishman commented 3 years ago

A neat generalization of #528 is to add up any objects that we can form a density matrix for. So it would be pretty straightfoward to add up arbitrary mixtures of MPS and MPO*MPS, all in a single call, for example (basically by merging the density matrix MPO*MPS contraction algorithm with the new density matrix MPS addition algorithm). We could use a notation like the following:

ϕ = ψ₁ + ψ₂ + (H, ψ₃)

where you can think of (H, ψ₃) as a lazily contracted MPS and MPO, and perhaps we could even move towards H * ψ being a lazy contraction for MPO and MPS. This could also work for adding up MPOs and products of MPOs.

mtfishman commented 3 years ago

I'm thinking of using A ⊗ B as a notation for lazily computing ITensors (thought of as a tensor product, so you could think of it as tensors producted together and waiting to get contracted). This could also be used in this case to lazily contract an MPO with an MPS, like: ϕ = ψ₁ + ψ₂ + H ⊗ ψ.

The tensor product may also create a tensor network object, which could store things like an adjacency list for the network based on analyzing which tensor of indices in common, but that is a story for another issue.