11"""
22 eigh_pullback!(
33 ΔA::AbstractMatrix, A, DV, ΔDV, [ind];
4- tol = default_pullback_gaugetol(DV[1]),
5- degeneracy_atol = tol,
6- gauge_atol = tol
4+ degeneracy_atol::Real = default_pullback_rank_atol(DV[1]),
5+ gauge_atol::Real = default_pullback_gauge_atol(ΔDV[2])
76 )
87
98Adds the pullback from the Hermitian eigenvalue decomposition of `A` to `ΔA`, given the
@@ -22,9 +21,8 @@ anti-hermitian part of `V' * ΔV`, restricted to rows `i` and columns `j` for wh
2221"""
2322function eigh_pullback! (
2423 ΔA:: AbstractMatrix , A, DV, ΔDV, ind = Colon ();
25- tol:: Real = default_pullback_gaugetol (DV[1 ]),
26- degeneracy_atol:: Real = tol,
27- gauge_atol:: Real = tol
24+ degeneracy_atol:: Real = default_pullback_rank_atol (DV[1 ]),
25+ gauge_atol:: Real = default_pullback_gauge_atol (ΔDV[2 ])
2826 )
2927
3028 # Basic size checks and determination
@@ -49,7 +47,7 @@ function eigh_pullback!(
4947 Δgauge < gauge_atol ||
5048 @warn " `eigh` cotangents sensitive to gauge choice: (|Δgauge| = $Δgauge )"
5149
52- aVᴴΔV .*= inv_safe .(D' .- D, tol )
50+ aVᴴΔV .*= inv_safe .(D' .- D, degeneracy_atol )
5351
5452 if ! iszerotangent (ΔDmat)
5553 ΔDvec = diagview (ΔDmat)
7472"""
7573 eigh_trunc_pullback!(
7674 ΔA::AbstractMatrix, A, DV, ΔDV;
77- tol=default_pullback_gaugetol(DV[1]),
78- degeneracy_atol=tol,
79- gauge_atol=tol
75+ degeneracy_atol::Real = default_pullback_rank_atol(DV[1]),
76+ gauge_atol::Real = default_pullback_gauge_atol(ΔDV[2])
8077 )
8178
8279Adds the pullback from the truncated Hermitian eigenvalue decomposition of `A` to `ΔA`,
@@ -96,9 +93,8 @@ not small compared to `gauge_atol`.
9693"""
9794function eigh_trunc_pullback! (
9895 ΔA:: AbstractMatrix , A, DV, ΔDV;
99- tol:: Real = default_pullback_gaugetol (DV[1 ]),
100- degeneracy_atol:: Real = tol,
101- gauge_atol:: Real = tol
96+ degeneracy_atol:: Real = default_pullback_rank_atol (DV[1 ]),
97+ gauge_atol:: Real = default_pullback_gauge_atol (ΔDV[2 ])
10298 )
10399
104100 # Basic size checks and determination
@@ -119,7 +115,7 @@ function eigh_trunc_pullback!(
119115 Δgauge < gauge_atol ||
120116 @warn " `eigh` cotangents sensitive to gauge choice: (|Δgauge| = $Δgauge )"
121117
122- aVᴴΔV .*= inv_safe .(D' .- D, tol )
118+ aVᴴΔV .*= inv_safe .(D' .- D, degeneracy_atol )
123119
124120 if ! iszerotangent (ΔDmat)
125121 ΔDvec = diagview (ΔDmat)
0 commit comments