Skip to content

Conversation

mtreinish
Copy link
Member

@mtreinish mtreinish commented Oct 20, 2020

Summary

In #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 #5251 but was switched to use scipy's
eigh() with the driver kwarg to avoid bumping the minimum version of
numpy. However, this wasn't actually required and was caused by me
misreading 1.8.0 as 1.18.0 so using the numpy version of the eigh()
function will fix the issue for our users that are running with PySCF.

Details and comments

[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

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
@mtreinish
Copy link
Member Author

Oh, I'm confusing 1.8.0 and 1.18.0. Our previous minimum version was 1.17.0 and the function was added in 1.8.0 not 1.18.0. Let me remove the release note and version bump since they're not necessary.

Copy link
Member

@ajavadia ajavadia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok if this doesn't require a version bump then we're good

@mergify mergify bot merged commit 837e79b into Qiskit:master Oct 21, 2020
@mtreinish mtreinish deleted the use-numpy-eigh branch October 21, 2020 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants