Skip to main content

ErrorCorrectionCode

Trait ErrorCorrectionCode 

Source
pub trait ErrorCorrectionCode: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn distance(&self) -> usize;
    fn encoding_rate(&self) -> f64;
    fn threshold(&self) -> f64;
    fn encode(
        &self,
        logical_state: &Array1<f64>,
    ) -> Result<Array1<f64>, QECError>;
    fn syndrome_extraction(
        &self,
        state: &Array1<f64>,
    ) -> Result<Array1<i32>, QECError>;
    fn error_lookup(
        &self,
        syndrome: &Array1<i32>,
    ) -> Result<Array1<i32>, QECError>;
}

Required Methods§

Source

fn name(&self) -> &str

Source

fn distance(&self) -> usize

Source

fn encoding_rate(&self) -> f64

Source

fn threshold(&self) -> f64

Source

fn encode(&self, logical_state: &Array1<f64>) -> Result<Array1<f64>, QECError>

Source

fn syndrome_extraction( &self, state: &Array1<f64>, ) -> Result<Array1<i32>, QECError>

Source

fn error_lookup(&self, syndrome: &Array1<i32>) -> Result<Array1<i32>, QECError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§