Skip to content

Commit

Permalink
remove references to M_PI
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Guo committed Oct 26, 2023
1 parent 10abe5b commit 17b41af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/output/ionq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class IonQOutputter final : public ast::Visitor {
// TODO: assert that this is a rotation gate
// TODO: Handle multiples of pi nicely
os_ << prefix_ << "\"angle\": " << std::fixed
<< gate.carg(0).constant_eval().value() / M_PI << ",\n";
<< gate.carg(0).constant_eval().value() / qasmtools::utils::pi << ",\n";
}

os_ << prefix_ << "\"gate\": \"" << name << "\"\n"; // no comma
Expand Down
4 changes: 2 additions & 2 deletions include/transformations/replace_ugate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ namespace ast = qasmtools::ast;
*/
void replace_ugates(ast::ASTNode& node);

static const double pi = M_PI;
static const double EPS = 1e-9;
static constexpr double pi = qasmtools::utils::pi;
static constexpr double EPS = 1e-9;

struct UArgs {
double theta;
Expand Down

0 comments on commit 17b41af

Please sign in to comment.