Conversation
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
|
Let me continue on this PR, there are some more inconsistencies in how |
|
Upon some consideration, I think it is actually easier to remove the |
|
That's definitely also okay for me |
|
Ok, this is a first set of changes. It makes the |
|
Remains to be done: the |
|
Ok, I finally found the time to complete this. I hope the tests pass. Then this is ready for a review @lkdvos . |
lkdvos
left a comment
There was a problem hiding this comment.
I think I only have a small comment about some aesthetics, otherwise I think this looks good, thanks!
| if indV == 1:p | ||
| ΔV₁ = copy(ΔV) | ||
| else | ||
| ΔV₁ = zero(V) | ||
| for (j, i) in enumerate(indV) | ||
| ΔV₁[:, i] .= view(ΔV, :, j) | ||
| end | ||
| end |
There was a problem hiding this comment.
| if indV == 1:p | |
| ΔV₁ = copy(ΔV) | |
| else | |
| ΔV₁ = zero(V) | |
| for (j, i) in enumerate(indV) | |
| ΔV₁[:, i] .= view(ΔV, :, j) | |
| end | |
| end | |
| ΔV₁ = similar(V) | |
| ΔV₁[:, indV] = ΔV | |
| zero!(view(ΔV₁, :, (length(indV) + 1):p)) |
I think this ends up doing the same, I just had a hard time parsing what was going on before
| if indV == 1:p | ||
| ΔV₁ = copy(ΔV) | ||
| else | ||
| ΔV₁ = zero(V) | ||
| for (j, i) in enumerate(indV) | ||
| ΔV₁[:, i] .= view(ΔV, :, j) | ||
| end | ||
| end |
There was a problem hiding this comment.
| if indV == 1:p | |
| ΔV₁ = copy(ΔV) | |
| else | |
| ΔV₁ = zero(V) | |
| for (j, i) in enumerate(indV) | |
| ΔV₁[:, i] .= view(ΔV, :, j) | |
| end | |
| end | |
| ΔV₁ = similar(V) | |
| ΔV₁[:, indV] = ΔV | |
| zero!(view(ΔV₁, :, (length(indV) + 1):p)) |
same comment here
| # we cannot directly multiply Z * V' into ΔA, because we have to | ||
| # take the Hermitian part, and cannot apply project_hermitian! to | ||
| # the current contents of ΔA |
There was a problem hiding this comment.
Not really relevant for this PR, but I think this has come up somewhere before as well. Do you think we could benefit from a project_hermitian!(C, A, alpha, beta) approach, or is that really overkill?
Bumped into this while trying to port this over to TensorKit:
Other parts of the code use
ind = Colon()as default, and then first takeindV = axes(V, 2)[ind]before doing the check of the length (length(ind)fails ifind = Colon()).Here I just did the same.
I checked for the SVD gauge removal and was surprised that there is no
indargument there, @Jutho is this meant to be like this?