- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.7k
 
docs(transpiler-plugins): fix layout plugin example for v2.1.2 (#14985) #14991
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
docs(transpiler-plugins): fix layout plugin example for v2.1.2 (#14985) #14991
Conversation
…t#14985) Fixes Qiskit#14985 issue. Updates the example under `qiskit.transpiler.preset_passmanagers.plugin` so it runs on Qiskit SDK v2.1.2. - Replace `PassManager.append(..., condition=...)` with `ConditionalController`. - Remove usage of `backend_properties` from `PassManagerConfig`. - Pass `target=pass_manager_config.target` to `VF2Layout`. - Add the missing comma in `max_trials=...`. - Guard property_set lookups with `.get(...)` and check against `VF2LayoutStopReason.SOLUTION_FOUND`. Tested with `generate_preset_pass_manager(..., layout_method="vf2lite")` at `optimization_level=1..3` on SDK v2.1.2.
| 
           Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the following people are relevant to this code: 
  | 
    
          Pull Request Test Coverage Report for Build 18169540117Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes. 
 Details
 
 
 💛 - 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.
Sorry for the slow review - thanks for the fix!
… (#14991) * docs(transpiler-plugins): fix layout plugin example for v2.1.2 (#14985) Fixes #14985 issue. Updates the example under `qiskit.transpiler.preset_passmanagers.plugin` so it runs on Qiskit SDK v2.1.2. - Replace `PassManager.append(..., condition=...)` with `ConditionalController`. - Remove usage of `backend_properties` from `PassManagerConfig`. - Pass `target=pass_manager_config.target` to `VF2Layout`. - Add the missing comma in `max_trials=...`. - Guard property_set lookups with `.get(...)` and check against `VF2LayoutStopReason.SOLUTION_FOUND`. Tested with `generate_preset_pass_manager(..., layout_method="vf2lite")` at `optimization_level=1..3` on SDK v2.1.2. * Fix lint error in plugin.py docstring (line too long) * Fix spacing --------- Co-authored-by: Jake Lishman <[email protected]> (cherry picked from commit cbe1f20)
… (#14991) (#15103) * docs(transpiler-plugins): fix layout plugin example for v2.1.2 (#14985) Fixes #14985 issue. Updates the example under `qiskit.transpiler.preset_passmanagers.plugin` so it runs on Qiskit SDK v2.1.2. - Replace `PassManager.append(..., condition=...)` with `ConditionalController`. - Remove usage of `backend_properties` from `PassManagerConfig`. - Pass `target=pass_manager_config.target` to `VF2Layout`. - Add the missing comma in `max_trials=...`. - Guard property_set lookups with `.get(...)` and check against `VF2LayoutStopReason.SOLUTION_FOUND`. Tested with `generate_preset_pass_manager(..., layout_method="vf2lite")` at `optimization_level=1..3` on SDK v2.1.2. * Fix lint error in plugin.py docstring (line too long) * Fix spacing --------- (cherry picked from commit cbe1f20) Co-authored-by: Ricard Santiago Raigada García <[email protected]> Co-authored-by: Jake Lishman <[email protected]>
…t#14985) (Qiskit#14991) * docs(transpiler-plugins): fix layout plugin example for v2.1.2 (Qiskit#14985) Fixes Qiskit#14985 issue. Updates the example under `qiskit.transpiler.preset_passmanagers.plugin` so it runs on Qiskit SDK v2.1.2. - Replace `PassManager.append(..., condition=...)` with `ConditionalController`. - Remove usage of `backend_properties` from `PassManagerConfig`. - Pass `target=pass_manager_config.target` to `VF2Layout`. - Add the missing comma in `max_trials=...`. - Guard property_set lookups with `.get(...)` and check against `VF2LayoutStopReason.SOLUTION_FOUND`. Tested with `generate_preset_pass_manager(..., layout_method="vf2lite")` at `optimization_level=1..3` on SDK v2.1.2. * Fix lint error in plugin.py docstring (line too long) * Fix spacing --------- Co-authored-by: Jake Lishman <[email protected]>
Summary
Fix documentation example for the transpiler stage plugin in Qiskit SDK v2.1.2.
Details and comments
Fixes #14985.
Docs-only change: updates the example under
qiskit.transpiler.preset_passmanagers.pluginto replacePassManager.append(..., condition=...)withConditionalController, removebackend_properties, passtarget, add the missing comma inmax_trials, and guardproperty_setlookups with.get(...).