diff --git a/c2qa/operators.py b/c2qa/operators.py index 2463019..14e70c9 100644 --- a/c2qa/operators.py +++ b/c2qa/operators.py @@ -28,9 +28,21 @@ def get_a1(self, cutoff_a: int, cutoff_b: int): def get_a2(self, cutoff_a: int, cutoff_b: int): return scipy.sparse.kron(self.get_eye(cutoff_a), self.get_a(cutoff_b)).tocsc() + def get_b1(self, cutoff_a: int, cutoff_b: int, cutoff_c: int): + return scipy.sparse.kron(self.get_a(cutoff_a), self.get_eye(cutoff_b), self.get_eye(cutoff_c)).tocsc() + + def get_b2(self, cutoff_a: int, cutoff_b: int, cutoff_c: int): + return scipy.sparse.kron(self.get_eye(cutoff_a), self.get_a(cutoff_b), self.get_eye(cutoff_c)).tocsc() + + def get_b3(self, cutoff_a: int, cutoff_b: int, cutoff_c: int): + return scipy.sparse.kron(self.get_eye(cutoff_a), self.get_eye(cutoff_b), self.get_a(cutoff_c)).tocsc() + def get_a12(self, cutoff_a: int, cutoff_b: int): return self.get_a1(cutoff_a, cutoff_b) * self.get_a2(cutoff_a, cutoff_b) + def get_b123(self, cutoff_a: int, cutoff_b: int, cutoff_c: int): + return self.get_b1(cutoff_a, cutoff_b, cutoff_c) * self.get_b2(cutoff_a, cutoff_b, cutoff_c) * self.get_b3(cutoff_a, cutoff_b, cutoff_c) + def get_a_dag(self, cutoff: int): """Creation operator""" a = self.get_a(cutoff)