You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use linalg.Qr, then the index direction is always from the Q tensor to the R tensor. I want to have it the other way round for an algorithm. This is even more important when Q or R would have only incoming or outgoing bonds, which is technically not allowed in Cytnx (but still works in the current implementation, see #497).
I found one solution that does not change the direction of a single bond (the latter is not compatible with symmetries):
Transpose the initial tensor (which redirects ALL bonds)
Do the Qr
Transpose Q and R
This is, however, not so clean to me. Ideally, we do not want to change the directions of indices if there is not a good reason for it (with Dagger = conjugate transpose being the only good reason I come up with).
There would be 2 possibilities to fix this:
i) Implement Lq: M = L * Q with bond direction from Q to L. Then, one could permute the indices of the initial tensor before using Lq and have the effect needed, a QR decomposition with reversed internal index. This idea works for Svd already: one can permute the initial indices and exchange the meaning of U and Vt.
ii) Have an additional argument in tensor decomposition functions (Qr, Svd, Eig, ...) which defines if the direction is from left to right or the other way round
The text was updated successfully, but these errors were encountered:
If I use
linalg.Qr
, then the index direction is always from theQ
tensor to theR
tensor. I want to have it the other way round for an algorithm. This is even more important whenQ
orR
would have only incoming or outgoing bonds, which is technically not allowed in Cytnx (but still works in the current implementation, see #497).I found one solution that does not change the direction of a single bond (the latter is not compatible with symmetries):
Qr
Q
andR
This is, however, not so clean to me. Ideally, we do not want to change the directions of indices if there is not a good reason for it (with
Dagger
= conjugate transpose being the only good reason I come up with).There would be 2 possibilities to fix this:
i) Implement
Lq
:M = L * Q
with bond direction fromQ
toL
. Then, one could permute the indices of the initial tensor before usingLq
and have the effect needed, aQR
decomposition with reversed internal index. This idea works forSvd
already: one can permute the initial indices and exchange the meaning ofU
andVt
.ii) Have an additional argument in tensor decomposition functions (
Qr
,Svd
,Eig
, ...) which defines if the direction is from left to right or the other way roundThe text was updated successfully, but these errors were encountered: