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

Providerv1 deprication patch #182

Merged

Conversation

LowkeyCoding
Copy link
Contributor

Summary

Qiskit's ProviderV1 and Provider abstract classes are deprecated and will be removed after the release of v2.0. This change requires the removal of the abstract class from the BraketProvider and the re-implementation of get_backend(self, name=None, **kwargs).

Details and comments

The change described in the summary has been implemented, and additionally, comments for the self.backends() and self.get_backend() methods have been added.

@CLAassistant
Copy link

CLAassistant commented Jul 1, 2024

CLA assistant check
All committers have signed the CLA.

@yitchen-tim yitchen-tim self-requested a review July 1, 2024 21:24
@yitchen-tim
Copy link
Collaborator

Hi @LowkeyCoding thanks for the PR. The PR looks good. Could you merge the latest commit from main which will fix the checks.

@LowkeyCoding
Copy link
Contributor Author

It seems like the behavior of get_backend() is not filtering in the test environment (most likely due to self.mock_session.search_devices.return_value and self.mock_session.get_device.side_effect). I have fixed it by creating a mock session with no simulators to catch the case where no backends are found and an exception is raised.

Copy link
Collaborator

@yitchen-tim yitchen-tim left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @LowkeyCoding !

@yitchen-tim yitchen-tim merged commit 330ec7d into qiskit-community:main Jul 2, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants