NumPyEigensolver¶
-
class
NumPyEigensolver
(k=1, filter_criterion=None)[source]¶ Bases:
qiskit.algorithms.eigen_solvers.eigen_solver.Eigensolver
The NumPy Eigensolver algorithm.
NumPy Eigensolver computes up to the first \(k\) eigenvalues of a complex-valued square matrix of dimension \(n \times n\), with \(k \leq n\).
Note
Operators are automatically converted to SciPy’s
spmatrix
as needed and this conversion can be costly in terms of memory and performance as the operator size, mostly in terms of number of qubits it represents, gets larger.- Parameters
k (
int
) – How many eigenvalues are to be computed, has a min. value of 1.filter_criterion (
Optional
[Callable
[[Union
[List
,ndarray
],float
,Optional
[List
[float
]]],bool
]]) – callable that allows to filter eigenvalues/eigenstates, only feasible eigenstates are returned in the results. The callable has the signature filter(eigenstate, eigenvalue, aux_values) and must return a boolean to indicate whether to keep this value in the final returned result or not. If the number of elements that satisfies the criterion is smaller than k then the returned list has fewer elements and can even be empty.
Methods
Computes eigenvalues.
Whether computing the expectation value of auxiliary operators is supported.
Attributes
-
filter_criterion
¶ returns the filter criterion if set
- Return type
Optional
[Callable
[[Union
[List
,ndarray
],float
,Optional
[List
[float
]]],bool
]]
-
k
¶ returns k (number of eigenvalues requested)
- Return type
int