Skip to content

Commit

Permalink
Throw errors in estimate_alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
singularitti committed May 19, 2024
1 parent 2a21d42 commit e862e3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FermiDiracOperatorExpansion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ end
function estimate_alpha(𝐇::AbstractMatrix, mu=1 / 2)
𝛌 = eigvals(𝐇)
if isempty(𝛌)
return zero(eltype(𝐇))
throw("no eigenvalues found!")
end
λₘᵢₙ, λₘₐₓ = extrema(𝛌)
return minimum((inv(mu - λₘᵢₙ), inv(λₘₐₓ - mu))) / 2
Expand Down

0 comments on commit e862e3d

Please sign in to comment.