compilation_stage

compilation_stage#

Full path: iqm.cpc.compiler.compilation_stage

Compilation stages and passes.

Module Attributes

DEFAULT_CONTEXT_KEYS

Keys that always exist in the Compiler context.

DEFAULT_STAGE_ARGS

Default compiler pass function arguments.

PassFunction

A function that takes the data, context, and options as arguments and returns the modified data and context.

Functions

compiler_pass(function)

Wrap a compiler pass function to give it a uniform signature.

format_stages(stages[, idempotent])

Wrap pass functions in stages to give them a fixed signature (see compiler_pass()).

pass_function_idempotent(function)

Wrap a pass function to make it idempotent.

resolve_circuit_function_and_stages(stages, ...)

Insert the circuit generation as the first stage in the provided stages.

Classes

CompilationStage

Sequence of compiler passes that are applied to the data.

StagesList

Extend list[CompilationStage] to allow accessing the stages via their names and to include validation.

Inheritance

Inheritance diagram of iqm.cpc.compiler.compilation_stage