Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove FakeBackendV2 import deprecated in Qiskit 0.46 #1420

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

ElePT
Copy link
Contributor

@ElePT ElePT commented Mar 12, 2024

Summary

In qiskit 0.46, several classes in the qiskit.providers.fake_provider module were deprecated, including qiskit.providers.fake_provider.fake_backend.FakeBackendV2. However, the removal PR failed to address this particular class, so while this particular FakeBackendV2 was no longer part of the public API, the import path would still work. This oversight will be addressed in Qiskit/qiskit#11997, but in order to merge this PR we must make sure that all the downstream libraries covered by qiskit-neko are up-to-date with the change.

This change adds an alternative import path for this class in qiskit-experiments. It follows the pattern from other 1.0 import deprecations. The removal would roll out in the 1.1 release, but it is indicated as a 1.0 removal because that is when it should have technically taken place.

Details and comments

Blocks Qiskit/qiskit#11997.

Copy link
Collaborator

@wshanks wshanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @ElePT. I probably should have asked about this class when I was doing the other updates for the fake_provider deprecations. Just one formatting issue to fix.

Comment on lines 50 to 39

pass


Copy link
Collaborator

@wshanks wshanks Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a change since black 22 which we are still pinned to here. GitHub won't let me suggest the fix in the comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed now

@wshanks wshanks added the backport stable potential The issue or PR might be minimal and/or import enough to backport to stable label Mar 12, 2024
@wshanks wshanks changed the title Remove import deprecated in 0.46 Remove FakeBackendV2 import deprecated in Qiskit 0.46 Mar 12, 2024
Copy link
Collaborator

@wshanks wshanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, the linting run passed this time.

By the way, I edited your PR description slightly (remove the check list and change voice) because the repo is set to use the PR description as the commit message for the merge queue.

@wshanks wshanks enabled auto-merge March 12, 2024 18:46
@wshanks wshanks added this pull request to the merge queue Mar 12, 2024
Merged via the queue into qiskit-community:main with commit 428c9bc Mar 12, 2024
11 checks passed
mergify bot pushed a commit that referenced this pull request Mar 12, 2024
### Summary

In qiskit 0.46, several classes in the `qiskit.providers.fake_provider`
module were deprecated, including
`qiskit.providers.fake_provider.fake_backend.FakeBackendV2`. However,
the removal PR failed to address this particular class, so while this
particular `FakeBackendV2` was no longer part of the public API, the
import path would still work. This oversight will be addressed in
Qiskit/qiskit#11997, but in order to merge this
PR we must make sure that all the downstream libraries covered by
`qiskit-neko` are up-to-date with the change.

This change adds an alternative import path for this class in
qiskit-experiments. It follows the pattern from other 1.0 import
deprecations. The removal would roll out in the 1.1 release, but it is
indicated as a 1.0 removal because that is when it should have
technically taken place.

### Details and comments

Blocks Qiskit/qiskit#11997.

(cherry picked from commit 428c9bc)
coruscating pushed a commit that referenced this pull request Mar 12, 2024
#1422)

This is an automatic backport of pull request #1420 done by
[Mergify](https://mergify.com).


---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the
[documentation](https://docs.mergify.com/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on
`<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you
can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com
</details>

Co-authored-by: Elena Peña Tapia <[email protected]>
@wshanks wshanks mentioned this pull request Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport stable potential The issue or PR might be minimal and/or import enough to backport to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants