-
Notifications
You must be signed in to change notification settings - Fork 10
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
some bug fixes #114
some bug fixes #114
Conversation
if(split.size() != 2) { | ||
//Is this an angle of the form 3*pi? | ||
// not sure why but maybe we need something like | ||
std::string ns = std::string(s) + "/1"; | ||
|
||
split = lstk::split_on(ns,"*pi/"); | ||
if(split.size() != 2) | ||
throw GateParseException{lstk::cat("Could not parse angle ", s, " as n*pi/m")}; | ||
} |
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.
Yeah, this parser could for sure be more robust, starting from having a datatype to actually store fractions. Ideally we find a good header only library to parse and represent fractions
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.
there is a datatype for fractions, but was not sure how to use it for our purposes. I would not invest time in qasm parser, as i would expect somebody will eventually provide one open source on github
No description provided.