iqm.cpc.compiler.compilation_stage.format_stages

Contents

iqm.cpc.compiler.compilation_stage.format_stages#

iqm.cpc.compiler.compilation_stage.format_stages(stages, idempotent=True)#

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

Parameters:
  • stages (list[CompilationStage]) – Compilation stages containing pass functions that should be wrapped.

  • idempotent (bool) – Iff True, make the passes idempotent (deepcopy both the context and the data before passing it to the pass function). NOTE: if performance is prioritized, this should be False.

Return type:

list[CompilationStage]