Skip to content

Commit d171498

Browse files
committed
added parameter to allow skipping output loading by solver
1 parent 8ca7153 commit d171498

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lindbladmpo/LindbladMPOSolver.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def __init__(
5555
self.s_id_suffix = ""
5656
self.result = {}
5757

58-
def solve(self):
58+
def solve(self, b_load_output=True):
5959
"""Solves the simulation and loads the result dictionaries."""
6060
if self.s_input_file == "":
6161
self.build()
@@ -64,7 +64,10 @@ def solve(self):
6464
)
6565
if exit_code != 0:
6666
raise Exception("There was an error executing the solver.")
67-
self.result = LindbladMPOSolver.load_output(self.s_output_path)
67+
if b_load_output:
68+
self.result = LindbladMPOSolver.load_output(self.s_output_path)
69+
else:
70+
self.result = {}
6871

6972
@staticmethod
7073
def process_default_paths(

0 commit comments

Comments
 (0)