-
Notifications
You must be signed in to change notification settings - Fork 376
MES Factory gradient support #1421
MES Factory gradient support #1421
Conversation
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.
The existing parameters to the factories, such as expectation
, all have setter/getters. I think for consistency gradient
should have them too.
good catch, thanks |
...chemistry/algorithms/ground_state_solvers/minimum_eigensolver_factories/vqe_uccsd_factory.py
Outdated
Show resolved
Hide resolved
...hemistry/algorithms/ground_state_solvers/minimum_eigensolver_factories/vqe_uvccsd_factory.py
Outdated
Show resolved
Hide resolved
In looking at the setters/getters now that you have done these I notice the original ones for initial_point, expectation, optimizer that default to None in factory constructor do not allow show that None is a valid value to set these too, via setter, or one would expect to have None back from getter, ie. are Optional like you just did for gradient. I think it should be valid to set to None so you go can back to default. Either way the getter needs to show Optional. Maybe this should/could be done in a separate PR but since its just typehints maybe it can be added/fixed here? Update: I created a new issue #1428 to address the above, leaving this as purely the gradient change then. |
Summary
Updating the MES Factory methods to support the new gradient framework.
This PR resolves #1398
Details and comments