-
Notifications
You must be signed in to change notification settings - Fork 4
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
Remove allocations for better performance from Python, cleanup #48
Merged
Conversation
This file contains 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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #48 +/- ##
==========================================
+ Coverage 98.88% 99.03% +0.15%
==========================================
Files 23 23
Lines 3216 3304 +88
==========================================
+ Hits 3180 3272 +92
+ Misses 36 32 -4 ☔ View full report in Codecov by Sentry. |
rmshaffer
previously approved these changes
Aug 27, 2024
Co-authored-by: Ryan Shaffer <[email protected]>
rmshaffer
approved these changes
Aug 27, 2024
contra-bit
pushed a commit
to contra-bit/BraketSimulator.jl
that referenced
this pull request
Sep 1, 2024
…n-braket#48) * change: Make things more inferrable * change: Use JSON3 for writing/reading to Python * fix: Make matrix generation less allocating * fix: Make matrix generation less allocating for custom gates too * fix: Handle empty/nothing targets properly * fix: Remove timing statements * fix: Allow subtypes of abstract result supertypes * fix: Remove timings and add inputs to precompile * fix: More validation tests * change: Bump version * fix: Semgrep * change: More tests and a fix for DoubleExcitation * Update src/gate_kernels.jl Co-authored-by: Ryan Shaffer <[email protected]> --------- Co-authored-by: Ryan Shaffer <[email protected]>
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.
Issue #, if available: N/A
Description of changes: Makes writing to JSON substantially faster for big statevectors/density matrices. Cleaned up a lot of internal allocations in the gate kernels. Benchmarked from Python and seeing speedups now comparable to what we see from Julia.
Testing done: Unit tests passed locally.
Merge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.