pub struct EntanglementSwapping {
pub n_hops: usize,
pub noise_per_link: f64,
pub rng_seed: u64,
}Expand description
Multi-hop entanglement swapping chain.
Topology: A — B₁ — B₂ — … — B_{n-1} — C Each link is a Bell pair with independent depolarizing noise.
Fields§
§n_hops: usizeNumber of hops (links). 1 = direct Bell pair; 2 = one relay; etc.
noise_per_link: f64Depolarizing noise probability per qubit per hop.
rng_seed: u64Seed for RNG.
Implementations§
Source§impl EntanglementSwapping
impl EntanglementSwapping
Sourcepub fn new(
n_hops: usize,
noise_per_link: f64,
rng_seed: u64,
) -> QuantRS2Result<Self>
pub fn new( n_hops: usize, noise_per_link: f64, rng_seed: u64, ) -> QuantRS2Result<Self>
Create a new entanglement swapping chain.
Sourcepub fn run(&self) -> QuantRS2Result<SwappingResult>
pub fn run(&self) -> QuantRS2Result<SwappingResult>
Run the entanglement swapping protocol.
Trait Implementations§
Source§impl Clone for EntanglementSwapping
impl Clone for EntanglementSwapping
Source§fn clone(&self) -> EntanglementSwapping
fn clone(&self) -> EntanglementSwapping
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EntanglementSwapping
impl RefUnwindSafe for EntanglementSwapping
impl Send for EntanglementSwapping
impl Sync for EntanglementSwapping
impl Unpin for EntanglementSwapping
impl UnsafeUnpin for EntanglementSwapping
impl UnwindSafe for EntanglementSwapping
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.