Filippo Vicentini
authored
Move constrained logic to a special ConstrainedHilbertIndex class that can more easily be overridden (#1528) > I believe there were a few requests for improvements of the hilbert spaces, but none of them would really benefit from jax afaik. In particular: > > - make restricted fock indexable in more cases (e.g. fixed particle number is small but we have a lot of sites). Implemented it [here](https://github.com/inailuig/chemistry_nqs_second/blob/5c04364aa456071a2a07a9f57ef7fd91709aa377/constrained_fock.py) some time ago and can try to clean it up for a PR at some point. Only really useful for ED and exactState (will benefit [@Jannes Nys](https://cqslab.slack.com/team/U02FE43BC9G) and [@Fan Yang](https://cqslab.slack.com/team/U040MJYMZ3L)) > > - restricted fock random_state going OOM if the local cuttoff is big and the local fock space is therefore not really indexable (according to [@Zakari Denis](https://cqslab.slack.com/team/U043EP0T1DM)) > > - I would change the default dtype of the discrete hilbert spaces to something more reasonable like int8/uint8 instead of double. I think it's cleaner to set it in hilbert already instead of later casting in the samplers. Also types are currently not consistent so you might get sth different from all_states and random_state This is a draft to make it easy to implement point 2, essentially we could add some _special_ HilbertIndexConstrained for what z-denis wanted, I think. You could take this as a starting point. We can probably further clean the interface, but I did not think much about it. Then inailuig step 1 could be achieved by jaxifying those classes.
Name | Last commit | Last update |
---|