-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Move generate_preset_pass_manager
to a standalone file
#12762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move generate_preset_pass_manager
to a standalone file
#12762
Conversation
One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 10073131207Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other thing we should do as part of this is expose this from qiskit/__init__.py
since it's "commonly" used.
releasenotes/notes/add-generate-preset-pm-global-import-efb12f185f3f738b.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the quick update and adding the top level import too. Just a few small nits in the release note, but otherwise this is ready to merge.
releasenotes/notes/add-generate-preset-pm-global-import-efb12f185f3f738b.yaml
Outdated
Show resolved
Hide resolved
releasenotes/notes/add-generate-preset-pm-global-import-efb12f185f3f738b.yaml
Outdated
Show resolved
Hide resolved
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Might we be amenable to making this name available from |
@jakelishman Makes sense to me, added path in ebb48ac. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
…erate-preset-pm-to-new-home
bc48357
to
6eb5dc0
Compare
498842b
to
9069dde
Compare
While dealing with the cyclic imports I realized that, in #12185, I hadn't migrated two input handling functions (the ones for Now that I think of it, maybe I should open an independent PR with these fixes, it might be a bit clearer. Edit: changes extracted to #12799. |
e039638
to
6eb5dc0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for getting to the bottom of those hairy import cycles
releasenotes/notes/add-generate-preset-pm-global-import-efb12f185f3f738b.yaml
Outdated
Show resolved
Hide resolved
…185f3f738b.yaml Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
* Move generate_preset_pass_manager to generate_preset_pass_manager.py * Add top-level import and reno * Apply suggestions from Matt's code review Co-authored-by: Matthew Treinish <mtreinish@kortar.org> * Add import path from qiskit.transpiler too * Fix cyclic import issue * Fix cyclic import issue in tools/pgo_scripts * Address cyclic import issues. Reorder imports alphabetically when relevant. * Fix docstring issue * Update releasenotes/notes/add-generate-preset-pm-global-import-efb12f185f3f738b.yaml Co-authored-by: Matthew Treinish <mtreinish@kortar.org> --------- Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
* Move generate_preset_pass_manager to generate_preset_pass_manager.py * Add top-level import and reno * Apply suggestions from Matt's code review Co-authored-by: Matthew Treinish <mtreinish@kortar.org> * Add import path from qiskit.transpiler too * Fix cyclic import issue * Fix cyclic import issue in tools/pgo_scripts * Address cyclic import issues. Reorder imports alphabetically when relevant. * Fix docstring issue * Update releasenotes/notes/add-generate-preset-pm-global-import-efb12f185f3f738b.yaml Co-authored-by: Matthew Treinish <mtreinish@kortar.org> --------- Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Summary
generate_preset_pass_manager
deserves a proper home. This PR moves this function from the__init__
file intranspiler/preset_passmanagers
to a standalone file in the same directory,generate_preset_pass_manager.py
.Note that this move doesn't affect the public interface or documented import path, but it makes it easier to find the source code when traversing the repo.
Details and comments
The PR now adds a global import path for
generate_preset_pass_manager
and contributes to #11897.