Skip to content

Add __getattr__ method for fake backends #2202

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

Merged
merged 6 commits into from
Apr 14, 2025

Conversation

kt474
Copy link
Member

@kt474 kt474 commented Mar 31, 2025

Summary

IBMBackend has a __getattr__ method so attributes from the backend configuration can be retrieved directly - backend.dynamic_reprate_enabled. It should work the same way for fake backends.

Details and comments

Fixes #2200

@kt474 kt474 added the Changelog: New Feature Include in the Added section of the changelog label Apr 1, 2025
@kt474 kt474 requested a review from ElePT April 1, 2025 20:23
Copy link
Collaborator

@ElePT ElePT left a comment

Choose a reason for hiding this comment

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

LGTM, I just have a docstring suggestion, as fake backends do not subclass IBMBackend (yet).

@kt474 kt474 merged commit 2fcfbb4 into Qiskit:main Apr 14, 2025
4 checks passed
@kt474 kt474 deleted the fake-backend-attributes branch April 14, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the Added section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FakeBackends do not set reprate and rep_delay attributes
2 participants