pub struct FiniteTempBasis<K, S>{ /* private fields */ }Expand description
Finite temperature basis for imaginary time/frequency Green’s functions
For a continuation kernel K from real frequencies ω ∈ [-ωmax, ωmax] to
imaginary time τ ∈ [0, β], this type stores the truncated singular
value expansion or IR basis:
K(τ, ω) ≈ sum(u[l](τ) * s[l] * v[l](ω) for l in 1:L)This basis is inferred from a reduced form by appropriate scaling of the variables.
§Type Parameters
K- Kernel type implementingKernelProperties + CentrosymmKernelS- Statistics type (FermionicorBosonic)
Implementations§
Source§impl<K, S> FiniteTempBasis<K, S>
impl<K, S> FiniteTempBasis<K, S>
Sourcepub fn sve_result(&self) -> &Arc<SVEResult>
pub fn sve_result(&self) -> &Arc<SVEResult>
Get the SVE result
Sourcepub fn u(&self) -> &Arc<PiecewiseLegendrePolyVector>
pub fn u(&self) -> &Arc<PiecewiseLegendrePolyVector>
Get the left singular functions (u) on imaginary time axis
Sourcepub fn v(&self) -> &Arc<PiecewiseLegendrePolyVector>
pub fn v(&self) -> &Arc<PiecewiseLegendrePolyVector>
Get the right singular functions (v) on real frequency axis
Sourcepub fn uhat(&self) -> &Arc<PiecewiseLegendreFTVector<S>>
pub fn uhat(&self) -> &Arc<PiecewiseLegendreFTVector<S>>
Get the left singular functions on Matsubara frequency axis (uhat)
Sourcepub fn uhat_full(&self) -> &Arc<PiecewiseLegendreFTVector<S>>
pub fn uhat_full(&self) -> &Arc<PiecewiseLegendreFTVector<S>>
Get the full uhat (before truncation)
Sourcepub fn default_matsubara_sampling_points_i64(
&self,
positive_only: bool,
) -> Vec<i64>where
S: 'static,
pub fn default_matsubara_sampling_points_i64(
&self,
positive_only: bool,
) -> Vec<i64>where
S: 'static,
Get default Matsubara sampling points as i64 indices (for C-API)
Sourcepub fn default_matsubara_sampling_points_i64_with_mitigate(
&self,
positive_only: bool,
mitigate: bool,
n_points: usize,
) -> Vec<i64>where
S: 'static,
pub fn default_matsubara_sampling_points_i64_with_mitigate(
&self,
positive_only: bool,
mitigate: bool,
n_points: usize,
) -> Vec<i64>where
S: 'static,
Get default Matsubara sampling points as i64 indices with mitigate parameter (for C-API)
§Panics
Panics if the kernel is not centrosymmetric. This method relies on centrosymmetry to generate sampling points.
Sourcepub fn from_sve_result(
kernel: K,
beta: f64,
sve_result: SVEResult,
epsilon: Option<f64>,
max_size: Option<usize>,
) -> Self
pub fn from_sve_result( kernel: K, beta: f64, sve_result: SVEResult, epsilon: Option<f64>, max_size: Option<usize>, ) -> Self
Create basis from existing SVE result
This is useful when you want to reuse the same SVE computation for both fermionic and bosonic bases.
Sourcepub fn significance(&self) -> Vec<f64>
pub fn significance(&self) -> Vec<f64>
Get significance of each singular value (s[i] / s[0])
Sourcepub fn default_tau_sampling_points(&self) -> Vec<f64>
pub fn default_tau_sampling_points(&self) -> Vec<f64>
Get default tau sampling points
C++ implementation: libsparseir/include/sparseir/basis.hpp:229-270
Returns sampling points in imaginary time τ ∈ [-β/2, β/2].
§Panics
Panics if the kernel is not centrosymmetric. This method relies on centrosymmetry to generate symmetric sampling points.
Sourcepub fn default_tau_sampling_points_size_requested(
&self,
size_requested: usize,
) -> Vec<f64>
pub fn default_tau_sampling_points_size_requested( &self, size_requested: usize, ) -> Vec<f64>
Get default tau sampling points with a requested size
§Panics
Panics if the kernel is not centrosymmetric. This method relies on centrosymmetry to generate symmetric sampling points.
Sourcepub fn default_matsubara_sampling_points(
&self,
positive_only: bool,
) -> Vec<MatsubaraFreq<S>>where
S: 'static,
pub fn default_matsubara_sampling_points(
&self,
positive_only: bool,
) -> Vec<MatsubaraFreq<S>>where
S: 'static,
Get default Matsubara frequency sampling points
Returns sampling points as MatsubaraFreq objects based on extrema of the Matsubara basis functions (same algorithm as C++/Julia).
§Arguments
positive_only- If true, returns only non-negative frequencies
§Returns
Vector of Matsubara frequency sampling points
§Panics
Panics if the kernel is not centrosymmetric. This method relies on centrosymmetry to generate sampling points.
pub fn default_matsubara_sampling_points_impl(
uhat_full: &PiecewiseLegendreFTVector<S>,
l: usize,
fence: bool,
positive_only: bool,
) -> Vec<MatsubaraFreq<S>>where
S: StatisticsType + 'static,
Sourcepub fn default_omega_sampling_points(&self) -> Vec<f64>
pub fn default_omega_sampling_points(&self) -> Vec<f64>
Get default omega (real frequency) sampling points
Returns sampling points on the real-frequency axis ω ∈ [-ωmax, ωmax]. These are used as pole locations for the Discrete Lehmann Representation (DLR).
The sampling points are chosen as the roots of the L-th basis function in the spectral domain (v), which provides near-optimal conditioning.
§Returns
Vector of real-frequency sampling points in [-ωmax, ωmax]
Trait Implementations§
Source§impl<K, S> Basis<S> for FiniteTempBasis<K, S>
impl<K, S> Basis<S> for FiniteTempBasis<K, S>
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>
Source§impl<K, S> Clone for FiniteTempBasis<K, S>
impl<K, S> Clone for FiniteTempBasis<K, S>
Source§fn clone(&self) -> FiniteTempBasis<K, S>
fn clone(&self) -> FiniteTempBasis<K, S>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<K, S> Freeze for FiniteTempBasis<K, S>where
K: Freeze,
impl<K, S> RefUnwindSafe for FiniteTempBasis<K, S>where
K: RefUnwindSafe,
S: RefUnwindSafe,
impl<K, S> Send for FiniteTempBasis<K, S>
impl<K, S> Sync for FiniteTempBasis<K, S>
impl<K, S> Unpin for FiniteTempBasis<K, S>
impl<K, S> UnwindSafe for FiniteTempBasis<K, S>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.