qat.frontend.passes.transform module

class FlattenIR

Bases: TransformPass

Flatten the IR by removing nested structures like InstructionBlocks.

run(ir, *args, **kwargs)
class InputOptimisation(hardware, *args, **kwargs)

Bases: object

Instantiate the pass with a hardware model.

Parameters:

hardware (PhysicalHardwareModel) – 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 the InputAnalysisResults.

  • 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)
PydFlattenIR

alias of FlattenIR

PydInputOptimisation

alias of InputOptimisation

class PydParse(hw_model)

Bases: TransformPass

parse_qir(qir_string, compiler_config)

Extracted from QIRFrontend

run(program, res_mgr, *args, compiler_config, **kwargs)