ppvm_pauli_sum/config/
fxhash.rs1use std::collections::HashMap;
5use std::marker::PhantomData;
6
7use ppvm_pauli_word::word::PauliWord;
8use ppvm_traits::config::Config;
9use ppvm_traits::traits::{Coefficient, NoStrategy, PauliWordTrait, Strategy};
10
11#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
13pub struct Byte<
14 const N: usize,
15 C: Coefficient,
16 St: Strategy = NoStrategy,
17 W: PauliWordTrait = PauliWord<[u8; N], fxhash::FxBuildHasher>,
18>(PhantomData<(C, St, W)>);
19
20impl<const N: usize, C: Coefficient, St: Strategy, W: PauliWordTrait> Config for Byte<N, C, St, W> {
21 type Storage = [u8; N];
22 type Coeff = C;
23 type BuildHasher = fxhash::FxBuildHasher;
24 type PauliWordType = W;
25 type Map = HashMap<W, C, Self::BuildHasher>;
26 type Strategy = St;
27}
28
29pub type ByteF64<const N: usize, St = NoStrategy> = Byte<N, f64, St>;