pub enum CodeType {
StandardPlanarCode,
RotatedPlanarCode,
StandardXZZXCode,
RotatedXZZXCode,
StandardTailoredCode,
RotatedTailoredCode,
RotatedTailoredCodeBellInit,
PeriodicRotatedTailoredCode,
Customized,
}Expand description
commonly used code type that has built-in functions to automatically build up the simulator. other type of code type is also feasible, but one needs to implement the generation of code patch.
Variants§
StandardPlanarCode
noisy measurement rounds (excluding the final perfect measurement cap), vertical code distance, horizontal code distance
RotatedPlanarCode
noisy measurement rounds (excluding the final perfect measurement cap), +i+j axis code distance, +i-j axis code distance
StandardXZZXCode
noisy measurement rounds (excluding the final perfect measurement cap), vertical code distance, horizontal code distance
RotatedXZZXCode
noisy measurement rounds (excluding the final perfect measurement cap), +i+j axis code distance, +i-j axis code distance
StandardTailoredCode
noisy measurement rounds (excluding the final perfect measurement cap), vertical code distance, horizontal code distance
RotatedTailoredCode
noisy measurement rounds (excluding the final perfect measurement cap), +i+j axis code distance, +i-j axis code distance
RotatedTailoredCodeBellInit
same as RotatedTailoredCode but with first measurement cycle modified for bell state initialization
PeriodicRotatedTailoredCode
periodic boundary condition of rotated tailored surface code, code distances must be even number
Customized
unknown code type, user must provide necessary information and build circuit-level implementation
Implementations§
Source§impl CodeType
impl CodeType
Sourcepub fn get_left(
&self,
i: usize,
j: usize,
code_size: &CodeSize,
) -> (usize, usize)
pub fn get_left( &self, i: usize, j: usize, code_size: &CodeSize, ) -> (usize, usize)
get position on the left of (i, j), note that this position may be invalid for open-boundary code if it doesn’t exist
Sourcepub fn get_up(&self, i: usize, j: usize, code_size: &CodeSize) -> (usize, usize)
pub fn get_up(&self, i: usize, j: usize, code_size: &CodeSize) -> (usize, usize)
get position up the position (i, j), note that this position may be invalid for open-boundary code if it doesn’t exist
Sourcepub fn get_right(
&self,
i: usize,
j: usize,
code_size: &CodeSize,
) -> (usize, usize)
pub fn get_right( &self, i: usize, j: usize, code_size: &CodeSize, ) -> (usize, usize)
get position on the right of (i, j), note that this position may be invalid for open-boundary code if it doesn’t exist
Sourcepub fn get_down(
&self,
i: usize,
j: usize,
code_size: &CodeSize,
) -> (usize, usize)
pub fn get_down( &self, i: usize, j: usize, code_size: &CodeSize, ) -> (usize, usize)
get position down the position (i, j), note that this position may be invalid for open-boundary code if it doesn’t exist
Sourcepub fn get_left_up(
&self,
i: usize,
j: usize,
code_size: &CodeSize,
) -> (usize, usize)
pub fn get_left_up( &self, i: usize, j: usize, code_size: &CodeSize, ) -> (usize, usize)
convenient call to get diagonal neighbor on the left up
Sourcepub fn get_left_down(
&self,
i: usize,
j: usize,
code_size: &CodeSize,
) -> (usize, usize)
pub fn get_left_down( &self, i: usize, j: usize, code_size: &CodeSize, ) -> (usize, usize)
convenient call to get diagonal neighbor on the left down
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CodeType
impl<'de> Deserialize<'de> for CodeType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Ord for CodeType
impl Ord for CodeType
Source§impl PartialOrd for CodeType
impl PartialOrd for CodeType
impl Copy for CodeType
impl Eq for CodeType
impl StructuralPartialEq for CodeType
Auto Trait Implementations§
impl Freeze for CodeType
impl RefUnwindSafe for CodeType
impl Send for CodeType
impl Sync for CodeType
impl Unpin for CodeType
impl UnwindSafe for CodeType
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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 more