kestrelquantum / QuantumCollocation.jl

Quantum Optimal Control with Direct Collocation
MIT License
29 stars 7 forks source link

Add timesteps to quadratic regularizers #55

Closed andgoldschmidt closed 10 months ago

andgoldschmidt commented 10 months ago

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 commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.