Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
BoxiLi committed Jul 14, 2024
1 parent 57119da commit c9357c8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/qutip_qtrl/dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,9 @@ def writeout(self, f=None):
for grad in self.grad_log:
g_num += 1
if fall:
fall.write(str.encode("gradients (call {}):\n".format(g_num)))
fall.write(
str.encode("gradients (call {}):\n".format(g_num))
)
np.savetxt(fall, grad)
else:
fname = "{}-fid_err_gradients{}.{}".format(
Expand Down Expand Up @@ -835,7 +837,9 @@ def writeout(self, f=None):
closef = True
for dg in self.dyn_gen:
f.write(
str.encode("dynamics generator for timeslot {}\n".format(k))
str.encode(
"dynamics generator for timeslot {}\n".format(k)
)
)
np.savetxt(f, self.dyn_gen[k], delimiter=dump.data_sep)
k += 1
Expand Down Expand Up @@ -928,7 +932,9 @@ def writeout(self, f=None):
f = open(os.path.join(dump.dump_dir, fname), "wb")
closef = True
for dg in self.dyn_gen:
f.write(str.encode("Evolution from {} onto target\n".format(k)))
f.write(
str.encode("Evolution from {} onto target\n".format(k))
)
np.savetxt(f, self.fwd_evo[k], delimiter=dump.data_sep)
k += 1
if closef:
Expand Down

0 comments on commit c9357c8

Please sign in to comment.