Skip to content

Commit

Permalink
Merge 2ce7362 into 4247d06
Browse files Browse the repository at this point in the history
  • Loading branch information
woodsp-ibm committed Jun 29, 2024
2 parents 4247d06 + 2ce7362 commit ca1a4b7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .pylintdict
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ configs
confint
córcoles
crs
csr
currentmodule
customizable
cvar
Expand Down
4 changes: 2 additions & 2 deletions qiskit_algorithms/eigensolvers/numpy_eigensolver.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2022, 2023.
# (C) Copyright IBM 2022, 2024.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand Down Expand Up @@ -152,7 +152,7 @@ def _solve(self, operator: BaseOperator) -> tuple[np.ndarray, np.ndarray]:

@staticmethod
def _solve_sparse(op_matrix: scisparse.csr_matrix, k: int) -> tuple[np.ndarray, np.ndarray]:
if (op_matrix != op_matrix.H).nnz == 0:
if (op_matrix != op_matrix.getH()).nnz == 0:
# Operator is Hermitian
return scisparse.linalg.eigsh(op_matrix, k=k, which="SA")
else:
Expand Down
6 changes: 6 additions & 0 deletions releasenotes/notes/numpy_2.0_fix-c29681db4874eee8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Compatibility fix for scipy 1.14 version. csr_matrix.H had been deprecated
and was removed. The :class:`.NumPyEigensolver` algorithm, which
had been using that, has been updated to use an alternative.

0 comments on commit ca1a4b7

Please sign in to comment.