Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Refactor Chemistry Drivers to also accept Molecule class #1297

Merged
merged 11 commits into from
Oct 12, 2020

Conversation

manoelmarques
Copy link
Collaborator

@manoelmarques manoelmarques commented Oct 1, 2020

Summary

Adds the new class Molecule as an additional input to Driver classes and update those drivers so that they can build their configuration strings using the Molecule info.

Details and comments

@manoelmarques manoelmarques self-assigned this Oct 1, 2020
@pbark pbark added the Chemistry label Oct 1, 2020
@pbark pbark added this to the 0.8 milestone Oct 1, 2020
@pbark pbark requested a review from mrossinek October 1, 2020 08:18
Copy link
Member

@mrossinek mrossinek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we need some more work on the Driver interface-structure and how the Molecule object is integrated into the drivers.

.github/workflows/main.yml Outdated Show resolved Hide resolved
qiskit/chemistry/molecule.py Outdated Show resolved Hide resolved
qiskit/chemistry/molecule.py Outdated Show resolved Hide resolved
qiskit/chemistry/molecule.py Outdated Show resolved Hide resolved
qiskit/chemistry/drivers/integrals_driver.py Outdated Show resolved Hide resolved
qiskit/chemistry/drivers/gaussiand/gaussiandriver.py Outdated Show resolved Hide resolved
@manoelmarques manoelmarques requested a review from Cryoris October 1, 2020 12:47
@manoelmarques manoelmarques force-pushed the driver branch 2 times, most recently from 53bd810 to 1266023 Compare October 1, 2020 15:08
@woodsp-ibm woodsp-ibm changed the title Refactor Chemistry Drivers to also accept Molecule class [WIP] Refactor Chemistry Drivers to also accept Molecule class Oct 1, 2020
@manoelmarques manoelmarques force-pushed the driver branch 6 times, most recently from b4e3d9e to 4e51440 Compare October 7, 2020 16:02
Copy link
Member

@mrossinek mrossinek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed a minor inconsistency on the use of unchecked strings vs Enums.
Please comment.

qiskit/chemistry/drivers/base_driver.py Show resolved Hide resolved
Copy link
Member

@mrossinek mrossinek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for the last open discussion point the only changes I would still like to see are the docstrings in the Molecule class to be updated. As they stand now, they only document the arguments and return types but none of them document the purpose of the methods.
The rest looks good to me.

@mrossinek mrossinek mentioned this pull request Oct 9, 2020
@woodsp-ibm
Copy link
Member

As they stand now, they only document the arguments and return types but none of them document the purpose of the methods.

You are referring to methods like absolute stretching etc. as the class states some overall intent and the rest are mostly simple setter/getters. The names on them seemed pretty self explanatory and the params state how the stretch or bend is accomplished via the params - so they seem as if they are mostly usable as-is - what did you have in mind to improve. This is not code I wrote so I would have to study the methods etc to see if better can be done - if someone there has more experience with this code maybe they can do this more efficiently. In the absence of that I think it will have to stand as-is.

@woodsp-ibm woodsp-ibm added the Changelog: API Change Include in the Changed section of the changelog label Oct 9, 2020
Copy link
Member

@mrossinek mrossinek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay in that case this looks good to me now.
We can always go back and add more documentation as we deem necessary.

@manoelmarques manoelmarques merged commit 3b6e407 into qiskit-community:master Oct 12, 2020
@manoelmarques manoelmarques deleted the driver branch October 12, 2020 13:43
@woodsp-ibm woodsp-ibm changed the title [WIP] Refactor Chemistry Drivers to also accept Molecule class Refactor Chemistry Drivers to also accept Molecule class Oct 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Changelog: API Change Include in the Changed section of the changelog Chemistry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants