Skip to content
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

Fixed an oversight in PR#1002 #1430

Merged
merged 2 commits into from
Mar 22, 2024
Merged

Conversation

1tnguyen
Copy link
Collaborator

Description

There is an oversight in constructing the return observe_result only containing the overall expectation value.

In particular, this diff in PR#1002:

https://github.com/NVIDIA/cuda-quantum/pull/1002/files#diff-8e5c3472b761fa649ea9d6448655c52b694663a809e4ff569c26e1daee6813cb

we didn't construct the equivalent sample_result with a single ExecutionResult on the register named H.to_string(false) when the backend only return a single expectation value.

Hence, this fixes that oversight and adds a test case.

Note: the implementation in custatevec already had the full set of sample_result's.

There is an oversight in constructing the return `observe_result` only
containing the overall expectation value.

Our code requires that it must contain a sample_result with a single
ExecutionResult on the register named with the spin_op string.

Hence, fixing the oversight and add a test for this.
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 22, 2024
@1tnguyen 1tnguyen merged commit 128ef44 into NVIDIA:main Mar 22, 2024
133 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 2024
@bettinaheim bettinaheim added this to the release 0.7.1 milestone Apr 17, 2024
@bettinaheim bettinaheim added the no release notes Don't list this PR in the release notes label Apr 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
no release notes Don't list this PR in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants