Commit 740a9dc
authored
Allow circuits using only SI units to pass through TimeUnitConversion (#14027)
* Allow circuits using only SI units to pass through TimeUnitConversion
In f0576fa, the `TimeUnitConversion` pass was modified so that it
raises an exception if a circuit has only SI unit delays with no `dt`
value set, but the intent seemed to be catch cases where SI units were
used alongside instructions with `dt` units. Here the conditions for
raising an exception are modified to allow circuits with all SI unit
delays (which usually only happens when working with a backend like
`AerSimulator`) to pass through.
Closes #14016
* Add TimeUnitConverion tests
* Update test description
* Remove comment
* lint test file
* Refactor TimeUnitConversion for readability
* Move time unit converison tests to test_transpiler
* lint
* lint1 parent 56a16ab commit 740a9dc
2 files changed
Lines changed: 47 additions & 6 deletions
File tree
- qiskit/transpiler/passes/scheduling
- test/python/compiler
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
134 | 132 | | |
135 | 133 | | |
136 | 134 | | |
137 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
| |||
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
157 | | - | |
| 161 | + | |
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1372 | 1372 | | |
1373 | 1373 | | |
1374 | 1374 | | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
1375 | 1397 | | |
1376 | 1398 | | |
1377 | 1399 | | |
| |||
1513 | 1535 | | |
1514 | 1536 | | |
1515 | 1537 | | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
1516 | 1553 | | |
1517 | 1554 | | |
1518 | 1555 | | |
| |||
0 commit comments