-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add solve_hci function #34
Conversation
hcore: Core Hamiltonian matrix representing single-electron integrals. | ||
eri: Electronic repulsion integrals representing two-electron integrals. | ||
norb: The number of spatial orbitals. | ||
nelec: The numbers of spin up and spin down electrons. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a description of ci_strings
here. We should definitely state what happens in default case (HF bitstring used). It may be worth even mentioning that in docstring description. Up to you on that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've documented the ci_strs
argument. I chose not to add anything to the docstring because I think the ideal behavior is to do whatever Dice itself does by default. If I'm not mistaken, mainline Dice does not accept any bitstrings. Here, I just used the Hartree-Fock bitstrings because it required minimal understanding on my part as to how the rest of the code works, and we might change this down the line.
ci_strs = bitstring_matrix_to_ci_strs(bitstring_matrix) | ||
num_up = format(ci_strs[0][0], "b").count("1") | ||
num_dn = format(ci_strs[1][0], "b").count("1") | ||
e_dice, sci_coefficients, _, avg_occupancies = solve_hci( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you. I was hoping you'd take care of this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM when you're ready, Thanks!
Adds
solve_hci
, which allows using Dice as a general HCI solver. Differences fromsolve_fermion
:norb
andnelec
are required to be passed.I called the strings "addresses" here for consistency with the rest of the code. They should be changed all together in #28 .