Beispiel #1
0
    def get_hamiltonian_colliding_wells(
        self,
        vL: float = 1.0,
        aL: float = 0.0,
        vR: float = None,
        aR: float = None,
    ) -> tasks.MBOperatorSpecification:
        if vR is None:
            vR = -vL

        if aR is None:
            aR = -aL

        left_potential = tasks.MBOperatorSpecification(
            (1, ),
            (self.grid, ),
            {"potential_left_coeff": 1.0},
            {
                "potential_left": {
                    "td_name": "moving_gaussian",
                    "td_args":
                    [-self.parameters.V0L, self.parameters.x0L, vL, aL],
                },
            },
            "potential_left_coeff | 1 potential_left",
        )

        right_potential = tasks.MBOperatorSpecification(
            (1, ),
            (self.grid, ),
            {"potential_right_coeff": 1.0},
            {
                "potential_right": {
                    "td_name": "moving_gaussian",
                    "td_args":
                    [-self.parameters.V0R, self.parameters.x0R, vR, aR],
                },
            },
            "potential_right_coeff | 1 potential_right",
        )

        operator = self.get_kinetic_operator(
        ) + left_potential + right_potential

        if (self.parameters.N > 1) and (self.parameters.g != 0.0):
            operator += self.get_interaction_operator()

        return operator
Beispiel #2
0
 def get_interaction_operator(self) -> tasks.MBOperatorSpecification:
     return tasks.MBOperatorSpecification(
         (1, ),
         (self.grid, ),
         {"interaction_coeff": self.parameters.g},
         {"interaction": self.grid.get_delta()},
         "interaction_coeff | {1:1} interaction",
     )
Beispiel #3
0
 def get_potential_operator(self) -> tasks.MBOperatorSpecification:
     return tasks.MBOperatorSpecification(
         (1, ),
         (self.grid, ),
         {"potential_coeff": self.parameters.V0},
         {"potential": self.get_potential(self.grid_1b.get_x())},
         "potential_coeff | 1 potential",
     )
Beispiel #4
0
 def get_interaction_operator(self) -> tasks.MBOperatorSpecification:
     return tasks.MBOperatorSpecification(
         (1, ),
         (self.grid, ),
         {"interaction_coeff": 2.0 * self.parameters.g},
         {"x": self.grid.get_x()},
         "interaction_coeff | 1 x | 1* x",
     )
Beispiel #5
0
 def get_potential_operator(self) -> tasks.MBOperatorSpecification:
     return tasks.MBOperatorSpecification(
         (1, ),
         (self.grid, ),
         {"potential_coeff": 0.5 * (self.parameters.omega**2)},
         {"potential": (self.grid.get_x() - self.parameters.x0)**2},
         "potential_coeff | 1 potential",
     )
Beispiel #6
0
 def create_gaussian_potential_operator(
     self,
     x0: float,
     V0: float,
     name: str = "potential",
     alpha: float = 1.0,
 ) -> tasks.MBOperatorSpecification:
     return tasks.MBOperatorSpecification(
         (1, ),
         (self.grid, ),
         {name + "_coeff": -V0},
         {name: gaussian(self.grid.get_x(), x0, alpha)},
         name + "_coeff | 1 " + name,
     )
Beispiel #7
0
 def get_hamiltonian_moving_well(
     self,
     v: float = 1.0,
     a: float = 0.0,
 ) -> tasks.MBOperatorSpecification:
     potential = tasks.MBOperatorSpecification(
         (1, ),
         (self.grid, ),
         {"potential_coeff": 1.0},
         {
             "potential": {
                 "td_name": "moving_gaussian",
                 "td_args": [-self.parameters.V0, self.parameters.x0, v, a],
             },
         },
         "potential_coeff | 1 potential",
     )
     return self.get_kinetic_operator(
     ) + potential + self.get_interaction_operator()