Skip to content
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

Merged
merged 5 commits into from
Mar 8, 2024
Merged

some bug fixes #114

merged 5 commits into from
Mar 8, 2024

Conversation

alexandrupaler
Copy link
Contributor

No description provided.

Comment on lines +128 to +136
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")};
}
Copy link
Member

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

Copy link
Contributor Author

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

src/gates/parse_gates.cpp Outdated Show resolved Hide resolved
@gwwatkin gwwatkin merged commit 6801e68 into main Mar 8, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants