-
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 scheduling units #11782
Fix scheduling units #11782
Conversation
One or more of the the following people are requested to review this:
|
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.
Thanks for finding this. Looking at the lines above in the code, I think this might need a bit more of a tweak - would this handle the case circ.unit == "ms"
correctly, for example?
Could we also add a couple of regression tests on it and a bugfix note? Do you think it's eligible for backport to 0.46 as well?
Pull Request Test Coverage Report for Build 7889916990Details
💛 - Coveralls |
Added. I think it's elegible for backport to both 0.45 and 0.46.
The bug was in |
Well, |
055733d
to
ede853a
Compare
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 looks fine to me, thanks. I think the bug's sufficiently non-critical (must have been around for ages, I think?) that it's best to wait to merge til we can target it at 1.0.1, rather than accepting the heightened risk of merging it between rc1 and 1.0.0 final.
I'll leave this approved but untagged until stable/1.0
is open for bugfixes for 1.0.1.
* Fix units * Add test and reno * Add support for non-IS units, move test to test_scheduled_circuit.py * Adapt reno wording (cherry picked from commit 944e20c)
* Fix units * Add test and reno * Add support for non-IS units, move test to test_scheduled_circuit.py * Adapt reno wording (cherry picked from commit 944e20c) Co-authored-by: Elena Peña Tapia <[email protected]>
Summary
While trying to fix #11780, @Cryoris and I noticed that the rounding errors after scheduling were reporting durations of the order of
e14 dt
, instead ofe4 dt
. This was due to a conversion todt
of circuit units that were already indt
. This PR adds a fix that checks the existing units before converting.Details and comments
To reproduce the issue, run the following code without the fix in #11780
Where the following line shows the output: