A tried this AD engine a bit. I think the design is good in general. So I will merge it directly. But I do not understand
Why do we need TrackedArray, TrackedArrayTypes, TrackedRealArray, TrackedComplexArray? Isn't TrackedArray alone enough?
TODOs:
[ ] If we want to support higher order gradients, we need to allow the gradient field being a TrackedArray, now it is forced to have the same type as input. Also, accumulate_grad! is an inplace function, not sure it can be differentiated.
A tried this AD engine a bit. I think the design is good in general. So I will merge it directly. But I do not understand
TODOs:
accumulate_grad!
is an inplace function, not sure it can be differentiated.Originally posted by @GiggleLiu in https://github.com/RydbergBoston/TensorNetworkEvolve.jl/issues/14#issuecomment-1001906509