JuliaQuantumControl / QuantumControl.jl

Julia Framework for Quantum Dynamics and Control
https://juliaquantumcontrol.github.io/QuantumControl.jl/
MIT License
47 stars 6 forks source link

Rename "objective" to "trajectory" #59

Closed goerz closed 5 months ago

goerz commented 5 months ago

Renames Objective to Trajectory, propagate_objective to propagate_trajectry, the objectives keyword argument in optimize to trajectories, etc.

This is a large, breaking change.

The term "objective" was originally taken from the krotov Python package, but has been a considerable source of misunderstanding. People (rightfully) get confused about "objectives" which are separate from the optimization functional. Especially when talking about a perfect entangler optimization where the objectives/trajectories have no target state, I always have to explain that 'objectives' is a misnomer, and that these are just the states whose dynamics enter the functional. The term "trajectory" is more accurate, as it consists of the initial state and the dynamical generator. Any (optional) additional properties (target_state, weight, …) are best understood as extra information specific to that trajectory that the functional may use.

As part of this breaking change, there have been considerable revisions of related functionality. Trajectories and ControlProblems can now also be instantiated with positional arguments. Trajectories can now take propagation keyword arguments with a prop_ prefix. These are taken into account in propagate_trajectory and the new init_prop_trajectory. These should be used in Krotov/GRAPE and finally enable customizing the propagation in an optimal control context (like a prop_callback that takes out population from the highest level, in lieu of a non-Hermitian Hamiltonian.)

See also https://github.com/JuliaQuantumControl/QuantumControlBase.jl/pull/72

codecov[bot] commented 5 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (c8c1807) 85.2% compared to head (2c612a4) 85.2%.

:exclamation: Current head 2c612a4 differs from pull request most recent head 2b4028c. Consider uploading reports for the commit 2b4028c to get more accurate results

Files Patch % Lines
src/functionals.jl 98.1% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #59 +/- ## ====================================== Coverage 85.2% 85.2% ====================================== Files 9 9 Lines 437 437 ====================================== Hits 372 372 Misses 65 65 ```

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