Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use numpy eigh instead of scipy eigh with driver kwarg
In Qiskit#5251 we updated the LAPACK driver used for the scipy hermitian optimized eigensovler to use 'evd' instead of the default 'ev'. However, this implicitly added a scipy minimum version of 1.5.0 because the driver kwarg was only added to the eigh() function in that release. [1] In that PR we didn't bump the minimum scipy version to reflect this. However, scipy 1.5.0 has a version conflict with our downstream users, mainly qiskit-aqua/qiskit-chemistry which use PySCF as an optional dependency. PySCF has a capped version of scipy in their requirements [2] which makes bumping our minimum scipy version intractable currently. To avoid this issue, this commit switches to use numpy's eigh() function [3] instead of scipy's. The numpy function uses the evd driver and was what we originally used in Qiskit#5251 but was switched to use scipy's eigh() with the driver kwarg to avoid bumping the minimum version of numpy. However, between bumping the minimum numpy version and bumping the minimum scipy version, the numpy version is less problematic. [1] https://docs.scipy.org/doc/scipy/reference/release.1.5.0.html#scipy-linalg-improvements [2] https://github.com/pyscf/pyscf/blob/v1.7.5/setup.py#L490 [3] https://numpy.org/doc/stable/reference/generated/numpy.linalg.eigh.html
- Loading branch information