Skip to content

Commit a7848f4

Browse files
shinaokaclaude
andcommitted
Fix statements that contradict the packages, and clear defects
Facts, checked against sparse-ir 2.1.4 (pylibsparseir 0.9.0) and SparseIR.jl 2.1.5: - The default τ sampling points lie in (0, β) (use_positive_taus=True), so reversing the array maps τ to β − τ. The migration guide and the FLEX_py comment said the v2 default was [−β/2, β/2], and the migration guide recommended -gtau*gtau[::-1], which is wrong under the default. With use_positive_taus=False the points are folded into (−β/2, β/2], and for an odd number of points β/2 is a point but −β/2 is not, so reversing the array is not τ → −τ in general. - FLEX_py and FLEX_jl ran with use_positive_taus=False, and their temperature sweeps have an odd basis size (L = 43 and 39), so -grit*grit[::-1] paired the wrong times. On main, λ_d becomes −10.5 at T = 0.03 in Python, and the Julia sweep aborts there with "U*max(chi0) >= 1". Use the default instead: the sweep then gives λ_d from 0.53 to 0.95, and the T = 0.1 run is unchanged. The False branch stays as a demonstration but asserts symmetric points. Also fix the FLEX_jl comment G(-tau,-r) = G(beta-tau,r) (sign) and "beta_min" (β_max = 1/T_min sets Λ = 400). - DLR poles are the roots of V_L, not the extrema of V'_{L-1} (DLR_py, DLR_jl). - Condition numbers: second_order_perturbation measures 163 (τ) and 466 (Matsubara), not 180 and 250. sparse_sampling_demo's Matsubara value is 213, about four times the τ value, not "slightly larger". - GW plots against matsb.wn / matsf.wn, which hold the reduced frequencies n, so label the x axes n instead of ω. Defects: - second_order_perturbation: Σ(τ) = U²G²(τ)G(β − τ) on the default points, i.e. srt = U*U*grt*grt*grt[::-1,:]. The old minus sign gave an acausal self-energy: Im Σ(iπ/β) = +5.72e-4 at k = Γ and positive at every k. It is now −5.72e-4 and negative at every k. - transformation_py plotted gtau1 instead of gtau2, and set the x label twice instead of the y label. transformation_jl hard-coded a developer's libsparseir path and loaded Revise. - DLR_py / DLR_jl: the semicircle √(2/π)√(1−ω²) integrates to 1.25; use (2/π)√(1−ω²). - FLEX_jl docstring F = |G|²Δ (the code uses −). The FLEX_py χ₀ title was not a raw string, so "\n" became a newline. FLEX_py c25 passed maxiter/U_maxiter and ignored the it_max/U_it_max it defines. The FLEX_jl χ₀ plot was titled χ. - Slips: the Matsubara fit in sparse_sampling_demo was commented "Fit G(τ) on the sampling times". The Eliashberg Δ(iν^F) panel had a bosonic axis label, and C/T was labeled C(T). SpM dropped the minus in G(τ_i) = −Σ U S ρ and in (G_l + S_l ρ_l)². analytic_continuation mixed the indices m and i. TPSC wrote χ⁰ for χ₀. BdG had lim_{τ→0+} for η → 0⁺ and ê(j) for e⃗(j). second_order_perturbation said "three integers" for a 2D point. transformation_py said V_l is dense "around τ = 0, β": the roots of V_l cluster around ω = 0. giv_tensor is the Matsubara data (was gtau_tensor). - DMFT_IPT_py linked to second_order_perturbation_py.md, which does not exist; link the notebook. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent c32b46a commit a7848f4

17 files changed

Lines changed: 76 additions & 68 deletions

