Commit 301aac0
* Initial: Reorganize schedule analysis passes
- Add initial ``NodeDurations`` struct.
* Fix: Use NodeDurations struct on passes
This commit is incomplete and most features will stop working.
* Add: Use `NodeDurations` in python.
- Add magic methods to `PyNodeDurations`.
* Fix: Use indices to get nodes from Dynamical Decoupling passes
- Add `items` method.
* Lint: Formatting
* Fix: Keep original dag nodes and give path to getting them from scratch.
- Add an extra field to `PyNodeDurations` to keep mapping between indices and original dag nodes.
- Add methods to update `NodeDurations` using mappings with a subset of the current nodes or new mappings as long as the user has the original dag.
- Reverted some changes inside of Context Aware DD.
* Format: Elide lifetimes.
* Apply suggestions from code review
Co-authored-by: Alexander Ivrii <alexi@il.ibm.com>
* Fix: Add missing magic methods.
* Fix: Pre-computing error in `__getitem__`
- An oversight allowed an error variant to precompute itself even if the result was `Ok` via `ok_or`. Replaced it with `ok_or_else`.
- Fix formatting issue.
* Add: `__iter__`, `keys` and `values` to `NodeDurations`.
---------
Co-authored-by: Alexander Ivrii <alexi@il.ibm.com>
1 parent e740447 commit 301aac0
10 files changed
Lines changed: 463 additions & 146 deletions
File tree
- crates
- pyext/src
- transpiler/src/passes
- schedule_analysis
- qiskit
- transpiler/passes/scheduling
- padding
- scheduling
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | | - | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
| |||
47 | 45 | | |
48 | 46 | | |
49 | 47 | | |
| 48 | + | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
| |||
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | | - | |
59 | 57 | | |
60 | | - | |
61 | 58 | | |
62 | 59 | | |
63 | 60 | | |
| |||
95 | 92 | | |
96 | 93 | | |
97 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
| |||
Lines changed: 21 additions & 79 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
| 18 | + | |
15 | 19 | | |
16 | | - | |
17 | 20 | | |
18 | | - | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 24 | | |
47 | 25 | | |
48 | 26 | | |
49 | 27 | | |
50 | | - | |
51 | | - | |
| 28 | + | |
| 29 | + | |
52 | 30 | | |
53 | 31 | | |
54 | 32 | | |
55 | 33 | | |
56 | 34 | | |
57 | 35 | | |
58 | | - | |
| 36 | + | |
59 | 37 | | |
60 | 38 | | |
61 | 39 | | |
| |||
154 | 132 | | |
155 | 133 | | |
156 | 134 | | |
157 | | - | |
| 135 | + | |
158 | 136 | | |
159 | 137 | | |
160 | 138 | | |
| |||
176 | 154 | | |
177 | 155 | | |
178 | 156 | | |
179 | | - | |
180 | 157 | | |
181 | 158 | | |
182 | | - | |
183 | | - | |
| 159 | + | |
| 160 | + | |
184 | 161 | | |
185 | 162 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
223 | 168 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
229 | 172 | | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
234 | 176 | | |
235 | 177 | | |
236 | 178 | | |
| |||
Lines changed: 17 additions & 55 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | | - | |
18 | 19 | | |
19 | | - | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
162 | 161 | | |
163 | 162 | | |
164 | | - | |
165 | | - | |
| 163 | + | |
| 164 | + | |
166 | 165 | | |
167 | 166 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
205 | 170 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
211 | 174 | | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
216 | 178 | | |
217 | 179 | | |
218 | 180 | | |
| |||
0 commit comments