pub struct TopologicalQuantumSimulator { /* private fields */ }
Expand description
Topological quantum simulator
Implementations§
Source§impl TopologicalQuantumSimulator
impl TopologicalQuantumSimulator
Sourcepub fn new(config: TopologicalConfig) -> Result<Self>
pub fn new(config: TopologicalConfig) -> Result<Self>
Create new topological quantum simulator
Sourcepub fn place_anyon(
&mut self,
anyon_type: AnyonType,
position: Vec<usize>,
) -> Result<usize>
pub fn place_anyon( &mut self, anyon_type: AnyonType, position: Vec<usize>, ) -> Result<usize>
Place anyon on the lattice
Sourcepub fn braid_anyons(
&mut self,
anyon_a: usize,
anyon_b: usize,
braiding_type: BraidingType,
) -> Result<Complex64>
pub fn braid_anyons( &mut self, anyon_a: usize, anyon_b: usize, braiding_type: BraidingType, ) -> Result<Complex64>
Perform braiding operation between two anyons
Sourcepub fn move_anyon(
&mut self,
anyon_id: usize,
new_position: Vec<usize>,
) -> Result<()>
pub fn move_anyon( &mut self, anyon_id: usize, new_position: Vec<usize>, ) -> Result<()>
Move anyon to new position
Sourcepub fn fuse_anyons(
&mut self,
anyon_a: usize,
anyon_b: usize,
) -> Result<Vec<AnyonType>>
pub fn fuse_anyons( &mut self, anyon_a: usize, anyon_b: usize, ) -> Result<Vec<AnyonType>>
Fuse two anyons
Sourcepub fn calculate_topological_invariants(
&mut self,
) -> Result<TopologicalInvariants>
pub fn calculate_topological_invariants( &mut self, ) -> Result<TopologicalInvariants>
Calculate topological invariants
Sourcepub fn detect_and_correct_errors(&mut self) -> Result<Vec<bool>>
pub fn detect_and_correct_errors(&mut self) -> Result<Vec<bool>>
Detect and correct topological errors
Sourcepub fn get_state(&self) -> &TopologicalState
pub fn get_state(&self) -> &TopologicalState
Get current topological state
Sourcepub fn get_braiding_history(&self) -> &[BraidingOperation]
pub fn get_braiding_history(&self) -> &[BraidingOperation]
Get braiding history
Sourcepub fn get_stats(&self) -> &TopologicalSimulationStats
pub fn get_stats(&self) -> &TopologicalSimulationStats
Get simulation statistics
Auto Trait Implementations§
impl Freeze for TopologicalQuantumSimulator
impl !RefUnwindSafe for TopologicalQuantumSimulator
impl Send for TopologicalQuantumSimulator
impl Sync for TopologicalQuantumSimulator
impl Unpin for TopologicalQuantumSimulator
impl !UnwindSafe for TopologicalQuantumSimulator
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
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
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.