-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
extend Cholesky decomposition method for finite fields #39200
base: develop
Are you sure you want to change the base?
extend Cholesky decomposition method for finite fields #39200
Conversation
Documentation preview for this PR (built with commit 704ae31; changes) is ready! 🎉 |
caed579
to
f2f35b7
Compare
I really dislike these apply-suggestion-commits with a completely useless commit message. Could you please squash and rebase? It makes it easier to see which changes have been done and looking through the logs much later. |
add hermitian_decomposition method given a Hermitian matrix U, returns a matrix A such that U = AA* use translated GAP source code for BaseChangeCanonical Co-Authored-By: Travis Scrimshaw <clfrngrown@aol.com>
6300bae
to
a8cd89e
Compare
Sure. I agree, the commit messages are pretty useless. I've squashed the commits here. Which branch should I rebase on? I rebased PR#38455 on this one (PR#39200) already. |
Thanks. Sorry, I misspoke slightly, I meant force-push.You will need to rebase #38455 again though… |
I don't think this handles the 1x1 case, so I'll add a fix. |
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
…alters/sage into hermitian_decomposition
@tscrim How do I squash these commits given there's a merge commit? We may've done this before, but I don't see how. |
I would just rebase the entire branch over the latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few more details, modulo making row
0-based.
src/sage/matrix/matrix2.pyx
Outdated
row += 1 | ||
|
||
# Look for a non-zero element on the main diagonal, starting from `row` | ||
i = row - 1 # Adjust for zero-based indexing in Sage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is possible as we mutate i
compared to row
.
change \ast to * for consistency Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
add word "package" to GAP ``forms`` Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
@tscrim I've refactored it so that row is initialized to -1, so that many |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I look into the Cholesky decomposition and its doc, I am thinking we should actually call this method cholesky_extended()
for "extended Cholesky decomposition". Or possibly accessing this via cholesky(extended=True)
(with the default being False
), in which case this method would be called something like _cholesky_extended_ff
. I am actually leaning towards the latter right now since it is the most natural. Sorry for a somewhat big change so far along.
This paper is also somewhat relevant: journal version; [arXiv version](https://arxiv.org/abs/2202.04012v1.
yes, just forgot to update this Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
add two examples of a Hermitian decomposition, one of which is not upper/lower triangular (so would be impossible with Cholesky decomposition)
replace always True with explicit conditional Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
remove this break conditional in favor of conditional for while loop Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
add a SEEALSO since this is an extended form of the Cholesky decomposition Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
I'm happy to have this accessed via |
this method for decomposition a Hermitian matrix U = AA* is similar in spirit to the Cholesky decomposition, but extends it to work over finite fields of square order.
…alters/sage into hermitian_decomposition
Okay, I have moved the code into cholesky(). It may require some changes. I believe Dima and I did look at that paper when trying to figure this out, but it didn't have exactly this method. Dima found it in GAP. |
Given a Hermitian matrix$U$ over $GF(q^2)$ , returns a matrix $A$ such that $U = AA^\ast$ , where $^\ast$ denotes conjugate-transpose.
Note that the Cholesky decomposition is meant for characteristic zero, and also only returns a lower/upper triangular matrix.
📝 Checklist
⌛ Dependencies