qiskit.chemistry.algorithms.NumPyEigensolverFactory
class NumPyEigensolverFactory(filter_criterion=None, k=100, use_default_filter_criterion=False)
A factory to construct a NumPyEigensolver.
Parameters
- filter_criterion (
Optional
[Callable
[[Union
[List
,ndarray
],float
,Optional
[List
[float
]]],bool
]]) – callable that allows to filter eigenvalues/eigenstates. The minimum eigensolver is only searching over feasible states and returns an eigenstate that has the smallest eigenvalue among feasible states. The callable has the signature filter(eigenstate, eigenvalue, aux_values) and must return a boolean to indicate whether to consider this value or not. If there is no feasible element, the result can even be empty. - use_default_filter_criterion (
bool
) – Whether to use default filter criteria or not - k (
int
) – How many eigenvalues are to be computed, has a min. value of 1. - use_default_filter_criterion – whether to use the transformation’s default filter criterion if
filter_criterion
isNone
.
__init__
__init__(filter_criterion=None, k=100, use_default_filter_criterion=False)
Parameters
- filter_criterion (
Optional
[Callable
[[Union
[List
,ndarray
],float
,Optional
[List
[float
]]],bool
]]) – callable that allows to filter eigenvalues/eigenstates. The minimum eigensolver is only searching over feasible states and returns an eigenstate that has the smallest eigenvalue among feasible states. The callable has the signature filter(eigenstate, eigenvalue, aux_values) and must return a boolean to indicate whether to consider this value or not. If there is no feasible element, the result can even be empty. - use_default_filter_criterion (
bool
) – Whether to use default filter criteria or not - k (
int
) – How many eigenvalues are to be computed, has a min. value of 1. - use_default_filter_criterion – whether to use the transformation’s default filter criterion if
filter_criterion
isNone
.
Methods
__init__ ([filter_criterion, k, …]) | type filter_criterionOptional [Callable [[Union [List , ndarray ], float , Optional [List [float ]]], bool ]] |
get_solver (transformation) | Returns a NumPyEigensolver with the desired filter |
Attributes
filter_criterion | returns filter criterion |
k | returns k (number of eigenvalues requested) |
use_default_filter_criterion | returns whether to use the default filter criterion |
filter_criterion
returns filter criterion
Return type
Callable
[[Union
[List
, ndarray
], float
, Optional
[List
[float
]]], bool
]
get_solver
get_solver(transformation)
Returns a NumPyEigensolver with the desired filter
Parameters
transformation (Transformation
) – a fermionic/bosonic qubit operator transformation.
Return type
Eigensolver
Returns
A NumPyEigensolver suitable to compute the ground state of the molecule transformed by transformation
.
k
returns k (number of eigenvalues requested)
Return type
int
use_default_filter_criterion
returns whether to use the default filter criterion
Return type
bool