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

Rename "objective" to "trajectory" #59

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Rename "objective" to "trajectory" #59

merged 1 commit into from
Jan 22, 2024

Conversation

goerz
Copy link
Member

@goerz goerz commented Jan 22, 2024

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
JuliaQuantumControl/QuantumControlBase.jl#72

@goerz goerz added the breaking PRs that break compatibility label Jan 22, 2024
Copy link

codecov bot commented Jan 22, 2024

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%.

❗ 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 ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##           master     #59   +/-   ##
======================================
  Coverage    85.2%   85.2%           
======================================
  Files           9       9           
  Lines         437     437           
======================================
  Hits          372     372           
  Misses         65      65           

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

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](https://github.com/qucontrol/krotov), 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
JuliaQuantumControl/QuantumControlBase.jl#72
@goerz goerz force-pushed the rename-objectives branch from 2c612a4 to 2b4028c Compare January 22, 2024 18:08
@goerz goerz merged commit 2b4028c into master Jan 22, 2024
3 checks passed
@goerz goerz deleted the rename-objectives branch January 22, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking PRs that break compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant