Closed jlbosse closed 1 year ago
I understand the use case, but I don't see a solution to this because Yao doesn't really handle symbolic scalar expressions...this should be the right behavior of YaoBlocks, and the error message is also quite clear?
Fair enough, I guess it is more down to the fact that π behaves funny in some contexts and julia users are (hopefully) used to that. So maybe give this issue a tag "wont-fix" and then close it for future reference?
so the real issue is still a mixture of value and symbolic expression (aka the program), pi
is technically a symbol but unfortunately Yao doesn't understand it. This problem will automatically disappear if there is an explicit symbolic expression containing scalar symbols then use an explicit compile stage to get the value. So it automatically gets fixed with YaoExpr (the Yao 2.0), but I currently don't have time to work on the new engine, might need to wait until I have more spare time to sketch that out.
Here is an MWE illustrating the problem:
Clearly, this can be fixed by wrapping the
π
in aFloat64
, but feels a bit cumbersome. But I am also not sure what a good fix is, since having generic types is quite nice.