question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`GroundStateEigensolver.solve()` should be async and return a job id when using real backend

See original GitHub issue

What is the expected enhancement?

Even with Qiskit Runtime, a typical VQE program can take more than one hour to run on a real backend, plus queue time. The currently workflow where result has to wait until solver.solve(problem) is done is not very friendly for real backend. I would like to suggest a new workflow that is similar to backend.run(circuit) for running QASM jobs.

Current workflow

runtime_vqe_groundstate_solver = GroundStateEigensolver(qubit_converter, runtime_vqe)
runtime_vqe_result = runtime_vqe_groundstate_solver.solve(problem)

Proposed workflow

runtime_vqe_groundstate_solver = GroundStateEigensolver(qubit_converter, runtime_vqe)
runtime_vqe_job = runtime_vqe_groundstate_solver.solve(problem)
runtime_vqe_result = runtime_vqe_job.get_result()

Or create a new method submit_job (or other names) if we don’t want to break current API.

runtime_vqe_groundstate_solver = GroundStateEigensolver(qubit_converter, runtime_vqe)
runtime_vqe_job = runtime_vqe_groundstate_solver.submit_job(problem)
runtime_vqe_result = runtime_vqe_job.get_result()

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mrossinekcommented, Nov 14, 2022

I think now that the refactoring to the primitives is complete, this issue can be closed.

As per the runtime session question, this is off-topic for this thread and (if not yet answered via other channels) should be picked up elsewhere 👍

1reaction
woodsp-ibmcommented, Apr 27, 2022

I will note that the intent going forwards is to move the algorithms over to using the primitives. At this point primitives define an interface and whether they are purely local code or code going over to use some remote backend will end up at the level of the primitive. At this point I would argue the primitives more represent the fundamental interface and should ensure friendliness to the backend, whatever that means, as part of their task of improving overall performance etc

Read more comments on GitHub >

github_iconTop Results From Across the Web

qiskit Changelog - PyUp.io
- Fixes a bug where numpy integer objects were causing integer-based isinstance checks to fail. This also avoids such problems by explicitly converting...
Read more >
Qiskit Backends: what they are and how to work with them
Returns True if successful. backend() : The backend instance which created the job. job_id() : a string the IBM Q API uses to...
Read more >
Example: Running Jobs on Qiskit Backends - True-Q
Qiskit backends accept job requests that contain one or more circuits to be run at ... by True-Q™ diagnostic protocols) must be batched...
Read more >
My Site: Wrap site title to next line instead of truncating - Wordpress ...
`GroundStateEigensolver.solve()` should be async and return a job id when using real backend, 4, 2021-11-26, 2022-10-05. Stop running workspaces on log out ...
Read more >
qiskit-nature - bytemeta
Question on UCCSD with VQEClient/VQEProgram runtime ... `GroundStateEigensolver.solve()` should be async and return a job id when using real backend.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found