NumPyEigensolver

class NumPyEigensolver(operator=None, k=1, aux_operators=None)[source]

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 MatrixOperator 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
  • operator (Union[OperatorBase, LegacyBaseOperator, None]) – Operator instance. If None is supplied it must be provided later before run() is called. Allowing None here permits the algorithm to be configured and used later when operator is available, say creating an instance an letting application stack use this algorithm with an operator it creates.

  • k (int) – How many eigenvalues are to be computed, has a min. value of 1.

  • aux_operators (Optional[List[Union[OperatorBase, LegacyBaseOperator, None]]]) – Auxiliary operators to be evaluated at each eigenvalue

Attributes

NumPyEigensolver.aux_operators

returns aux operators

NumPyEigensolver.k

returns k (number of eigenvalues requested)

NumPyEigensolver.operator

returns operator

NumPyEigensolver.random

Return a numpy random.

Methods

NumPyEigensolver.run()

Execute the classical algorithm.

NumPyEigensolver.supports_aux_operators()

If will process auxiliary operators or not