‎src/BgG_jl.ipynb‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@
7777
"The regarded and advanced Green's functions are, respectively, defined as \n",
7878
"\n",
7979
"$$\n",
80-
"\\boldsymbol{G}^{\\rm R}(\\omega) = \\lim_{\\tau \\rightarrow 0+} \\boldsymbol{G}(\\omega + \\mathrm{i} \\eta)\n",
80+
"\\boldsymbol{G}^{\\rm R}(\\omega) = \\lim_{\\eta \\rightarrow 0^+} \\boldsymbol{G}(\\omega + \\mathrm{i} \\eta)\n",
8181
"$$\n",
8282
"\n",
8383
"$$\n",
84-
"\\boldsymbol{G}^{\\rm A}(\\omega) = \\lim_{\\tau \\rightarrow 0+} \\boldsymbol{G}(\\omega - \\mathrm{i} \\eta)\n",
84+
"\\boldsymbol{G}^{\\rm A}(\\omega) = \\lim_{\\eta \\rightarrow 0^+} \\boldsymbol{G}(\\omega - \\mathrm{i} \\eta)\n",
8585
"$$\n",
8686
"\n",
8787
"In order to obtain physical quantities (e.g., density of states) from Green's functions, we introduce the following useful $2N$-component unit-vectors $\\vec{e}(i)$ and $\\vec{h}(i)$ $(1 \\le i \\le N)$, which are, respectively, defined as\n",
@@ -140,7 +140,7 @@
140140
"the superconducting mean-field is expressed as \n",
141141
"\n",
142142
"$$\n",
143-
"\\langle c_i c_j \\rangle = T \\sum_{\\nu} \\hat{e}(j)^T \\vec{x}(i,\\nu).\n",
143+
"\\langle c_i c_j \\rangle = T \\sum_{\\nu} \\vec{e}(j)^T \\vec{x}(i,\\nu).\n",
144144
"$$\n",
145145
"\n",
146146
"For example, s-wave superconducting order parameter is defined as \n",
@@ -445,7 +445,7 @@
445445
"If one wants to use the Matsubara frequencies, one has to introduce the cutoff of the frequencies. Then the mean-fields are expressed as \n",
446446
"\n",
447447
"$$\n",
448-
"\\langle c_i c_j \\rangle = T \\sum_{|\\nu| < \\nu_c} \\hat{e}(j)^T \\vec{x}(i,\\nu).\n",
448+
"\\langle c_i c_j \\rangle = T \\sum_{|\\nu| < \\nu_c} \\vec{e}(j)^T \\vec{x}(i,\\nu).\n",
449449
"$$\n",
450450
"\n",
451451
"Here, $\\nu_c$ is a cutoff value (`ωc` in the code). \n",

