Skip to content

Improve hilbert

Vicentini Filippo requested to merge improve_hilbert into master

Created by: gcarleo

This PR partially adresses #188 (closed) . Specifically, it is now possible to do things like

hi = nk.hilbert.Spin(s=0.5) ** 20
hi *=hi
hi1=h1*nk.hilbert.Spin(n=10,s=0.5)

#standard constructor
hi=nk.hilbert.Spin(graph=g,s=0.5) 

etc.

Apart from the last constructor, the last ones do not assing a graph by default, however one can attach graphs in this way

# Hilbert space of spins on the graph
hi = nk.hilbert.Spin(s=0.5) ** 20
hi.graph = nk.graph.Hypercube(length=20, n_dim=1)

Support for heterogeneous spaces remains to be addressed, but this seems to me a good starting point.

Merge request reports