ITensor / ITensor/ITensorMPS.jl

Generalize `expect` and `correlation_matrix` to MPOs

Open
#60 1 comment 0 reactions 2 assignees View on GitHub

@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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.