pub struct TopologicalGate {
pub braids: Vec<BraidingOperation>,
pub comp_dim: usize,
}Expand description
Topological gate using anyon braiding
Fields§
§braids: Vec<BraidingOperation>Sequence of braiding operations
comp_dim: usizeTarget computational basis dimension
Implementations§
Source§impl TopologicalGate
impl TopologicalGate
Sourcepub const fn new(braids: Vec<BraidingOperation>, comp_dim: usize) -> Self
pub const fn new(braids: Vec<BraidingOperation>, comp_dim: usize) -> Self
Create a new topological gate
Sourcepub fn to_matrix(
&self,
model: &dyn AnyonModel,
) -> QuantRS2Result<Array2<Complex64>>
pub fn to_matrix( &self, model: &dyn AnyonModel, ) -> QuantRS2Result<Array2<Complex64>>
Compute the unitary matrix representation of this braiding sequence in the
fusion-tree basis of model.
Each BraidingOperation is a generator σ_i (or its inverse when
over == false) of the braid group. Its matrix in the fusion-tree basis is the
diagonal action of the model’s R-symbols R^{ab}_c on the fusion channel c
of the braided pair (a, b). The full sequence is the ordered product
B = B(braid_{k-1}) ··· B(braid_0) (later braids act last, i.e. on the left).
The anyons are materialised as n = (max index used) + 1 copies of the model’s
primary non-vacuum anyon (the smallest-id anyon with quantum dimension > 1,
falling back to the first non-vacuum type), which is the standard setting for
braiding-based gates (e.g. σ anyons for the Ising model).
Returns an QuantRS2Error::UnsupportedOperation if the model exposes no
non-vacuum anyon to braid (so no generator matrices can be built) — never a
silent identity.
Trait Implementations§
Source§impl Clone for TopologicalGate
impl Clone for TopologicalGate
Source§fn clone(&self) -> TopologicalGate
fn clone(&self) -> TopologicalGate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for TopologicalGate
impl RefUnwindSafe for TopologicalGate
impl Send for TopologicalGate
impl Sync for TopologicalGate
impl Unpin for TopologicalGate
impl UnsafeUnpin for TopologicalGate
impl UnwindSafe for TopologicalGate
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
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.