Skip to content

Commit

Permalink
fixed erreors detected by pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
freude committed Jul 26, 2020
1 parent 20a84b8 commit f0a301c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions nanonet/tb/hamiltonian.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ def get_site_coordinates(self):

return np.array(self._coords)

def get_hamiltonians_block_tridiagonal(self, left=None, right=None, optimized=True):
def get_hamiltonians_block_tridiagonal(self, left=-1, right=-1, optimized=True):
"""
Parameters
Expand All @@ -644,7 +644,7 @@ def get_hamiltonians_block_tridiagonal(self, left=None, right=None, optimized=Tr

hl, h0, hr = self.get_hamiltonians()

if left is None and right is None:
if left == -1 and right == -1:
h_r_h = find_nonzero_lines(hr, 'bottom')
h_r_v = find_nonzero_lines(hr[-h_r_h:, :], 'left')
h_l_h = find_nonzero_lines(hl, 'top')
Expand All @@ -658,11 +658,9 @@ def get_hamiltonians_block_tridiagonal(self, left=None, right=None, optimized=Tr
subblocks = split_into_subblocks(h0, left, right)

h01, hl1, hr1 = cut_in_blocks(h0, subblocks)

if left is not None and right is not None:
hl1.append(hl[:left, -right:])
hr1.append(hr[-right:, :left])
else:
hl1.append(hl)
hr1.append(hr)

return hl1, h01, hr1, subblocks

0 comments on commit f0a301c

Please sign in to comment.