Repository navigation
Implement cluster expansion MPOs - #252
Conversation
|
Perhaps also using |
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
lkdvos
left a comment
There was a problem hiding this comment.
Keep in mind that @generated tends to increase compilation time, since it has to compile new functions for all types.
Having a quick glance at this, it seems to me that the compile time is this large mostly because a lot of the functions are very type-unstable. One thing that might help is to use Val(N) whenever you are referring to the lengths of the finite mpos. Since you are instantiating them as contracted tensors, this yields AbstractTensorMap{T,S,N,N} or similar objects, and becomes a problem when N is not known at compile time.
(which coincidentally also requires more @generated functions since ncon is also not type stable 😁 )
This being said, am I right in looking at this and thinking the main missing components in terms of contractions is the instantiation or application of FiniteMPO with static lengths?
If this is the case, we might just create SFiniteMPO in analogy to SVector (StaticArrays.jl), and implement this generically? This has additional benefits as well, since the derivatives would fit in this same framework.
1796877 to
e0f7464
Compare
|
In an attempt to get as many PRs from my to-do list, I seem to have find some time and energy to revive this and set off a 🤖 to have a look at this. |
Construct time-evolution MPOs by matching exact finite-cluster exponentials, including all translations of mixed-space periodic unit cells. Use TensorKit primitives and generated planar contractions, with a single dispatch on the cluster size and inferred internal stages. Complete the SVD factors with complementary directions to preserve environment support for rectangular and rank-deficient residuals. Retain below-cutoff components and use untruncated LQ/QR bases to avoid redundant virtual channels. Document the API and tensor layouts. Validate exact clusters, symmetry sectors, dual and planar spaces, repeated cells, disconnected dimers, time-step edge cases, error scaling, and inference: 1,062 focused tests pass.
e0f7464 to
2fcd29a
Compare
|
I recently made a new version of this code where I completely steered away from using krylov based solvers. The linear problems are easily solvable with |
|
This PR is using |
Share the cluster builder and tensor kernels between finite and infinite Hamiltonians. Limit finite stages to windows contained in the chain, add empty virtual levels near the endpoints, and project and structurally prune the final MPO. Cap the cluster size at the finite chain length before the single dynamic size dispatch. Handle one-site finite Hamiltonian conversion by stripping both utility legs instead of contracting the site with itself. Update the algorithm documentation and cover mixed spaces, symmetries, boundary windows, inference, large cutoffs, time-step edge cases, finite error scaling, and agreement with projected infinite MPOs. All 2,030 cluster-expansion tests pass.
9ae86e0 to
c4ca7a2
Compare
| #### Nonperturbative cluster expansion | ||
|
|
||
| [`ClusterExpansion`](@ref) constructs evolution MPOs for finite and infinite | ||
| nearest-neighbor Hamiltonians by matching exact exponentials on clusters of up to |
There was a problem hiding this comment.
| nearest-neighbor Hamiltonians by matching exact exponentials on clusters of up to | |
| Hamiltonians by matching exact exponentials on clusters of up to |
This is my initial implementation for the "Symmetric cluster expansions" introduced in https://doi.org/10.1103/PhysRevA.103.L020402
They are currently only implemented for infinite systems.
The current implementation is still undergoing testing and suffers from a rather large compilation time.
Things that still need to be done: