Skip to content

Commit

Permalink
Improve formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
shemian29 authored Apr 15, 2023
1 parent d4af7af commit 24ef03e
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions JJArray/junction_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ def __init__(self, ejs: list, ecs: list, converge: bool = False, ncut: int = 5,
def circuit_setup(self, ncut: int, converge: bool, monitor: object = True) -> None:
"""
:rtype: object
:param ncut:
:param converge:
:param monitor:
:param ncut: manually set cut-off in the charge basis for each degree of freedom
:param converge: determine whether to automatically search for optimal cut-off
:param monitor: track convergence of cut-off
:rtype: Circuit class object
"""
jj_circ_yaml = "branches:\n"

Expand All @@ -66,13 +67,13 @@ def circuit_setup(self, ncut: int, converge: bool, monitor: object = True) -> No
+ "]\n"
)

super().__init__(JJcirc_yaml, from_file=False)
super().__init__(jj_circ_yaml, from_file=False)

closure_branches = [self.branches[0]]
trans_mat = np.triu(np.ones((self.N, self.N)), 0) * (-1)
transformation_matrix = np.triu(np.ones((self.N, self.N)), 0) * (-1)

self.configure(
transformation_matrix=trans_mat, closure_branches=closure_branches
transformation_matrix= transformation_matrix, closure_branches=closure_branches
)

if converge:
Expand All @@ -93,9 +94,8 @@ def set_cutoff(self, ncut: int) -> None:

def converge_cutoff(self, monitor: object = True) -> object:
"""
:rtype: object
:return:
Parameters
----------
:param monitor:
:return:
"""
Expand All @@ -114,9 +114,6 @@ def converge_cutoff(self, monitor: object = True) -> object:
)
)

# sample = np.concatenate((self.cartesian(tuple([[0, 0.25, 0.5, 0.75] for r in range(self.N + 1)])),
# np.random.rand(ntries, self.N + 1)))

if monitor:
print()
print(
Expand Down

0 comments on commit 24ef03e

Please sign in to comment.