Skip to main content

quantrs2_sim/topological_quantum_simulation/
chernsimonsanyons_traits.rs

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