-
Notifications
You must be signed in to change notification settings - Fork 177
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
[custatevec] getStateData
to return data consistent with qpp and cudaq::from_state
#582
Merged
amccaskey
merged 4 commits into
NVIDIA:main
from
1tnguyen:tnguyen/custatevec_getStateData_endian
Aug 29, 2023
Merged
[custatevec] getStateData
to return data consistent with qpp and cudaq::from_state
#582
amccaskey
merged 4 commits into
NVIDIA:main
from
1tnguyen:tnguyen/custatevec_getStateData_endian
Aug 29, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…q::from_state Since we now have `cudaq::from_state`, which assumes MSB bit-ordering for its input, make `CuStateVecCircuitSimulator::getStateData` to return the state data in that bit ordering as well. This will make it consistent with qpp as well as the `cudaq::from_state` convention. Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
bmhowe23
reviewed
Aug 29, 2023
…tate` Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
`mEntry` returns `std::pow(-1, sum_of_ones)`, i.e., expected {0, +1, -1} but the return type is `std::size_t`. In x86, all seems to work just fine when mEntry returned value is casted to an int. However, in ARM, that -1 size_t is converted to a 0! Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
amccaskey
approved these changes
Aug 29, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix
1tnguyen
added
bug fix
To be listed under Bug Fixes in the release notes
release notes
Changes need to be captured in the release notes
labels
Sep 25, 2023
bettinaheim
removed
the
release notes
Changes need to be captured in the release notes
label
Sep 27, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Since we now have
cudaq::from_state
, which assumes MSB bit-ordering for its input, this PR makesCuStateVecCircuitSimulator::getStateData
to return the state data in that bit ordering.This will make it consistent with qpp as well as the
cudaq::from_state
convention.Tested by: running
test_runtime_custatevec-fp32
:KernelsTester.checkFromState
test passed.