fix: cast node.size to IntegerLiteral for qubit register size#263
fix: cast node.size to IntegerLiteral for qubit register size#263
Conversation
Fixes bug [#240] by casting node.size into IntegerLiteral
|
@rmshaffer, @DanBlackwell In this regard the spec explicitly states that shifting, either right or left, is supported by an unsigned integer (https://openqasm.com/language/classical.html#classical-bits-and-registers). Since we are enabling registers sizes to be specified also as |
|
Maybe slightly related, but I found the following here the other day:
I'm not sure whether this is implying that it is valid to cast an array of bits into int and vice versa; but in that case I think that when applying any ops ( |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #263 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 48 48
Lines 4067 4071 +4
Branches 440 441 +1
=========================================
+ Hits 4067 4071 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|

Issue #, if available:
#240
Description of changes:
Starting with the changes from #258 and performing the additional work required to merge to
main.The biggest outstanding items are:
functions.pyinto a separate helper function, for readability. See this comment thread.Testing done:
toxMerge Checklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.