qat.frontend.purr.purr module

class PurrFrontend(model)

Bases: BaseFrontend

A frontend for processing purr InstructionBuilder source programs.

The instruction builder will be accepted if it has a model that matches the provided model (or if no model is provided), and if it has no sweeps or device injections. These are handled by the SweepPipeline.

Parameters:
  • model – The hardware model to use for compilation.

  • model – The hardware model that holds calibrated information on the qubits on the QPU.

check_and_return_source(src)

Checks if the source is a valid purr instruction builder.

Parameters:

src – The source program, or path to the program.

Returns:

If the program is determined to not be valid, False is returned. Otherwise, the program is returned (and loaded if required).

emit(src, res_mgr=None, met_mgr=None, compiler_config=None, **kwargs)

Passes through the instruction builder without modifying it.

Return type:

InstructionBuilder