theochem / fanpy

Projectively-optimized geminal and "fancyCI" wavefunctions
Other
16 stars 2 forks source link

slater module #15

Open FarnazH opened 8 years ago

FarnazH commented 8 years ago

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:

  1. 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.
  2. 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.
kimt33 commented 8 years ago
  1. 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
  2. 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.
FarnazH commented 8 years ago
  1. 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
  2. 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.
kimt33 commented 8 years ago
  1. 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 > = | >
  2. Alrighty then. Thanks
msricher commented 8 years ago

I like this idea, of zero as the vacuum and None as a zero. This is probably the best way to do it.