handle_output_metadata
- qcengine.util.handle_output_metadata(output_data, metadata, raise_error=False, return_dict=True)[source]
Fuses general metadata and output together.
- Parameters:
output_data (
Union
[Dict
[str
,Any
],AtomicResult
,OptimizationResult
,FailedOperation
]) – The original output object to be fused with metadatametadata (
Dict
[str
,Any
]) – Metadata produced by the compute_wrapper context managerraise_error (
bool
) – Raise an exception if errors exist (True) or return FailedOperation (False)return_dict (
bool
) – Return dictionary or object representation of data
- Returns:
result – Output type depends on return_dict or a dict if an error was generated in model construction
- Return type:
AtomicResult, OptimizationResult, FailedOperation, or dict representation of any one.