We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40d5d1a commit 983ba28Copy full SHA for 983ba28
src/pullbacks/eig.jl
@@ -46,8 +46,7 @@ function eig_pullback!(
46
Δgauge ≤ gauge_atol ||
47
@warn "`eig` cotangents sensitive to gauge choice: (|Δgauge| = $Δgauge)"
48
49
- VᴴΔV ./= conj.(transpose(D) .- D)
50
- diagview(VᴴΔV) .= zero(eltype(VᴴΔV))
+ VᴴΔV .*= conj.(inv_safe.(transpose(D) .- D, degeneracy_atol))
51
52
if !iszerotangent(ΔDmat)
53
ΔDvec = diagview(ΔDmat)
0 commit comments