PAOFLOW.elphon.migdal_eliashberg#
Isotropic Migdal-Eliashberg equations from the Eliashberg function a2F(omega).
Temperature-dependent superconducting properties in the isotropic,
Fermi-surface-restricted limit, following EPW’s liso / limag / lpade
/ lacon / tc_linear (EPW tutorial 04). Everything depends only on
a2F(omega), the Coulomb pseudopotential mu* (applied up to the Matsubara
cutoff wscut, not rescaled) and the temperature:
imaginary axis:
Z(i w_n)andDelta(i w_n)on the fermionic Matsubara frequenciesw_n = (2n+1) pi k_B T <= wscut(solve_imag_iso());real axis:
Z(w),Delta(w)from an N-point Pade approximant (pade_continuation()) and from the iterative analytic continuation of Marsiglio, Schossmann and Carbotte (analytic_continuation_iso()), the gap edgew = Re Delta(w)(gap_edge()) and the quasiparticle density of states (quasiparticle_dos());the largest eigenvalue of the linearised gap equation, which crosses 1 at
Tc(linearized_max_eigenvalue()).
With lambda(n) = int 2 w a2F(w) / (w^2 + (2 pi n k_B T)^2) dw and the sums
restricted to positive frequencies, the imaginary-axis equations are
with R = sqrt(w^2 + Delta^2). Energies are in eV and temperatures in
kelvin. a2F is resampled on a uniform grid nu_j = j * dw (as EPW’s
wsph) and every frequency integral is the rectangle sum on that grid.
Attributes#
Functions#
|
Eliashberg function from the mode couplings, with an EPW-like phonon smearing. |
|
Real-frequency grid of the continuation, as EPW's |
|
Allen-Dynes critical temperature from the moments of |
|
Temperature grid bracketing |
|
Matsubara cutoff |
|
Positive fermionic Matsubara frequencies up to the cutoff. |
|
Coupling on the bosonic Matsubara frequencies. |
|
Largest eigenvalue of the linearised isotropic Migdal-Eliashberg kernel. |
|
Self-consistent isotropic gap |
|
Anderson-mixed fixed point |
|
Coefficients of the Vidberg-Serene N-point Pade continued fraction. |
|
Evaluate the continued fraction of |
|
Real-axis |
|
Real-axis |
|
Superconducting gap edge, the first solution of |
|
Superconducting quasiparticle density of states |
|
Temperature where the linearised-kernel eigenvalue crosses 1. |
|
|
|
Isotropic Migdal-Eliashberg solution over a set of temperatures. |
|
Largest linearised-kernel eigenvalue at each temperature, and |
|
Eliashberg function from an |
|
Eliashberg function from an EPW |
EPW's temperature suffix, e.g. |
|
|
Write the Migdal-Eliashberg results in EPW's file formats. |
Module Contents#
- PAOFLOW.elphon.migdal_eliashberg.a2f_from_modes(lambda_qv, omega_qv_thz, q_weights=None, degaussq_ev=0.00015, nqstep=500, omega_max_ev=None)[source]#
Eliashberg function from the mode couplings, with an EPW-like phonon smearing.
- Parameters:
lambda_qv (array_like, shape
(nq, nmode)) – Mode-resolved coupling and frequencies (THz), e.g. thelambda_qv/omega_qv_thzkeys ofeliashberg_dense_q.omega_qv_thz (array_like, shape
(nq, nmode)) – Mode-resolved coupling and frequencies (THz), e.g. thelambda_qv/omega_qv_thzkeys ofeliashberg_dense_q.q_weights (array_like, shape
(nq,), optional) – q-point weights (normalised here); uniform by default.degaussq_ev (float, optional) – Gaussian phonon smearing in eV (default 0.15 meV, EPW’s isotropic Migdal-Eliashberg value of
degaussq).nqstep (int, optional) – Number of frequency points (EPW
nqstep, default 500).omega_max_ev (float, optional) – Highest phonon frequency (eV); defaults to
max(omega_qv).
- Returns:
omega (ndarray, shape
(nqstep,)) – Frequenciesj * 1.1 * omega_max / nqstep(eV),j = 1 .. nqstep.a2F (ndarray, shape
(nqstep,)) – The Eliashberg function onomega.
Notes
The Eliashberg function is
\[\alpha^2F(\omega) = \tfrac12\sum_{q\nu} w_q\,\lambda_{q\nu}\, \omega_{q\nu}\,\delta(\omega-\omega_{q\nu}),\]with a Gaussian
deltaof widthdegaussq_ev. The grid extends to1.1 * omega_max(EPWwsphmax) and starts at its spacing, the form every other function of this module expects.
- PAOFLOW.elphon.migdal_eliashberg.real_axis_grid(omega, a2F, wscut)[source]#
Real-frequency grid of the continuation, as EPW’s
ws.- Parameters:
omega (array_like) – Eliashberg function (frequencies in eV).
a2F (array_like) – Eliashberg function (frequencies in eV).
wscut (float) – Upper frequency (eV).
- Returns:
w_i = i * dw <= wscut(eV), withdwthe spacing of the uniforma2Fgrid, so thatw_i +/- nu_jstay on the grid.- Return type:
ndarray
- PAOFLOW.elphon.migdal_eliashberg.allen_dynes_tc(omega, a2F, mu_star)[source]#
Allen-Dynes critical temperature from the moments of
a2F.- Parameters:
omega (array_like) – Eliashberg function (frequencies in eV).
a2F (array_like) – Eliashberg function (frequencies in eV).
mu_star (float) – Coulomb pseudopotential.
- Returns:
Tcin K (mcmillan_allen_dynes_tc()), or 0 whenlambda <= 0.- Return type:
- PAOFLOW.elphon.migdal_eliashberg.default_temperatures(omega, a2F, mu_star, nstemp=25, tmax_factor=1.5)[source]#
Temperature grid bracketing
Tc, from the Allen-Dynes estimate.- Parameters:
omega (array_like) – Eliashberg function (frequencies in eV).
a2F (array_like) – Eliashberg function (frequencies in eV).
mu_star (float) – Coulomb pseudopotential.
nstemp (int, optional) – Number of temperatures (default 25).
tmax_factor (float, optional) – Highest temperature in units of the Allen-Dynes
Tc(default 1.5).
- Returns:
Evenly spaced temperatures (K) from
Tmax / nstemptoTmax.- Return type:
ndarray, shape
(nstemp,)- Raises:
ValueError – If the Allen-Dynes
Tcis zero.
Notes
The Migdal-Eliashberg
Tcis usually within 20% of Allen-Dynes, so the default range brackets it.
- PAOFLOW.elphon.migdal_eliashberg.default_wscut(omega, a2F, factor=5.0, minimum=0.1)[source]#
Matsubara cutoff
wscutfrom the phonon spectrum.- Parameters:
- Returns:
max(minimum, factor * omega_ph)rounded to 0.01 eV, and above the top of thea2Fgrid (required byanalytic_continuation_iso()).- Return type:
Notes
omega_phis the highest frequency witha2F > 10^-3 max(a2F). The rule reproduces the cutoffs of EPW tutorial 04: 0.1 eV for Pb (omega_ph= 9 meV) and 0.5 eV for MgB2 (omega_ph= 100 meV).
- PAOFLOW.elphon.migdal_eliashberg.matsubara_grid(T, wscut)[source]#
Positive fermionic Matsubara frequencies up to the cutoff.
- PAOFLOW.elphon.migdal_eliashberg.matsubara_lambda(omega, a2F, T, nmax)[source]#
Coupling on the bosonic Matsubara frequencies.
- Parameters:
- Returns:
lambda(n)forn = 0 .. nmax;lambda(0)is the total coupling.- Return type:
ndarray, shape
(nmax + 1,)
Notes
\[\lambda(n) = \int_0^\infty \frac{2\omega\,\alpha^2F(\omega)} {\omega^2 + \nu_n^2}\,d\omega, \qquad \nu_n = 2\pi n k_B T.\]
- PAOFLOW.elphon.migdal_eliashberg.linearized_max_eigenvalue(omega, a2F, T, mu_star, wscut=0.1)[source]#
Largest eigenvalue of the linearised isotropic Migdal-Eliashberg kernel.
- Parameters:
- Returns:
The largest eigenvalue
rho: above 1 belowTc, 1 atTc(EPWtc_linear).- Return type:
Notes
Near
Tcthe gap equation linearises to\[\rho\,\Delta_n = \sum_{n'} \frac{\pi T}{Z_n} \left[\lambda(n-n') + \lambda(n+n'+1) - 2\mu^*\right] \frac{\Delta_{n'}}{\omega_{n'}},\]with the normal-state
Z_n. The kernel is similar to the symmetric matrix \(D^{1/2}[\ldots]D^{1/2}\), \(D_n = \pi T/(Z_n\omega_n)\), whose eigenvalues are real (numpy.linalg.eigvalsh).
- PAOFLOW.elphon.migdal_eliashberg.solve_imag_iso(omega, a2F, T, mu_star, wscut=0.1, nsiter=500, conv_thr=0.0001, delta0=None, mix=0.7, nhist=8)[source]#
Self-consistent isotropic gap
Delta(i w_n)and renormalisationZ(i w_n).- Parameters:
omega (array_like) – Eliashberg function (frequencies in eV).
a2F (array_like) – Eliashberg function (frequencies in eV).
T (float) – Temperature (K).
mu_star (float) – Coulomb pseudopotential (EPW
muc).wscut (float, optional) – Matsubara cutoff in eV (EPW
wscut, default 0.1).nsiter (int, optional) – Maximum number of iterations (EPW
nsiter).conv_thr (float, optional) – Convergence threshold (EPW
conv_thr_iaxis).delta0 (float or array_like, optional) – Initial gap (eV), scalar or one value per Matsubara frequency. Defaults to
1.764 k_B Tcwith the Allen-DynesTcofa2F.mix (float, optional) – Anderson mixing parameter (default 0.7, EPW’s
broyden_beta).nhist (int, optional) – Number of previous steps kept by the Anderson mixing.
- Returns:
wn,Z,delta(eV,(nsiw,)),niter,convergedandrho_max(largest linearised-kernel eigenvalue).deltais positive at the lowest frequency.- Return type:
Notes
The equations are those of the module docstring. The fixed point
Delta = G(Delta)is found with Anderson mixing and stops whensum|G(Delta) - Delta| / sum|G(Delta)| < conv_thr, EPW’s criterion. When the linearised kernel has no eigenvalue above 1 the only solution is the normal state, which is returned directly withZfrom the same cut-off sums.
- PAOFLOW.elphon.migdal_eliashberg.anderson_fixed_point(gap_map, gap_trial, nsiter, conv_thr, mix, nhist, normal_floor=None)[source]#
Anderson-mixed fixed point
Delta = G(Delta)of the gap equation.- Parameters:
gap_map (callable) –
Delta -> (G(Delta), extra);extra(e.g.Z) is returned with the last evaluation.gap_trial (ndarray) – Initial gap, of any shape.
nsiter (int) – Maximum number of iterations.
conv_thr (float) – Threshold on
sum|G(Delta) - Delta| / sum|G(Delta)|(EPW’s criterion).mix (float) – Mixing parameter.
nhist (int) – Number of previous steps kept.
normal_floor (float, optional) – Stop, as converged to the normal state, when
max|G(Delta)|drops below this value.
- Returns:
gap_mapped (ndarray) – The last
G(Delta).extra (Any) – The
extraof the last evaluation.niter (int) – Iterations used.
converged (bool) – Whether the threshold (or
normal_floor) was reached.
Notes
With the residual \(F_i = G(\Delta_i) - \Delta_i\) and the differences \(\delta\Delta_i\), \(\delta F_i\) of the last
nhiststeps, the update is\[\Delta_{i+1} = \Delta_i + \beta F_i - \sum_j \gamma_j\,(\delta\Delta_j + \beta\,\delta F_j), \qquad \gamma = \arg\min\,\|F_i - \textstyle\sum_j \gamma_j \delta F_j\|.\]
- PAOFLOW.elphon.migdal_eliashberg.pade_coefficients(z, u)[source]#
Coefficients of the Vidberg-Serene N-point Pade continued fraction.
- Parameters:
z (array_like, shape
(N,)) – Sampling points (e.g.i w_n).u (array_like, shape
(..., N)) – Function values atz; leading axes are independent functions.
- Returns:
Coefficients
a_pofpade_eval().- Return type:
ndarray, shape
(..., N), complex
Notes
With \(g_1(z_i) = u_i\), the recursion is
\[g_p(z) = \frac{g_{p-1}(z_{p-1}) - g_{p-1}(z)}{(z - z_{p-1})\,g_{p-1}(z)}, \qquad a_p = g_p(z_p)\](H. J. Vidberg and J. W. Serene, J. Low Temp. Phys. 29, 179 (1977)).
- PAOFLOW.elphon.migdal_eliashberg.pade_eval(coefficients, z, w)[source]#
Evaluate the continued fraction of
pade_coefficients()atw.- Parameters:
coefficients (ndarray, shape
(..., N)) – Output ofpade_coefficients().z (array_like, shape
(N,)) – The sampling points used forcoefficients.w (array_like, shape
(nw,)) – Evaluation points.
- Returns:
The approximant at
w.- Return type:
ndarray, shape
(..., nw), complex
Notes
\(C_N(w) = A_N(w)/B_N(w)\) with \(A_{n+1} = A_n + (w - z_n)\,a_{n+1}A_{n-1}\) (likewise for
B), \(A_0 = 0\), \(A_1 = a_1\), \(B_0 = B_1 = 1\). Each step is rescaled by \(B_{n+1}\), which leaves the ratio unchanged and avoids overflow.
- PAOFLOW.elphon.migdal_eliashberg.pade_continuation(wn, Z, delta, w_real, npade=90)[source]#
Real-axis
Z(w),Delta(w)from Pade approximants of the Matsubara data.- Parameters:
wn (array_like, shape
(nsiw,)) – Imaginary-axis solution (solve_imag_iso()).Z (array_like, shape
(nsiw,)) – Imaginary-axis solution (solve_imag_iso()).delta (array_like, shape
(nsiw,)) – Imaginary-axis solution (solve_imag_iso()).w_real (array_like) – Real frequencies (eV).
npade (float, optional) – Percentage of the Matsubara frequencies used (EPW
npade, default 90).
- Returns:
Z_real, delta_real –
Z(w)andDelta(w)onw_real;Delta = 0for a vanishing gap.- Return type:
ndarray, complex
- PAOFLOW.elphon.migdal_eliashberg.analytic_continuation_iso(omega, a2F, T, mu_star, wn, Zn, deltan, w_real, Z_init, delta_init, nsiter=500, conv_thr=0.0001, mix=0.5)[source]#
Real-axis
Z(w),Delta(w)by the iterative analytic continuation.- Parameters:
omega (array_like) – Eliashberg function (frequencies in eV).
a2F (array_like) – Eliashberg function (frequencies in eV).
T (float) – Temperature (K).
mu_star (float) – Coulomb pseudopotential.
wn (ndarray, shape
(nsiw,)) – Converged imaginary-axis solution (solve_imag_iso()).Zn (ndarray, shape
(nsiw,)) – Converged imaginary-axis solution (solve_imag_iso()).deltan (ndarray, shape
(nsiw,)) – Converged imaginary-axis solution (solve_imag_iso()).w_real (array_like, shape
(nw,)) – Real grid fromreal_axis_grid().Z_init (array_like, shape
(nw,)) – Starting point, normally the Pade result.delta_init (array_like, shape
(nw,)) – Starting point, normally the Pade result.nsiter (int, optional) – Maximum number of iterations.
conv_thr (float, optional) – Threshold on
sum|Delta_new - Delta| / sum|Delta_new|(EPWconv_thr_racon).mix (float, optional) – Linear mixing parameter.
- Returns:
Z, delta (ndarray, shape
(nw,), complex) –Z(w)andDelta(w).niter (int) – Iterations used.
converged (bool) – Whether
conv_thrwas reached.
- Raises:
ValueError – If
w_realis not the grid ofreal_axis_grid(), or does not extend beyond the highesta2Ffrequency.
Notes
Solves the Marsiglio-Schossmann-Carbotte equations (Phys. Rev. B 37, 4965 (1988)) for \(\tilde\omega = \omega Z\) and \(\phi = Z\Delta\):
\[ \begin{align}\begin{aligned}\tilde\omega(\omega) = \omega + i\pi T\sum_m \lambda(\omega - i\omega_m) \frac{\omega_m}{R_m} + i\pi\int_0^\infty d\nu\,\alpha^2F(\nu) \left\{[N(\nu)+f(\nu-\omega)]\,\frac{\tilde\omega}{S}(\omega-\nu) -[N(\nu)+f(\nu+\omega)]\,\frac{\tilde\omega}{S}(\omega+\nu)\right\},\\\phi(\omega) = \pi T\sum_m [\lambda(\omega - i\omega_m) - \mu^*] \frac{\Delta_m}{R_m} + i\pi\int_0^\infty d\nu\,\alpha^2F(\nu) \left\{[N(\nu)+f(\nu-\omega)]\,\frac{\phi}{S}(\omega-\nu) +[N(\nu)+f(\nu+\omega)]\,\frac{\phi}{S}(\omega+\nu)\right\},\end{aligned}\end{align} \]with the Matsubara sums over all
m(fixed by the imaginary-axis solution), \(S = \sqrt{\tilde\omega^2 - \phi^2}\) on the retarded branch, BoseNand Fermif. Negative frequencies follow from \(Z(-\omega) = Z(\omega)^*\), \(\Delta(-\omega) = \Delta(\omega)^*\); above the grid the normal state is assumed. Both convolutions are evaluated withnumpy.convolveon the common grid spacing.
- PAOFLOW.elphon.migdal_eliashberg.gap_edge(w_real, delta)[source]#
Superconducting gap edge, the first solution of
w = Re Delta(w).- Parameters:
w_real (array_like) – Real frequencies (eV), increasing.
delta (array_like) –
Delta(w)onw_real.
- Returns:
The gap edge (eV), linearly interpolated; 0 for a vanishing gap and
nanwhen there is no crossing on the grid.- Return type:
- PAOFLOW.elphon.migdal_eliashberg.quasiparticle_dos(w_real, delta, Z=None)[source]#
Superconducting quasiparticle density of states
N_S(w)/N_F.- Parameters:
w_real (array_like) – Real frequencies (eV).
delta (array_like) –
Delta(w)onw_real.Z (array_like, optional) –
Z(w); only its phase matters for the branch of the square root.
- Returns:
N_S/N_Fonw_real.- Return type:
ndarray
Notes
\[\frac{N_S(\omega)}{N_F} = \mathrm{Re}\left[ \frac{\omega Z}{\sqrt{Z^2(\omega^2 - \Delta^2(\omega))}}\right],\]with the retarded square root;
w = Deltaexactly is singular.
- PAOFLOW.elphon.migdal_eliashberg.tc_from_eigenvalues(temps, rho)[source]#
Temperature where the linearised-kernel eigenvalue crosses 1.
- Parameters:
temps (array_like) – Increasing temperatures (K).
rho (array_like) – Largest eigenvalues at
temps.
- Returns:
Tc(K) by linear interpolation of the first downward crossing, ornanwithout one.- Return type:
- PAOFLOW.elphon.migdal_eliashberg.tc_from_gap(temps, gap)[source]#
Tcfrom a linear extrapolation ofDelta^2(T)to zero.- Parameters:
temps (array_like) – Increasing temperatures (K).
gap (array_like) – Gap at
temps(any unit).
- Returns:
Tc(K) through the two highest-temperature non-zero gaps, ornanwhen there are fewer than two orDelta^2does not decrease.- Return type:
Notes
Near a second-order transition \(\Delta^2 \propto T_c - T\).
- PAOFLOW.elphon.migdal_eliashberg.migdal_eliashberg_iso(omega, a2F, temps, mu_star=0.1, wscut=0.1, nsiter=500, conv_thr_iaxis=0.0001, conv_thr_racon=0.0001, npade=90, lpade=True, lacon=True, verbose=False)[source]#
Isotropic Migdal-Eliashberg solution over a set of temperatures.
- Parameters:
omega (array_like) – Eliashberg function (frequencies in eV).
a2F (array_like) – Eliashberg function (frequencies in eV).
temps (array_like) – Temperatures (K); solved in ascending order.
mu_star (float, optional) – Coulomb pseudopotential (EPW
muc, default 0.1).wscut (float, optional) – Matsubara cutoff and upper real frequency (eV, default 0.1).
nsiter (int, optional) – Maximum iterations on each axis (EPW
nsiter).conv_thr_iaxis (float, optional) – Convergence thresholds on the imaginary and real axes.
conv_thr_racon (float, optional) – Convergence thresholds on the imaginary and real axes.
npade (float, optional) – Percentage of Matsubara points in the Pade approximant.
lpade (bool, optional) – Compute the Pade and the analytic continuation (EPW
lpade,lacon).lacon (bool, optional) – Compute the Pade and the analytic continuation (EPW
lpade,lacon).verbose (bool, optional) – Print one summary line per temperature.
- Returns:
temps(K); per-temperature arraysgap0_imag(Delta(i w_0)),gap_pade,gap_acon(gap edges),Z0(Z(i w_0)),rho_max,niter,converged(energies in eV,nanwhere not computed);Tc_gap(K,tc_from_gap()ongap0_imag);w_real;mu_star,wscut; and the per-temperature listsimag((wn, Z, delta)),pade,acon((Z, delta)onw_realorNone) andqdos(fromacon, elsepade, orNone).- Return type:
Notes
Each temperature starts from the gap of the previous one, interpolated on its Matsubara grid. Temperatures with a non-zero gap are continued to the real axis with Pade and, when
laconis set, refined by the analytic continuation, which always starts from the Pade result.
- PAOFLOW.elphon.migdal_eliashberg.linearized_eigenvalues(omega, a2F, temps, mu_star=0.1, wscut=0.1)[source]#
Largest linearised-kernel eigenvalue at each temperature, and
Tc.- Parameters:
- Returns:
temps(sorted, K),max_eigenvalueandTc_linear(K, where the eigenvalue crosses 1,tc_from_eigenvalues()).- Return type:
- PAOFLOW.elphon.migdal_eliashberg.a2f_from_npz(path, degaussq_ev=0.00015, nqstep=500)[source]#
Eliashberg function from an
eliashberg.npzwritten by the PAOFLOW el-ph drivers.- Parameters:
- Returns:
omega, a2F – Frequencies (eV) and Eliashberg function.
- Return type:
ndarray
Notes
a2Fis rebuilt fromlambda_qv, the mode frequencies (omega_qv_thzoromega_q) andq_weightswitha2f_from_modes(). Files without the mode data fall back to the storedomega/a2F.
- PAOFLOW.elphon.migdal_eliashberg.a2f_from_epw(path)[source]#
Eliashberg function from an EPW
<prefix>.a2ffile (first smearing).- Parameters:
path (str) – The EPW file (
read_epw_a2f()).- Returns:
omega, a2F – Frequencies (eV) and Eliashberg function.
- Return type:
ndarray
- PAOFLOW.elphon.migdal_eliashberg.temperature_tag(T)[source]#
EPW’s temperature suffix, e.g.
000.30for 0.3 K.
- PAOFLOW.elphon.migdal_eliashberg.write_me_outputs(result, outdir, prefix, linear=None)[source]#
Write the Migdal-Eliashberg results in EPW’s file formats.
- Parameters:
result (dict) – Output of
migdal_eliashberg_iso().outdir (str) – Output directory (created if needed).
prefix (str) – File prefix (EPW
prefix).linear (dict, optional) – Output of
linearized_eigenvalues().
- Returns:
Writes, per temperature
<T>(temperature_tag()) and with energies in eV:<prefix>.imag_iso_<T>:w_n,Z,Delta;<prefix>.pade_iso_<T>/<prefix>.acon_iso_<T>:w,Re Z,Im Z,Re Delta,Im Delta;<prefix>.qdos_iso_<T>:w,N_S/N_F;
plus
gap_vs_T.dat(gaps in meV),max_eigenvalue.dat(withlinear) andmigdal_eliashberg.npzwith every array.- Return type:
None