Remove explicit call to InfiniteMPS in VUMPS and IDMRG#396
Remove explicit call to InfiniteMPS in VUMPS and IDMRG#396AFeuerpfeil wants to merge 10 commits intoQuantumKitHub:mainfrom
InfiniteMPS in VUMPS and IDMRG#396Conversation
lkdvos
left a comment
There was a problem hiding this comment.
While I left a small comment on the implementation here, I think I would be happier with a more fundamental change where instead of the uniform gauge happening in the InfiniteMPS constructor, we actually use the dedicated function:
Something along the lines of:
gaugefix!(similar(it.state.mps), copy(it.state.AR), ...; kwargs...)
src/algorithms/groundstate/idmrg.jl
Outdated
|
|
||
| alg_gauge = updatetol(alg.alg_gauge, it.state.iter, it.state.ϵ) | ||
| ψ′ = InfiniteMPS(it.state.mps.AR[1:end]; alg_gauge.tol, alg_gauge.maxiter) | ||
| ψ′ = typeof(mps)(it.state.mps.AR; alg_gauge.tol, alg_gauge.maxiter) |
There was a problem hiding this comment.
| ψ′ = typeof(mps)(it.state.mps.AR; alg_gauge.tol, alg_gauge.maxiter) | |
| ψ′ = typeof(mps)(copy(it.state.mps.AR); alg_gauge.tol, alg_gauge.maxiter) |
Otherwise this will share the array with the input, which is probably not what we want here.
This being said, I think if you overload similar for your array type it keeps its type.
|
Thanks for the recommendation! |
|
Your PR no longer requires formatting changes. Thank you for your contribution! |
|
Looks like the |
Head branch was pushed to by a user without write access
|
Just looked at this a bit more - the IDMRG2 failures are most likely because the spaces of the MPS are changing, so my proposed solution in terms of an in-place function doesn't work that straightforwardly, since |
I remove the call to
InfiniteMPStotypeof(mps). This change necessitates thattypeof(mps)supports the same interface for the constructor of anInfiniteMPS.I also removed the call to
it.state.mps.AR[1:end], as calling the indexing[1:end]might remove information about theVectortype ofAR.