-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix fake backend v2 dtm unit #8019
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
cef495d
convert dtm from nanoseconds to seconds
HuangJunye 7b40e0f
Handle dtm not defined in configuration
HuangJunye bce30bd
Add test for checking backend v2 dtm less than 1e-6
HuangJunye 02fc22f
add release note
HuangJunye 9c672ab
new line in release note
HuangJunye 16a0583
Merge branch 'main' into fix-fake-backend-v2-dtm-unit
HuangJunye c6ecc2a
Update qiskit/test/mock/fake_backend.py
HuangJunye bb64ce0
Merge branch 'main' into fix-fake-backend-v2-dtm-unit
mergify[bot] 97e91d0
Merge branch 'main' into fix-fake-backend-v2-dtm-unit
mtreinish File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
releasenotes/notes/fix-fake-backend-v2-dtm-unit-392a8fe3fcc9b793.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
fixes: | ||
| | ||
Fixed an issue with :class:`~.BackendV2` based fake backend classes from the | ||
``qiskit.providers.fake_provider`` module such as ``FakeMontrealV2`` where the | ||
value for the :attr:`~.BackendV2.dtm` attribute were not properly being | ||
converted to seconds. This would cause issues when using these fake backends | ||
with scheduling. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test for
dtm
cannot be combined withdt
(liketest_to_dict_configuration
) becausedtm
is not part of the target. But I am not sure creating a specific test just fordtm
is a good practice or not.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mtreinish What do you think about the test? Is the function name too specific? Does this test belong to this file or should it be in the test_fake_backend_v2.py?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine here and is a reasonable test to make sure we've got the unit conversion right.