-
Notifications
You must be signed in to change notification settings - Fork 13
Sparse matrix capabilities #82
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
Conversation
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.
Pull Request Overview
This PR introduces comprehensive sparse matrix capabilities to the XDiag library, adding support for coordinate (COO), compressed sparse row (CSR), and compressed sparse column (CSC) matrix formats. The implementation allows algorithms to use either on-the-fly matrix operations or precomputed sparse matrices for improved performance and memory efficiency.
Key changes include:
- Implementation of three sparse matrix formats with both 32-bit and 64-bit integer support
- Integration of sparse matrices with existing algorithms (eigenvalue computation, time evolution)
- Extensive testing and benchmarking infrastructure for sparse matrix operations
Reviewed Changes
Copilot reviewed 92 out of 191 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| xdiag/algebra/sparse/*.hpp/.cpp | New sparse matrix types and operations (COO, CSR, CSC formats) |
| xdiag/algebra/apply_dispatch.* | Unified dispatch system replacing old fill-based approach |
| xdiag/algebra/matrix.cpp | Updated to use new dispatch system |
| tests/algebra/test_sparse_matrix.cpp | Comprehensive testing for sparse matrix functionality |
| julia/src/algebra/sparse/*.cpp | Julia bindings for sparse matrix operations |
| examples/usage_examples/main.* | Updated examples showing sparse matrix usage |
Comments suppressed due to low confidence (1)
xdiag/algebra/sparse/coo_matrix_fill.cpp:1
- Logic error: comparing V.n_rows with itself. Should be comparing V.n_rows with W.n_rows.
// SPDX-FileCopyrightText: 2025 Alexander Wietek <[email protected]>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.