Make fidelity simulator tools self-contained
This commit is contained in:
@@ -32,6 +32,9 @@ PRIMARY_ROLES = ("low1", "high1")
|
||||
|
||||
|
||||
def load_module(path: Path):
|
||||
module_root = str(path.parent.resolve())
|
||||
if module_root not in sys.path:
|
||||
sys.path.insert(0, module_root)
|
||||
spec = importlib.util.spec_from_file_location("simfid_s2rb_prepare", path)
|
||||
if spec is None or spec.loader is None:
|
||||
raise ImportError(path)
|
||||
|
||||
Reference in New Issue
Block a user