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

Fixes for NoiseModel when using with fp32 targets #2672

Merged
merged 3 commits into from
Mar 1, 2025

Conversation

1tnguyen
Copy link
Collaborator

Description

  • parameters was defined as a vector<double>; hence we need to cast if cudaq::real is float.

  • get_channel using params type to deduct the variant type is not reliable; could lead to bad variant access. Hence, perform a holds_alternative check before calling std::get. If needed, perform a type casting to retrieve the correct variant type.

@1tnguyen 1tnguyen force-pushed the tnguyen/apply-noise-fix branch from f9f6d57 to 6f41b89 Compare February 28, 2025 06:37
github-actions bot pushed a commit that referenced this pull request Feb 28, 2025
Copy link

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

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.

LGTM, although I'm a bit curious why the cusvsim fp32 target that I used for testing didn't show any problems in the local testing I did. If there is a set of tests I missed, please let me know for next time. Thanks!

@1tnguyen
Copy link
Collaborator Author

LGTM, although I'm a bit curious why the cusvsim fp32 target that I used for testing didn't show any problems in the local testing I did. If there is a set of tests I missed, please let me know for next time. Thanks!

Actually, it was the 'enhanced' noise_tester.cpp that caught this error (checkFineGrainArg and checkFineGrainVec).

In the latest mgpu update, I added a CMake change to force all the test cases in that file to be executed on all downstream mgpu backends, so we'll have better coverage.

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 Feb 28, 2025
@bmhowe23 bmhowe23 enabled auto-merge (squash) March 1, 2025 00:13
@bmhowe23 bmhowe23 merged commit ea54a6f into NVIDIA:main Mar 1, 2025
211 checks passed
github-actions bot pushed a commit that referenced this pull request Mar 1, 2025
Copy link

github-actions bot commented Mar 1, 2025

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

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