Skip to content

return a single results object instead of always a list - IonQ #7285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

splch
Copy link
Contributor

@splch splch commented Apr 18, 2025

ionq results api can return a list of results or a single result, so this change allows for either a list or single element to be returned from the results endpoint

@splch splch requested review from dabacon, vtomole and a team as code owners April 18, 2025 21:04
Copy link

codecov bot commented Apr 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.67%. Comparing base (5112418) to head (899cb05).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7285   +/-   ##
=======================================
  Coverage   98.66%   98.67%           
=======================================
  Files        1106     1106           
  Lines       96086    96102   +16     
=======================================
+ Hits        94808    94824   +16     
  Misses       1278     1278           

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

@@ -296,3 +296,28 @@ def test_service_remote_host_default():
def test_service_remote_host_from_env_var_cirq_ionq_precedence():
service = ionq.Service(api_key='tomyheart')
assert service.remote_host == 'http://example.com'


def test_service_run_unwraps_single_result_list():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a test for the correctness of the order of multiple results being returned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants