Skip to content

Commit 3ee267f

Browse files
shinaokaclaude
andcommitted
Use the default positive sampling times in FLEX, and fix clear defects
FLEX (Python and Julia) now relies on the default use_positive_taus=true of sparse-ir and SparseIR.jl, which puts the sampling times in (0, beta) as in version 1. The switch cell, the use_positive_taus=false branch of ckio_calc, and the use_positive_taus field and keyword of the Julia Mesh are removed. FLEX_py: remove the diagnostic print added in #4. It called calc_electron_density, which recomputes gkio without mixing and so overwrote the mixed Green function that the gap solver reads. lambda_d at T = 0.1 was 0.4571 instead of 0.4583 (version 1 and the Julia notebook). lambda_d(T) now matches version 1 to 4e-13. Also: - BgG_jl: the IR expression for <c_i c_j> takes -G(beta^-), as fit_ir does. Exact diagonalization gives the same value. - FLEX, TPSC: n is the total density, n = 2(1 + G(0+)), so the parameter comments no longer say "per spin". - Use raw strings for LaTeX labels, which removes the SyntaxWarnings on the pages (DMFT_IPT, FLEX, GW, orbital susceptibility, second-order perturbation). - FLEX_jl: the initialization cell no longer displays an uninitialized matrix. - eliashberg_holstein_py: elta_iv0 -> delta_iv0. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 59bebc2 commit 3ee267f

9 files changed

Lines changed: 50 additions & 89 deletions

‎src/BgG_jl.ipynb‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,11 @@
174174
"The superconducting mean-fielads are expressed as \n",
175175
"\n",
176176
"$$\n",
177-
"\\langle c_i c_j \\rangle = \\vec{e}(j)^T \\boldsymbol{G}(\\tau = \\beta^-) \\vec{h}(i) = \\sum_{l=0}^{L-1} U_l(\\beta^-) \\vec{e}(j)^T \\boldsymbol{G}_l \\vec{h}(i)\n",
177+
"\\langle c_i c_j \\rangle = -\\vec{e}(j)^T \\boldsymbol{G}(\\tau = \\beta^-) \\vec{h}(i) = -\\sum_{l=0}^{L-1} U_l(\\beta^-) \\vec{e}(j)^T \\boldsymbol{G}_l \\vec{h}(i)\n",
178178
"$$\n",
179179
"\n",
180+
"The minus sign appears because this component of $\\boldsymbol{G}(\\tau)$ is continuous at $\\tau = 0$: the Matsubara sum above equals $\\boldsymbol{G}(\\tau = 0) = -\\boldsymbol{G}(\\tau = \\beta^-)$.\n",
181+
"\n",
180182
"Since the Matsubara Green's function is expressed as \n",
181183
"\n",
182184
"$$\n",

‎src/DMFT_IPT_py.ipynb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
"outputs": [],
190190
"source": [
191191
"def IPTSolver(mesh, g_weiss, U):\n",
192-
" \"\"\"\n",
192+
" r\"\"\"\n",
193193
" IPT solver to calculate the impurity problem.\n",
194194
" Input:\n",
195195
" mesh - Holding class of IR basis with sparsely sampled grids.\n",
@@ -547,7 +547,7 @@
547547
"ax = plt.gca()\n",
548548
"ax.set_xlabel('$U/t_\\\\star$', fontsize=12)\n",
549549
"ax.set_xlim([U_min, U_max])\n",
550-
"ax.set_ylabel('$Z = (1-\\partial\\Sigma/\\partial\\omega)^{-1}$', fontsize=12)\n",
550+
"ax.set_ylabel(r'$Z = (1-\\partial\\Sigma/\\partial\\omega)^{-1}$', fontsize=12)\n",
551551
"ax.set_ylim([0,1])\n",
552552
"ax.legend(fontsize=12)\n",
553553
"plt.show()"

‎src/FLEX_jl.ipynb‎

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"\n",
7575
"T = 0.1 # temperature\n",
7676
"beta = 1 / T # inverse temperature\n",
77-
"n = 0.85 # electron filling, here per spin per lattice site (n=1: half filling)\n",
77+
"n = 0.85 # electron filling per lattice site, summed over both spins (n=1: half filling)\n",
7878
"U = 4.0 # Hubbard interaction\n",
7979
"\n",
8080
"### Numerical parameters\n",
@@ -119,15 +119,13 @@
119119
" bnw::Int64\n",
120120
" bntau::Int64\n",
121121
" IR_basis_set::FiniteTempBasisSet\n",
122-
" use_positive_taus::Bool\n",
123122
"end\n",
124123
"\n",
125124
"\"\"\"Initiarize function\"\"\"\n",
126125
"function Mesh(\n",
127126
" nk1::Int64,\n",
128127
" nk2::Int64,\n",
129-
" IR_basis_set::FiniteTempBasisSet;\n",
130-
" use_positive_taus::Bool=false\n",
128+
" IR_basis_set::FiniteTempBasisSet\n",
131129
")::Mesh\n",
132130
"\n",
133131
" nk::Int64 = nk1 * nk2\n",
@@ -155,7 +153,7 @@
155153
" end\n",
156154
"\n",
157155
" # Return\n",
158-
" Mesh(nk1, nk2, nk, ek, iw0_f, iw0_b, fnw, fntau, bnw, bntau, IR_basis_set, use_positive_taus)\n",
156+
" Mesh(nk1, nk2, nk, ek, iw0_f, iw0_b, fnw, fntau, bnw, bntau, IR_basis_set)\n",
159157
"end\n",
160158
"\n",
161159
"function smpl_obj(mesh::Mesh, statistics::SparseIR.Statistics)\n",
@@ -400,23 +398,9 @@
400398
"\n",
401399
"function ckio_calc(solver::FLEXSolver)\n",
402400
" \"\"\" Calculate irreducible susciptibility chi0(iv,q) \"\"\"\n",
403-
" # chi0(tau, r) = -G(tau, r) * G(-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",
406-
" # => chi0(tau, r) = G(tau, r) * G(beta-tau, r)\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",
409-
" # => chi0(tau, r) = -G(tau, r) * G(-tau, r)\n",
410-
" grit_reversed = reverse(solver.grit, dims=1)\n",
411-
" if solver.mesh.use_positive_taus\n",
412-
" # G(tau) * G(beta - tau)\n",
413-
" crit = solver.grit .* grit_reversed\n",
414-
" else\n",
415-
" # - G(tau) * G(- tau)\n",
416-
" tau = solver.mesh.IR_basis_set.smpl_tau_f.sampling_points\n",
417-
" @assert reverse(tau) ≈ -tau\n",
418-
" crit = -solver.grit .* grit_reversed\n",
419-
" end\n",
401+
" # chi0(tau, r) = -G(tau, r) * G(-tau, -r) = G(tau, r) * G(beta-tau, r) (inversion symmetry).\n",
402+
" # The default sampling times lie in (0, beta), so reversing the tau array gives G(beta-tau, r).\n",
403+
" crit = solver.grit .* reverse(solver.grit, dims=1)\n",
420404
"\n",
421405
" # Fourier transform\n",
422406
" ckit = r_to_k(solver.mesh, crit)\n",
@@ -501,10 +485,8 @@
501485
"outputs": [],
502486
"source": [
503487
"# initialize calculation\n",
504-
"use_positive_taus = true\n",
505-
"\n",
506-
"IR_basis_set = FiniteTempBasisSet(beta, Float64(wmax), IR_tol; use_positive_taus=use_positive_taus)\n",
507-
"mesh = Mesh(nk1, nk2, IR_basis_set; use_positive_taus=use_positive_taus)\n",
488+
"IR_basis_set = FiniteTempBasisSet(beta, Float64(wmax), IR_tol)\n",
489+
"mesh = Mesh(nk1, nk2, IR_basis_set)\n",
508490
"sigma_init = zeros(ComplexF64, (mesh.fnw, nk1, nk2))\n",
509491
"solver = FLEXSolver(mesh, beta, U, n, sigma_init, sfc_tol=sfc_tol, maxiter=maxiter, U_maxiter=U_maxiter, mix=mix)\n",
510492
"\n",
@@ -787,7 +769,7 @@
787769
"println(\"Initialization...\")\n",
788770
"# system parameters\n",
789771
"t = 1 # hopping amplitude\n",
790-
"n = 0.85 # electron filling, here per spin per lattice site (n=1: half filling)\n",
772+
"n = 0.85 # electron filling per lattice site, summed over both spins (n=1: half filling)\n",
791773
"U = 4.0 # Hubbard interaction\n",
792774
"\n",
793775
"W = 8 * t # bandwidth\n",
@@ -806,16 +788,15 @@
806788
"\n",
807789
"# initialize first IR basis set (no recalculation afterwrds)\n",
808790
"beta_init = 1.0 / T_values[1]\n",
809-
"use_positive_taus = true\n",
810-
"IR_basis_set = FiniteTempBasisSet(beta_init, IR_Lambda / beta_init, IR_tol; use_positive_taus=use_positive_taus)\n",
791+
"IR_basis_set = FiniteTempBasisSet(beta_init, IR_Lambda / beta_init, IR_tol)\n",
811792
"\n",
812793
"# set initial self_energy - will be set to previous calculation step afterwards\n",
813794
"sigma_init = zeros(ComplexF64, (length(IR_basis_set.smpl_wn_f.sampling_points), nk1, nk2))\n",
814795
"\n",
815796
"# empty arrays for results\n",
816797
"lam_T = Array{Float64}(undef, length(T_values))\n",
817798
"chiSmax_T = Array{Float64}(undef, length(T_values))\n",
818-
"chi_s_plt = Array{Float64}(undef, nk1, nk2)"
799+
"chi_s_plt = Array{Float64}(undef, nk1, nk2);"
819800
]
820801
},
821802
{
@@ -836,8 +817,8 @@
836817
" local beta = 1 / T\n",
837818
"\n",
838819
" # initialize meshes\n",
839-
" IR_basis_set = FiniteTempBasisSet(beta, IR_Lambda / beta, IR_tol; sve_result=IR_basis_set.basis_f.sve_result, use_positive_taus=use_positive_taus)\n",
840-
" local mesh = Mesh(nk1, nk2, IR_basis_set; use_positive_taus=use_positive_taus)\n",
820+
" IR_basis_set = FiniteTempBasisSet(beta, IR_Lambda / beta, IR_tol; sve_result=IR_basis_set.basis_f.sve_result)\n",
821+
" local mesh = Mesh(nk1, nk2, IR_basis_set)\n",
841822
"\n",
842823
" # calculate FLEX loop\n",
843824
" solver = FLEXSolver(mesh, beta, U, n, sigma_init, sfc_tol=sfc_tol, maxiter=it_max, U_maxiter=U_it_max, mix=mix, verbose=false)\n",

‎src/FLEX_py.ipynb‎

Lines changed: 23 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -87,20 +87,6 @@
8787
"import matplotlib.pyplot as plt"
8888
]
8989
},
90-
{
91-
"cell_type": "code",
92-
"execution_count": null,
93-
"id": "f8ef0f85",
94-
"metadata": {},
95-
"outputs": [],
96-
"source": [
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"
102-
]
103-
},
10490
{
10591
"cell_type": "markdown",
10692
"id": "238e7d17",
@@ -123,7 +109,7 @@
123109
"\n",
124110
"T = 0.1 # temperature\n",
125111
"beta = 1/T # inverse temperature\n",
126-
"n = 0.85 # electron filling, here per spin per lattice site (n=1: half filling)\n",
112+
"n = 0.85 # electron filling per lattice site, summed over both spins (n=1: half filling)\n",
127113
"U = 4 # Hubbard interaction\n",
128114
"\n",
129115
"### Numerical parameters\n",
@@ -154,7 +140,7 @@
154140
"outputs": [],
155141
"source": [
156142
"#### Initiate fermionic and bosonic IR basis objects\n",
157-
"IR_basis_set = sparse_ir.FiniteTempBasisSet(beta, wmax, eps=IR_tol, use_positive_taus=use_positive_taus)\n",
143+
"IR_basis_set = sparse_ir.FiniteTempBasisSet(beta, wmax, eps=IR_tol)\n",
158144
"\n",
159145
"class Mesh:\n",
160146
" \"\"\"\n",
@@ -286,7 +272,6 @@
286272
" if sfc_check < self.sfc_tol:\n",
287273
" print(\"FLEX loop converged at desired accuracy\")\n",
288274
" break\n",
289-
" print(\"FLEX loop finished\", \" mu = \", self.mu, \"n = \", self.calc_electron_density(self.mu))\n",
290275
" \n",
291276
" def loop(self):\n",
292277
" \"\"\" FLEX loop \"\"\"\n",
@@ -350,16 +335,9 @@
350335
"\n",
351336
" def ckio_calc(self):\n",
352337
" \"\"\" Calculate irreducible susciptibility chi0(iv,q) \"\"\"\n",
353-
" if use_positive_taus:\n",
354-
" # G(tau) * G(beta - tau)\n",
355-
" ckio = self.grit * self.grit[::-1, :]\n",
356-
" else:\n",
357-
" # - 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",
362-
" ckio = - self.grit * self.grit[::-1, :]\n",
338+
" # chi0(tau, r) = -G(tau, r) G(-tau, -r) = G(tau, r) G(beta - tau, r) (inversion symmetry).\n",
339+
" # The default sampling times lie in (0, beta), so reversing grit gives G(beta - tau, r).\n",
340+
" ckio = self.grit * self.grit[::-1, :]\n",
363341
"\n",
364342
" # Fourier transform\n",
365343
" ckio = self.mesh.r_to_k(ckio)\n",
@@ -433,7 +411,7 @@
433411
"outputs": [],
434412
"source": [
435413
"# initialize calculation\n",
436-
"IR_basis_set = sparse_ir.FiniteTempBasisSet(beta, wmax, eps=IR_tol, use_positive_taus=use_positive_taus)\n",
414+
"IR_basis_set = sparse_ir.FiniteTempBasisSet(beta, wmax, eps=IR_tol)\n",
437415
"mesh = Mesh(IR_basis_set, nk1, nk2)\n",
438416
"solver = FLEXSolver(mesh, U, n, sigma_init=0, sfc_tol=sfc_tol, maxiter=maxiter, U_maxiter=U_maxiter, mix=mix)\n",
439417
"\n",
@@ -461,9 +439,9 @@
461439
"# plot 2D k-dependence of lowest Matsubara frequency of e.g. Green function\n",
462440
"plt.pcolormesh(2*mesh.k1.reshape(nk1,nk2), 2*mesh.k2.reshape(nk1,nk2), np.real(solver.gkio[mesh.iw0_f].reshape(mesh.nk1,mesh.nk2)), shading='auto')\n",
463441
"ax = plt.gca()\n",
464-
"ax.set_xlabel('$k_x/\\pi$')\n",
442+
"ax.set_xlabel(r'$k_x/\\pi$')\n",
465443
"ax.set_xlim([0,2])\n",
466-
"ax.set_ylabel('$k_y/\\pi$')\n",
444+
"ax.set_ylabel(r'$k_y/\\pi$')\n",
467445
"ax.set_ylim([0,2])\n",
468446
"ax.set_aspect('equal')\n",
469447
"ax.set_title(r'Re $G(k,\\mathrm{i}\\pi T)$')\n",
@@ -481,9 +459,9 @@
481459
"# plot 2D k-dependence of lowest Matsubara frequency of e.g. chi0\n",
482460
"plt.pcolormesh(2*mesh.k1.reshape(nk1,nk2), 2*mesh.k2.reshape(nk1,nk2), np.real(solver.ckio[mesh.iw0_b].reshape(mesh.nk1,mesh.nk2)), shading='auto')\n",
483461
"ax = plt.gca()\n",
484-
"ax.set_xlabel('$k_x/\\pi$')\n",
462+
"ax.set_xlabel(r'$k_x/\\pi$')\n",
485463
"ax.set_xlim([0,2])\n",
486-
"ax.set_ylabel('$k_y/\\pi$')\n",
464+
"ax.set_ylabel(r'$k_y/\\pi$')\n",
487465
"ax.set_ylim([0,2])\n",
488466
"ax.set_aspect('equal')\n",
489467
"ax.set_title(r'Re $\\chi_0(k,\\mathrm{i}\\nu^\\mathrm{B}=0)$')\n",
@@ -669,9 +647,9 @@
669647
"plt.figure()\n",
670648
"plt.pcolormesh(2*mesh.k1.reshape(nk1,nk2), 2*mesh.k2.reshape(nk1,nk2), np.real(gap_solver.delta0.reshape(nk1,nk2)) / np.linalg.norm(gap_solver.delta0), cmap='RdBu', shading='auto')\n",
671649
"ax = plt.gca()\n",
672-
"ax.set_xlabel('$k_x/\\pi$')\n",
650+
"ax.set_xlabel(r'$k_x/\\pi$')\n",
673651
"ax.set_xlim([0,2])\n",
674-
"ax.set_ylabel('$k_y/\\pi$')\n",
652+
"ax.set_ylabel(r'$k_y/\\pi$')\n",
675653
"ax.set_ylim([0,2])\n",
676654
"ax.set_aspect('equal')\n",
677655
"ax.set_title('$\\\\Delta^0_d(k)$')\n",
@@ -680,9 +658,9 @@
680658
"plt.figure()\n",
681659
"plt.pcolormesh(2*mesh.k1.reshape(nk1,nk2), 2*mesh.k2.reshape(nk1,nk2), np.real(gap_solver.delta[mesh.iw0_f].reshape(mesh.nk1,mesh.nk2)), cmap='RdBu', shading='auto')\n",
682660
"ax = plt.gca()\n",
683-
"ax.set_xlabel('$k_x/\\pi$')\n",
661+
"ax.set_xlabel(r'$k_x/\\pi$')\n",
684662
"ax.set_xlim([0,2])\n",
685-
"ax.set_ylabel('$k_y/\\pi$')\n",
663+
"ax.set_ylabel(r'$k_y/\\pi$')\n",
686664
"ax.set_ylim([0,2])\n",
687665
"ax.set_aspect('equal')\n",
688666
"ax.set_title(r'$\\Delta_d(k,\\mathrm{i}\\pi T)$')\n",
@@ -701,9 +679,9 @@
701679
"plt.figure()\n",
702680
"plt.pcolormesh(2*mesh.k1.reshape(nk1,nk2), 2*mesh.k2.reshape(nk1,nk2), np.real(gap_solver.fkio[mesh.iw0_f].reshape(mesh.nk1,mesh.nk2)), cmap='RdBu', shading='auto')\n",
703681
"ax = plt.gca()\n",
704-
"ax.set_xlabel('$k_x/\\pi$')\n",
682+
"ax.set_xlabel(r'$k_x/\\pi$')\n",
705683
"ax.set_xlim([0,2])\n",
706-
"ax.set_ylabel('$k_y/\\pi$')\n",
684+
"ax.set_ylabel(r'$k_y/\\pi$')\n",
707685
"ax.set_ylim([0,2])\n",
708686
"ax.set_aspect('equal')\n",
709687
"ax.set_title(r'Re $F(k,\\mathrm{i}\\pi T)$')\n",
@@ -739,7 +717,7 @@
739717
"print('Initialization...')\n",
740718
"# system parameters\n",
741719
"t = 1 # hopping amplitude\n",
742-
"n = 0.85 # electron filling, here per spin per lattice site (n=1: half filling)\n",
720+
"n = 0.85 # electron filling per lattice site, summed over both spins (n=1: half filling)\n",
743721
"U = 4 # Hubbard interaction\n",
744722
"\n",
745723
"W = 8*t # bandwidth\n",
@@ -758,7 +736,7 @@
758736
"\n",
759737
"# initialize first IR basis set (no recalculation, just reevaluation afterwards)\n",
760738
"beta_init = 1/T_values[0]\n",
761-
"IR_basis_set = sparse_ir.FiniteTempBasisSet(beta_init, IR_Lambda/beta_init, eps=IR_tol, use_positive_taus=use_positive_taus)\n",
739+
"IR_basis_set = sparse_ir.FiniteTempBasisSet(beta_init, IR_Lambda/beta_init, eps=IR_tol)\n",
762740
"\n",
763741
"# set initial self_energy - will be set to previous calculation step afterwards\n",
764742
"sigma_init = 0\n",
@@ -774,7 +752,7 @@
774752
" beta = 1/T\n",
775753
"\n",
776754
" # initialize meshes\n",
777-
" IR_basis_set = sparse_ir.FiniteTempBasisSet(beta, IR_Lambda/beta, eps=IR_tol, sve_result=IR_basis_set.sve_result, use_positive_taus=use_positive_taus)\n",
755+
" IR_basis_set = sparse_ir.FiniteTempBasisSet(beta, IR_Lambda/beta, eps=IR_tol, sve_result=IR_basis_set.sve_result)\n",
778756
" mesh = Mesh(IR_basis_set, nk1, nk2)\n",
779757
" \n",
780758
" # calculate FLEX loop\n",
@@ -821,19 +799,19 @@
821799
"f_ax1.plot(k_HSP, chi_s_HSP,'-')\n",
822800
"f_ax1.set_xlim([0,2+np.sqrt(2)])\n",
823801
"f_ax1.set_xticks([0,1,2,2+np.sqrt(2)])\n",
824-
"f_ax1.set_xticklabels(['$\\Gamma$','X','M','$\\Gamma$'])\n",
802+
"f_ax1.set_xticklabels([r'$\\Gamma$','X','M',r'$\\Gamma$'])\n",
825803
"f_ax1.set_ylim([0,26])\n",
826804
"f_ax1.set_xlabel('')\n",
827805
"f_ax1.set_ylabel('$\\\\chi_{\\\\mathrm{s}}(\\\\mathrm{i}\\\\nu^\\\\mathrm{B}=0,{\\\\bf{q}})$', fontsize=14)\n",
828806
"f_ax1.grid()\n",
829807
"\n",
830808
"# second panel with T-dependence of lambda_d and 1/chi_s,max\n",
831-
"f_ax2.plot(T_values, lam_T, '-x', label='$\\lambda_d$')\n",
832-
"f_ax2.plot(T_values, 1/chiSmax_T, '-x', label='$1/\\chi_{\\mathrm{s},\\mathrm{max}}$')\n",
809+
"f_ax2.plot(T_values, lam_T, '-x', label=r'$\\lambda_d$')\n",
810+
"f_ax2.plot(T_values, 1/chiSmax_T, '-x', label=r'$1/\\chi_{\\mathrm{s},\\mathrm{max}}$')\n",
833811
"f_ax2.set_xlim([0.01,0.08])\n",
834812
"f_ax2.set_ylim([0,1])\n",
835813
"f_ax2.set_xlabel('$T/t$', fontsize=14)\n",
836-
"f_ax2.set_ylabel('$\\lambda_d$, $1/\\chi_{\\mathrm{s},\\mathrm{max}}$', fontsize=14)\n",
814+
"f_ax2.set_ylabel(r'$\\lambda_d$, $1/\\chi_{\\mathrm{s},\\mathrm{max}}$', fontsize=14)\n",
837815
"f_ax2.legend()\n",
838816
"f_ax2.grid()\n",
839817
"plt.show()"

‎src/GW_py.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@
452452
"outputs": [],
453453
"source": [
454454
"pl.semilogy(np.abs(E_l_f),'+-')\n",
455-
"pl.title('$\\Sigma_l^F$ over l ')\n",
455+
"pl.title(r'$\\Sigma_l^F$ over l ')\n",
456456
"pl.xticks(range(0,20))\n",
457457
"pl.xlabel('l')"
458458
]

‎src/TPSC_py.ipynb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
"\n",
138138
"T = 0.1 # temperature\n",
139139
"beta = 1/T # inverse temperature\n",
140-
"n = 0.85 # electron filling, here per spin per lattice site (n=1: half filling)\n",
140+
"n = 0.85 # electron filling per lattice site, summed over both spins (n=1: half filling)\n",
141141
"U = 4 # Hubbard interaction\n",
142142
"\n",
143143
"### Numerical parameters\n",
@@ -528,7 +528,7 @@
528528
"print('Initialization...')\n",
529529
"# system parameters\n",
530530
"t = 1 # hopping amplitude\n",
531-
"n = 1 # electron filling, here per spin per lattice site (n=1: half filling)\n",
531+
"n = 1 # electron filling per lattice site, summed over both spins (n=1: half filling)\n",
532532
"T = 0.4 # temperature\n",
533533
"beta =1/T\n",
534534
"U_array = np.linspace(1e-2,5,51) # Hubbard interaction\n",

‎src/eliashberg_holstein_py.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@
681681
"\n",
682682
"bset = None\n",
683683
"sigma_iv0 = None\n",
684-
"elta_iv0 = None\n",
684+
"delta_iv0 = None\n",
685685
"\n",
686686
"for temp in temps_all:\n",
687687
" beta = 1/temp\n",

‎src/orbital_magnetic_susceptibility_py.ipynb‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@
282282
"\n",
283283
"plt.plot(mu_range, chi_mu, label='IR Basis (T=0.1)')\n",
284284
"plt.plot(mu_range, chi_anltc, label='Analytic (T=0)')\n",
285-
"plt.xlabel(\"$\\mu$\")\n",
286-
"plt.ylabel(\"$\\chi$\")\n",
285+
"plt.xlabel(r\"$\\mu$\")\n",
286+
"plt.ylabel(r\"$\\chi$\")\n",
287287
"plt.legend()\n",
288288
"plt.show()"
289289
]
@@ -342,8 +342,8 @@
342342
"outputs": [],
343343
"source": [
344344
"plt.plot(mu_range, chi_mu, label='IR Basis')\n",
345-
"plt.xlabel(\"$\\mu$\")\n",
346-
"plt.ylabel(\"$\\chi$\")\n",
345+
"plt.xlabel(r\"$\\mu$\")\n",
346+
"plt.ylabel(r\"$\\chi$\")\n",
347347
"plt.legend()\n",
348348
"plt.show()"
349349
]

‎src/second_order_perturbation_py.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@
358358
"skl = skl.reshape(L, *kps)\n",
359359
"\n",
360360
"#plt.semilogy(np.max(np.abs(skl),axis=(1,2)), label=\"max, abs\")\n",
361-
"plt.semilogy(np.abs(skl[:,0,0]), label=\"$k=\\Gamma$\")\n",
361+
"plt.semilogy(np.abs(skl[:,0,0]), label=r\"$k=\\Gamma$\")\n",
362362
"plt.semilogy(basis.s, label=\"Singular values\", ls=\"--\")\n",
363363
"plt.xlabel(r\"$l$\")\n",
364364
"plt.ylabel(r\"$|\\Sigma(l, k)|$\")\n",

0 commit comments

Comments
 (0)