‎src/DLR_jl.ipynb‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
" \\rho(\\omega) = \\sum_{p=1}^L c_p \\delta(\\omega - \\bar{\\omega}_p),\n",
1717
"$$\n",
1818
"\n",
19-
"where sampling frequencies $\\{\\bar{\\omega}_1, \\cdots, \\bar{\\omega}_{L}\\}$ are chosen to the extrema of $V'_{L-1}(\\omega)$ [2].\n",
19+
"where the poles $\\{\\bar{\\omega}_1, \\cdots, \\bar{\\omega}_{L}\\}$ are the roots of $V_L(\\omega)$, the first basis function beyond the $L$ functions kept in the basis [2].\n",
2020
"In the original paper [1], a more and different systematic way of choosing poles was used.\n",
2121
"We can transform data between $\\rho_l$ and $c_p$ through the relation\n",
2222
"\n",
@@ -45,7 +45,7 @@
4545
"We consider fermions and the semi circular DOS\n",
4646
"\n",
4747
"$$\n",
48-
"\\rho(\\omega) = \\sqrt{\\frac{2}{\\pi}} \\sqrt{1-\\omega^2}.\n",
48+
"\\rho(\\omega) = \\frac{2}{\\pi} \\sqrt{1-\\omega^2}.\n",
4949
"$$\n",
5050
"\n",
5151
"The corresponding Green's function is given by\n",
@@ -116,7 +116,7 @@
116116
"metadata": {},
117117
"outputs": [],
118118
"source": [
119-
"rho(omega) = sqrt(1-omega^2)/sqrt(0.5*π)\n",
119+
"rho(omega) = (2/π) * sqrt(1-omega^2)\n",
120120
"\n",
121121
"omega = LinRange(-wmax, wmax, 1000)\n",
122122
"plot(omega, rho.(omega), xlabel=latexstring(\"\\\\omega\"), ylabel=latexstring(\"\\\\rho(\\\\omega)\"))"

‎src/DLR_py.ipynb‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
"## Theory\n",
1111
"\n",
1212
"We explain how to transform expansion coefficients in IR to the discrete Lehmann representation (DLR) [1].\n",
13-
"In `sparse-ir`, we choose poles based on the exrema of $V_l(\\omega)$ [2] (In the original paper [1], a more systematic way is proposed).\n",
13+
"In `sparse-ir`, we choose the poles based on the roots of the IR basis function $V_L(\\omega)$ [2] (In the original paper [1], a more systematic way is proposed).\n",
1414
"We model the spectral function as\n",
1515
"\n",
1616
"$$\n",
1717
" \\rho(\\omega) = \\sum_{p=1}^L c_p \\delta(\\omega - \\bar{\\omega}_p),\n",
1818
"$$\n",
1919
"\n",
20-
"where sampling frequencies $\\{\\bar{\\omega}_1, \\cdots, \\bar{\\omega}_{L}\\}$ are chosen to the extrema of $V'_{L-1}(\\omega)$.\n",
20+
"where the poles $\\{\\bar{\\omega}_1, \\cdots, \\bar{\\omega}_{L}\\}$ are the roots of $V_L(\\omega)$, the first basis function beyond the $L$ functions kept in the basis.\n",
2121
"This choice is heuristic but allows us a numerically stable transform between $\\rho_l$ and $c_p$ through the relation\n",
2222
"\n",
2323
"$$\n",
@@ -45,7 +45,7 @@
4545
"We consider fermions and the semi circular DOS\n",
4646
"\n",
4747
"$$\n",
48-
"\\rho(\\omega) = \\sqrt{\\frac{2}{\\pi}} \\sqrt{1-\\omega^2}.\n",
48+
"\\rho(\\omega) = \\frac{2}{\\pi} \\sqrt{1-\\omega^2}.\n",
4949
"$$\n",
5050
"\n",
5151
"The corresponding Green's function is given by\n",
@@ -119,7 +119,7 @@
119119
"metadata": {},
120120
"outputs": [],
121121
"source": [
122-
"rho = lambda omega: np.sqrt(1-omega**2)/np.sqrt(0.5*np.pi)\n",
122+
"rho = lambda omega: (2/np.pi) * np.sqrt(1-omega**2)\n",
123123
"\n",
124124
"omega = np.linspace(-wmax, wmax, 1000)\n",
125125
"plt.xlabel(r'$\\omega$')\n",

‎src/DMFT_IPT_py.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"\n",
4545
"\n",
4646
"### IPT Solver\n",
47-
"The IPT is an inexpensive way of solving the impurity problem (instead of applying e.g. Quantum Monte Carlo (QMC) or Exact Diagonalization (ED) methods). The self-energy is approximated by the second-order perturbation theory (SOPT/GF2, see other [tutorial](second_order_perturbation_py.md))\n",
47+
"The IPT is an inexpensive way of solving the impurity problem (instead of applying e.g. Quantum Monte Carlo (QMC) or Exact Diagonalization (ED) methods). The self-energy is approximated by the second-order perturbation theory (SOPT/GF2, see other [tutorial](second_order_perturbation_py.ipynb))\n",
4848
"\n",
4949
"$$\n",
5050
" \\Sigma(\\tau) = U^2\\mathcal{G}^3(\\tau).\n",

‎src/FLEX_jl.ipynb‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -401,16 +401,20 @@
401401
"function ckio_calc(solver::FLEXSolver)\n",
402402
" \"\"\" Calculate irreducible susciptibility chi0(iv,q) \"\"\"\n",
403403
" # chi0(tau, r) = -G(tau, r) * G(-tau, -r)\n",
404-
" # For positive taus [0, beta]: G(-tau, -r) = G(beta-tau, r)\n",
404+
" # For positive taus in (0, beta): G(-tau, -r) = -G(beta-tau, -r) = -G(beta-tau, r) (inversion symmetry),\n",
405+
" # and G(beta-tau, r) is obtained by reversing the tau array\n",
405406
" # => chi0(tau, r) = G(tau, r) * G(beta-tau, r)\n",
406-
" # For symmetric taus [-beta/2, beta/2]: G(-tau, r) is obtained by reversing the tau array\n",
407+
" # For taus in (-beta/2, beta/2]: G(-tau, r) is obtained by reversing the tau array\n",
408+
" # only for an even number of points (for an odd number, beta/2 is a point but -beta/2 is not)\n",
407409
" # => chi0(tau, r) = -G(tau, r) * G(-tau, r)\n",
408410
" grit_reversed = reverse(solver.grit, dims=1)\n",
409411
" if solver.mesh.use_positive_taus\n",
410412
" # G(tau) * G(beta - tau)\n",
411413
" crit = solver.grit .* grit_reversed\n",
412414
" else\n",
413415
" # - G(tau) * G(- tau)\n",
416+
" tau = solver.mesh.IR_basis_set.smpl_tau_f.sampling_points\n",
417+
" @assert reverse(tau) ≈ -tau\n",
414418
" crit = -solver.grit .* grit_reversed\n",
415419
" end\n",
416420
"\n",
@@ -497,7 +501,7 @@
497501
"outputs": [],
498502
"source": [
499503
"# initialize calculation\n",
500-
"use_positive_taus = false\n",
504+
"use_positive_taus = true\n",
501505
"\n",
502506
"IR_basis_set = FiniteTempBasisSet(beta, Float64(wmax), IR_tol; use_positive_taus=use_positive_taus)\n",
503507
"mesh = Mesh(nk1, nk2, IR_basis_set; use_positive_taus=use_positive_taus)\n",
@@ -541,7 +545,7 @@
541545
"source": [
542546
"# plot 2D k-dependence of lowest Matsubara frequency of e.g. chi0\n",
543547
"heatmap(myx, myy, real.(solver.ckio[solver.mesh.iw0_b, :, :]),\n",
544-
" title=latexstring(\"\\\\mathrm{Re}\\\\,\\\\chi(k,i\\\\nu_0)\"), xlabel=latexstring(\"k_x/\\\\pi\"), ylabel=latexstring(\"k_y/\\\\pi\"),\n",
548+
" title=latexstring(\"\\\\mathrm{Re}\\\\,\\\\chi_0(k,\\\\mathrm{i}\\\\nu=0)\"), xlabel=latexstring(\"k_x/\\\\pi\"), ylabel=latexstring(\"k_y/\\\\pi\"),\n",
545549
" c=:viridis,\n",
546550
" xlim=(0, 2), ylim=(0, 2), aspect_ratio=1.0, size=(370, 300))"
547551
]
@@ -681,7 +685,7 @@
681685
"end\n",
682686
"\n",
683687
"function frit_calc(gap_solver::LinearizedGapSolver)\n",
684-
" \"\"\" Calculate (linearized) anomalous Green function F = |G|^2 * delta for evaluating the gap equation \"\"\"\n",
688+
" \"\"\" Calculate (linearized) anomalous Green function F = -|G|^2 * delta for evaluating the gap equation \"\"\"\n",
685689
" fkio = -gap_solver.gkio .* conj(gap_solver.gkio) .* gap_solver.delta\n",
686690
"\n",
687691
" # Fourier transform\n",
@@ -793,7 +797,7 @@
793797
"# numerical parameters\n",
794798
"nk1, nk2 = 64, 64 # k-mesh sufficiently dense!\n",
795799
"nk = nk1 * nk2\n",
796-
"IR_Lambda = 10^3 # dimensionless IR parameter >= w_max * beta_min = 400\n",
800+
"IR_Lambda = 10^3 # dimensionless IR parameter >= wmax * beta_max = 400\n",
797801
"IR_tol = 1e-7 # accuary for l-cutoff of IR basis functions\n",
798802
"sfc_tol = 1e-4 # accuracy for self-consistent iteration\n",
799803
"it_max = 30 # maximal number of iterations in self-consistent cycle\n",
@@ -802,7 +806,7 @@
802806
"\n",
803807
"# initialize first IR basis set (no recalculation afterwrds)\n",
804808
"beta_init = 1.0 / T_values[1]\n",
805-
"use_positive_taus = false\n",
809+
"use_positive_taus = true\n",
806810
"IR_basis_set = FiniteTempBasisSet(beta_init, IR_Lambda / beta_init, IR_tol; use_positive_taus=use_positive_taus)\n",
807811
"\n",
808812
"# set initial self_energy - will be set to previous calculation step afterwards\n",

‎src/FLEX_py.ipynb‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@
9494
"metadata": {},
9595
"outputs": [],
9696
"source": [
97-
"# If true, we use sampling points in [0, beta].\n",
98-
"# If false, we use sampling points in [-beta/2, beta/2].\n",
99-
"# sparse-ir version 1 defaults to use_positive_taus=True, \n",
100-
"# but sparse-ir version 2 defaults to use_positive_taus=False.\n",
101-
"use_positive_taus = False"
97+
"# If true, we use sampling points in (0, beta); reversing the array maps tau to beta - tau.\n",
98+
"# If false, we use sampling points in (-beta/2, beta/2]; reversing the array maps tau to -tau\n",
99+
"# only if the number of points is even (see ckio_calc below).\n",
100+
"# sparse-ir defaults to use_positive_taus=True, which reproduces the sampling points of version 1.\n",
101+
"use_positive_taus = True"
102102
]
103103
},
104104
{
@@ -355,6 +355,10 @@
355355
" ckio = self.grit * self.grit[::-1, :]\n",
356356
" else:\n",
357357
" # - G(tau) * G(- tau)\n",
358+
" # Reversing maps tau to -tau only for an even number of points: for an odd number,\n",
359+
" # the unfolded set (-beta/2, beta/2] contains beta/2 but not -beta/2.\n",
360+
" tau = self.mesh.IR_basis_set.smpl_tau_f.sampling_points\n",
361+
" assert np.allclose(tau[::-1], -tau)\n",
358362
" ckio = - self.grit * self.grit[::-1, :]\n",
359363
"\n",
360364
" # Fourier transform\n",
@@ -482,7 +486,7 @@
482486
"ax.set_ylabel('$k_y/\\pi$')\n",
483487
"ax.set_ylim([0,2])\n",
484488
"ax.set_aspect('equal')\n",
485-
"ax.set_title('Re $\\chi_0(k,i\\nu_0)$')\n",
489+
"ax.set_title(r'Re $\\chi_0(k,\\mathrm{i}\\nu^\\mathrm{B}=0)$')\n",
486490
"plt.colorbar()\n",
487491
"plt.show()"
488492
]
@@ -745,7 +749,7 @@
745749
"# numerical parameters\n",
746750
"nk1, nk2 = 64, 64 # k-mesh sufficiently dense!\n",
747751
"nk = nk1*nk2\n",
748-
"IR_Lambda = 10**3 # dimensionless IR parameter >= w_max * beta_min = 400\n",
752+
"IR_Lambda = 10**3 # dimensionless IR parameter >= wmax * beta_max = 400\n",
749753
"IR_tol = 1e-8 # desired accuary for l-cutoff of IR basis functions\n",
750754
"sfc_tol = 1e-4 # desired accuracy for self-consistent iteration\n",
751755
"it_max = 30 # maximal number of iterations in self-consistent cycle\n",
@@ -775,12 +779,12 @@
775779
" \n",
776780
" # calculate FLEX loop\n",
777781
" solver = FLEXSolver(mesh, U, n, sigma_init=sigma_init, sfc_tol=sfc_tol, \n",
778-
" maxiter=maxiter, U_maxiter=U_maxiter, mix=mix, verbose=False)\n",
782+
" maxiter=it_max, U_maxiter=U_it_max, mix=mix, verbose=False)\n",
779783
" solver.solve()\n",
780784
" sigma_init = solver.sigma\n",
781785
"\n",
782786
" # calculate linearized gap equation\n",
783-
" gap_solver = LinearizedGapSolver(solver, maxiter=maxiter, sfc_tol=sfc_tol, verbose=False)\n",
787+
" gap_solver = LinearizedGapSolver(solver, maxiter=it_max, sfc_tol=sfc_tol, verbose=False)\n",
784788
" gap_solver.solve()\n",
785789
" \n",
786790
" # save data for plotting\n",

‎src/GW_py.ipynb‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273
"pl.plot(matsb.wn,P_iw_b.imag,label='imaginary')\n",
274274
"pl.plot(matsb.wn,P_iw_b.real,label='real')\n",
275275
"pl.title(r'$P(\\mathrm{i}\\nu^\\mathrm{B})$')\n",
276-
"pl.xlabel(r'$\\omega$')\n",
276+
"pl.xlabel(r'$n$')\n",
277277
"pl.legend()"
278278
]
279279
},
@@ -321,7 +321,7 @@
321321
"pl.plot(matsb.wn,W_iw_b.imag,label='imaginary')\n",
322322
"pl.plot(matsb.wn,W_iw_b.real,label='real')\n",
323323
"pl.title(r'$W(\\mathrm{i}\\nu^\\mathrm{B})$')\n",
324-
"pl.xlabel(r'$\\omega$')\n",
324+
"pl.xlabel(r'$n$')\n",
325325
"pl.legend()"
326326
]
327327
},
@@ -495,10 +495,10 @@
495495
"fig, ax = pl.subplots(1,2, figsize=(12,5) )\n",
496496
"ax[0].plot(matsf.wn,E_iw_f_U.imag)\n",
497497
"ax[0].set_title(r'Imaginary part of $\\Sigma(\\mathrm{i}\\nu^\\mathrm{F})$')\n",
498-
"ax[0].set_xlabel(r'$\\omega$')\n",
498+
"ax[0].set_xlabel(r'$n$')\n",
499499
"ax[1].plot(matsf.wn,E_iw_f_U.real)\n",
500500
"ax[1].set_title(r'Real part of $\\Sigma(\\mathrm{i}\\nu^\\mathrm{F})$')\n",
501-
"ax[1].set_xlabel(r'$\\omega$')"
501+
"ax[1].set_xlabel(r'$n$')"
502502
]
503503
},
504504
{
@@ -536,7 +536,7 @@
536536
"pl.plot(matsf.wn,G_iw_f.imag,label='imaginary')\n",
537537
"pl.plot(matsf.wn,G_iw_f.real,label='real')\n",
538538
"pl.title(r'$G(\\mathrm{i}\\nu^\\mathrm{F})$')\n",
539-
"pl.xlabel(r'$\\omega$')\n",
539+
"pl.xlabel(r'$n$')\n",
540540
"pl.legend()"
541541
]
542542
},
@@ -550,10 +550,12 @@
550550
" pl.plot(matsf.wn,E_iw_f_arr[i].imag,label='current')\n",
551551
" pl.title(r'$\\Sigma(\\mathrm{i}\\nu^\\mathrm{F})$ in the current and previous iteration')\n",
552552
" pl.plot(matsf.wn,E_iw_f_arr[i-1].imag,'.',label='previous')\n",
553+
" pl.xlabel(r'$n$')\n",
553554
" pl.legend()\n",
554555
" pl.show()\n",
555556
" pl.plot(matsf.wn,np.abs(E_iw_f_arr[i]-E_iw_f_arr[i-1]))\n",
556557
" pl.title(r'$|\\Sigma_i(\\mathrm{i}\\nu^\\mathrm{F})-\\Sigma_{i-1}(\\mathrm{i}\\nu^\\mathrm{F})|$' )\n",
558+
" pl.xlabel(r'$n$')\n",
557559
" "
558560
]
559561
},

