Add support for state-dependent running costs#103
Conversation
dfd7de9 to
46e185f
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #103 +/- ##
========================================
+ Coverage 88.3% 88.5% +0.3%
========================================
Files 20 20
Lines 1046 1120 +74
========================================
+ Hits 923 991 +68
- Misses 123 129 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
887de3c to
5aa5869
Compare
There was a problem hiding this comment.
Pull request overview
Adds the missing building blocks in QuantumControl.Functionals for state-dependent running costs (as needed by GRAPE): a running-cost functional J_b and a corresponding state-gradient builder make_xi, with AD backend support and tests.
Changes:
- Add
make_xi(analytic/automatic selection, default AD framework support) andJ_btoQuantumControl.Functionals. - Implement
make_automatic_xifor Zygote and FiniteDifferences via package extensions. - Add comprehensive tests for
make_xiand a basic integration test forJ_b; add a Documenter interlink fallback label.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/functionals.jl |
Introduces make_xi/make_automatic_xi and J_b, plus exports and storage access. |
ext/QuantumControlZygoteExt.jl |
Adds Zygote-based automatic differentiation path for xi. |
ext/QuantumControlFiniteDifferencesExt.jl |
Adds FiniteDifferences-based automatic differentiation path for xi. |
test/test_functionals.jl |
Adds tests for make_xi modes/backends and a J_b integration test. |
docs/make.jl |
Adds an interlinks fallback label referenced by J_b docs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
As identified by copilot review
Adds
make_xiandJ_bfunctions inQuantumControl.Functionals, with support for automatic differentiation.This is a pre-requisite for state-dependent-running costs in GRAPE, see JuliaQuantumControl/GRAPE.jl#53