Skip to content

Add support to ForwarDiff differentiation #515

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

Merged
merged 3 commits into from
Jul 27, 2025

Conversation

albertomercurio
Copy link
Member

Description

This PR adds the support for autodiff with ForwardDiff.jl. Indeed, it was just missing a custom method for the _CType function.

Moreover, I believe that the previous name of the _CType function was not 100% clear, and also unusual for a name of a Julia function. So, here I have also change _CType and _FType to _complex_float_type and _float_type respectively.

@albertomercurio albertomercurio marked this pull request as ready for review July 27, 2025 12:42
@albertomercurio albertomercurio requested a review from ytdHuang July 27, 2025 12:43
Copy link

codecov bot commented Jul 27, 2025

Codecov Report

❌ Patch coverage is 78.57143% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.07%. Comparing base (0bc7621) to head (0a78b05).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/utilities.jl 59.09% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #515      +/-   ##
==========================================
- Coverage   94.10%   94.07%   -0.03%     
==========================================
  Files          51       51              
  Lines        3543     3545       +2     
==========================================
+ Hits         3334     3335       +1     
- Misses        209      210       +1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `average_states`
- `average_expect`
- `std_expect`
- Add support to ForwardDiff.jl for `sesolve` and `mesolve`. ([#515])
Copy link
Member

@ytdHuang ytdHuang Jul 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the keep_runs_results log has many contents, I suggest we put this one before it.

This should increase the readability of the change log

@albertomercurio albertomercurio merged commit 5ba859a into qutip:main Jul 27, 2025
15 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants