Skip to main content
IBM Quantum Platform

qiskit.transpiler.generate_preset_pbc_pass_manager

qiskit.transpiler.generate_preset_pbc_pass_manager(optimization_level=2, approximation_degree=1.0, seed_transpiler=None, unitary_synthesis_method='default', unitary_synthesis_plugin_config=None, hls_config=None, qubits_initially_zero=True)

GitHub

Generate a preset PBC StagedPassManager.

This function provides a convenient way to construct a preset pass manager for PBC compilation.

Parameters

  • optimization_level (int) – The optimization level to generate a StagedPassManager for. By default optimization level 2 is used if this is not specified. This can be 0, 1, 2, or 3. Higher levels generate potentially more optimized circuits, at the expense of potentially longer transpilation time.
  • approximation_degree (float | None) – Heuristic dial used for circuit approximation, where 1.0 means no approximation (up to numerical tolerance) and 0.0 means the maximum approximation.
  • seed_transpiler (int | None) – Sets random seed for the stochastic parts of the transpiler. If it is not specified here it can also be specified via an environment variable: QISKIT_TRANSPILER_SEED or in a user configuration file. The priority order is: this argument, then the environment variable, and finally the user configuration option. So setting this argument will take precedence over the other methods of setting a seed.
  • unitary_synthesis_method (str) – The name of the unitary synthesis method to use. By default 'default' is used. You can see a list of installed plugins with unitary_synthesis_plugin_names().
  • unitary_synthesis_plugin_config (dict | None) – An optional configuration dictionary that will be passed directly to the unitary synthesis plugin. By default this setting will have no effect as the default unitary synthesis method does not take custom configuration. This should only be necessary when a unitary synthesis plugin is specified with the unitary_synthesis_method argument. As this is custom for each unitary synthesis plugin refer to the plugin documentation for how to use this option.
  • hls_config (HLSConfig | None) – An optional configuration class HLSConfig that will be passed directly to HighLevelSynthesis transformation pass. This configuration class allows to specify for various high-level objects the lists of synthesis algorithms and their parameters.
  • qubits_initially_zero (bool) – Indicates whether the input circuit is zero-initialized.

Returns

The preset pass manager for the given options.

Raises

TranspilerError – if an invalid value for optimization_level is passed in.

Return type

StagedPassManager

Was this page helpful?
Report a bug, typo, or request content on GitHub.