Closed bsenjean closed 4 years ago
Eeeeh, I just found the origin of my problem.
If I take the same script as in the previous mail, but setting symmetry c1
in Psi4, then I get the correct ordering (meaning there is no swapping between 4 <--> 6 and 5 <--> 7 anymore). So that's due to the IRREP.
And indeed in OpenFermion-Psi4, in the _psi4_template
the keyword symmetry c1
is set.
Hi,
I am currently checking if the CCSD amplitudes extracted from Psi4 are sorted correctly in OpenFermion, and I have the impression that something is wrong (but maybe I'm doing something wrong). Here is an example for H4 (I enclose the whole script below if you want to run it).
I find that in Psi4, the CCSD amplitudes are the following:
Where the indices are: "I" --> occupied alpha spin-orbital (labelled from 0 to 1) "j" --> occupied beta spin-orbital (labelled from 0 to 1) "A" --> virtual alpha spin-orbital (labelled from 0 to 1) "b" --> virtual beta spin-orbital (labelled from 0 to 1).
So if I'm not mistaken, those spin-orbitals have the following indices in OpenFermion: I = 0 --> 0 I = 1 --> 2 j = 0 --> 1 j = 1 --> 3 A = 0 --> 4 A = 1 --> 6 b = 0 --> 5 b = 1 --> 7
So the amplitude
-0.2129966367
should correspond to `2 3 6^ 7^'.However, if I look at the (normal ordered) ucc amplitudes generated by OpenFermion, I get the following:
And so at the end it's like the indices for the virtual orbitals are swapped, i.e. 4 <--> 6 and 5 <--> 7. I checked in more details and it seems the indices are already swapped (according to me) in
molecule.ccsd_double_amplitudes
.I enclose a script to test it below. Am I missing something obvious or not ? Thanks !
You can check the
ccsd_H4.txt
file to see the amplitudes and corresponding indices.