-
Notifications
You must be signed in to change notification settings - Fork 341
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
Parsing of pi from strings #1664
Comments
This will require some design work in |
I would just like it to be one way or the other. I think the simplest way
is when parsing a problem, replace pi with 3.14159...
This is ugly for program readers, but at least consistent.
…On Fri, Sept 22, 2023, 18:07 Marquess Valdez ***@***.***> wrote:
This will require some design work in quil-rs to resolve. The issue is
that, when parsing a program, the string pi is parsed as the Quil keyword
pi. However, when constructing a gate in Python, np.pi is just a float.
quil-rs would either need to rewrite expressions containing pi before
storing them, or do so during comparison checks to make this work.
—
Reply to this email directly, view it on GitHub
<#1664 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEWA7RPAFT5IJJSXNMETU3X3XAVHANCNFSM6AAAAAA5DAHBSU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Isn't |
Consistent with |
Issue Description
If I construct a program from a string, parameters such as "pi/2" are preserved and output that way. However, if I construct the same program in python, the parameter is output as 1.5707963267948966.
The two programs below are entirely equivalent and should compare as equal, but they do not.
How to Reproduce
Code Snippet
The text was updated successfully, but these errors were encountered: