Superconductivity models

The superconductivity API is organised around normalised superfluid density

\[\rho_s(T)=\left[\frac{\lambda(0)}{\lambda(T)}\right]^2,\]

with measured \(\sigma(T)\) provided in additive and quadrature forms.

Kernel and gap helpers

Thermal kernel and angular averaging:

asymmetry.core.fitting.sc.kernel.thermal_integral(gap_over_temperature)[source]

Evaluate I(d) = -∫ f(sqrt(u²+d²)) [1-f(sqrt(u²+d²))] du.

Here d = Delta/(k_B T), u = sqrt(E²-Delta²)/(k_B T), and f(x) = expit(-x). The substitution removes the density-of-states endpoint singularity from the thermal response (Prozorov & Giannetta, SST 19, R41, 2006, Eq. (16)). The fixed trapezoid is exponentially convergent; I(0) = -1/2 follows without a zero-gap branch. Scalar, empty, and N-dimensional shapes are preserved.

asymmetry.core.fitting.sc.kernel.superfluid_density(t_values, *, tc, gap_ratio, gap, gap_params=None, reduced_gap_function=None)[source]

Normalised density with a controlled Fermi-surface average.

gap declares the function, surface and angular symmetries. Both angular coordinates refine until their combined error estimate is <= 1e-7, with a 16384-node cap per coordinate and explicit failure. Nonconstant angular gaps require T/Tc >= .005; zero temperature is analytic. Azimuth-independent cylindrical gaps need no angular quadrature and retain the full thermal-kernel domain.

class asymmetry.core.fitting.sc.gaps.GapForm(name, function, surface, period, equator_mirror)[source]

Angular integration contract for \(|g|\) on a cylinder or sphere.

A missing azimuthal period declares azimuth independence. Equator mirror symmetry means |g(theta, phi)| = |g(pi-theta, phi)|. These mathematical symmetries determine the integration coordinates, not the physical label.

name
function
surface
period
equator_mirror
__init__(name, function, surface, period, equator_mirror)

Gap-amplitude approximations and convention helpers:

asymmetry.core.fitting.sc.bcs.delta_bcs(t_reduced)[source]

Return reduced BCS gap from the Carrington-Manzano interpolation.

This uses the Carrington-Manzano approximation:

delta(T) = tanh(1.82 * [1.018 * (1/t - 1)]^0.51), for 0 < t < 1

with t = T / Tc.

The function is pinned to: - delta = 1 at t <= 0 - delta = 0 at t >= 1

Notes

A frequently cited alternative is a Gross-type form [1],

\[\Delta_0(T)=\Delta_0(0)\tanh\left[\frac{\pi T_c}{\Delta_0(0)} \sqrt{a\left(\frac{T_c}{T}-1\right)}\right],\]

where a is symmetry-dependent. Use delta_generalized() when a symmetry-specific weak-coupling shape factor is available.

asymmetry.core.fitting.sc.bcs.delta_generalized(t_reduced, *, gap_ratio, shape_factor)[source]

Return reduced gap from the generalized Gross-style expression.

In reduced units with \(t = T/T_c\) and \(\Delta_0(0)/(k_B T_c)=\text{gap_ratio}\) this becomes

\[\delta(t)=\tanh\left[\frac{\pi}{\text{gap_ratio}} \sqrt{a\left(\frac{1}{t}-1\right)}\right],\]

where shape_factor corresponds to the literature parameter \(a\). The function is pinned to 1 for t <= 0 and 0 for t >= 1.

asymmetry.core.fitting.sc.bcs.gap_ratio_from_mev(gap_mev, tc)[source]

Convert Delta0 in meV to Delta0/(k_B Tc).

Parameters:
  • gap_mev – Zero-temperature gap magnitude in meV.

  • tc – Critical temperature in K.

asymmetry.core.fitting.sc.bcs.resolve_gap_ratio(*, tc, gap_ratio=None, gap_mev=None)[source]

Resolve gap ratio from either explicit ratio or meV input.

If both are provided, gap_mev takes precedence.

Returns:

float – Dimensionless ratio \(\Delta_0/(k_B T_c)\).

Angular gap form factors:

asymmetry.core.fitting.sc.gaps.isotropic_s(phi)[source]

Return isotropic s-wave form factor.

\[g(\phi) = 1.\]
asymmetry.core.fitting.sc.gaps.d_wave(phi)[source]

Return 2D d-wave form factor with line nodes.

\[g(\phi) = \cos(2\phi).\]
asymmetry.core.fitting.sc.gaps.anisotropic_s_cos4(phi, a_anis)[source]

