catalyst.CompileOptions

class CompileOptions(verbose: typing.Optional[bool] = False, logfile: typing.Optional[_io.TextIOWrapper] = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>, target: typing.Optional[str] = 'binary', keep_intermediate: typing.Optional[bool] = False, pipelines: typing.Optional[typing.List[typing.Any]] = None, autograph: typing.Optional[bool] = False, autograph_include: typing.Optional[typing.Iterable[str]] = (), async_qnodes: typing.Optional[bool] = False, static_argnums: typing.Optional[typing.Union[int, typing.Iterable[int]]] = None, static_argnames: typing.Optional[typing.Union[str, typing.Iterable[str]]] = None, abstracted_axes: typing.Optional[typing.Union[typing.Iterable[typing.Iterable[str]], typing.Dict[int, str]]] = None, lower_to_llvm: typing.Optional[bool] = True, checkpoint_stage: typing.Optional[str] = '', disable_assertions: typing.Optional[bool] = False, seed: typing.Optional[int] = None, experimental_capture: typing.Optional[bool] = False, circuit_transform_pipeline: typing.Optional[dict[str, dict[str, str]]] = None)[source]

Bases: object

Generic compilation options, for which reasonable default values exist.

Parameters
  • verbose (Optional[bool]) – flag indicating whether to enable verbose output. Default is False

  • logfile (Optional[TextIOWrapper]) – the logfile to write output to. Default is sys.stderr

  • keep_intermediate (Optional[bool]) – flag indicating whether to keep intermediate results. Default is False

  • pipelines (Optional[List[Tuple[str,List[str]]]]) – A list of tuples. The first entry of the tuple corresponds to the name of a pipeline. The second entry of the tuple corresponds to a list of MLIR passes.

  • autograph (Optional[bool]) – flag indicating whether experimental autograph support is to be enabled.

  • autograph_include (Optional[Iterable[str]]) – A list of (sub)modules to be allow-listed

  • conversion. (for autograph) –

  • async_qnodes (Optional[bool]) – flag indicating whether experimental asynchronous execution of QNodes support is to be enabled.

  • lower_to_llvm (Optional[bool]) – flag indicating whether to attempt the LLVM lowering after the main compilation pipeline is complete. Default is True.

  • static_argnums (Optional[Union[int, Iterable[int]]]) – indices of static arguments. Default is None.

  • static_argnames (Optional[Union[str, Iterable[str]]]) – names of static arguments. Default is None.

  • abstracted_axes (Optional[Any]) – store the abstracted_axes value. Defaults to None.

  • disable_assertions (Optional[bool]) – disables all assertions. Default is False.

  • seed (Optional[int]) – the seed for random operations in a qjit call. Default is None.

  • experimental_capture (bool) – If set to True, use PennyLane’s experimental program capture capabilities to capture the function for compilation.

  • circuit_transform_pipeline (Optional[dict[str, dict[str, str]]]) – A dictionary that specifies the quantum circuit transformation pass pipeline order, and optionally arguments for each pass in the pipeline. Default is None.

abstracted_axes

async_qnodes

autograph

autograph_include

checkpoint_stage

circuit_transform_pipeline

disable_assertions

experimental_capture

keep_intermediate

logfile

lower_to_llvm

pipelines

seed

static_argnames

static_argnums

target

verbose

abstracted_axes: Optional[Union[Iterable[Iterable[str]], Dict[int, str]]] = None
async_qnodes: Optional[bool] = False
autograph: Optional[bool] = False
autograph_include: Optional[Iterable[str]] = ()
checkpoint_stage: Optional[str] = ''
circuit_transform_pipeline: Optional[dict[str, dict[str, str]]] = None
disable_assertions: Optional[bool] = False
experimental_capture: Optional[bool] = False
keep_intermediate: Optional[bool] = False
logfile: Optional[_io.TextIOWrapper] = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>
lower_to_llvm: Optional[bool] = True
pipelines: Optional[List[Any]] = None
seed: Optional[int] = None
static_argnames: Optional[Union[str, Iterable[str]]] = None
static_argnums: Optional[Union[int, Iterable[int]]] = None
target: Optional[str] = 'binary'
verbose: Optional[bool] = False

get_pipelines()

Get effective pipelines

get_pipelines() List[Tuple[str, List[str]]][source]

Get effective pipelines