forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Defaults in TranspileConfig (now called PassManagerConfig) (Qiskit#3035)
* TranspileConfig defaults * defatuls for TranspileConfig * explicit kwargs * remove __getattr__ None * move cm checks to _parse_coupling_map * transpile_config as a dict * pass manager config * circuit is yet another transpiler param * TranspileConfigSchema -> PassManagerConfigSchema * removing unsed parameters in PassManagerConfig * no need for _transpile_circuit anymore * pass manager callback at construction time * docstring * changelog * deprecate callback from construction time * _parse_output_name creates Nones instead of circuit.name * transpile_config -> transpile_args * CouplingMap(backend.configuration().coupling_map) * reformat * fixing test/python/transpiler/test_passmanager_run.py * run(..., output_name=None, callback=None) * basis * kwargs * transpile_args[pass_manager_config].basis_gates * callback at run time * lint * release note * docstring * other -> upgrade * release note * style * fix * line too long * reverse the changes in about parallel * rollback transpile_circuit * lint * release note * expanding the parameters * remove optimization level * remove pass_manager_config as a transpile_circuit arg * output_name and callback are optional * Update qiskit/compiler/transpile.py Co-Authored-By: Ali Javadi-Abhari <[email protected]> * documentation * parse callback * remove circuit from transpile_args * Update qiskit/transpiler/transpile_circuit.py Co-Authored-By: Ali Javadi-Abhari <[email protected]> * rename transpile_args_circuits to list_transpile_args.append * new path for passes * back to old _parse_coupling_map * undoing _parse_output_name * comments on the transpiler configuration * docstring * remove transpile_circuit Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Kevin Krsulich <[email protected]> Co-authored-by: Ali Javadi-Abhari <[email protected]>
- Loading branch information
1 parent
aeeef37
commit db613ea
Showing
16 changed files
with
296 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2017, 2019. | ||
# | ||
# This code is licensed under the Apache License, Version 2.0. You may | ||
# obtain a copy of this license in the LICENSE.txt file in the root directory | ||
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# Any modifications or derivative works of this code must retain this | ||
# copyright notice, and modified files need to carry a notice indicating | ||
# that they have been altered from the originals. | ||
|
||
"""Models for PassManagerConfig and its related components.""" | ||
|
||
from qiskit.transpiler.models import PassManagerConfigSchema | ||
from qiskit.validation import BaseModel, bind_schema | ||
|
||
|
||
@bind_schema(PassManagerConfigSchema) | ||
class PassManagerConfig(BaseModel): | ||
"""Model for PassManagerConfig. | ||
Please note that this class only describes the required fields. For the | ||
full description of the model, please check ``PassManagerConfigSchema``. | ||
Attributes: | ||
initial_layout (Layout): Initial position of virtual qubits on physical qubits. | ||
basis_gates (list): List of basis gate names to unroll to. | ||
coupling_map (CouplingMap): Directed graph represented a coupling map. | ||
backend_properties (BackendProperties): Properties returned by a backend, including | ||
information on gate errors, readout errors, qubit coherence times, etc. | ||
seed_transpiler (int): Sets random seed for the stochastic parts of the transpiler. | ||
""" | ||
|
||
def __init__(self, | ||
initial_layout=None, | ||
basis_gates=None, | ||
coupling_map=None, | ||
backend_properties=None, | ||
seed_transpiler=None, | ||
**kwargs): | ||
super().__init__(initial_layout=initial_layout, | ||
basis_gates=basis_gates, | ||
coupling_map=coupling_map, | ||
backend_properties=backend_properties, | ||
seed_transpiler=seed_transpiler, | ||
**kwargs) |
Oops, something went wrong.