ppvm_pauli_sum/config/
fx64hash.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)]
22pub struct Byte8<
23 const N: usize,
24 C: Coefficient,
25 St: Strategy = NoStrategy,
26 W: PauliWordTrait = PauliWord<[usize; N], fxhash::FxBuildHasher>,
27>(PhantomData<(C, St, W)>);
28
29impl<const N: usize, C: Coefficient, St: Strategy, W: PauliWordTrait> Config
30 for Byte8<N, C, St, W>
31{
32 type Storage = [usize; N];
33 type Coeff = C;
34 type BuildHasher = fxhash::FxBuildHasher;
35 type PauliWordType = W;
36 type Map = HashMap<W, C, Self::BuildHasher>;
37 type Strategy = St;
38}
39
40pub type Byte8F64<const N: usize, St = NoStrategy> = Byte8<N, f64, St>;