qiskit-documentation/docs/api/qiskit/0.35/qiskit.transpiler.PassManag...

64 lines
3.9 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: PassManagerConfig
description: API reference for qiskit.transpiler.PassManagerConfig
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.transpiler.PassManagerConfig
---
# PassManagerConfig
<Class id="qiskit.transpiler.PassManagerConfig" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.20/qiskit/transpiler/passmanager_config.py" signature="PassManagerConfig(initial_layout=None, basis_gates=None, inst_map=None, coupling_map=None, layout_method=None, routing_method=None, translation_method=None, scheduling_method=None, instruction_durations=None, backend_properties=None, approximation_degree=None, seed_transpiler=None, timing_constraints=None, unitary_synthesis_method='default', unitary_synthesis_plugin_config=None, target=None)" modifiers="class">
Bases: `object`
Pass Manager Configuration.
Initialize a PassManagerConfig object
**Parameters**
* **initial\_layout** ([*Layout*](qiskit.transpiler.Layout "qiskit.transpiler.Layout")) Initial position of virtual qubits on physical qubits.
* **basis\_gates** (*list*) List of basis gate names to unroll to.
* **inst\_map** ([*InstructionScheduleMap*](qiskit.pulse.InstructionScheduleMap "qiskit.pulse.InstructionScheduleMap")) Mapping object that maps gate to schedule.
* **coupling\_map** ([*CouplingMap*](qiskit.transpiler.CouplingMap "qiskit.transpiler.CouplingMap")) Directed graph represented a coupling map.
* **layout\_method** (*str*) the pass to use for choosing initial qubit placement.
* **routing\_method** (*str*) the pass to use for routing qubits on the architecture.
* **translation\_method** (*str*) the pass to use for translating gates to basis\_gates.
* **scheduling\_method** (*str*) the pass to use for scheduling instructions.
* **instruction\_durations** ([*InstructionDurations*](qiskit.transpiler.InstructionDurations "qiskit.transpiler.InstructionDurations")) Dictionary of duration (in dt) for each instruction.
* **backend\_properties** ([*BackendProperties*](qiskit.providers.models.BackendProperties "qiskit.providers.models.BackendProperties")) Properties returned by a backend, including information on gate errors, readout errors, qubit coherence times, etc.
* **approximation\_degree** (*float*) heuristic dial used for circuit approximation (1.0=no approximation, 0.0=maximal approximation)
* **seed\_transpiler** (*int*) Sets random seed for the stochastic parts of the transpiler.
* **timing\_constraints** (*TimingConstraints*) Hardware time alignment restrictions.
* **unitary\_synthesis\_method** (*str*) The string method to use for the [`UnitarySynthesis`](qiskit.transpiler.passes.UnitarySynthesis "qiskit.transpiler.passes.UnitarySynthesis") pass. Will search installed plugins for a valid method.
* **target** ([*Target*](qiskit.transpiler.Target "qiskit.transpiler.Target")) The backend target
## Methods
### from\_backend
<Function id="qiskit.transpiler.PassManagerConfig.from_backend" signature="PassManagerConfig.from_backend(backend, **pass_manager_options)" modifiers="classmethod">
Construct a configuration based on a backend and user input.
This method automatically gererates a PassManagerConfig object based on the backends features. User options can be used to overwrite the configuration.
**Parameters**
* **backend** ([*BackendV1*](qiskit.providers.BackendV1 "qiskit.providers.BackendV1")) The backend that provides the configuration.
* **pass\_manager\_options** User-defined option-value pairs.
**Returns**
The configuration generated based on the arguments.
**Return type**
[PassManagerConfig](qiskit.transpiler.PassManagerConfig "qiskit.transpiler.PassManagerConfig")
**Raises**
**AttributeError** If the backend does not support a configuration() method.
</Function>
</Class>