‎src/TPSC_py.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"When implementing the TPSC, a few points need to be treated carefully which we adress in the following:\n",
8787
"\n",
8888
"* The constant Hartree term $V_{\\mathrm{H}} = U$ in the interaction $V$ and respective self-energy term $\\Sigma_H = U n_{\\sigma} = U\\frac{n}{2}$ can be absorbed into the definition of the chemical potential $\\mu$. Otherwise we would have to treat this term separately, since the IR basis cannot model the $\\delta$-peak in frequency space well/compactly. In this case, evaluate the term analytically and add it after the Fourier transformation step.\n",
89-
"* An upper bound for the renormalized spin vertex $U_{\\mathrm{sp}}$ exists. Since the denominator spin susceptibility $\\chi_{\\mathrm{sp}}$ should not diverge, the upper bound is given by the RPA critical interaction value $U_{\\mathrm{crit}} = 1/\\mathrm{max}\\{\\chi^0\\}$. Mathematically, the function $f(U_{\\mathrm{sp}}) = 2\\sum \\chi_{\\mathrm{sp}}(U_{\\mathrm{sp}}) - n + \\frac{U_{\\mathrm{sp}}}{2U}n^2$, from which $U_{\\mathrm{sp}}$ is determined, turns unstable for $U_{\\mathrm{sp}} \\geq U_{\\mathrm{crit}}$ (try plotting $f(U_{\\mathrm{sp}})$!). At this point, TPSC is not applicable and, e.g., the temperature $T$ is too low or the (unrenormalized) interaction $U$ too large.\n",
89+
"* An upper bound for the renormalized spin vertex $U_{\\mathrm{sp}}$ exists. Since the denominator spin susceptibility $\\chi_{\\mathrm{sp}}$ should not diverge, the upper bound is given by the RPA critical interaction value $U_{\\mathrm{crit}} = 1/\\mathrm{max}\\{\\chi_0\\}$. Mathematically, the function $f(U_{\\mathrm{sp}}) = 2\\sum \\chi_{\\mathrm{sp}}(U_{\\mathrm{sp}}) - n + \\frac{U_{\\mathrm{sp}}}{2U}n^2$, from which $U_{\\mathrm{sp}}$ is determined, turns unstable for $U_{\\mathrm{sp}} \\geq U_{\\mathrm{crit}}$ (try plotting $f(U_{\\mathrm{sp}})$!). At this point, TPSC is not applicable and, e.g., the temperature $T$ is too low or the (unrenormalized) interaction $U$ too large.\n",
9090
"* An internal accuracy check $\\frac{1}{2}\\mathrm{Tr}(\\Sigma G) = U \\langle n_{\\uparrow} n_{\\downarrow}\\rangle$ can be employed to test the validity of TPSC (not done here)."
9191
]
9292
},

