示例#1
0
 def subdiagonalize_bfs(self, bfs):
     self.initialize()
     bfs = np.array(bfs)
     p = self.input_parameters
     h_pp = p['h']
     s_pp = p['s']
     ht_pp, st_pp, c_pp, e_p = subdiagonalize(h_pp, s_pp, bfs)
     c_pp = np.take(c_pp, bfs, axis=0)
     c_pp = np.take(c_pp, bfs, axis=1)
     return ht_pp, st_pp, e_p, c_pp
示例#2
0
    def subdiagonalize_bfs(self, bfs, apply=False):
        self.initialize()
        bfs = np.array(bfs)
        p = self.input_parameters
        h_mm = p['h']
        s_mm = p['s']
        ht_mm, st_mm, c_mm, e_m = subdiagonalize(h_mm, s_mm, bfs)
        if apply:
            self.uptodate = False
            h_mm[:] = ht_mm
            s_mm[:] = st_mm
            # Rotate coupling between lead and central region
            for alpha, sigma in enumerate(self.selfenergies):
                sigma.h_im[:] = np.dot(sigma.h_im, c_mm)
                sigma.s_im[:] = np.dot(sigma.s_im, c_mm)

        c_mm = np.take(c_mm, bfs, axis=0)
        c_mm = np.take(c_mm, bfs, axis=1)
        return ht_mm, st_mm, e_m.real, c_mm