qiskit-community / qiskit-algorithms

A library of quantum algorithms for Qiskit.
https://qiskit-community.github.io/qiskit-algorithms/
Apache License 2.0
89 stars 43 forks source link

CI failing since scipy 1.14.0 released #182

Closed woodsp-ibm closed 7 hours ago

woodsp-ibm commented 1 week ago

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'