Skip to content
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

LQ decomposition #498

Open
manuschneider opened this issue Nov 7, 2024 · 0 comments
Open

LQ decomposition #498

manuschneider opened this issue Nov 7, 2024 · 0 comments
Labels
Low priority An issue which is not urgent proposal feature proposal

Comments

@manuschneider
Copy link
Collaborator

manuschneider commented Nov 7, 2024

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):

  1. Transpose the initial tensor (which redirects ALL bonds)
  2. Do the Qr
  3. 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

@manuschneider manuschneider added proposal feature proposal Low priority An issue which is not urgent labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Low priority An issue which is not urgent proposal feature proposal
Projects
None yet
Development

No branches or pull requests

1 participant