use super::c64; use super::time_evolution::State; use ndarray::prelude::*; pub struct TwoLevel { state: Array1, } impl TwoLevel { pub fn new(alpha: c64, beta: c64) -> TwoLevel { TwoLevel { state: array![alpha, beta], } } } impl State for TwoLevel { fn fibrate(&self) -> Array1 { self.state.clone() } fn evolve(mut self, t: f64) -> Self { self.state = self.state.dot(&G::gen(t)); self } }