catalyst
catalyst copied to clipboard
Guarding against non-differentiable code in transforms
One example is the merge rotation formula for Rot which involves a sqrt operation with an undefined derivative at 0.
See also: Originally posted by @rturrado in https://github.com/PennyLaneAI/catalyst/pull/1955#discussion_r2258260899