Return fourfold-anisotropic s-wave form factor.

\[g(\phi) = 1 + a\cos(4\phi).\]

For abs(a) < 1 this form is nodeless. For abs(a) >= 1 accidental nodes can occur.

asymmetry.core.fitting.sc.gaps.nonmonotonic_d_wave(phi, beta_nm)[source]

Return nonmonotonic d-wave form factor.

\[g(\phi) = \beta\cos(2\phi) + (1-\beta)\cos(6\phi).\]
asymmetry.core.fitting.sc.gaps.s_plus_g(theta, phi)[source]

Return s+g form factor used in anisotropic singlet models.

\[g(\theta,\phi) = \frac{1 - \sin^4\theta\cos(4\phi)}{2}.\]

This representation follows the weak-coupling form tabulated in Ref. [1] for s+g-wave phenomenology.

Single-gap and anisotropic models

Isotropic and nodal baselines:

asymmetry.core.fitting.sc.models.rho_s_wave(T, *, Tc, gap_ratio=1.764, gap_mev=None)[source]

Return \(\rho_s(T)\) for isotropic s-wave gap, \(g(\phi)=1\).

Parameters:
  • T – Temperature in K.

  • Tc – Critical temperature in K.

  • gap_ratio – Dimensionless ratio \(\Delta_0/(k_B T_c)\).

  • gap_mev – Optional \(\Delta_0\) in meV. Overrides gap_ratio when given.

Returns:

numpy.ndarray – Normalized superfluid density \(\rho_s(T)\).

asymmetry.core.fitting.sc.models.sc_s_wave(T, sigma_0, Tc, gap_ratio=1.764, sigma_bg=0.0, gap_mev=None)[source]

Additive isotropic s-wave model for measured \(\sigma(T)\).

\[\sigma(T) = \sigma_0\,\rho_s(T) + \sigma_{bg}\]
asymmetry.core.fitting.sc.models.rho_d_wave(T, *, Tc, gap_ratio=2.14, gap_mev=None)[source]

Return \(\rho_s(T)\) for d-wave \(g(\phi)=\cos(2\phi)\).

This model has line nodes and therefore stronger low-temperature variation than isotropic s-wave, typically close to linear-in-T in clean limits [1]. The reduced gap amplitude uses the generalized weak-coupling form with the d-wave shape factor \(a=4/3\).

asymmetry.core.fitting.sc.models.sc_d_wave(T, sigma_0, Tc, gap_ratio=2.14, sigma_bg=0.0, gap_mev=None)[source]

Additive d-wave model for measured \(\sigma(T)\).

Anisotropic variants:

asymmetry.core.fitting.sc.models.rho_anisotropic_s_cos4(T, *, Tc, gap_ratio=1.764, a_anis=0.2, shape_factor_a=0.0, gap_mev=None)[source]

Return \(\rho_s(T)\) for anisotropic s-wave 1 + a*cos(4phi).

a_anis controls anisotropy. For abs(a_anis) < 1 the gap remains nodeless; accidental nodes may appear when abs(a_anis) >= 1. If shape_factor_a > 0, use the generalized weak-coupling reduced-gap law with that value; otherwise fall back to the Carrington-Manzano interpolation.

asymmetry.core.fitting.sc.models.sc_anisotropic_s_cos4(T, sigma_0, Tc, gap_ratio=1.764, a_anis=0.2, shape_factor_a=0.0, sigma_bg=0.0, gap_mev=None)[source]

Additive anisotropic-s model for measured \(\sigma(T)\).

asymmetry.core.fitting.sc.models.rho_nonmonotonic_d(T, *, Tc, gap_ratio=2.14, beta_nm=0.8, gap_mev=None)[source]

Return \(\rho_s(T)\) for nonmonotonic d-wave.

\[g(\phi)=\beta\cos(2\phi)+(1-\beta)\cos(6\phi).\]

This form is commonly used as a phenomenological extension when a monotonic \(\cos(2\phi)\) d-wave is insufficient [1]. The temperature-dependent gap amplitude uses the same d-wave weak-coupling shape factor \(a=4/3\) as rho_d_wave().

asymmetry.core.fitting.sc.models.sc_nonmonotonic_d(T, sigma_0, Tc, gap_ratio=2.14, beta_nm=0.8, sigma_bg=0.0, gap_mev=None)[source]

Additive nonmonotonic-d model for measured \(\sigma(T)\).

