rapidity.models module¶
Physical models for the rapidity package.
This module defines the Model protocol, which specifies the
interface that all integrable models must implement, and concrete
implementations of specific models.
Currently implemented:
LiebLiniger— the Lieb-Liniger model of bosons with delta interaction
To implement a new model, create a dataclass that satisfies the
Model protocol by implementing all required methods.
- class rapidity.models.LiebLiniger(c, rapidity_label='theta')¶
Bases:
objectThe Lieb-Liniger model of bosons with repulsive delta interaction.
The model is parameterized by the coupling constant c only. The thermodynamic state is encoded separately in
TBAState. The scattering kernel includes the 1/(2π) factor by convention, so the TBA equation reads:\[\epsilon(\theta) = \epsilon_0(\theta) - \int d\theta'\, K(\theta - \theta') \log(1 + e^{-\epsilon(\theta')})\]- Parameters:
c (
float) – Coupling constant. Must be positive for repulsive interactions.
Examples
>>> model = LiebLiniger(c=1.0) >>> grid = Grid1D.gauss_hermite(200, "theta") >>> kernel = model.kernel(grid)
- c: float¶
- charge(order, grid)¶
Single-particle eigenvalue of the conserved charge of given order.
\[q_s(\theta) = \theta^s\]
- driving(grid, betas)¶
Driving term as a linear combination of charge eigenvalues.
\[\epsilon_0(\theta) = \sum_s \beta_s \theta^s\]
- kernel(grid)¶
Lieb-Liniger scattering kernel including the 1/(2π) factor.
\[K(\theta) = \frac{c}{\pi(c^2 + \theta^2)}\]
- rapidity_label: str = 'theta'¶
- class rapidity.models.Model(*args, **kwargs)¶
Bases:
ProtocolProtocol for integrable models.
Any class implementing these methods can be used as a model in
TBAState.- charge(order, grid)¶
Single-particle eigenvalue of the conserved charge of given order.
- Return type:
- driving(grid, betas)¶
Driving term as a linear combination of charge eigenvalues.
- Return type:
- rapidity_label: str¶
- class rapidity.models.QHR(a, rapidity_label='theta')¶
Bases:
objectThe Quantum hard rods model.
The model is parameterized by the rod length a only. The thermodynamic state is encoded separately in
TBAState. The scattering kernel includes the 1/(2π) factor by convention, so the TBA equation reads:\[\epsilon(\theta) = \epsilon_0(\theta) - \int d\theta'\, K(\theta - \theta') \log(1 + e^{-\epsilon(\theta')})\]- Parameters:
a (
float) – Rod length. Must be positive.
Examples
>>> model = QHR(a=1.0) >>> grid = Grid1D.gauss_hermite(200, "theta") >>> kernel = model.kernel(grid)
- a: float¶
- charge(order, grid)¶
Single-particle eigenvalue of the conserved charge of given order.
\[q_s(\theta) = \theta^s\]
- driving(grid, betas)¶
Driving term as a linear combination of charge eigenvalues.
\[\epsilon_0(\theta) = \sum_s \beta_s \theta^s\]
- kernel(grid)¶
QHR scattering kernel including the 1/(2π) factor.
\[K(\theta) = -a\]
- rapidity_label: str = 'theta'¶