Commit 974ad78
Prepare for Qiskit 2.0 by addressing removed classes and methods (#1526)
This change prepares for Qiskit 2.0 by guarding or replacing references
to objects removed in Qiskit 2.0.
## Detailed list of changes:
### Compatibility changes:
* Guard references to `BackendV1`. `BackendV1` was removed in Qiskit
2.0. There were only a few remaining references to `BackendV1` after the
previous removal of pulse support, so it was not hard to keep the
remaining support for now but it should be removed when Qiskit 1 is no
longer supported.
* Update usage of `qiskit.result.Result.header` to expect a dict (Qiskit
2) as well as a class (Qiskit 1). `ExperimentData` gets the circuit
metadata from the header (by convention the metadata is copied into the
result and `ExperimentData` relies on this).
* Add classes `MeasLevel` and `MeasReturnType` to enumerate the expected
measurement level (kerneled or classified) and return type (averaged or
not). Previously, private classes of Qiskit were inadvertently used for
these purposes but they were removed in Qiskit 2.0.
* Remove null default `inst_map` transpile options from experiments.
These should have been removed along with the rest of pulse support.
* Update tests to use `GenericBackendV2` or a custom `BackendV2` in
place of removed `FakeOpenPulse2Q` and `Fake5QV1` backends from Qiskit.
* Remove suppression of Qiskit deprecation warnings from the tests.
* Remove stray references to `ProviderV1` in tests.
* Update the saved `QuantumVolume` results for Qiskit 2.0's change in
the quantum volume algorithm.
* Vendor deprecation decorators to prepare for their removal from
Qiskit's public API (see
[here](Qiskit/qiskit#11296 (review))).
At first it appeared that these methods would be changed late in the
Qiskit 2.0 cycle but the change was pushed back in time. Still the plan
is to make the functions private, so we need to stop using them.
### Other changes
* Provide a more specific warning in `LocalReadouMitigator` if it is
used with a backend without a ``properties()`` method or with a backend
that does not the required readout error properties.
* Fix a performance issue in `QuantumVolume`. When Qiskit Aer is
installed, `QuantumVolume` uses `AerSimulator` to simulate the outcomes
of the quantum volume circuits to determine the heavy output
probabilities. In its default instantiation, `AerSimulator` regenerates
its `Target` every time it is accessed and this generation takes an
appreciable amount of time. Because the target was being accessed
separately for every circuit, this overhead could accumulate to over a
minute in the standard 100 circuit experiment. This overhead was reduced
by processing all the circuits in one pass.
* Switch `FineFrequency` tests to use `T2HahnBackend` in place
`MockIQBackend` since it provides a more realistic backend emulation.
* Fix the `stacklevel` on the deprecation warning for `RestlessNode`.
---------
Co-authored-by: Eli Arbel <arbel@il.ibm.com>1 parent 00f2533 commit 974ad78
42 files changed
Lines changed: 743 additions & 257 deletions
File tree
- docs
- manuals/characterization
- tutorials
- qiskit_experiments
- curve_analysis
- data_processing
- mitigation
- framework
- library
- characterization
- quantum_volume
- randomized_benchmarking
- test
- releasenotes/notes
- test
- curve_analysis
- data_processing
- framework
- library
- characterization
- quantum_volume
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
427 | | - | |
428 | | - | |
| 427 | + | |
429 | 428 | | |
430 | 429 | | |
431 | 430 | | |
432 | | - | |
| 431 | + | |
433 | 432 | | |
434 | 433 | | |
435 | 434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
| 218 | + | |
| 219 | + | |
217 | 220 | | |
218 | 221 | | |
219 | 222 | | |
| |||
234 | 237 | | |
235 | 238 | | |
236 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
237 | 245 | | |
238 | 246 | | |
239 | 247 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
604 | | - | |
| 604 | + | |
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
293 | 296 | | |
294 | 297 | | |
295 | 298 | | |
296 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
297 | 307 | | |
298 | 308 | | |
299 | 309 | | |
| |||
304 | 314 | | |
305 | 315 | | |
306 | 316 | | |
| 317 | + | |
307 | 318 | | |
308 | 319 | | |
| 320 | + | |
309 | 321 | | |
310 | 322 | | |
311 | 323 | | |
| 324 | + | |
312 | 325 | | |
313 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
314 | 331 | | |
315 | 332 | | |
316 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
| 924 | + | |
924 | 925 | | |
925 | 926 | | |
926 | 927 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | | - | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
148 | 161 | | |
149 | 162 | | |
150 | 163 | | |
| |||
159 | 172 | | |
160 | 173 | | |
161 | 174 | | |
162 | | - | |
| |||
0 commit comments