#[non_exhaustive]pub enum LogError {
NotNearIdentity {
distance: f64,
threshold: f64,
},
Singularity {
reason: String,
},
NumericalInstability {
reason: String,
},
}Expand description
Errors that can occur during Lie group logarithm computation
The logarithm map log: G → 𝔤 is only well-defined on a neighborhood
of the identity. Elements far from the identity may not have a unique
or well-defined logarithm.
§Mathematical Background
For matrix Lie groups, the logarithm is the inverse of the exponential map.
However, unlike exp: 𝔤 → G which is always defined, log: G → 𝔤 has
a restricted domain:
- U(1): Log defined for all elements except exact multiples of e^{iπ}
- SU(2): Log defined for all elements except -I
- SU(3): Log defined in a neighborhood of the identity
- SO(3): Log defined for rotations with angle < π
§Physical Interpretation
In lattice gauge theory, when computing curvature F = log(U_□) from the Wilson loop U_□:
- If U_□ ≈ I (small plaquette, weak field), log is well-defined
- If U_□ far from I (large plaquette, strong field), log may fail
- Solution: Use smaller lattice spacing or smearing techniques
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotNearIdentity
Element is too far from identity for logarithm to be computed
The logarithm map is only guaranteed to exist in a neighborhood of the identity. This error indicates the element is outside that neighborhood.
Singularity
Element is exactly at a singularity of the log map
For example:
- SU(2): element = -I (rotation by π with ambiguous axis)
- SO(3): rotation by exactly π (axis ambiguous)
NumericalInstability
Numerical precision insufficient for accurate logarithm
When the element is very close to a singularity, numerical errors can dominate. This indicates the computation would be unreliable.
Trait Implementations§
Source§impl Error for LogError
impl Error for LogError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl StructuralPartialEq for LogError
Auto Trait Implementations§
impl Freeze for LogError
impl RefUnwindSafe for LogError
impl Send for LogError
impl Sync for LogError
impl Unpin for LogError
impl UnsafeUnpin for LogError
impl UnwindSafe for LogError
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<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.