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 timesteps to quadratic regularizers #55

Merged
merged 2 commits into from
Nov 29, 2023

Conversation

andgoldschmidt
Copy link
Member

@andgoldschmidt andgoldschmidt commented Nov 28, 2023

Modifies loss, gradient, and hessian of QuadraticRegularizer to use timesteps. That is, the loss is now 0.5 * (Δt .* vₜ)' * (R .* ( Δt .* vₜ)) instead of 0.5 * vₜ' * (R .* vₜ). This enforces an energy (integral) constraint, preventing the optimizer from stretching variable timesteps in order to minimize QuadraticRegularizer losses.

Closes #47

@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (749a742) 49.67% compared to head (13b054e) 50.31%.
Report is 7 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #55      +/-   ##
==========================================
+ Coverage   49.67%   50.31%   +0.63%     
==========================================
  Files          17       17              
  Lines        2329     2359      +30     
==========================================
+ Hits         1157     1187      +30     
  Misses       1172     1172              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aarontrowbridge aarontrowbridge merged commit fdeea38 into kestrelquantum:main Nov 29, 2023
4 checks passed
@andgoldschmidt andgoldschmidt deleted the quad_reg_fix branch November 30, 2023 16:49
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.

Min time objective fix for unequal timesteps
3 participants