Make DoubledHilbert a parametric class
Created by: PhilipVinc
This is my last step in the world domination of hilbert spaces.
DoubledHilbert
is now a parametric class (where the type parameter is the enclosed physical space) which is used to dispatch to faster implementations and is easy to extend.
This is used to speed up flip_state
for DoubledHilbert
by adding a specialized implementation for HomogeneousHilbert
.
It leads to a 10% speedup in the sampler for <10 spins.
The PR is done, i just need to add a bunch of extra tests to be sure...