TensorKit.jl icon indicating copy to clipboard operation
TensorKit.jl copied to clipboard

Automatic Differentiation support

Open ErikLW opened this issue 3 years ago • 5 comments

Hey, Is there a way to use automatic differentiation with the TensorMap type and with the @tensor macro? Best regards, Erik

ErikLW avatar Jan 21 '22 13:01 ErikLW

In the public version, not yet. @maartenvd and others have been working on support for this (most of it is done) behind the scenes. Maybe you are interested to get involved?

Jutho avatar Jan 21 '22 14:01 Jutho

I would not be against making the TensorKitAD package public but unregistered?

maartenvd avatar Jan 21 '22 15:01 maartenvd

Sure. I don't think it should be registered as we probably want to reorganise some stuff. It contains TensorOperations specific stuff that is not really TensorKit. I want to invest some time in TensorOperations the next weeks, move CUDA support to a separate package, but maybe make AD support first class, so without the need to load other packages (except of course Zygote or any other AD engine that supports ChainRules.jl), by taking the stuff you have in TensorKitAD.

And maybe then TensorKit itself should also have first class AD support in the same manner.

Jutho avatar Jan 21 '22 15:01 Jutho

I would not be against making the TensorKitAD package public but unregistered?

Both TensorOperations and TensorKit support for AD would be very useful! If you decide to make the AD support public, let me know!

In the public version, not yet. @maartenvd and others have been working on support for this (most of it is done) behind the scenes. Maybe you are interested to get involved?

I have only recently started using Julia, so sadly I don't think I would be of much help.

ErikLW avatar Jan 21 '22 15:01 ErikLW

https://github.com/quantumghent/TensorKitAD.jl should be publicly visible now? Feel free to open a bug report with any new errors you encounter, when I'm back from holiday I will look at them.

maartenvd avatar Jan 22 '22 10:01 maartenvd