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

Make chi functions not-in-place #48

Merged
merged 1 commit into from
Jul 17, 2024
Merged

Make chi functions not-in-place #48

merged 1 commit into from
Jul 17, 2024

Conversation

goerz
Copy link
Member

@goerz goerz commented Jul 17, 2024

The chi! functions previously used by GRAPE and Krotov are now simply chi do not act in-place. This is more general and easier to implement for the user, as it allows to use immutable structs for states

Note that in extreme performance-critical situations, one could still construct the χ-states in-place via a closure or functor.

Both chi and J_T can now have an optional keyword argument tau (instead of the previous improperly implemented and unicode τ). Whether or not tau should be passed to these functions is automatically detected.

The `chi!` functions previously used by GRAPE and Krotov are now
simply `chi` do not act in-place. This is more general and easier to
implement for the user, as it allows to use immutable structs for states

Note that in extreme performance-critical situations, one could still
construct the χ-states in-place via a closure or functor.

Both chi and J_T can now have an optional keyword argument `tau`
(instead of the previous improperly implemented and unicode `τ`).
Whether or not `tau` should be passed to these functions is
automatically detected.
@goerz goerz added the breaking PRs that break compatibility label Jul 17, 2024
Copy link

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 86.48649% with 5 lines in your changes missing coverage. Please review.

Project coverage is 81.7%. Comparing base (fefb799) to head (a8ddddf).

Files Patch % Lines
src/optimize.jl 88.5% 3 Missing ⚠️
src/workspace.jl 80.0% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master     #48     +/-   ##
========================================
- Coverage    82.3%   81.7%   -0.5%     
========================================
  Files           4       4             
  Lines         287     300     +13     
========================================
+ Hits          236     245      +9     
- Misses         51      55      +4     

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

@goerz goerz merged commit a8ddddf into master Jul 17, 2024
5 checks passed
@goerz goerz deleted the immutable-chi branch July 17, 2024 14:04
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