def reset(self, size): self.U = defaultdict(lambda: Dict.empty(key_type=UniTuple(int64, size), value_type=complex128)) self.U[(0, ) * size][(0, ) * size] = 1.0 + 0.0j self.dU = defaultdict(lambda: Dict.empty( key_type=UniTuple(int64, size), value_type=complex128[:, :])) self.dU[(0, ) * size][(0, ) * size] = np.zeros_like( self.V, dtype=np.complex128)
def _init_gaps_coordinates(self): # Rendering the gaps coordinates self._gaps_coordinates = Dict.empty( key_type=types.int_, value_type=types.int_[:], ) self._gaps_coordinates.update(self._cacheable_gaps_coordinates)