quantum_launcher.routines.qiskit_routines.backends.utils#
Summary#
Functions:
Set chosen automatic behavior on a estimator instance. |
|
Set chosen automatic behavior on a sampler instance. |
Reference#
- quantum_launcher.routines.qiskit_routines.backends.utils.set_sampler_auto_run_behavior(sampler: AUTO_TRANSPILE_SAMPLER_TYPE, auto_transpile: bool = False, auto_transpile_level: int = 2, auto_assign: bool = False) AUTO_TRANSPILE_SAMPLER_TYPE [source]#
Set chosen automatic behavior on a sampler instance.
- Parameters:
sampler (AUTO_TRANSPILE_SAMPLER_TYPE) – Compatible sampler instance
auto_transpile (bool, optional) – Whether to automatically transpile to the samplers backend. Defaults to False.
auto_transpile_level (int, optional) – What level of optimization to set. Defaults to 2.
auto_assign (bool, optional) – Whether to automatically assign parameters in case of parameterized circuits. Defaults to False.
- Returns:
Same instance with modified run() method.
- Return type:
AUTO_TRANSPILE_SAMPLER_TYPE
- quantum_launcher.routines.qiskit_routines.backends.utils.set_estimator_auto_run_behavior(estimator: AUTO_TRANSPILE_ESTIMATOR_TYPE, auto_transpile: bool = False, auto_transpile_level: int = 2, auto_assign: bool = False) AUTO_TRANSPILE_ESTIMATOR_TYPE [source]#
Set chosen automatic behavior on a estimator instance.
- Parameters:
estimator (AUTO_TRANSPILE_ESTIMATOR_TYPE) – Compatible estimator instance
auto_transpile (bool, optional) – Whether to automatically transpile to the estimators backend. Defaults to False.
auto_transpile_level (int, optional) – What level of optimization to set. Defaults to 2.
auto_assign (bool, optional) – Whether to automatically assign parameters in case of parameterized circuits. Defaults to False.
- Returns:
Same instance with modified run() method.
- Return type:
AUTO_TRANSPILE_ESTIMATOR_TYPE