QbraidJob.result() drops the finished circuits' results of a FAILED batch job
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- backend-api-design
Research direction
Start in qbraid/runtime/native/job.py at QbraidJob.result() and compare its handling of COMPLETED jobs with the FAILED batch behavior described for app/routers/jobs_result.py. Verify that a failed batch with available results returns per-circuit results, while a failed result fetch falls back to empty results; BatchResult.success should remain false.
Written by the indexing model from the issue text.
Description
QbraidJob.result() only downloads results when the job is COMPLETED. A batch job that ends FAILED because some of its circuits failed gets results=[empty] * num_circuits, so the counts of the circuits that did finish are lost. Those circuits are charged.
The platform does serve them. runtime-api returns the stored BatchResult for a FAILED batch (app/routers/jobs_result.py: has_results = job.status == COMPLETED or (is_batch and job.status == FAILED)), with each circuit's own status, counts or statusMsg. qBraid's simulator batches already settle like this, e.g. 2 of 3 circuits completed: FAILED, completedCircuits: 2, cost charged for the 2.
Affected: qbraid==0.13.0 and main (qbraid/runtime/native/job.py, QbraidJob.result).
Fix: for a batch job (numCircuits > 1) that ended FAILED, call get_job_result and build per-circuit results from it, falling back to the empty results only if that call fails. BatchResult.success can stay False.
- Dominant language
- Python
- Stars
- 117
- Forks
- 66
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from qBraid/qBraid
-
Test order: test_run_forbidden_kwarg leaves Mock registered as a program typePossibly taken @VanshajPoonia claimed this 3 days ago. Openbug 🐛 testing 🧪
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug 🐛
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Pasqal: a {"sequence_builder": ...} payload sent as a string reaches Pasqal still wrappedPossibly taken @ryanhill1 claimed this 21 days ago. Openbug 🐛
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug 🐛 transpiler 🚊
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
Similar issues
-
auto-reported bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
stix-atlas.json: the same relationship id is used for several different mitigates relationshipsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
backend bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
nolte/kamerplanter#3193 ·
Maintainers usually reply within 1 day
-
soup prune-prompt exits 1 after writing its output on a file over 100,000 rows, and reports a capped row count otherwisePossibly taken @abdulwaarith0 claimed this today. Openneeds-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
MakazhanAlpamys/Soup#3690 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day