Skip to content

Commit

Permalink
Autoformat
Browse files Browse the repository at this point in the history
  • Loading branch information
Strilanc committed Nov 18, 2023
1 parent 8387240 commit d1bb9a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/stim/circuit/gate_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ std::array<float, 4> 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 {
Expand Down
6 changes: 2 additions & 4 deletions src/stim/circuit/gate_data.test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,7 @@ std::array<std::complex<float>, 4> canonicalize_global_phase(std::array<std::com
}

void expect_unitaries_close_up_global_phase(
Gate g,
std::array<std::complex<float>, 4> u1,
std::array<std::complex<float>, 4> u2) {
Gate g, std::array<std::complex<float>, 4> u1, std::array<std::complex<float>, 4> u2) {
u1 = canonicalize_global_phase(u1);
u2 = canonicalize_global_phase(u2);
for (size_t k = 0; k < 4; k++) {
Expand All @@ -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;
}
}
Expand Down

0 comments on commit d1bb9a7

Please sign in to comment.