‎src/analytic_continuation_py.ipynb‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,12 @@
345345
"grid $\\{\\omega_1,\\ldots,\\omega_M\\}$ of frequencies and a function $f(x)$ and expand:\n",
346346
"\n",
347347
"$$\n",
348-
" \\rho(\\omega) = \\sum_{m=1}^M a_i f(\\omega - \\omega_i),\n",
348+
" \\rho(\\omega) = \\sum_{m=1}^M a_m f(\\omega - \\omega_m),\n",
349349
"$$\n",
350350
"\n",
351-
"where $a_i$ are now the expansion coefficients. (More advanced methods also optimize over $\\omega_m$ and/or add some shape parameter of $f$ to the optimization parameters.)\n",
351+
"where $a_m$ are now the expansion coefficients. (More advanced methods also optimize over $\\omega_m$ and/or add some shape parameter of $f$ to the optimization parameters.)\n",
352352
"\n",
353-
"It is useful to use some probability distribution as $f(x)$, as this allows one to translate non-negativity and norm of $\\rho(\\omega)$ to non-negativity and norm of $a_i$. Since one can only observe \"broadened\" spectra in experiment for any given temperature, a natural choice is the Lorentz (Cauchy) distribution:\n",
353+
"It is useful to use some probability distribution as $f(x)$, as this allows one to translate non-negativity and norm of $\\rho(\\omega)$ to non-negativity and norm of $a_m$. Since one can only observe \"broadened\" spectra in experiment for any given temperature, a natural choice is the Lorentz (Cauchy) distribution:\n",
354354
"\n",
355355
"$$\n",
356356
" f(\\omega) = \\frac1\\pi \\frac\\eta{\\omega^2 + \\eta^2},\n",

