Skip to content
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

feat: add the PySCFGroundStateSolver #35

Merged

Conversation

mrossinek
Copy link
Member

Summary

This PR adds the PySCFGroundStateSolver, a new class which flips the API integration on its head, by using PySCF's fci module to allow solving Qiskit Nature problems.
This obviously will not scale to huge problems but I find this to be a useful utility when testing and debugging classical computational workflows in Qiskit Nature. Especially since this approach is a lot more performant than the NumPyMinimumEigensolver alternative with a filter_criterion added into it (see also Qiskit/qiskit#10194).

Details and comments

@coveralls
Copy link

coveralls commented Jun 5, 2023

Pull Request Test Coverage Report for Build 5220560044

  • 49 of 53 (92.45%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+7.9%) to 77.632%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit_nature_pyscf/pyscf_ground_state_solver.py 48 52 92.31%
Totals Coverage Status
Change from base Build 5219162798: 7.9%
Covered Lines: 118
Relevant Lines: 152

💛 - Coveralls

@mrossinek
Copy link
Member Author

Rerunning CI here to see if the fix from qiskit-community/qiskit-nature#1202 propagates down to fix things here, too 👍

qiskit_nature_pyscf/pyscf_ground_state_solver.py Outdated Show resolved Hide resolved
qiskit_nature_pyscf/pyscf_ground_state_solver.py Outdated Show resolved Hide resolved
qiskit_nature_pyscf/pyscf_ground_state_solver.py Outdated Show resolved Hide resolved
qiskit_nature_pyscf/pyscf_ground_state_solver.py Outdated Show resolved Hide resolved
qiskit_nature_pyscf/pyscf_ground_state_solver.py Outdated Show resolved Hide resolved
qiskit_nature_pyscf/pyscf_ground_state_solver.py Outdated Show resolved Hide resolved
@mrossinek
Copy link
Member Author

Thanks for the review! Seems like I overlooked quite a lot of things. I guess I should go back to my development style of always writing TODO in places which I have not actually written a proper message yet rather than putting something semi-useful in there because then the TODO will actually stand out to me 🙃

@mrossinek mrossinek requested a review from woodsp-ibm June 8, 2023 17:01
This is currently not guaranteed to give the correct result.
I know a way of fixing this when having the MO coefficients available
but we do not have them here. Will investigate this in the future.
For now, we simply do not compute the spin related values.
@mrossinek mrossinek merged commit bc21d50 into qiskit-community:main Jun 9, 2023
@mrossinek mrossinek deleted the pyscf-ground-state-solver branch June 9, 2023 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants