Commit 2f08762
docs(transpiler-plugins): fix layout plugin example for v2.1.2 (Qiskit#14985) (Qiskit#14991) (Qiskit#15103)
* 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
---------
(cherry picked from commit cbe1f20)
Co-authored-by: Ricard Santiago Raigada García <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>1 parent ff43eaa commit 2f08762
1 file changed
+13
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
115 | | - | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
125 | 130 | | |
126 | 131 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| |||
0 commit comments