Commit 13443f4
authored
Remove unecessary nodes field in SabreDAG (Qiskit#14199)
The SabreDAG struct was carrying a nodes field which was a Vec of the
topologically sorted node descriptions used to create the inner graph
object. The format of this field mirrors what Python passes to Rust when
initially creating the DAG. The reason this was being kept around was
for reversing the graph when working with control flow ops. However, in
practice this isn't necessary because all the data contained in the vec
is also contained in the graph and we can just reverse the graph
directly and save having to carry around the entire object. Also
removing this field simplifies the step of moving the sabre dag
construction into Rust which is required for porting the remainder of
the pass to Rust.1 parent 8ec4c9c commit 13443f4
2 files changed
+20
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | 246 | | |
248 | 247 | | |
249 | 248 | | |
250 | 249 | | |
251 | 250 | | |
252 | 251 | | |
253 | 252 | | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
| 253 | + | |
261 | 254 | | |
262 | 255 | | |
263 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
49 | 67 | | |
50 | 68 | | |
51 | 69 | | |
| |||
105 | 123 | | |
106 | 124 | | |
107 | 125 | | |
108 | | - | |
109 | 126 | | |
110 | 127 | | |
111 | 128 | | |
| |||
0 commit comments