QuantumErrorCode

Trait QuantumErrorCode 

Source
pub trait QuantumErrorCode {
    // Required methods
    fn get_stabilizers(&self) -> Vec<StabilizerGroup>;
    fn get_logical_operators(&self) -> Vec<LogicalOperator>;
    fn distance(&self) -> usize;
    fn num_data_qubits(&self) -> usize;
    fn num_ancilla_qubits(&self) -> usize;
    fn logical_qubit_count(&self) -> usize;
    fn encode_logical_state(
        &self,
        logical_state: &Array1<Complex64>,
    ) -> QECResult<Array1<Complex64>>;
}
Expand description

Trait defining a quantum error correction code

Required Methods§

Source

fn get_stabilizers(&self) -> Vec<StabilizerGroup>

Get the stabilizer generators for this code

Source

fn get_logical_operators(&self) -> Vec<LogicalOperator>

Get the logical operators for this code

Source

fn distance(&self) -> usize

Get the code distance (minimum weight of logical operators)

Source

fn num_data_qubits(&self) -> usize

Get the number of physical data qubits

Source

fn num_ancilla_qubits(&self) -> usize

Get the number of ancilla qubits for syndrome measurement

Source

fn logical_qubit_count(&self) -> usize

Get the number of logical qubits encoded

Source

fn encode_logical_state( &self, logical_state: &Array1<Complex64>, ) -> QECResult<Array1<Complex64>>

Encode a logical state into the code space

Implementors§