rapidity.tba module¶
Thermodynamic Bethe Ansatz solver.
This module provides the TBAState class representing the
thermodynamic state of an integrable model, and the tools to compute
thermodynamic quantities from it.
The TBA equation for a single-species model reads:
where \(\epsilon_0\) is the driving term, \(K\) is the scattering kernel, and the filling function is:
The state can be constructed from chemical potentials, a filling function, or a particle density.
- class rapidity.tba.TBAState(model, grid, filling)¶
Bases:
objectThermodynamic state of an integrable model.
The state is characterized by the filling function n(theta), which encodes the occupation of rapidity modes. It always carries the model and grid alongside the filling function.
- Parameters:
Examples
>>> from rapidity.models import LiebLiniger >>> from rapidity.core import Grid1D >>> model = LiebLiniger(c=1.0) >>> grid = Grid1D.gauss_hermite(200, "theta") >>> state = TBAState.from_betas(model, grid, betas={2: 1.0, 0: -0.5})
- bare_state_density()¶
Bare density of states a(theta).
Delegates to the model’s implementation of bare_state_density, which satisfies:
\[a(\theta) = \frac{1}{2\pi} \partial_\theta q_1(\theta)\]- Returns:
The bare density of states as a 1D Field.
- Return type:
- dress(h)¶
Compute the dressed quantity h^dr via the dressing equation.
\[h^{dr}(\theta) = h(\theta) + \int d\theta'\, K(\theta - \theta') n(\theta') h^{dr}(\theta')\]
- free_energy()¶
Compute the free energy density.
\[f = -\int \frac{d\theta}{2\pi} \log(1 + e^{-\epsilon(\theta)})\]- Returns:
The free energy density.
- Return type:
float
- classmethod from_betas(model, grid, betas, tol=1e-10, max_iter=1000)¶
Construct state by solving the TBA equation from chemical potentials.
- Parameters:
- Returns:
The thermodynamic state.
- Return type:
- classmethod from_density(model, grid, rho_p)¶
Construct state from particle density rho_p(theta).
- classmethod from_filling(model, grid, filling)¶
Construct state directly from a filling function.
- rho_p()¶
Compute the particle density rho_p(theta).
\[\rho_p(\theta) = n(\theta) \rho_s(\theta)\]- Returns:
The particle density as a 1D Field.
- Return type:
- rho_s()¶
Compute the density of states rho_s(theta).
\[\rho_s(\theta) = a^{dr}(\theta)\]where \(a(\theta)\) is the bare state density.
- Returns:
The density of states as a 1D Field.
- Return type:
- v_eff()¶
Compute the effective velocity v^eff(theta).
\[v^{eff}(\theta) = \frac{(\partial_\theta q_2)^{dr}} {(\partial_\theta q_1)^{dr}}\]where \(q_1\) and \(q_2\) are the momentum and energy charges respectively.
- Returns:
The effective velocity as a 1D Field.
- Return type:
- classmethod zero_temperature(model, theta_f, n_points=200)¶
Construct zero temperature ground state.
At zero temperature all states within the Fermi sea are filled. The particle density satisfies the linear integral equation:
\[\rho_p(\theta) = a(\theta) + \int_{-\theta_F}^{\theta_F} K(\theta - \theta') \rho_p(\theta') d\theta'\]which is equivalent to dressing with uniform filling n=1.