qat.frontend.passes.transform module
- class InputOptimisation(hardware, *args, **kwargs)
Bases:
TransformPass
Run third party optimisation passes on the incoming QASM.
Instantiate the pass with a hardware model.
- Parameters:
model¶ – The hardware model is used in TKET optimisations.
- run(program, res_mgr, met_mgr, *args, compiler_config, **kwargs)
- Parameters:
program¶ (
str
) – The program as a string (e.g. QASM or QIR), or filepath to the program.res_mgr¶ (
ResultManager
) – The results manager to look-up theInputAnalysisResults
.met_mgr¶ (
MetricsManager
) – The metrics manager to save the optimised circuit.compiler_config¶ (
CompilerConfig
) – The compiler config should be provided by a keyword argument.
- run_qasm_optimisation(qasm_string, optimizations, met_mgr, *args, **kwargs)
Extracted from DefaultOptimizers.optimize_qasm
- run_qiskit_optimization(qasm_string, level)
- TODO: [QK] Current setup is unlikely to provide much benefit, refine settings
before using.
- class Parse(hardware)
Bases:
TransformPass
Parses the QASM/QIR input into IR.
Instantiate the pass with a hardware model.
- Parameters:
model¶ – The hardware model is required to create Qat IR.
- parse_qir(qir_string, compiler_config)
Extracted from QIRFrontend
- run(program, res_mgr, *args, compiler_config, **kwargs)
- Parameters:
program¶ (
str
) – The program as a string (e.g. QASM or QIR), or filepath to the program.res_mgr¶ (
ResultManager
) – The results manager to look-up theInputAnalysisResults
.compiler_config¶ (
CompilerConfig
) – The compiler config should be provided by a keyword argument.
- class PydInputOptimisation(hardware, *args, **kwargs)
Bases:
InputOptimisation
Instantiate the pass with a hardware model.
- Parameters:
model¶ – The hardware model is used in TKET optimisations.
- run_qasm_optimisation(qasm_string, optimizations, met_mgr, *args, **kwargs)
Extracted from DefaultOptimizers.optimize_qasm
- class PydParse(hw_model)
Bases:
TransformPass
- parse_qir(qir_string, compiler_config)
Extracted from QIRFrontend
- run(program, res_mgr, *args, compiler_config, **kwargs)