-
Notifications
You must be signed in to change notification settings - Fork 45
Various small fixes and improvements to RandExpand
#335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@AFeuerpfeil, tagging you here |
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Hi Lukas, Thanks, the subspace expansion itself looks good now. Calculating the environments currently errors: nested task error: SpaceMismatch("ProductSpace(⊞(Rep[U₁ × Cyclic{36} × U₁]((0, 0, 0)=>1, (3, 6, 3)=>1))) ≠ ProductSpace(⊞(Rep[U₁ × Cyclic{36} × U₁]((0, 0, 0)=>1, (3, 0, 3)=>1)))")I also identified the reason: When calling right_virtualspace(ket, i) = Rep[U₁ × Cyclic{36} × U₁]((0, 0, 0)=>1, (3, 0, 3)=>1)
TensorKit.space(ket.AL[i]) = (Rep[U₁ × Cyclic{36} × U₁]((1, 35, 1)=>1, (4, 29, 4)=>1) ⊗ Rep[U₁ × Cyclic{36} × U₁]((-1, 1, -1)=>1, (2, 1, 2)=>1)) ← Rep[U₁ × Cyclic{36} × U₁]((0, 0, 0)=>1, (3, 0, 3)=>1)
TensorKit.space(ket.AR[i]) = (Rep[U₁ × Cyclic{36} × U₁]((1, 35, 1)=>1, (-2, 35, -2)=>1) ⊗ Rep[U₁ × Cyclic{36} × U₁]((-1, 1, -1)=>1, (2, 1, 2)=>1)) ← Rep[U₁ × Cyclic{36} × U₁]((0, 0, 0)=>1, (3, 6, 3)=>1) |
|
Thanks for checking and investigating! I pushed some more changes that should hopefully resolve the issue, it would be nice if you could check again! |
|
Sure, I will look into that today. |
|
I have 2 comments:
ERROR: TaskFailedException
nested task error: SpaceMismatch("ProductSpace(⊞(Rep[U₁ × Cyclic{36} × U₁]((0, 0, 0)=>1))) ≠ ProductSpace(⊞(Rep[U₁ × Cyclic{36} × U₁]((0, 0, 0)=>1, (3, 0, 3)=>1)))") |
|
I observe some peculiarities with the [ Info: VUMPS init: obj = +2.216860652296e+03 err = 0.0000e+00
┌ Warning: Constructing an MPS from tensors that are not full rank
└ @ MPSKit ~/.julia/dev/MPSKit/src/states/infinitemps.jl:191
ERROR: SpaceMismatch("Incompatible spaces for permuting")
Stacktrace:
[1] TensorKit.TreeTransformer(transform::Function, p::Tuple{…}, Vdst::TensorMapSpace{…}, Vsrc::TensorMapSpace{…})
@ TensorKit ~/.julia/packages/TensorKit/JuisY/src/tensors/treetransformers.jl:161
[2] _treetransposer
@ ~/.julia/packages/TensorKit/JuisY/src/tensors/treetransformers.jl:199 [inlined]
[3] #treetransposer##5
@ ~/.julia/packages/TensorKit/JuisY/src/auxiliary/caches.jl:113 [inlined]
[4] get!(default::TensorKit.var"#treetransposer##5#treetransposer##6"{…}, lru::LRUCache.LRU{…}, key::Tuple{…})
@ LRUCache ~/.julia/packages/LRUCache/ZH7qB/src/LRUCache.jl:169
[5] treetransposer(Vdst::TensorMapSpace{…}, Vsrc::TensorMapSpace{…}, p::Tuple{…}, ::TensorKit.GlobalLRUCache)
@ TensorKit ./none:-1
[6] treetransposer
@ ./none:-1 [inlined]
[7] treetransposer
@ ~/.julia/packages/TensorKit/JuisY/src/tensors/treetransformers.jl:193 [inlined]
[8] add_transpose!
@ ~/.julia/packages/TensorKit/JuisY/src/tensors/indexmanipulations.jl:450 [inlined]
[9] transpose!
@ ~/.julia/packages/TensorKit/JuisY/src/tensors/indexmanipulations.jl:181 [inlined]
[10] repartition!(tdst::TensorMap{…}, tsrc::TensorMap{…})
@ TensorKit ~/.julia/packages/TensorKit/JuisY/src/tensors/indexmanipulations.jl:238
[11] gauge_orth_step!(it::MPSKit.IterativeSolver{…}, state::@NamedTuple{…})
@ MPSKit ~/.julia/dev/MPSKit/src/states/ortho.jl:312
[12] iterate(it::MPSKit.IterativeSolver{…}, state::@NamedTuple{…})
@ MPSKit ~/.julia/dev/MPSKit/src/states/ortho.jl:287
[13] iterate(it::MPSKit.IterativeSolver{MPSKit.RightCanonical, @NamedTuple{…}})
@ MPSKit ~/.julia/dev/MPSKit/src/states/ortho.jl:286
[14] (::MPSKit.var"#uniform_rightorth!##0#uniform_rightorth!##1"{…})()
@ MPSKit ~/.julia/dev/MPSKit/src/states/ortho.jl:271
[15] #30
@ ~/.julia/packages/LoggingExtras/VLO3o/src/verbosity.jl:103 [inlined]
[16] with_logstate(f::LoggingExtras.var"#30#31"{…}, logstate::Base.CoreLogging.LogState)
@ Base.CoreLogging ./logging/logging.jl:540
[17] with_logger
@ ./logging/logging.jl:651 [inlined]
[18] withlevel(f::MPSKit.var"#uniform_rightorth!##0#uniform_rightorth!##1"{…}, level::Base.CoreLogging.LogLevel; verbosity::Int64)
@ LoggingExtras ~/.julia/packages/LoggingExtras/VLO3o/src/verbosity.jl:99
[19] withlevel (repeats 2 times)
@ ~/.julia/packages/LoggingExtras/VLO3o/src/verbosity.jl:98 [inlined]
[20] uniform_rightorth!(::Tuple{…}, A::PeriodicVector{…}, C₀::TensorMap{…}, alg::MPSKit.RightCanonical)
@ MPSKit ~/.julia/dev/MPSKit/src/states/ortho.jl:262
[21] gaugefix!
@ ~/.julia/dev/MPSKit/src/states/ortho.jl:143 [inlined]
[22] #gaugefix!#105
@ ~/.julia/dev/MPSKit/src/states/ortho.jl:122 [inlined]
[23] gaugefix!
@ ~/.julia/dev/MPSKit/src/states/ortho.jl:111 [inlined]
[24] InfiniteMPS(AL::PeriodicVector{…}, C₀::TensorMap{…}; kwargs::@Kwargs{…})
@ MPSKit ~/.julia/dev/MPSKit/src/states/infinitemps.jl:202
[25] gauge_step!(it::MPSKit.IterativeSolver{…}, state::MPSKit.VUMPSState{…}, ACs::PeriodicVector{…})
@ MPSKit ~/.julia/dev/MPSKit/src/algorithms/groundstate/vumps.jl:156
[26] iterate
@ ~/.julia/dev/MPSKit/src/algorithms/groundstate/vumps.jl:89 [inlined]
[27] iterate
@ ~/.julia/dev/MPSKit/src/algorithms/groundstate/vumps.jl:88 [inlined]
[28] (::MPSKit.var"#459#460"{…})()
@ MPSKit ~/.julia/dev/MPSKit/src/algorithms/groundstate/vumps.jl:70
[29] #30
@ ~/.julia/packages/LoggingExtras/VLO3o/src/verbosity.jl:103 [inlined]
[30] with_logstate(f::LoggingExtras.var"#30#31"{MPSKit.var"#459#460"{…}}, logstate::Base.CoreLogging.LogState)
@ Base.CoreLogging ./logging/logging.jl:540
[31] with_logger
@ ./logging/logging.jl:651 [inlined]
[32] withlevel(f::MPSKit.var"#459#460"{…}, level::Base.CoreLogging.LogLevel; verbosity::Int64)
@ LoggingExtras ~/.julia/packages/LoggingExtras/VLO3o/src/verbosity.jl:99
[33] withlevel (repeats 2 times)
@ ~/.julia/packages/LoggingExtras/VLO3o/src/verbosity.jl:98 [inlined]
[34] dominant_eigsolve(operator::InfiniteMPOHamiltonian{…}, mps::InfiniteMPS{…}, alg::VUMPS{…}, envs::MPSKit.InfiniteEnvironments{…}; which::Symbol)
@ MPSKit ~/.julia/dev/MPSKit/src/algorithms/groundstate/vumps.jl:67
[35] dominant_eigsolve
@ ~/.julia/dev/MPSKit/src/algorithms/groundstate/vumps.jl:54 [inlined]
[36] find_groundstate
@ ~/.julia/dev/MPSKit/src/algorithms/groundstate/vumps.jl:51 [inlined]
[37] find_groundstate(mps::InfiniteMPS{…}, operator::InfiniteMPOHamiltonian{…}, alg::VUMPS{…})
@ MPSKit ~/.julia/dev/MPSKit/src/algorithms/groundstate/vumps.jl:51
[38] top-level scope
@ ~/.julia/dev/ITensorTensorKitInterface/scripts/benchmarks/ergodicity.jl:93
Some type information was truncated. Use `show(err)` to see complete types. |
|
Thanks. The error is gone, but at least in my examples the GMRES for the environment does not converge after expanding leading to weird errors and Lapack Exceptions, when the local update is ill-defined. |
RandExpand to go beyond the two-site subspaceRandExpand
|
@AFeuerpfeil as we discussed I abandoned this approach, after realizing that the proper way of doing this is to sequentially expand and sweep through the unit cell. I will open a new PR for that. |
|
Hi Lukas, |
|
I'm currently trying that out, but I felt like at that point it no longer fits the changes I'm doing to |
|
I agree. |
VictorVanthilt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
G2G for me!
changebonds(state, ::RandExpand)algorithm now no longer needs to multiply and decompose a random twosite state, and instead generates the correct vectors directly.iter = 0InfiniteMPOHamiltonianenvironments now properly clamp the Krylov dimension if the MPS bond dimension is low.