-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add repeated structures #124
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
dexter2206
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.
Looks good, I requested only minor changes in docstrings and examples.
tests/qref/data/valid_programs/programs_with_repetitions/repetition_5_nested.yaml
Outdated
Show resolved
Hide resolved
| count: N | ||
| sequence: | ||
| type: closed_form | ||
| sum: "(2 ^ (X + 1) - 1)" |
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.
question: In some places we use ** to denote exponentiation, while in other places like here we use ^. WDYT about unifying it so that every exponentiation is represented with the same symbol?
Personally, I'd like it to be ** because it is more pythonic, and ^ is meant to mean xor in Python. We support both notations in Bartiq, but users familiar with Python might find the current state of the examples confusing - if there are examples of ** and examples of ^, a reasonable conclusion is that those two operations are diferent, right?
On the other hand, QREF is (programming)language-agnostic and we don't discuss language of arithmetic expressions in the documentation - it is therefore subject to interpretation by client libraries.
What's your stance on 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.
Agree, I think ** is better choice.
It's language agnostic, but reality is that most people will use that with Python anyway, assuming pythonic syntax is not bad.
Co-authored-by: Konrad Jałowiecki <dexter2206@gmail.com>
Description
Adds support for repeated structures.
There's a couple of things left:
Please verify that you have completed the following steps