Repository navigation
perf(runtime): faster map_insert + specialized diagonal 2-qubit rotations #117
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
Changes from all commits
9a9c9a0
1a9a002
827f9f1
ee3046f
12af34d
86db8d1
65594d9
1df64df
136f409
b12d547
2ce2f34
ac4f1d5
6f57270
ee74457
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,12 @@ use std::hash::Hash; | |
| /// Backing storage for a [`PauliWord`](crate::word::PauliWord) — a | ||
| /// fixed-size, `Copy`-able block of bits (typically `[u8; N]` or | ||
| /// `[u64; N]`). | ||
| /// | ||
| /// The [`bytemuck::Pod`] bound guarantees the storage is a plain-old-data | ||
| /// type with no padding and all bit patterns valid, which lets | ||
| /// [`PauliWord::rehash`](crate::word::PauliWord) view it as a `&[u8]` for | ||
| /// fast byte-slice hashing *without* `unsafe`. Every concrete storage used | ||
| /// here (`[u8; N]`, `[u64; N]`) is already `Pod`. | ||
|
Comment on lines
+11
to
+15
|
||
| pub trait PauliStorage: | ||
| BitViewSized | ||
| + Clone | ||
|
|
@@ -19,6 +25,7 @@ pub trait PauliStorage: | |
| + std::fmt::Debug | ||
| + Ord | ||
| + PartialOrd | ||
| + bytemuck::Pod | ||
| { | ||
| } | ||
| impl< | ||
|
|
@@ -32,7 +39,8 @@ impl< | |
| + Sync | ||
| + std::fmt::Debug | ||
| + Ord | ||
| + PartialOrd, | ||
| + PartialOrd | ||
| + bytemuck::Pod, | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI. the key of this optimization is assuming padding for the pauli string encoding, which I assume we may want similar optimization for other things. cc: @david-pl
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Definitely something we want for |
||
| > PauliStorage for A | ||
| { | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.