Exact values for comparison
This commit is contained in:
parent
e869d32343
commit
a569302ca2
|
|
@ -57,10 +57,14 @@
|
|||
"outputs": [],
|
||||
"source": [
|
||||
"extrapolate_points = range(0.40, 0.20, 5)\n",
|
||||
"extrapolate_E = Vector{ComplexF64}(undef, length(extrapolate_points))\n",
|
||||
"ref_E = 0.2 - 0.1im\n",
|
||||
"\n",
|
||||
"exact_E = Vector{ComplexF64}(undef, length(extrapolate_points))\n",
|
||||
"extrapolate_E = Vector{ComplexF64}(undef, length(extrapolate_points))\n",
|
||||
"\n",
|
||||
"for (j, c) in enumerate(extrapolate_points)\n",
|
||||
" exact_E[j] = quick_pole_E(V_system(c))\n",
|
||||
"\n",
|
||||
" EC_basis_w = EC_basis .* w\n",
|
||||
" H = get_H_matrix(V_system(c), p, w)\n",
|
||||
" H_EC = transpose(EC_basis) * H * EC_basis\n",
|
||||
|
|
@ -72,6 +76,7 @@
|
|||
"end\n",
|
||||
"\n",
|
||||
"scatter(real.(training_E), imag.(training_E), label=\"training\")\n",
|
||||
"scatter!(real.(exact_E), imag.(exact_E), label=\"exact\")\n",
|
||||
"scatter!(real.(extrapolate_E), imag.(extrapolate_E), label=\"extrapolated\")\n",
|
||||
"plot!(real.(mesh_E), imag.(mesh_E), label=\"contour\")\n",
|
||||
"xlims!(0,1)"
|
||||
|
|
|
|||
|
|
@ -39,4 +39,10 @@ function identify_pole_i(p, evals, μ=0.5)
|
|||
end
|
||||
end
|
||||
return current_i
|
||||
end
|
||||
|
||||
function quick_pole_E(V_pq, μ=0.5; cs_angle=0.5, cutoff=8.0, meshpoints=256)
|
||||
p, w = get_mesh([0, cutoff * exp(-1im * cs_angle)], meshpoints)
|
||||
evals = eigvals(get_H_matrix(V_pq, p, w))
|
||||
return evals[identify_pole_i(p, evals)]
|
||||
end
|
||||
Loading…
Reference in New Issue