Remove deprecated BackendV1 elements, including base class, providers.models and qobj modules#13793
Remove deprecated BackendV1 elements, including base class, providers.models and qobj modules#13793mtreinish merged 15 commits intoQiskit:mainfrom
BackendV1 elements, including base class, providers.models and qobj modules#13793Conversation
qobj, pulse module, and related tools from BackendV1BackendV1 elements, including base class, providers.models and qobj modules
Pull Request Test Coverage Report for Build 13684630517Details
💛 - Coveralls |
BackendV1 elements, including base class, providers.models and qobj modulesBackendV1 elements, including base class, providers.models and qobj modules
|
One or more of the following people are relevant to this code:
|
…55) BackendV1 and qiskit.qobj removals in Qiskit/qiskit#13793 cause the test in qiskit_neko/tests/experiments/test_tomography.py to fail. This is part of the tests that are blocking the Qiskit/qiskit#13793 and Qiskit/qiskit#13872 PR in Qiskit from being merged. There is a PR in Qiskit Experiments that address these removals: qiskit-community/qiskit-experiments#1526. Until it is merged, we need to skip this failing test. Tracked in #54
mtreinish
left a comment
There was a problem hiding this comment.
Overall this LGTM. Thanks for doing this! This finally finishes a process I started back in 2019 with #3383 of trying to clean up these interfaces. I'm glad to see that 4 years later we're finally able to remove this legacy code from Qiskit. This is incredibly satisfying to see.
I just had a couple small comments inline. I thinkt he only one that needs an update is the release notes one though.
| provider is anything that provides an external service to Qiskit. The typical | ||
| example of this is a Backend provider which provides | ||
| :class:`~qiskit.providers.Backend` objects which can be used for executing | ||
| :class:`~qiskit.circuit.QuantumCircuit` and/or :class:`~qiskit.pulse.Schedule` |
There was a problem hiding this comment.
This PR doesn't remove schedules yet but it's fine. :)
| If migrating a provider from :class:`~qiskit.providers.BackendV1` | ||
| one thing to keep in mind is for | ||
| backwards compatibility you might need to add a configuration method that | ||
| will build a :class:`~qiskit.providers.models.BackendConfiguration` object | ||
| and :class:`~qiskit.providers.models.BackendProperties` from the attributes | ||
| defined in this class for backwards compatibility. |
There was a problem hiding this comment.
We could have left this comment in the docstring because someone could conceivably be migrating from BackendV1 post removal (as part of fixing 2.0 compatibility). But it also is fine to remove it since this lives in the 1.4 docs.
|
|
||
| class Bloch: | ||
| """Class for plotting data on the Bloch sphere. Valid data can be | ||
| either points, vectors, or qobj objects. |
There was a problem hiding this comment.
lol, what!? There is nothing that ever took a qobj here afaik.
| The ``BackendV1`` model has been removed following its deprecation in | ||
| Qiskit 1.2.0. This includes the ``BackendV1`` class as well as related | ||
| modules and utils, as they have been superseded by the :class:`.BackendV2` | ||
| model. The list of removed items includes: |
There was a problem hiding this comment.
You might want to mention this also includes things that previously could accept a backend v1 object like generate_preset_pass_manager etc.
| legacy ``BackendV1`` components (such as ``BackendConfiguration`` or ``BackendProperties``) | ||
|
|
||
| * ``BackendPropertyError`` and ``BackendConfigurationError``: exceptions linked to removed classes | ||
|
|
There was a problem hiding this comment.
I think there are a couple of removals missing here. The ones I caught are:
Target.from_configuration()backend_properties` argtarget_to_backend_properties
I might have missed others though.
mtreinish
left a comment
There was a problem hiding this comment.
LGTM, thanks for the quick update.
This is an undocumented internal module, so not subject to the deprecation policy. The module has been empty since Qiskitgh-13793 (and the handful of other `qiskit.providers` PRs that logically went with that one) in the Qiskit 2.0 transition, but since everything was using precise imports, we didn't notice the `__init__` file was now useless.
This is an undocumented internal module, so not subject to the deprecation policy. The module has been empty since gh-13793 (and the handful of other `qiskit.providers` PRs that logically went with that one) in the Qiskit 2.0 transition, but since everything was using precise imports, we didn't notice the `__init__` file was now useless.
…15091) This is an undocumented internal module, so not subject to the deprecation policy. The module has been empty since Qiskitgh-13793 (and the handful of other `qiskit.providers` PRs that logically went with that one) in the Qiskit 2.0 transition, but since everything was using precise imports, we didn't notice the `__init__` file was now useless.
Summary
This PR builds upon (
and is BLOCKED BY) the changes in #13805.This PR removes
BackendV1and all related modules and utils. This includes:from
qiskit/providers:BackendV1BackendV2Converterconvert_to_targetBackendPropertyErrorBackendConfigurationErrorfrom
qiskit/providers/models: these were BackendV1 data structures. Full module removedBackendConfigurationBackendPropertiesBackendStatusQasmBackendConfigurationPulseBackendConfigurationUchannelLOGateConfigPulseDefaultsCommandJobStatusGatePropertiesNduvRemoved
PulseQobjDeffromqiskit/providers/models(this steps a bit into pulse removal realm)from
qiskit/qobj: Full module removed.Note that there were two classes defined in the qobj utils (
MeasLevelandMeasReturnType) used in the result class, so they have been moved toresult/models.py.TODOs
Details