Commit 1b0276a
authored
Avoid triggering register/layout warning in
`QuantumCircuit.remove_final_measurements` has always been a bit fragile
because it attempts to do effectively in-place deletions of bits of
metadata while leaving others intact. Since the "layout" warning is
only about modifying the `qregs`, and those are untouched by
`remove_final_measurements`, we know that the register modifications are
at least safe here and can avoid the warning.remove_final_measurements (#16026)1 parent 12c06a7 commit 1b0276a
3 files changed
Lines changed: 34 additions & 4 deletions
File tree
- qiskit/circuit
- releasenotes/notes
- test/python/circuit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4719 | 4719 | | |
4720 | 4720 | | |
4721 | 4721 | | |
4722 | | - | |
| 4722 | + | |
| 4723 | + | |
| 4724 | + | |
4723 | 4725 | | |
4724 | | - | |
| 4726 | + | |
4725 | 4727 | | |
4726 | 4728 | | |
4727 | 4729 | | |
4728 | 4730 | | |
4729 | 4731 | | |
4730 | 4732 | | |
4731 | | - | |
| 4733 | + | |
4732 | 4734 | | |
4733 | 4735 | | |
4734 | 4736 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
1058 | 1059 | | |
1059 | 1060 | | |
1060 | 1061 | | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
1061 | 1084 | | |
1062 | 1085 | | |
1063 | 1086 | | |
| |||
0 commit comments