Skip to content

Adds support for retrieving shotwise output on IonQ devices#7738

Draft
radumarg wants to merge 14 commits into
quantumlib:mainfrom
radumarg:shotwise-output
Draft

Adds support for retrieving shotwise output on IonQ devices#7738
radumarg wants to merge 14 commits into
quantumlib:mainfrom
radumarg:shotwise-output

Conversation

@radumarg
Copy link
Copy Markdown
Contributor

@radumarg radumarg commented Nov 5, 2025

Summary: adds support for shotwise output

Details and comments:

  • add memory argument to service, to control the retrieval of shotwise results from IonQ servers. By default memory is False (opt-in behavior).
  • retrieve shots from IonQ for QPU jobs and noisy simulator jobs when memory is True
  • do not attempt retrieve shots for ideal simulations since these do not exists remotely
  • when "memory" is False and shots are needed, the current behavior where shots are generated by sampling the probability distribution will take over
  • for unlikely 4xx/5xx errors on retrieving shots a warning will be generated but job will not fail, shots will be instead generated in software for that particular job

@github-actions github-actions Bot added the size: M 50< lines changed <250 label Nov 5, 2025
@github-actions github-actions Bot added size: L 250< lines changed <1000 and removed size: M 50< lines changed <250 labels Nov 13, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.63%. Comparing base (bde5ffa) to head (36be425).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7738      +/-   ##
==========================================
- Coverage   99.63%   99.63%   -0.01%     
==========================================
  Files        1110     1110              
  Lines      100430   100490      +60     
==========================================
+ Hits       100068   100124      +56     
- Misses        362      366       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@radumarg radumarg changed the title Start working on shotwise output. Add support for shotwise output. Nov 27, 2025
@radumarg radumarg changed the title Add support for shotwise output. Adds support for retrieving shotwise output. Nov 27, 2025
@radumarg radumarg marked this pull request as ready for review November 27, 2025 11:14
@radumarg radumarg requested review from a team, dabacon and vtomole as code owners November 27, 2025 11:14
@mhucka
Copy link
Copy Markdown
Contributor

mhucka commented Feb 18, 2026

@radumarg there are some merge conflicts; whenever you get a chance, could you look into them? (No pressure intended; I'm just going around all PRs and checking statuses.)

@mhucka mhucka changed the title Adds support for retrieving shotwise output. Adds support for retrieving shotwise output on IonQ devices Feb 18, 2026
@mhucka mhucka moved this to Nudged in Follow-up tracker Feb 18, 2026
@radumarg radumarg marked this pull request as draft March 9, 2026 12:20
@radumarg
Copy link
Copy Markdown
Contributor Author

radumarg commented Mar 9, 2026

@mhucka Fixed the merged issues but converted back to Draft PR because the shot-wise output @ionq was not yet released in production. Will convert back to regular PR when shot-wise output will become available.

@splch
Copy link
Copy Markdown
Contributor

splch commented May 14, 2026

Cross-SDK we standardized on memory kwarg, off by default. To converge:

  1. Add memory: bool = False on Service.create_job()/run(), thread to Job.
  2. Gate the fetch in job.py:259-263 on memory and (qpu_or_noisy).
  3. Replace the bare except: on job.py:268 with except (IonQException, requests.RequestException) + warnings.warn(...).
  4. Add a memory=False default test confirming no GET to /results/shots.
  5. Rebase and undraft.

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

Labels

interface/cirq-ionq size: L 250< lines changed <1000

Projects

Status: Nudged

Development

Successfully merging this pull request may close these issues.

3 participants