Skip to main content

Screened

Struct Screened 

Source
pub struct Screened<R: RealField, N: NaturalNumber, S> { /* private fields */ }
Expand description

What validate terminates in: the config, the admitted candidates, and the report.

Implementations§

Source§

impl<R: RealField, N: NaturalNumber, S> Screened<R, N, S>

Source

pub fn config(&self) -> &Config<R, N, S>

The configuration that was screened.

Source

pub fn admitted(&self) -> &[Hypothesis<R>]

The candidates that passed every check.

Source

pub fn stages(&self) -> &[(&'static str, CheckReport<R>)]

Each stage’s report, in order.

Source

pub fn report(&self) -> Option<&CheckReport<R>>

The folded report, when it is current. None after a marginalisation: the pre-trace margins are not readable as current margins.

Source

pub fn stale_report_degraded(&self) -> Option<R>

The stale report’s worst margin degraded by the amplification, after a marginalisation.

Source

pub fn status(&self) -> ScreenStatus<R>

Whether the report is current.

Source§

impl<R: RealField, N: NaturalNumber, S: SubjectOrigin> Screened<R, N, S>

Source

pub fn origin(&self) -> ScreenOrigin

Where the screened subject’s factorization came from.

Source

pub fn require_compositional(&self) -> Result<(), QuantumError>

Admits the screen into an abstraction, which needs a compositional model.

§Errors

QuantumError::NoCompositionalModel unless the origin is a circuit: a process operator without its circuit is the marginal of a compositional model and not one itself (Lorenz & Tull, Example 62), so it validates as in v1 and stops.

Source§

impl<R, N, G, T> Screened<R, N, ModelSubject<R, G, T>>

Source

pub fn marginalise( &self, kept_legs: usize, z: &CausalTensor<Complex<R>>, tolerance: R, ) -> Result<(Marginalised<R>, Self), QuantumError>

Marginalise the screened factorization, gated on the boundary warrant, invalidating the report. The traced operator and its warrant come back beside the invalidated screen.

§Errors

As Hypothesis::marginalise.

Trait Implementations§

Source§

impl<R: Clone + RealField, N: Clone + NaturalNumber, S: Clone> Clone for Screened<R, N, S>

Source§

fn clone(&self) -> Screened<R, N, S>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<R, N, const D: usize> ControlSource<R, N, D> for &Screened<R, N, PlantSubject<R, D, Structural>>
where R: RealField, N: NaturalNumber,

Source§

fn into_control(self) -> Control<R, N, D>

The control stage over this source.

Auto Trait Implementations§

§

impl<R, N, S> Freeze for Screened<R, N, S>
where Config<R, N, S>: Freeze, Vec<Hypothesis<R>>: Freeze, Vec<(&'static str, CheckReport<R>)>: Freeze, CheckReport<R>: Freeze, ScreenStatus<R>: Freeze,

§

impl<R, N, S> RefUnwindSafe for Screened<R, N, S>

§

impl<R, N, S> Send for Screened<R, N, S>
where Config<R, N, S>: Send, Vec<Hypothesis<R>>: Send, Vec<(&'static str, CheckReport<R>)>: Send, CheckReport<R>: Send, ScreenStatus<R>: Send,

§

impl<R, N, S> Sync for Screened<R, N, S>
where Config<R, N, S>: Sync, Vec<Hypothesis<R>>: Sync, Vec<(&'static str, CheckReport<R>)>: Sync, CheckReport<R>: Sync, ScreenStatus<R>: Sync,

§

impl<R, N, S> Unpin for Screened<R, N, S>
where Config<R, N, S>: Unpin, Vec<Hypothesis<R>>: Unpin, Vec<(&'static str, CheckReport<R>)>: Unpin, CheckReport<R>: Unpin, ScreenStatus<R>: Unpin,

§

impl<R, N, S> UnsafeUnpin for Screened<R, N, S>

§

impl<R, N, S> UnwindSafe for Screened<R, N, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<Borrowed> SampleBorrow<Borrowed> for Borrowed

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.