ppvm_traits::config
config¶
ppvm_traits::config
classConfig¶source
ppvm_traits::config::Config
Rust trait. Compile-time configuration bundle for a `PauliSum`.
pub trait Config: CloneAssociated items
| Name | Type | Description |
|---|---|---|
Storage | type Storage: PauliStorage | associated type. Backing storage for an individual Pauli word — typically a `[u8; N]` where `N` is the number of bytes packed. |
Coeff | type Coeff: Coefficient | associated type. Numeric coefficient type (e.g. `f64`, `Complex<f64>`). |
Strategy | type Strategy: Strategy | associated type. Truncation strategy applied when `PauliSum::truncate` runs. |
BuildHasher | type BuildHasher: BuildHasher + Clone + Default + HashFinalize | associated type. Hasher used by the underlying map. It is also the hasher of the [`PauliWordType`](Self::PauliWordType) keys, so it must declare its cached-hash finalization via [`HashFinalize`]. |
PauliWordType | type PauliWordType: PauliWordTrait | associated type. Concrete [`PauliWordTrait`] implementation used as map keys. |
Map | type Map: ACMap<<Self as >::Storage, <Self as >::Coeff, <Self as >::BuildHasher, <Self as >::PauliWordType> | associated type. Concrete map type satisfying [`ACMap`] over the chosen storage / coefficient / hasher / word combination. |
`Config` is a zero-cost generic dispatch mechanism: it pins down the storage backing (`Storage`), coefficient type (`Coeff`), truncation strategy (`Strategy`), hasher (`BuildHasher`), Pauli-word representation (`PauliWordType`), and concrete map (`Map`) used by a single `PauliSum` instantiation. Pre-built bundles live in the submodules (`fxhash`, `indexmap`, …); user code may define its own.
source