I came across a few things in the slater module. Please let me know what you think, so I can make the needed changes accordingly:
Currently, slater.annihilate(0b00110, 1, 6) returns None because one of the specified indices is not occupied. Isn't it better to have slater.annihilate only return None when none of the specified indices are occupied? In this way slater.annihilate(0b00110, 1, 6) or slater.annihilate(0b00110, 6, 1) will return 0b100.
The same argument applies to the slater.create function.
Function slater.ground only works for the closed-shell systems, right? Isn't it useful to have a more general function taking number of occupied alpha and beta orbitals as arguments.
I like to think of the slater.annihilate as an actual annihilator operator. If we annihilate something twice, or if we annihilate something that is not occupied (vacuum) then we get a zero. This way, we have a way to keep bad operations in check
Yup. I didn't think too much about the ground state. We just needed something as a reference. We should have a smarter ground state, rather than the first N alpha and beta orbitals.
That makes sense, but if I am not wrong, considering annihilator and creator operators the slater.create function should be able to occupy vaccum which is not the case in the current code unless vacuum is represented by 0b0 instead of None. I like 0b0 better for vaccum, unless there is a reason to use None.
https://github.com/QuantumElephant/olsens/blob/master/geminals/slater.py#L106
Ground state works for odd number of electrons (it assumes n_alpah > n_beta). I mainly wanted to leave a note for potential future improvements.
0b0 is used for the vacuum, but None is produced if you try to annihilate a vacuum or create an orbital that already exists. So that we can distinguish between zero's and vacuum's. (0b0 is vacuum and None is a "zero")
:math:a_i a_i | i > = 0 \neq | > = a_i | i > = | >
I came across a few things in the slater module. Please let me know what you think, so I can make the needed changes accordingly:
slater.annihilate(0b00110, 1, 6)
returnsNone
because one of the specified indices is not occupied. Isn't it better to have slater.annihilate only returnNone
when none of the specified indices are occupied? In this wayslater.annihilate(0b00110, 1, 6)
orslater.annihilate(0b00110, 6, 1)
will return 0b100. The same argument applies to the slater.create function.