Skip to content

Allow loading a MinimumEigensolverResult directly into the MinimumEigenOptimizer  #325

@Cryoris

Description

@Cryoris

What should we add?

The MinimumEigenOptimizer internally calls a minimum eigensolver and then postprocesses the obtained MinimumEigensolverResult in the context of the quadratic program that we try to solve. It would be great if we could directly pass in a MinimumEigensolverResult into this postprocessing part if we have it already, like:

optimization_result = MinimumEigenOptimizer.process_result(minimum_eigensolver_result, quadratic_program)

This would be particularly useful in context of the QAOA and VQE runtimes as jobs can get stuck locally but we can easily get the result back from the job ID on the quantum experience (see also qiskit-community/qiskit-nature#479). With the feature here we could then have a workflow like

job_id = # my job ID from the quantum experience
vqe_result = VQEClient.retrieve_result(provider, job_id)
opt_result = MinimumEigenOptimizer.process_result(vqe_result, quadratic_program)

Names or function calls here are just suggestions 🙂

The implementation should be rather straightforward since we could restructure MinimumEigenOptimizer.solve to something like

def solve(self, problem):
    # same conversions as now
    problem_ = self._convert(problem, self._converters)
    operator, offset = problem_.to_ising()
        
    # just run MES, no interpretation 
    mes_result = self._solve_mes(operator, offset, problem_, problem)
        
    # interpretation in a separate function
    result = self.process_result(problem)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions