Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Unresolved moderate findings affect sampling performance, native typing, and positional overload behavior.
Review effort: Lite
Findings: None
What changed in this PR
Adds optional NumPy-backed shot sampling to reduce Python conversion overhead.
Changes:
- Adds NumPy as a runtime dependency.
- Exposes flattened native results as writable
int8arrays. - Updates sampling types and tests.
| File | Summary |
|---|---|
ppvm-python/uv.lock |
Locks the NumPy runtime dependency. |
ppvm-python/test/generalized_tableau/test_stim.py |
Tests NumPy sampling behavior. |
ppvm-python/test/generalized_tableau/test_basics.py |
Updates type-checker suppression. |
ppvm-python/src/ppvm/generalized_tableau.py |
Adds as_numpy sampling support and overloads. |
ppvm-python/src/ppvm/_core.pyi |
Updates native sampling return typing. |
ppvm-python/pyproject.toml |
Declares NumPy as a runtime dependency. |
crates/ppvm-python-native/src/interface_tableau.rs |
Produces flattened bytearray sampling results. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
This branch has not been deployed
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.
This conversion is taking up a significant part of runtime per shot for many qubits.