Normalize in multiline galerkin#78
Conversation
Codecov Report
@@ Coverage Diff @@
## master #78 +/- ##
==========================================
+ Coverage 84.29% 84.33% +0.03%
==========================================
Files 60 60
Lines 3726 3734 +8
==========================================
+ Hits 3141 3149 +8
Misses 585 585
|
|
We should probably do the same for the other cases, while less likely, it is still possible to have a pathological Hamiltonian with energy close to zero, or very large energies. Small note, in principle the left nullspace of AC is given by (1 - AL AL*) which is slightly faster. (See above). It might be a good idea to get all of these cases to be the same |
|
Doesn't |
| out -= state.AL[loc] * state.AL[loc]' * out | ||
| AC´ = ∂∂AC(loc, state, envs.opp, envs) * state.AC[loc] | ||
| normalize!(AC´) | ||
| out = add!(AC´, state.AL[loc] * state.AL[loc]' * AC´, -1) |
There was a problem hiding this comment.
One less allocation could have been obtained by writing
out = mul!(AC´, state.AL[loc], state.AL[loc]' * AC´, -1, +1)
Normalizes the
AC´tensor after application of the effective Hamiltonian before using it to compute the galerkin. This seems more fair for stat mech problems with very large leading boundary eigenvalues, the current implementation was giving me quite a bit of trouble.