asymmetry.core.fitting.sc.models.rho_s_plus_g(T, *, Tc, gap_ratio=2.77, gap_mev=None)[source]

Return \(\rho_s(T)\) for s+g-wave anisotropic singlet gap.

\[g(\theta,\phi)=\frac{1-\sin^4\theta\cos(4\phi)}{2}.\]

The default gap_ratio=2.77 follows the weak-coupling tabulation used in Ref. [1]. The reduced gap amplitude uses the generalized weak-coupling form with the s+g shape factor \(a=2\).

Parameters:
  • T – Temperature in K.

  • Tc – Critical temperature in K.

  • gap_ratio – Dimensionless ratio \(\Delta_0/(k_B T_c)\).

  • gap_mev – Optional \(\Delta_0\) in meV. Overrides gap_ratio when given.

asymmetry.core.fitting.sc.models.sc_s_plus_g(T, sigma_0, Tc, gap_ratio=2.77, sigma_bg=0.0, gap_mev=None)[source]

Additive s+g model for measured \(\sigma(T)\).

\[\sigma(T) = \sigma_0\,\rho_{s+g}(T) + \sigma_{bg}.\]

Additional unconventional examples:

asymmetry.core.fitting.sc.models.rho_extended_s(T, *, Tc, gap_ratio=2.14, signed=False, gap_mev=None)[source]

Return \(\rho_s(T)\) for extended s-wave based on cos(2phi).

Set signed=True to preserve sign of \(\cos(2\phi)\). The default uses magnitude because the quasiparticle excitation energy depends on \(|\Delta|\). The reduced gap amplitude uses the generalized weak-coupling form with \(a=4/3\), consistent with the \(\cos(2\phi)\) basis tabulated in Ref. [1].

asymmetry.core.fitting.sc.models.sc_extended_s(T, sigma_0, Tc, gap_ratio=2.14, signed_gap=0.0, sigma_bg=0.0, gap_mev=None)[source]

Additive extended-s model for measured \(\sigma(T)\).

asymmetry.core.fitting.sc.models.rho_p_wave_axial(T, *, Tc, gap_ratio=2.0, shape_factor_a=0.0, gap_mev=None)[source]

Return \(\rho_s(T)\) for 2D axial p-wave, \(g(\phi)=\cos\phi\).

If shape_factor_a > 0, use the generalized weak-coupling reduced-gap law with that value; otherwise fall back to the Carrington-Manzano interpolation.

asymmetry.core.fitting.sc.models.sc_p_wave_axial(T, sigma_0, Tc, gap_ratio=2.0, shape_factor_a=0.0, sigma_bg=0.0, gap_mev=None)[source]

Additive 2D axial p-wave model for measured \(\sigma(T)\).

asymmetry.core.fitting.sc.models.rho_p_wave_polar_3d(T, *, Tc, gap_ratio=2.0, shape_factor_a=0.0, gap_mev=None)[source]

Return \(\rho_s(T)\) for the spherical sin(theta) gap example.

Uses \(g(\theta)=\sin\theta\) with spherical angular averaging. If shape_factor_a > 0, use the generalized weak-coupling reduced-gap law with that value; otherwise fall back to the Carrington-Manzano interpolation.

Note

rho_extended_s uses the generalized weak-coupling reduced-gap law with a = 4/3 by default. For rho_anisotropic_s_cos4, sc_anisotropic_s_cos4, rho_p_wave_axial, sc_p_wave_axial, and rho_p_wave_polar_3d, the optional shape_factor_a parameter can be supplied when a symmetry-specific weak-coupling shape factor is known or is to be fitted. If shape_factor_a is omitted or left at 0, these models fall back to the Carrington-Manzano interpolation.

Two-gap and alpha models

Weighted-sum two-gap models (including MgB2-style s+s decomposition):

asymmetry.core.fitting.sc.models.sc_two_gap_ss(T, sigma_0, Tc, gap_ratio_1=1.2, gap_ratio_2=2.2, weight=0.5, sigma_bg=0.0)[source]

Two-gap isotropic model, weighted superfluid density sum.

\[ \begin{align}\begin{aligned} \rho_s(T) = w\rho_1(T) + (1-w)\rho_2(T),\quad 0\le w\le 1.\\This is the standard MgB2-style alpha-model decomposition for multiband superconductors [2].\end{aligned}\end{align} \]
asymmetry.core.fitting.sc.models.sc_two_gap_sd(T, sigma_0, Tc, gap_ratio_s=1.764, gap_ratio_d=2.14, weight=0.5, sigma_bg=0.0)[source]

