qcmet.core.FileManager#
- class qcmet.core.FileManager(benchmark_name, base_path, create_timestamp_folder=True, log_level=20, run_id=None, save_circuits=True, save_plots=True, save_intermediate=True)[source]#
Handles benchmark data saving and directory structure.
This class creates a consistent directory layout for each benchmark run and provides methods to save JSON data, plots, and other intermediate results.
The folders are set up in the following structure:
- base_path/
- └── benchmark_name/
├── results/ │ └── plots/ ├── data/ ├── logs/ ├── intermediate/ └── config/
- __init__(benchmark_name, base_path, create_timestamp_folder=True, log_level=20, run_id=None, save_circuits=True, save_plots=True, save_intermediate=True)#
Methods
__init__(benchmark_name, base_path[, ...])Get the path to the config directory.
Get the path to the data directory.
Get the path to the intermediate directory.
Get the path to the logs directory.
Get the path to the plots directory.
Get the path to the results directory.
save_json(data, filename[, subfolder])Save a dictionary as a JSON file in the specified subfolder.
save_plot(figure, filename[, format])Save a matplotlib figure to the plots directory.
Attributes
- get_results_path()[source]#
Get the path to the results directory.
- Returns:
Path to the results directory.
- Return type:
Path
- get_data_path()[source]#
Get the path to the data directory.
- Returns:
Path to the data directory.
- Return type:
Path
- get_plots_path()[source]#
Get the path to the plots directory.
- Returns:
Path to the plots directory.
- Return type:
Path
- get_config_path()[source]#
Get the path to the config directory.
- Returns:
Path to the config directory.
- Return type:
Path
- get_logs_path()[source]#
Get the path to the logs directory.
- Returns:
Path to the logs directory.
- Return type:
Path
- get_intermediate_path()[source]#
Get the path to the intermediate directory.
- Returns:
Path to the intermediate directory.
- Return type:
Path
- save_json(data, filename, subfolder='results')[source]#
Save a dictionary as a JSON file in the specified subfolder.