Improve failed-job behavior for qiskit-experiments (`error_message()`)

Open
#10 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start with QCDLJob.result() and the underlying QCDL problems' Future.exception() values. Read qiskit-experiments' ExperimentData._add_job_data and its failure analysis to compare jobs whose result() raises with jobs reporting ERROR and error_message(). Done means error_message() returns the aggregated failure reasons, while result() behavior is deliberately confirmed and the failure path works with qiskit-experiments.

Written by the indexing model from the issue text.

Description

enhancement

QCDLJob surfaces failures by raising JobError from result(). That is consistent with Qiskit's JobV1 API.

However, qiskit-experiments seem to expect a job to terminate in JobStatus.ERROR state, with error_message() that reports the error.

The happy path with qiskit-experiments is verified to work; the failure path is not. We need to:

  • Check how current qiskit-experiments (ExperimentData._add_job_data / failure analysis) treats a job whose result() raises vs. one that reports ERROR + error_message().
  • Implement error_message() -> str | None on QCDLJob, aggregating the failure reasons of the underlying QCDL problems (Future.exception()).
  • Decide whether result() should keep raising (probably yes — standard Qiskit behavior) with error_message() as the non-raising complement.
Dominant language
Python
Stars
39
Forks
22
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dwavesystems/dwave-qiskit-plugin

All issues in dwavesystems/dwave-qiskit-plugin

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.