Skip to content

Improve failed-job behavior for qiskit-experiments (error_message()) #10

Description

@randomir

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions