Skip to content

Conversation

@albertomercurio
Copy link
Contributor

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

When differentiating an ODE with Zygote, I was having an error at the point where cache_operator was called. Appartently Zygote doesn't like the @reset macro.

See for example these errors:

https://github.com/qutip/QuantumToolbox.jl/actions/runs/19443089834/job/55630970771?pr=596

Here I avoid it using generated function. This should also make the code more robust on more structured AddedOperators.

@albertomercurio
Copy link
Contributor Author

The OrdinaryDiffEq tests should not be related to this PR. I have tested the locally with the stable version of SciMLOperators.jl and still fail

@ChrisRackauckas ChrisRackauckas merged commit 05c7688 into SciML:master Nov 18, 2025
13 of 15 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