WIP: Python Hilbert and Operator
Created by: gcarleo
This is a WIP PR introducing pure python AbstractHilbert
and AbstractOperator
.
At this stage, I also partially implemented experimental Py* concrete classes: hilbert.PySpin
and operator.PyIsing
(names are of course temporary, and Py will be removed at some point when replacing the c++ classes).
The jitted version of PyIsing already allows to gain about 30% in the computation of the local energy (see Benchmarks/hamiltonian.py) over the corresponding pybind11 implementation... ! This is quite encouraging, and it is now important to see if also iterators over full hilbert spaces can be efficiently implemented. If so, I would say that we can start safely and happily removing all Hilbert and Hamiltonians from C++ already in 2.* versions (preserving only C++ machines and samplers, for the moment).