qiskit-documentation/docs/api/qiskit/0.43/qiskit.transpiler.preset_pa...

35 lines
1.8 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: level_1_pass_manager
description: API reference for qiskit.transpiler.preset_passmanagers.level_1_pass_manager
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.transpiler.preset_passmanagers.level_1_pass_manager
---
<span id="qiskit-transpiler-preset-passmanagers-level-1-pass-manager" />
# qiskit.transpiler.preset\_passmanagers.level\_1\_pass\_manager
<Function id="qiskit.transpiler.preset_passmanagers.level_1_pass_manager" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.24/qiskit/transpiler/preset_passmanagers/level1.py" signature="level_1_pass_manager(pass_manager_config)">
Level 1 pass manager: light optimization by simple adjacent gate collapsing.
This pass manager applies the user-given initial layout. If none is given, and a trivial layout (i-th virtual -> i-th physical) makes the circuit fit the coupling map, that is used. Otherwise, the circuit is mapped to the most densely connected coupling subgraph, and swaps are inserted to map. Any unused physical qubit is allocated as ancilla space. The pass manager then unrolls the circuit to the desired basis, and transforms the circuit to match the coupling map. Finally, optimizations in the form of adjacent gate collapse and redundant reset removal are performed.
**Parameters**
**pass\_manager\_config** ([*PassManagerConfig*](qiskit.transpiler.PassManagerConfig "qiskit.transpiler.passmanager_config.PassManagerConfig")) configuration of the pass manager.
**Returns**
a level 1 pass manager.
**Raises**
[**TranspilerError**](qiskit.transpiler.TranspilerError "qiskit.transpiler.TranspilerError") if the passmanager config is invalid.
**Return type**
[*StagedPassManager*](qiskit.transpiler.StagedPassManager "qiskit.transpiler.passmanager.StagedPassManager")
</Function>