Like the question. It seems that we can use the arpack to diagonalize the sparse matrix. But using arpack is quite complex. Are there any simpler ways to use arpack? If I want to obtain the first eigenvalue greater than zero and its corresponding wave function using arpack, how should I proceed?"
I think arpack has some examples. You can ask some AI to help you set things up, here is a link to get you started: https://grok.com/share/bGVnYWN5_924567ae-1844-448f-8fd9-032b85a7d091.
Could you perhaps try to be more specific about what part of using ARPACK you are struggling with? Have you been able to install the library and link it to your program? Are you looking for help on dealing with the reverse communication interface? As @certik said, a good place to start is looking at the documentation and the examples at GitHub - opencollab/arpack-ng: Collection of Fortran77 subroutines designed to solve large scale eigenvalue problems.
Iām not sure how familiar you are with Krylov methods, but ARPACK works by repeatedly computing matrix-vector products to build an approximation of your matrix. It uses a reverse communication interface, so for each iteration, ARPACK will ask you to perform some operation, for instance, computing Ax=y and returning the result. To target eigenvalues near a specific value \sigma, it is usually a good idea to use the shift and invert transformation, so instead of computing Ax=y at each iteration, you need to compute (A-\sigma I)^{-1}x = y by solving the linear system (A-\sigma I ) y= x .
The simplest way to use ARPACK for Hermitian problems is probably to use the eigsh function in scipy.sparse.linalg, it hides all the details of ARPACK and can take care of the shift and invert transformation for you, but you would have to transfer your matrix to Python first.