pub trait Config: Clone {
type Storage: PauliStorage;
type Coeff: Coefficient;
type Strategy: Strategy;
type BuildHasher: BuildHasher + Clone + Default + HashFinalize;
type PauliWordType: PauliWordTrait;
type Map: ACMap<Self::Storage, Self::Coeff, Self::BuildHasher, Self::PauliWordType>;
}Expand description
Compile-time configuration bundle for a PauliSum.
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.
Required Associated Types§
Sourcetype Storage: PauliStorage
type Storage: PauliStorage
Backing storage for an individual Pauli word — typically a [u8; N]
where N is the number of bytes packed.
Sourcetype Coeff: Coefficient
type Coeff: Coefficient
Numeric coefficient type (e.g. f64, Complex<f64>).
Sourcetype BuildHasher: BuildHasher + Clone + Default + HashFinalize
type BuildHasher: BuildHasher + Clone + Default + HashFinalize
Hasher used by the underlying map. It is also the hasher of the
PauliWordType keys, so it must declare its
cached-hash finalization via HashFinalize.
Sourcetype PauliWordType: PauliWordTrait
type PauliWordType: PauliWordTrait
Concrete PauliWordTrait implementation used as map keys.
Sourcetype Map: ACMap<Self::Storage, Self::Coeff, Self::BuildHasher, Self::PauliWordType>
type Map: ACMap<Self::Storage, Self::Coeff, Self::BuildHasher, Self::PauliWordType>
Concrete map type satisfying ACMap over the chosen
storage / coefficient / hasher / word combination.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".