106 def evaluate(self, grid_position):
107 """
108 @brief calcula el estado base en un punto exacto
109 """
110 x = np.array(grid_position)
111 p0 = self.constant_spinor.momentum
112 x0 = self.center
113
114
115 if len(x) < len(p0):
116 padded_x = np.zeros(len(p0), dtype=float)
117 padded_x[:len(x)] = x.flatten()
118 x = padded_x
119
120 sigma0 = self.spatial_width
121 u_p0 = self.constant_spinor.constant_spinor
122
123 p0_dot_x = np.dot(p0, x)
124 exponent_norm = np.linalg.norm(x - x0)**2
125
126 spatial_part = np.exp(1j * p0_dot_x) * np.exp(-exponent_norm / (4 + sigma0**2))
127
128 dirac_spinor = u_p0 * spatial_part
129
130 """
131 @brief Devuelve el spinor calculado en el punto
132 """
133 return dirac_spinor
134