pub trait OpenSystem<'a>:
Add
+ Sub
+ PartialEq
+ Clone
+ Display
+ Serialize
+ Deserialize<'a>where
Self::System: OperateOnState<'a> + 'a,
&'a Self::System: IntoIterator,
<Self::System as OperateOnDensityMatrix<'a>>::Index: Clone + SymmetricIndex,
<Self::System as OperateOnDensityMatrix<'a>>::Value: Mul<f64, Output = <Self::System as OperateOnDensityMatrix<'a>>::Value> + Add<<Self::System as OperateOnDensityMatrix<'a>>::Value, Output = <Self::System as OperateOnDensityMatrix<'a>>::Value> + Clone + TruncateTrait + ConjugationTrait,
Self::Noise: OperateOnDensityMatrix<'a> + 'a,
&'a Self::Noise: IntoIterator,
<Self::Noise as OperateOnDensityMatrix<'a>>::Index: Clone,
<Self::Noise as OperateOnDensityMatrix<'a>>::Value: Mul<f64, Output = <Self::Noise as OperateOnDensityMatrix<'a>>::Value> + Add<<Self::Noise as OperateOnDensityMatrix<'a>>::Value, Output = <Self::Noise as OperateOnDensityMatrix<'a>>::Value> + Clone + TruncateTrait + ConjugationTrait,{
type System;
type Noise;
// Required methods
fn noise(&self) -> &Self::Noise;
fn system(&self) -> &Self::System;
fn noise_mut(&mut self) -> &mut Self::Noise;
fn system_mut(&mut self) -> &mut Self::System;
fn ungroup(self) -> (Self::System, Self::Noise);
fn group(
system: Self::System,
noise: Self::Noise,
) -> Result<Self, StruqtureError>;
fn empty_clone(&self) -> Self;
// Provided method
fn truncate(&'a self, threshold: f64) -> Self { ... }
}Expand description
Trait for representing complete open systems
Required Associated Types§
Required Methods§
Sourcefn noise(&self) -> &Self::Noise
fn noise(&self) -> &Self::Noise
Returns the Self::Noise of the OpenSystem object.
§Returns
&Self::Noise- The Self::Noise of the OpenSystem object.
Sourcefn system(&self) -> &Self::System
fn system(&self) -> &Self::System
Returns the Self::System of the OpenSystem object.
§Returns
&Self::System- The Self::System of the OpenSystem object.
Sourcefn noise_mut(&mut self) -> &mut Self::Noise
fn noise_mut(&mut self) -> &mut Self::Noise
Returns a mutable reference of the Self::Noise of the OpenSystem object.
§Returns
&Self::Noise- The Self::Noise of the OpenSystem object.
Sourcefn system_mut(&mut self) -> &mut Self::System
fn system_mut(&mut self) -> &mut Self::System
Returns a mutable reference of the Self::System of the OpenSystem object.
§Returns
&Self::System- The Self::System of the OpenSystem object.
Sourcefn ungroup(self) -> (Self::System, Self::Noise)
fn ungroup(self) -> (Self::System, Self::Noise)
Returns a tuple of the system (Self::System) and the noise (Self::Noise) of the OpenSystem.
§Returns
(Self::System, Self::Noise)- The system and noise of the OpenSystem.
fn group( system: Self::System, noise: Self::Noise, ) -> Result<Self, StruqtureError>
Sourcefn empty_clone(&self) -> Self
fn empty_clone(&self) -> Self
Provided Methods§
Sourcefn truncate(&'a self, threshold: f64) -> Self
fn truncate(&'a self, threshold: f64) -> Self
Truncates Self by returning a copy without entries under a threshold.
Entries with an absolute value under the threshold are removed from the copy of the object that is returned. For entries with complex coefficients the threshold is applied to real and imaginary part separately. All symbolic values are considered to be above the threshold.
§Arguments
threshold- The threshold for inclusion.
§Returns
Self- The truncated version of Self.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.