KEMBAR78
Fix issue with `spin_op` result retrieval by 1tnguyen · Pull Request #1440 · NVIDIA/cuda-quantum · GitHub
Skip to content

Conversation

@1tnguyen
Copy link
Collaborator

Description

We have the logic to expand the term strings (used as index keys) for result look-up but it was limited to single-qubit cases (e.g., only expanding Z0 but not Z1 to the target number of qubits).

This caused the issue reported in #1396 whereby the second spin_op in that list is Z1. It wasn't expanded properly, hence reported as a zero result.

This PR fixed the issue and added a test based on the bug report.

Resolved #1396

@1tnguyen 1tnguyen added the bug fix To be listed under Bug Fixes in the release notes label Mar 25, 2024
Copy link
Collaborator

@bmhowe23 bmhowe23 left a comment

Choose a reason for hiding this comment

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

👍

Co-authored-by: Ben Howe <141149032+bmhowe23@users.noreply.github.com>
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Mar 25, 2024
@1tnguyen 1tnguyen merged commit 736dbb1 into NVIDIA:main Mar 25, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 2024
@bettinaheim bettinaheim added this to the release 0.7.1 milestone Apr 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug fix To be listed under Bug Fixes in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Batched measurement outputs dont allign to expected results

3 participants