Easier access to the preset pass managers #7023
Labels
good first issue
Good for newcomers
help wanted
community contributions welcome. For filters like http://github-help-wanted.com/
type: enhancement
It's working, but needs polishing
What is the expected enhancement?
Currently, accessing the preset passmanagers (outside of a call to
transpile
) requires building apass_manager_config
by hand, like:which is a fair amount of boilerplate if one already has access to a backend and a set of transpiler options (and prone to going stale as new options are added). I also don't think we document this anywhere.
One option would be to add a
PassManagerConfig.from_backend(backend, **pass_manager_options)
so that users canlevel_1_pass_manager(PassManagerConfig.from_backend(backend, **pass_manager_options))
and we can extract some of the argument parsing and backend extraction logic fromqiskit.compiler.transpiler
.Another would be to build upon the builder for the preset pass managers being introduced in #6403 and have something like
pm = FullPassManager.from_backend(backend, **pass_manager_options)
(Related to #3118 .)
The text was updated successfully, but these errors were encountered: