diff --git a/src/stim/circuit/gate_data.cc b/src/stim/circuit/gate_data.cc index 4032b5ff4..c73812cfb 100644 --- a/src/stim/circuit/gate_data.cc +++ b/src/stim/circuit/gate_data.cc @@ -114,7 +114,7 @@ std::array Gate::to_axis_angle() const { auto rs = s.real(); // At this point it's more of a quaternion. Normalize the axis. - auto r = sqrt(rx*rx + ry*ry + rz*rz); + auto r = sqrt(rx * rx + ry * ry + rz * rz); if (r == 0) { rx = 1; } else { diff --git a/src/stim/circuit/gate_data.test.cc b/src/stim/circuit/gate_data.test.cc index d8dff639f..b38034007 100644 --- a/src/stim/circuit/gate_data.test.cc +++ b/src/stim/circuit/gate_data.test.cc @@ -217,9 +217,7 @@ std::array, 4> canonicalize_global_phase(std::array, 4> u1, - std::array, 4> u2) { + Gate g, std::array, 4> u1, std::array, 4> u2) { u1 = canonicalize_global_phase(u1); u2 = canonicalize_global_phase(u2); for (size_t k = 0; k < 4; k++) { @@ -229,7 +227,7 @@ void expect_unitaries_close_up_global_phase( for (size_t k2 = 0; k2 < 4; k2++) { out << " " << u1[k2] << " vs " << u2[k2] << "\n"; } - EXPECT_EQ(u1, u2) << out.str() << "\n" << comma_sep(g.to_euler_angles(),","); + EXPECT_EQ(u1, u2) << out.str() << "\n" << comma_sep(g.to_euler_angles(), ","); return; } }