pub struct DiscreteLehmannRepresentation<S>where
S: StatisticsType,{
pub poles: Vec<f64>,
pub beta: f64,
pub wmax: f64,
pub accuracy: f64,
pub regularizers: Vec<f64>,
/* private fields */
}Expand description
Discrete Lehmann Representation (DLR)
The DLR is a variant of the IR basis based on a “sketching” of the analytic continuation kernel K. Instead of using singular value expansion, it represents Green’s functions as a linear combination of poles on the real-frequency axis:
G(iν) = Σ_i a[i] * reg[i] / (iν - ω[i])where:
ω[i]are pole positions on the real axisa[i]are expansion coefficientsreg[i]are kernel-dependent pole weights on the physical ω grid
The public regularizers field stores the raw kernel regularizer
w(β, ω_i). Internally, DLR evaluations use pole_weights, which include
the ω-domain normalization carried by FiniteTempBasis.
§Type Parameters
S- Statistics type (Fermionic or Bosonic)
Fields§
§poles: Vec<f64>Pole positions on the real-frequency axis ω ∈ [-ωmax, ωmax]
beta: f64Inverse temperature β
wmax: f64Maximum frequency ωmax
accuracy: f64Accuracy of the representation
regularizers: Vec<f64>Regularizers for each pole: regularizer[i] = w(β, ω_i) These are computed from the source IR basis kernel.
Implementations§
Source§impl<S> DiscreteLehmannRepresentation<S>where
S: StatisticsType,
impl<S> DiscreteLehmannRepresentation<S>where
S: StatisticsType,
pub fn kernel_ypower(&self) -> i32
pub fn pole_weights(&self) -> &[f64]
Sourcepub fn with_poles<K>(basis: &impl Basis<S, Kernel = K>, poles: Vec<f64>) -> Selfwhere
S: 'static,
K: KernelProperties + Clone,
pub fn with_poles<K>(basis: &impl Basis<S, Kernel = K>, poles: Vec<f64>) -> Selfwhere
S: 'static,
K: KernelProperties + Clone,
Create DLR from IR basis with custom poles
The tau-domain pole basis is built from the logistic representation, while kernel-specific regularizers are preserved for compatible kernels.
§Arguments
basis- The IR basis to construct DLR frompoles- Pole positions on the real-frequency axis
§Returns
A new DLR representation
Sourcepub fn new<K>(basis: &impl Basis<S, Kernel = K>) -> Selfwhere
S: 'static,
K: KernelProperties + Clone,
pub fn new<K>(basis: &impl Basis<S, Kernel = K>) -> Selfwhere
S: 'static,
K: KernelProperties + Clone,
Create DLR from IR basis with default pole locations
Uses the default omega sampling points from the basis.
§Arguments
basis- The IR basis to construct DLR from
§Returns
A new DLR representation with default poles
§Panics
Panics if the number of default poles is less than the basis size. This can happen with certain kernel types (e.g., RegularizedBoseKernel) due to numerical precision limitations in root finding.
Sourcepub fn from_ir_nd<T>(
&self,
backend: Option<&GemmBackendHandle>,
gl: &Tensor<T, DynRank>,
dim: usize,
) -> Tensor<T, DynRank>
pub fn from_ir_nd<T>( &self, backend: Option<&GemmBackendHandle>, gl: &Tensor<T, DynRank>, dim: usize, ) -> Tensor<T, DynRank>
Trait Implementations§
Source§impl<S> Basis<S> for DiscreteLehmannRepresentation<S>where
S: StatisticsType + 'static,
impl<S> Basis<S> for DiscreteLehmannRepresentation<S>where
S: StatisticsType + 'static,
Source§type Kernel = LogisticKernel
type Kernel = LogisticKernel
Source§fn default_matsubara_sampling_points(
&self,
_positive_only: bool,
) -> Vec<MatsubaraFreq<S>>
fn default_matsubara_sampling_points( &self, _positive_only: bool, ) -> Vec<MatsubaraFreq<S>>
Source§fn evaluate_tau(&self, tau: &[f64]) -> DTensor<f64, 2>
fn evaluate_tau(&self, tau: &[f64]) -> DTensor<f64, 2>
Source§fn evaluate_matsubara(
&self,
freqs: &[MatsubaraFreq<S>],
) -> DTensor<Complex<f64>, 2>
fn evaluate_matsubara( &self, freqs: &[MatsubaraFreq<S>], ) -> DTensor<Complex<f64>, 2>
Auto Trait Implementations§
impl<S> !Freeze for DiscreteLehmannRepresentation<S>
impl<S> RefUnwindSafe for DiscreteLehmannRepresentation<S>where
S: RefUnwindSafe,
impl<S> Send for DiscreteLehmannRepresentation<S>where
S: Send,
impl<S> Sync for DiscreteLehmannRepresentation<S>where
S: Sync,
impl<S> Unpin for DiscreteLehmannRepresentation<S>where
S: Unpin,
impl<S> UnsafeUnpin for DiscreteLehmannRepresentation<S>
impl<S> UnwindSafe for DiscreteLehmannRepresentation<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoCloned<T> for T
impl<T> IntoCloned<T> for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.