ITensor / ITensor/ITensorMPS.jl
Generalize `expect` and `correlation_matrix` to MPOs
Open
@mtfishman is already working on this.
Since Sep 1, 2021.
- Dominant language
- Julia
- Stars
- 85
- Forks
- 27
- Avg merge
- 22m
- Merged PRs (30d)
- 1
Description
Generalize expect and correlation_matrix to MPOs.
This comes up here: http://itensor.org/support/3350/calculating-observables-from-density-matrices and is needed in PastaQ.
A conceptually simple approach would be something like:
function expect(M::MPO, x::String, n::Int)
s = dag.(siteinds(first, M; plev=0))
O = op(x, s, n)
return tr(apply([O], M))
end
used like:
expect(M, "Sx", 3) # Compute `tr(Sx_3 * M)`
where of course we would want to handle moving the orthogonality center around efficiently when computing ranges of local expectation values.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.