Skip to main content

quantrs2_sim/topological_quantum_simulation/
parafermionanyons_traits.rs

1//! # ParafermionAnyons - Trait Implementations
2//!
3//! This module contains trait implementations for `ParafermionAnyons`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Default`
8//! - `AnyonModelImplementation`
9//!
10//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
11
12use scirs2_core::ndarray::{Array1, Array2, Array3, Array4, Axis};
13use scirs2_core::Complex64;
14
15use super::functions::AnyonModelImplementation;
16use super::types::{AnyonType, ParafermionAnyons};
17
18impl Default for ParafermionAnyons {
19    fn default() -> Self {
20        Self::new()
21    }
22}
23
24impl AnyonModelImplementation for ParafermionAnyons {
25    fn get_anyon_types(&self) -> Vec<AnyonType> {
26        self.anyon_types.clone()
27    }
28    fn fusion_coefficients(&self, _a: &AnyonType, _b: &AnyonType, _c: &AnyonType) -> Complex64 {
29        Complex64::new(1.0, 0.0)
30    }
31    fn braiding_matrix(&self, _a: &AnyonType, _b: &AnyonType) -> Array2<Complex64> {
32        Array2::eye(1)
33    }
34    fn f_matrix(
35        &self,
36        _a: &AnyonType,
37        _b: &AnyonType,
38        _c: &AnyonType,
39        _d: &AnyonType,
40    ) -> Array2<Complex64> {
41        Array2::eye(1)
42    }
43    fn is_abelian(&self) -> bool {
44        false
45    }
46    fn name(&self) -> &'static str {
47        "Parafermion Anyons"
48    }
49}