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)#

Format user inputted stages and their passes to their final runnable form (see compiler_pass()).

Parameters:
  • stages (list[CompilationStage]) – The compilation stages containing function passes that should be formatted.

  • idempotent (bool) – Optionally make the stages also idempotent (they deepcopy both the context and the circuits at each pass). NOTE: if performance is prioritized, this option should not be turned on.

Return type:

list[CompilationStage]