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)
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
StagedPassManagerfor. 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.0means no approximation (up to numerical tolerance) and0.0means 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_SEEDor 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 withunitary_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_methodargument. 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
HLSConfigthat will be passed directly toHighLevelSynthesistransformation 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
Was this page helpful?
Report a bug, typo, or request content on GitHub.