class QEOM(ground_state_solver, estimator, excitations='sd', aux_eval_rules=None, *, tol=1e-06)[ソース]#

ベースクラス: ExcitedStatesSolver

The calculation of excited states via the qEOM algorithm.

This algorithm approximates the excited-state properties of a problem using additional measurements on the ground state provided by a GroundStateSolver object. The precision of the GroundStateSolver.solve method for the ground state approximate directly affects the precision of the qEOM algorithm for the same problem. The excitations are used to build a linear subspace in which an eigenvalue problem for the projected Hamiltonian will be solved. This method typically works well for calculating the lowest-lying excited states of a problem. The excited-state energies are calculated by default in this algorithm for all excited states. Auxiliary observables can be specified to the solve method along with auxiliary evaluation rules of the QEOM object.

For more details, please refer to https://arxiv.org/abs/1910.12890.

The following attributes can be read and updated once the QEOM object has been constructed.


The excitations to be included in the eom pseudo-eigenvalue problem.


The rules determining how observables should be evaluated on excited states.


The tolerance threshold for the qEOM eigenvalues.

  • ground_state_solver (GroundStateSolver) – A GroundStateSolver object. The qEOM algorithm will use this ground state to compute the EOM matrix elements.

  • estimator (BaseEstimator) – The BaseEstimator to use for the evaluation of the qubit operators at the ground state ansatz. If the internal solver provided to the GroundStateSolver also uses a BaseEstimator primitive, you can provide the same estimator instance here.

  • excitations (str | int | list[int] | Callable[[int, tuple[int, int]], list[tuple[tuple[int, ...], tuple[int, ...]]]]) –

    The excitations to be included in the eom pseudo-eigenvalue problem.


    which contains the types of excitations. Allowed characters are + s for singles + d for doubles + t for triples + q for quadruples


    a single, positive integer which denotes the number of excitations (1 == s, etc.)


    a list of positive integers generalizing the above


    a function which is used to generate the excitations. The callable must take the __keyword__ arguments num_spin_orbitals and num_particles (with identical types to those explained above) and must return a list[tuple[tuple[int, …], tuple[int, …]]]. For more information on how to write such a callable refer to the default method generate_fermionic_excitations().

  • aux_eval_rules (EvaluationRule | dict[str, list[tuple[int, int]]] | None) –

    The rules determining how observables should be evaluated on excited states. By default, none of the auxiliary operators are evaluated on none of the excited states.


    specific predefined rules. Allowed rules are: + ALL to compute all expectation values and all transition amplitudes. + DIAG to only compute expectation values.

    dict[str, list[tuple[int, int]]]:

    Dictionary mapping valid auxiliary operator’s name to lists of tuple (i, j) specifying the indices of the excited states to be evaluated on.

  • tol (float) – Tolerance threshold for the qEOM eigenvalues. This plays a role when one excited state approaches the ground state, in which case it is best to avoid manipulating very small absolute values.



Returns the qubit_mapper object defined in the ground state solver.


Returns the solver object defined in the ground state solver.


get_qubit_operators(problem, aux_operators=None)[ソース]#

Gets the operator and auxiliary operators, and transforms the provided auxiliary operators. If the user-provided aux_operators contain a name which clashes with an internally constructed auxiliary operator, then the corresponding internal operator will be overridden by the user-provided operator.

Note that this methods performs a specific treatment of the symmetries required by the qEOM calculation.


Tuple of the form (Qubit operator, Auxiliary operators).


tuple[qiskit.quantum_info.operators.symplectic.sparse_pauli_op.SparsePauliOp, dict[str, qiskit.quantum_info.operators.symplectic.sparse_pauli_op.SparsePauliOp] | None]

solve(problem, aux_operators=None)[ソース]#

Run the excited-states calculation.

Construct and solve the EOM pseudo-eigenvalue problem to obtain the excitation energies and the excitation operators expansion coefficients.


An interpreted EigenstateResult. For more information see also interpret(). The EigenstateResult is constructed from a QEOMResult instance which holds additional information specific to the qEOM problem.