qat.purr.compiler.frontends module

class LanguageFrontend

Bases: ABC

abstract execute(instructions, hardware, compiler_config, *args, **kwargs)
abstract parse(program_str, hardware, compiler_config)
Return type:

Tuple[InstructionBuilder, CompilationMetrics]

class QASMFrontend

Bases: LanguageFrontend

execute(instructions, hardware=None, compiler_config=None, *args, **kwargs)
parse(path_or_str, hardware=None, compiler_config=None)
parse_and_execute(qasm_string, hardware=None, compiler_config=None, *args, **kwargs)

Execute a qasm string against a particular piece of hardware. Initializes a default qubit simulator if no hardware provided.

class QIRFrontend

Bases: LanguageFrontend

execute(instructions, hardware=None, compiler_config=None, *args, **kwargs)
parse(path_or_str, hardware=None, compiler_config=None)
parse_and_execute(qir_file, hardware=None, compiler_config=None, *args, **kwargs)