OpenSystem

Trait OpenSystem 

Source
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§

Source

fn noise(&self) -> &Self::Noise

Returns the Self::Noise of the OpenSystem object.

§Returns
  • &Self::Noise - The Self::Noise of the OpenSystem object.
Source

fn system(&self) -> &Self::System

Returns the Self::System of the OpenSystem object.

§Returns
  • &Self::System - The Self::System of the OpenSystem object.
Source

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.
Source

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.
Source

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.
Source

fn group( system: Self::System, noise: Self::Noise, ) -> Result<Self, StruqtureError>

Source

fn empty_clone(&self) -> Self

Returns an instance of Self that has no entries but clones all other properties, with the given capacity.

§Arguments
  • capacity - The capacity of the object to create.
§Returns
  • Self - An empty clone with the same properties as Self, with the given capacity.

Provided Methods§

Source

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.

Implementors§