Gate Library Manager
The gate library manager keeps track of all gate libraries that are used within HAL. Further, it takes care of loading and saving gate libraries on demnand.
- hal_py.GateLibraryManager.get_gate_libraries() List[hal_py.GateLibrary]
Get all loaded gate libraries.
- Returns
A list of gate libraries.
- Return type
- hal_py.GateLibraryManager.get_gate_library(file_path: str) hal_py.GateLibrary
Get a gate library by file path. If no library with the given name is loaded, loading the gate library from file will be attempted.
- Parameters
file_path (str) – The input path.
- Returns
The gate library on success, None otherwise.
- Return type
- hal_py.GateLibraryManager.get_gate_library_by_name(lib_name: str) hal_py.GateLibrary
Get a gate library by name. If no library with the given name is loaded, None will be returned.
- Parameters
lib_name (str) – The name of the gate library.
- Returns
The gate library on success, None otherwise.
- Return type
- hal_py.GateLibraryManager.load(file_path: os.PathLike, reload: bool = False) hal_py.GateLibrary
Load a gate library from file.
- Parameters
file_path (pathlib.Path) – The input path.
reload (bool) – If true, reloads the library in case it is already loaded.
- Returns
The gate library on success, None otherwise.
- Return type
- hal_py.GateLibraryManager.load_all(reload: bool = False) None
Load all gate libraries available in standard gate library directories.
- Parameters
reload (bool) – If true, reloads all libraries that have already been loaded.
- hal_py.GateLibraryManager.save(file_path: os.PathLike, gate_lib: hal_py.GateLibrary, overwrite: bool = False) bool
Save a gate library to file.
- Parameters
file_path (pathlib.Path) – The output path.
gate_lib (hal_py.GateLibrary) – The gate library.
overwrite (bool) – If true, overwrites already existing files.
- Returns
True on success, false otherwise.
- Return type