dwavesystems / dwavesystems/dwave-qiskit-plugin

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

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
37
Forks
22
Avg merge
2d 14h
Merged PRs (30d)
7

Description

`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.

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.