qat.runtime.passes.transform module
- class AssignResultsTransform
Bases:
TransformPass
Processes
Assign
instructions.As assigns are classical instructions they are not processed as a part of the quantum execution (right now). Read through the results dictionary and perform the assigns directly, return the results.
Extracted from
purr.compiler.execution.QuantumExecutionEngine._process_assigns()
.- run(acquisitions, *args, package, **kwargs)
- Parameters:
acquisitions¶ (
Dict
[str
,any
]) – The dictionary of results acquired from the target machine.package¶ (
Executable
) – The executable program containing the results-processing information should be passed as a keyword argument.
- class ErrorMitigation(hardware_model)
Bases:
TransformPass
Applies readout error mitigation to the results.
Extracted from
qat.purr.compiler.runtime.QuantumRuntime._apply_error_mitigation()
.- Parameters:
hardware_model¶ (
QuantumHardwareModel
) – The hardware model contains the error mitigation properties.
- run(acquisitions, res_mgr, *args, compiler_config, **kwargs)
- Parameters:
acquisitions¶ (
Dict
[str
,any
]) – The dictionary of results acquired from the target machine.res_mgr¶ (
ResultManager
) – The results manager is needed to look up the qubit-to-variable mapping.compiler_config¶ (
CompilerConfig
) – The compiler config is needed to know how to apply error mitigaiton, and should be provided as a keyword argument.
- class InlineResultsProcessingTransform
Bases:
TransformPass
Uses
InlineResultsProcessing
instructions from the executable package to format the acquired results in the desired format.- run(acquisitions, *args, package, **kwargs)
- Parameters:
acquisitions¶ (
Dict
[str
,any
]) – The dictionary of results acquired from the target machine.package¶ (
Executable
) – The executable program containing the results-processing information should be passed as a keyword argument.
- class PostProcessingTransform
Bases:
TransformPass
Uses the post-processing instructions from the executable package to process the results from the engine.
The target machine will return the results in a format that depends on the specified
AcquireMode
. However, it is often the case results need to be returned in an explicit format, e.g., as discriminated bits. To achieve this, extra software post-processing is needed.The post-processing that appears here is the same as the post-processing responsibilities taken on by the
QuantumExecutionEngine
inqat.purr.compiler.execution
.- run(acquisitions, *args, package, **kwargs)
- Parameters:
acquisitions¶ (
Dict
[str
,any
]) – The dictionary of results acquired from the target machine.package¶ (
Executable
) – The executable program containing the results-processing information should be passed as a keyword argument.
- class ResultTransform
Bases:
TransformPass
Transform the raw results into the format that we’ve been asked to provide. Look at individual transformation documentation for descriptions on what they do.
Extracted from
qat.purr.compiler.runtime.QuantumRuntime._transform_results()
.- run(acquisitions, *args, compiler_config, **kwargs)