Commit 8e6200a
authored
Simplify return type of
Technically this is a breaking change, not because of the type change
(we're returning a subset of what we previously did), but because the
docstring previously _explicitly_ said that `None` was used for the
empty list. In practice, this is a bit of a footgun (as I found), and
inconsistent with the other `DAGCircuit` methods. It's not clear that
it has a performance advantage; technically it can save a single Python
empty-list allocation (`None` is a singleton), but this cost is pretty
trivial.DAGCircuit::control_flow_op_nodes (Qiskit#13892)1 parent ca1297e commit 8e6200a
File tree
4 files changed
+35
-35
lines changed- crates/circuit/src
- qiskit/transpiler/passes
- optimization
- utils
- releasenotes/notes
4 files changed
+35
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3628 | 3628 | | |
3629 | 3629 | | |
3630 | 3630 | | |
3631 | | - | |
3632 | | - | |
3633 | | - | |
3634 | | - | |
3635 | | - | |
3636 | | - | |
3637 | | - | |
3638 | | - | |
3639 | | - | |
3640 | | - | |
3641 | | - | |
3642 | | - | |
3643 | | - | |
3644 | | - | |
3645 | | - | |
3646 | | - | |
3647 | | - | |
3648 | | - | |
3649 | | - | |
3650 | | - | |
3651 | | - | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
| 3634 | + | |
3652 | 3635 | | |
| 3636 | + | |
| 3637 | + | |
| 3638 | + | |
| 3639 | + | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
3653 | 3649 | | |
3654 | 3650 | | |
3655 | 3651 | | |
| |||
Lines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
148 | 146 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 57 | + | |
| 58 | + | |
64 | 59 | | |
65 | 60 | | |
66 | 61 | | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments