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

Are the Factorization rules correct for Complex inputs?

Open oxinabox opened this issue 4 years ago • 3 comments

I see in https://github.com/JuliaDiff/ChainRules.jl/blob/master/src/rulesets/LinearAlgebra/factorization.jl

we use a fair bit of A' which is adjoint. In other places @simeonschaub has said we need to not use that, and to use transpose instread, so we don't recursively conjugate the complex numbers

oxinabox avatar Sep 10 '19 11:09 oxinabox

We should now be able to check the complex case with FiniteDifferences. But right now, most of our LinearAlgebra rules are restricted to real numbers anyways, so we could also just restrict these to reals for now and worry about this later.

simeonschaub avatar Sep 10 '19 11:09 simeonschaub

Sounds reasonable. They almost certainly weren't written with complex-valued inputs in mind. Probably makes sense to restrict the types of the inputs to be real-valued unless we're really lucky and the adjoints generalise immediately to complex numbers.

willtebbutt avatar Sep 10 '19 11:09 willtebbutt

Related reference for SVDs of complex-valued matrices: https://arxiv.org/abs/1909.02659

willtebbutt avatar Dec 14 '20 18:12 willtebbutt