Not to mention it’s diagonal plus convolution, so you can use iterative eigensolvers+FFTs+diagonal preconditioning to solve it at a cost linear in the number of unknowns. I imagine this comes from a band structure computation in quantum mechanics? You might be able to adapt GitHub - JuliaMolSim/DFTK.jl: Density-functional toolkit to your purposes (see eg Custom potential · DFTK.jl for how to incorporate a custom potential), although that might be overkill for this relatively simple problem.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Julia equivalent for python scipy.optimize.fsolve | 29 | 4818 | September 7, 2020 | |
| General eigen solution for sparse matrices | 17 | 3422 | August 14, 2018 | |
| Julia is slower than matlab when it comes to matrix diagonalization? | 39 | 1910 | January 14, 2024 | |
| How to optimize simple matrix equation solving | 16 | 2424 | August 28, 2019 | |
| Fastest way to calculate eigenvectors of 4x4 matrix | 21 | 987 | July 13, 2025 |