Skip to content

feat: Add float32 zero-copy angle encoding in Python bindings (single sample)#1264

Open
viiccwen wants to merge 9 commits intoapache:mainfrom
viiccwen:feature/angle-f32-python-binding-single
Open

feat: Add float32 zero-copy angle encoding in Python bindings (single sample)#1264
viiccwen wants to merge 9 commits intoapache:mainfrom
viiccwen:feature/angle-f32-python-binding-single

Conversation

@viiccwen
Copy link
Copy Markdown
Contributor

Related Issues

Closes #1250

Changes

  • Bug fix
  • New feature
  • Refactoring
  • Documentation
  • Test
  • CI/CD pipeline
  • Other

Why

QDP core already supports single-sample angle encoding from CUDA float32
buffers, but the Python binding did not expose that path. This PR adds the
Python-side support while keeping batch CUDA angle inputs on float64.

How

  • route 1D CUDA float32 angle tensors through the dedicated zero-copy angle
    GPU-pointer path
  • keep CUDA angle float32 support limited to 1D single-sample tensors
  • add targeted Python tests for success and rejection paths
  • document the CUDA tensor dtype rules for amplitude and angle
  • pin the IQP naive-reference comparison test to float64 precision so the
    comparison matches the reference dtype

Checklist

  • Added or updated unit tests for all changes
  • Added or updated documentation for all changes

@viiccwen viiccwen changed the title [Feature][QDP] Add float32 zero-copy angle encoding in Python bindings (single sample) feat: Add float32 zero-copy angle encoding in Python bindings (single sample) Apr 13, 2026
Copy link
Copy Markdown
Contributor

@rich7420 rich7420 left a comment

Choose a reason for hiding this comment

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

thanks for the patch! sorry for the late review:

Comment thread qdp/qdp-python/src/engine.rs Outdated
Comment thread qdp/qdp-python/src/engine.rs Outdated
@viiccwen viiccwen force-pushed the feature/angle-f32-python-binding-single branch from 9308194 to f815e74 Compare April 20, 2026 11:22
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.

[Feature] Add float32 zero-copy angle encoding in Python bindings (single sample)

2 participants