feat: Add float32 zero-copy angle encoding in qdp-core (single sample)#1249
Open
viiccwen wants to merge 5 commits intoapache:mainfrom
Open
feat: Add float32 zero-copy angle encoding in qdp-core (single sample)#1249viiccwen wants to merge 5 commits intoapache:mainfrom
viiccwen wants to merge 5 commits intoapache:mainfrom
Conversation
Contributor
Author
|
cc @400Ping, @ryankert01 |
ryankert01
reviewed
Apr 8, 2026
Member
ryankert01
left a comment
There was a problem hiding this comment.
Overall lg, I think maybe can add a python test also?
66b8bfb to
b479dc8
Compare
Co-authored-by: Ryan Huang <ryankert01@gmail.com>
Contributor
Author
Currently, this PR doesn't include python binding, so it's still unsupported in python behavior. |
guan404ming
approved these changes
Apr 10, 2026
Member
There was a problem hiding this comment.
I think this is missing validate_qubit_count(num_qubits)? call that all other encode paths use. Guards against overflow in 1 << num_qubits.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related Issues
Closes #1248
Changes
Why
It adds single-sample
float32zero-copy angle encoding support in the Rust core and CUDA kernel layer, following the existing amplitudef32rollout pattern.How
float32CUDA kernel entrypoint for single-sample angle encodingAngleEncoder::encode_from_gpu_ptr_f32_with_stream(...)QdpEngineAPIs:encode_angle_from_gpu_ptr_f32(...)encode_angle_from_gpu_ptr_f32_with_stream(...)float32angle pathFiles Changed
qdp/qdp-core/src/gpu/encodings/angle.rsqdp/qdp-core/src/lib.rsqdp/qdp-core/tests/gpu_ptr_encoding.rsqdp/qdp-kernels/src/angle.cuqdp/qdp-kernels/src/lib.rsqdp/qdp-kernels/tests/angle_encode.rsChecklist