-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Bugfix] Re-allow non-integral line/grid qubits #7110
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7110 +/- ##
==========================================
- Coverage 98.15% 98.15% -0.01%
==========================================
Files 1089 1089
Lines 95251 95255 +4
==========================================
- Hits 93497 93495 -2
- Misses 1754 1760 +6 ☔ View full report in Codecov by Sentry. |
dstrain115
left a comment
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 fixing this!
pavoljuhas
left a comment
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.
LGTM with a couple of small comments. Thank you!
* Allow non-integral line/grid qubits * tests * fix numpy overflow * fix tests * fix tests on windows * Address PR comments
Fixes #7102. No longer coerces x/row/col to int. Wraps hash expression with
hashinstead.On my laptop it's also a tiny bit faster. It creates 10,000,000 LineQubits in 2.1s; old code took 2.5s.
Also, note that I left all the type annotations
int, which is what they have always been. I looked into changing these intonumbers.RationalorSupportsFloator something, but it's too invasive. Lots of code seems to assume integral x/row/col values, and mypy blows up when you try to expand it.