Skip to content

Conversation

apkille
Copy link
Contributor

@apkille apkille commented Jun 24, 2025

I added a test suite that exhaustively checks automatic differentiation capabilities for each solver. With this PR, FiniteDiff.jl and ForwardDiff.jl are fully supported for schroedinger and master solvers (including their dynamic versions). I added DifferentiationInterface.jl as a test dependency to quickly test other autodiff libraries supported in Julia in the future (such as Zygote.jl and Enzyme.jl). In the future I will also add support for the stochastic, semi-classical, and Monte Carlo solvers.

One note: here I am simply testing whether or not each differentiation operation runs on each solver with random test cases. I'm open to testing for correctness within some numerical tolerance, but I'd imagine we'd have to be extremely careful that the hundreds of tests pass every time, particularly when we have a handful of autodiff libraries supported in the suite.

Copy link
Member

@Krastanov Krastanov left a comment

Choose a reason for hiding this comment

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

On first pass, this looks awesome, thank you!

There are test failures though -- I have not looked into them, do you know how to address them?

@apkille
Copy link
Contributor Author

apkille commented Jun 28, 2025

Yes, I will do that soon, just got busy this week and didn't have time to deal with them :)

@Krastanov
Copy link
Member

I will mark this as a draft, just to organize my review queue a bit. Feel free to mark it back at any time.

@Krastanov Krastanov marked this pull request as draft August 17, 2025 20:55
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