Skip to content

Bug fixes for e2e tests#739

Merged
04diiguyi merged 3 commits intomicrosoft:mainfrom
rigidit:users/rigidit/fix-ionq-test
Mar 31, 2026
Merged

Bug fixes for e2e tests#739
04diiguyi merged 3 commits intomicrosoft:mainfrom
rigidit:users/rigidit/fix-ionq-test

Conversation

@rigidit
Copy link
Copy Markdown
Contributor

@rigidit rigidit commented Mar 30, 2026

There is e2e test failing with ValueError: Probabilities do not add up to 1: defaultdict(<class 'int'>, {'0': 0.4991999864578247, '1': 0.4991999864578247}) that tests qiskit submission to ionq. To fix the test, we switch to 1e-2 in qiskit job's draw_random_sample to allow probability sums in the range [0.99, 1.01] to be normalized rather than raising an error.

Another e2e test failed when testing cirq.Circuit program run against quantinuum target, which caused by exception swallowed in first job.results call inside run method, and the fallback path then calls job.results on the same CirqJob again this time successfully and internally already returns a fully-converted cirq.ResultDict, but ater that there is target_obj._to_cirq_result call for the result and it fails wih AttributeError: 'ResultDict' object has no attribute 'items'. To fix this one we surface error for the CirqJob path immediately instead of silently falling into the wrong code path.

@rigidit rigidit requested a review from a team as a code owner March 30, 2026 19:00
@pavelbraginskiy
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@rigidit rigidit changed the title Switch to 1e-2 in qiskit job's draw random sample to fix e2e test Bug fixes for e2e tests Mar 31, 2026
@pavelbraginskiy
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@04diiguyi 04diiguyi merged commit 1b1ca3d into microsoft:main Mar 31, 2026
4 checks passed
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.

3 participants