JuliaQuantumControl / QuantumPropagators.jl

Propagators for Quantum Dynamics and Optimal Control
https://juliaquantumcontrol.github.io/QuantumPropagators.jl/
MIT License
16 stars 4 forks source link

Add `preserve_start`, `preserve_end` options to `get_tlist_midpoints` #63

Closed goerz closed 6 months ago

goerz commented 7 months ago

This might come in handy for a manual pulse discretization like

midpoints = get_tlist_midpoints(
    tlist;
    preserve_start=false,
    preserve_end=false
)
pulsvals = [control_func(t) for t in midpoints]

I'm not sure I'd want to extend this functionality directly into discretize_on_midpoints. There are a lot of subtle details in optimal control that depend on the exact behavior of preserving the end points in discretize and discretize_on_midpoints (and the fact that they're inverse operations). It could be pretty dangerous if parameters inadvertently get forwarded from the optimal control workspace initialization.

I might still change my mind on this…

codecov[bot] commented 7 months ago

Codecov Report

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

Comparison is base (cd07aa3) 88.9% compared to head (bb895d6) 89.0%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #63 +/- ## ======================================== + Coverage 88.9% 89.0% +0.1% ======================================== Files 28 28 Lines 1910 1925 +15 ======================================== + Hits 1697 1712 +15 Misses 213 213 ```

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