‎src/eliashberg_holstein_py.ipynb‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,8 @@
598598
" plt.show()\n",
599599
"\n",
600600
" plt.plot(iv_f.imag, res['delta_iv'].real, marker=\"x\")\n",
601-
" plt.xlabel(r\"$\\nu_m$\")\n",
602-
" plt.ylabel(r\"Re $\\Delta(\\mathrm{i}\\nu_m)$\")\n",
601+
" plt.xlabel(r\"$\\nu^\\mathrm{F}$\")\n",
602+
" plt.ylabel(r\"Re $\\Delta(\\mathrm{i}\\nu^\\mathrm{F})$\")\n",
603603
" plt.xlim([-0.8, 0.8])\n",
604604
" plt.xticks([-0.8, -0.6, -0.4, -0.2, 0, 0.2, 0.4, 0.6, 0.8])\n",
605605
" plt.ylim([-0.05, 0.3])\n",
@@ -745,7 +745,7 @@
745745
"plt.plot(temps, specific_heat/temps, marker=\"o\")\n",
746746
"plt.ylim([0, 1200])\n",
747747
"plt.xlabel(r\"$T$\")\n",
748-
"plt.ylabel(r\"$C(T)$\")\n",
748+
"plt.ylabel(r\"$C(T)/T$\")\n",
749749
"plt.show()"
750750
]
751751
},

0 commit comments

Comments
 (0)