Skip to content

feat: support postselection masks in detector sampler#151

Open
CodeMaverick2 wants to merge 1 commit into
QuEraComputing:mainfrom
CodeMaverick2:feat/postselection-masks
Open

feat: support postselection masks in detector sampler#151
CodeMaverick2 wants to merge 1 commit into
QuEraComputing:mainfrom
CodeMaverick2:feat/postselection-masks

Conversation

@CodeMaverick2
Copy link
Copy Markdown

Summary

Closes - #41

  • Add optional postselection_mask to CompiledDetectorSampler.sample (feat: Support postselection masks #41)
  • Compute direct detector bits in NumPy and skip JAX for shots discarded by direct postselected detectors
  • Buffer survivors into fixed-size JAX batches with padding on the final batch
  • Apply detector reference XOR before postselection checks and on returned detector columns
  • Fully-direct circuits continue using the existing NumPy fast path

Test plan

  • uv run pytest (1102 passed)
  • uv run pre-commit run --all-files
  • New unit tests in test/unit/test_postselection.py (18 tests)

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.

1 participant