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 Single-Parameter Optimization Module to Bartiq #118

Merged
merged 51 commits into from
Sep 25, 2024

Conversation

sitong1011
Copy link
Contributor

@sitong1011 sitong1011 commented Sep 15, 2024

Description

Context:

This PR addresses issue #12 by integrating a basic optimization module into Bartiq. This enhancement enables users to optimize parameters related to resource expressions within Bartiq routines.

Implemented Solution:

Added a minimize function to allow optimization of resources with respect to a single free parameter.
Users can specify bounds for the parameter and choose the optimizer.

Dependencies:

Added scipy to the extras dependencies as one backend could be used by minimize function.

Please verify that you have completed the following steps

  • I have self-reviewed my code.
  • I have included test cases validating introduced feature/fix.
  • I have updated documentation.

@sitong1011 sitong1011 marked this pull request as ready for review September 16, 2024 18:52
@sitong1011
Copy link
Contributor Author

#111 (comment) @mstechly
I’ve adjusted the optimizer by reducing the default learning rate to 0.000001 and adding a momentum of 0.9 to adjust the influence of previous updates. If you have any additional examples, it would be great to test whether the changes improve its performance.

Additionally, it seems that the overall df_active_volume is an increasing function. If this assumption is correct, then the current test results should now be reasonable.

@sitong1011
Copy link
Contributor Author

Hi @mstechly, I've completed the changes and everything is ready for tests and your review.

@mstechly mstechly merged commit e407474 into PsiQ:main Sep 25, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants