diff --git a/ext/TensorKitChainRulesCoreExt.jl b/ext/TensorKitChainRulesCoreExt.jl index 372a140b..1de548c1 100644 --- a/ext/TensorKitChainRulesCoreExt.jl +++ b/ext/TensorKitChainRulesCoreExt.jl @@ -250,7 +250,7 @@ function svd_pullback(U::AbstractMatrix, S::AbstractVector, Vd::AbstractMatrix, ΔVd -= VΔV' * Vp' end else - aVΔV = fill!(similar(V, (p, p)), 0) + aVΔV = fill!(similar(Vd, (p, p)), 0) end # check whether cotangents arise from gauge-invariance objective function