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

Add an adaptive optimizer #3192

Merged
merged 42 commits into from
Nov 1, 2022
Merged

Add an adaptive optimizer #3192

merged 42 commits into from
Nov 1, 2022

Conversation

soranjh
Copy link
Contributor

@soranjh soranjh commented Oct 20, 2022

Context:
This PR adds an adaptive optimizer.

Description of the Change:
The AdaptiveOptimizer class is added to qml.optimize.

Benefits:
The new functionality makes it easy for the users to build quantum chemistry circuits adaptively.

Possible Drawbacks:

Related GitHub Issues:

@github-actions
Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@codecov
Copy link

codecov bot commented Oct 20, 2022

Codecov Report

Merging #3192 (a7a92af) into master (65e335e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3192   +/-   ##
=======================================
  Coverage   99.70%   99.70%           
=======================================
  Files         277      278    +1     
  Lines       24578    24621   +43     
=======================================
+ Hits        24505    24548   +43     
  Misses         73       73           
Impacted Files Coverage Δ
pennylane/optimize/__init__.py 100.00% <100.00%> (ø)
pennylane/optimize/adaptive.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@soranjh soranjh requested a review from ixfoduap October 24, 2022 18:07
@soranjh soranjh changed the title [WIP] add adaptive optimizer Add an adaptive optimizer Oct 24, 2022
@soranjh soranjh marked this pull request as ready for review October 25, 2022 13:12
@Jaybsoni Jaybsoni added this to the v0.27.0 milestone Oct 25, 2022
Copy link
Contributor

@ixfoduap ixfoduap left a comment

Choose a reason for hiding this comment

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

This optimizer is awesome!

I'm making mostly small suggestions, except perhaps the addition of a few more tests

pennylane/optimize/adaptive.py Outdated Show resolved Hide resolved
pennylane/optimize/adaptive.py Outdated Show resolved Hide resolved
pennylane/optimize/adaptive.py Outdated Show resolved Hide resolved
pennylane/optimize/adaptive.py Outdated Show resolved Hide resolved
pennylane/optimize/adaptive.py Outdated Show resolved Hide resolved
pennylane/optimize/adaptive.py Outdated Show resolved Hide resolved
pennylane/optimize/adaptive.py Outdated Show resolved Hide resolved
pennylane/optimize/adaptive.py Show resolved Hide resolved
pennylane/optimize/adaptive.py Show resolved Hide resolved
tests/optimize/test_adaptive.py Show resolved Hide resolved
@soranjh soranjh requested a review from ixfoduap October 26, 2022 21:30
pennylane/optimize/adaptive.py Outdated Show resolved Hide resolved
tests/optimize/test_adaptive.py Outdated Show resolved Hide resolved
@soranjh soranjh requested a review from ixfoduap October 27, 2022 17:30
Copy link
Contributor

@obliviateandsurrender obliviateandsurrender left a comment

Choose a reason for hiding this comment

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

Looking good! Just leaving a couple of suggestions.

pennylane/optimize/adaptive.py Outdated Show resolved Hide resolved
pennylane/optimize/adaptive.py Outdated Show resolved Hide resolved
pennylane/optimize/adaptive.py Outdated Show resolved Hide resolved
pennylane/optimize/adaptive.py Outdated Show resolved Hide resolved
@soranjh soranjh merged commit a464d48 into master Nov 1, 2022
@soranjh soranjh deleted the adaptive_optimizer branch November 1, 2022 13:57
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.

5 participants