ITensor / ITensor/ITensorMPS.jl
[ITensors] [ENHANCEMENT] Easy padding of an MPS to a desired bond dimension.
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 85
- Forks
- 27
- Avg merge
- 22m
- Merged PRs (30d)
- 1
Description
Is your feature request related to a problem? Please describe.
For e.g. 1-site DMRG (or DMRG-X), starting from an initial product state is viable if the MPS is first padded to the desired final bond dimension. This can be more efficient than 2-site DMRG(X), e.g. if the site dimensions are larger.
Describe the solution you'd like
Something like pad(mps, maxdim) that defaults to padding the tensors with zeros. I realize this might be trickier with nontrivial quantum numbers, but I would be happy with just the dense case for now.
Describe alternatives you've considered
Adding the original MPS and a zeroed MPS for padding only works in some cases. For example, this does not work if I want to pad some bonds but not others, as adding an MPS to another with some bond dimensions = 0 currently fails, and there is currently no easy way to initialize an empty MPS with nonuniform bond dimension (In MPS(sinds; linkdims), linkdims can only be an integer right now). This also seems a rather roundabout way to achieve the padding (e.g. I have to compute the difference of each bond dimension to the target dimension).
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.
Research direction
Start by examining MPS(sinds; linkdims), especially its current integer-only linkdims behavior, along with the MPS construction and addition paths described in the issue. Done means a pad(mps, maxdim) entry point can zero-pad dense MPS tensors to the requested bond dimensions, including nonuniform bonds where applicable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- hpc
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100