Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI failing since scipy 1.14.0 released #182

Closed
woodsp-ibm opened this issue Jun 25, 2024 · 2 comments · Fixed by #184
Closed

CI failing since scipy 1.14.0 released #182

woodsp-ibm opened this issue Jun 25, 2024 · 2 comments · Fixed by #184

Comments

@woodsp-ibm
Copy link
Member

Numpy eigensolver has failing code with the latest scipy 1.14.0 due to .H being removed. Apparently it was deprecated in 1.11.0. This affects tests using numpy (minimum) eigensolver. This only shows in >= Python 3.10 as lower versions (3.8 and 3.9) are not supported by this new version and so CI still uses a prior version there of scipy there.

       File "/home/runner/work/qiskit-algorithms/qiskit-algorithms/qiskit_algorithms/eigensolvers/numpy_eigensolver.py", line 258, in compute_eigenvalues
    eigvals, eigvecs = self._solve(operator)

      File "/home/runner/work/qiskit-algorithms/qiskit-algorithms/qiskit_algorithms/eigensolvers/numpy_eigensolver.py", line 143, in _solve
    eigval, eigvec = self._solve_sparse(op_matrix, self._k)

      File "/home/runner/work/qiskit-algorithms/qiskit-algorithms/qiskit_algorithms/eigensolvers/numpy_eigensolver.py", line 155, in _solve_sparse
    if (op_matrix != op_matrix.H).nnz == 0:

    AttributeError: 'csr_matrix' object has no attribute 'H'
```
    
@kifumi
Copy link

kifumi commented Jul 23, 2024

Hi, this issue still occurred with qiskit-algorithms v.0.3.0 and Scipy 1.14.0.
With Scipy 1.13.1, the error does not occur. Python version is 3.12.4.

@woodsp-ibm
Copy link
Member Author

Yes it will still fail with 0.3.0, the released version, as an updated version that includes this fix has not been released.

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 a pull request may close this issue.

2 participants