Two-gap mixed-symmetry model (s + d weighted sum).

Alpha-model scaling:

asymmetry.core.fitting.sc.models.sc_alpha_model(T, sigma_0, Tc, alpha_sc=1.0, sigma_bg=0.0)[source]

Single-gap alpha model using isotropic BCS kernel.

alpha_sc rescales the weak-coupling s-wave ratio 1.764.

Quadrature sigma models

These variants are intended for workflows where superconducting and non-superconducting linewidth channels are modelled as independent Gaussian contributions added in quadrature.

asymmetry.core.fitting.sc.models.sc_s_wave_q(T, sigma_sc, sigma_nm, Tc, gap_ratio=1.764, gap_mev=None)[source]

Quadrature s-wave model for measured \(\sigma(T)\).

Use this convention when independent Gaussian broadening channels combine at the second-moment level, motivating \(\sigma^2=(\sigma_{sc}\rho_s)^2+\sigma_{nm}^2\).

asymmetry.core.fitting.sc.models.sc_d_wave_q(T, sigma_sc, sigma_nm, Tc, gap_ratio=2.14, gap_mev=None)[source]

Quadrature d-wave model for measured \(\sigma(T)\).

asymmetry.core.fitting.sc.models.sc_s_plus_g_q(T, sigma_sc, sigma_nm, Tc, gap_ratio=2.77, gap_mev=None)[source]

Quadrature s+g model for measured \(\sigma(T)\).

This is useful when superconducting and non-superconducting linewidth channels are treated as independent Gaussian contributions that add in quadrature.

lambda and sigma conversion helpers:

class asymmetry.core.fitting.sc.GaussianWidth(*values)[source]

Factor converting a stated Gaussian width into the second-moment width.

SECOND_MOMENT = 1.0
GAUSSIAN_COMPONENT = np.float64(1.4142135623730951)
asymmetry.core.fitting.sc.constants.sigma_to_lambda_nm(sigma_us, *, width, brandt_coefficient=0.0609)[source]

Convert superconducting sigma (us^-1) to penetration depth lambda (nm).

width=GaussianWidth.SECOND_MOMENT takes sigma_2 from exp(-sigma_2^2*t^2/2). width=GaussianWidth.GAUSSIAN_COMPONENT takes sigma_G from exp(-sigma_G^2*t^2). The conversion first applies sigma_2 = sqrt(2)*sigma_G when needed.

For sigma <= 0, the returned lambda is +inf.

asymmetry.core.fitting.sc.constants.lambda_nm_to_sigma_us(lambda_nm, *, width, brandt_coefficient=0.0609)[source]

Convert penetration depth lambda (nm) to superconducting sigma (us^-1).

The required width selects exp(-sigma_2^2*t^2/2) (SECOND_MOMENT) or exp(-sigma_G^2*t^2) (GAUSSIAN_COMPONENT), with sigma_G = sigma_2/sqrt(2).

asymmetry.core.fitting.sc.models.rho_to_lambda_inv_sq(rho, *, lambda_0_nm)[source]

Convert normalized \(\rho_s(T)\) to \(\lambda^{-2}(T)\) in nm^-2.

asymmetry.core.fitting.sc.models.rho_to_lambda(rho, *, lambda_0_nm)[source]

Convert normalized \(\rho_s(T)\) to \(\lambda(T)\) in nm.

asymmetry.core.fitting.sc.models.lambda_inv_sq_from_model(T, *, rho_function, lambda_0_nm, **kwargs)[source]

Evaluate \(\lambda^{-2}(T)\) from any rho_function callable.

asymmetry.core.fitting.sc.models.lambda_from_model(T, *, rho_function, lambda_0_nm, **kwargs)[source]

Evaluate \(\lambda(T)\) from any rho_function callable.

Models

asymmetry.core.fitting.sc.models.brandt_field_factor(b)[source]

Return the normalised Brandt field-dependence factor \(g(b)\).

\[g(b) = \frac{(1-b)\,[1 + 1.21\,(1-\sqrt{b})^3]}{1 + 1.21}, \qquad b = B_0/B_{c2}.\]

This is Brandt’s Ginzburg-Landau result for the field dependence of the second moment of an ideal triangular vortex lattice (Brandt, Phys. Rev. B 68, 054506 (2003)), normalised so that \(g(0)=1\). For \(b \ge 1\) (at or above \(B_{c2}\) there is no vortex lattice) the factor is clamped to 0; negative b is clamped to 0 so the sqrt stays real.