ITensor / ITensor/ITensorMPS.jl

Return Spectrums from MPS(::ITensor, sites) and replacesites!

Open
#48 0 comments 0 reactions 1 assignee View on GitHub

@mtfishman is already working on this.

Since Oct 7, 2020.

enhancement
Dominant language
Julia
Stars
85
Forks
27
Avg merge
22m
Merged PRs (30d)
1

Description

It would be very helpful to return the Spectrums of the new bonds introduced in functions like MPS(::ITensor, sites) and replacesites!(::MPS, ::ITensor, range). This could be done with an API like:

s = siteinds("S=1/2", 3)
A = randomITensor(s...)
spectra = []
ψ = MPS(A, s; spectra! = spectra)

so that spectra would store the Spectrum objects for each bond of the MPS. Note the exclamation mark on the keyword argument to indicate that the keyword argument is being modified in-place (we could consider the same convention for DMRG observers).

This API style is discuessed in ITensor/ITensors.jl#500, and would be helpful for finishing up the n-site DMRG PR (#434) as well as for returning more information from the MPS gate evolution function apply(::Vector{ITensor}, ::MPS) (which probably needs a full-fledged observer).

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.