help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Different eigenvectors obtained from gsl_eigen_hermv compared with scipy


From: Jiasen Guo
Subject: Different eigenvectors obtained from gsl_eigen_hermv compared with scipy.linalg.eigh
Date: Wed, 3 Jan 2024 23:39:34 -0500

Dear all,
I am having an issue using gsl_eigen_hermv to reproduce a complex hermitian
eigenvalue problem previously solved with scipy.linalg.eigh. I have
included the cpp and python code in the attached zip file. Basically, the
matrix is created in cpp and solved using gsl. the same matrix (*real.csv*
for the real part and *imag.csv* for the imaginary part) is dumped out and
solved in Python again. While I get the same eigenvalues from the two
approaches, the eigenvalues are, however, different. And if I calculated
the module of the complex numbers in the eigenvector, then they are
identical from both methods.

I use g++ --std=c++11 test.cpp -o test.o -lgsl -lgslcblas for compilation.
Please help me understand what is the problem here. Thanks for your kind
help.

Best,
Jiasen

Attachment: test.zip
Description: Zip compressed data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]