ITensor / ITensor/ITensorMPS.jl
Return Spectrums from MPS(::ITensor, sites) and replacesites!
@mtfishman is already working on this.
Since Oct 7, 2020.
- 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
- 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.