Skip to content

Commit

Permalink
log2をstdc++のものに
Browse files Browse the repository at this point in the history
  • Loading branch information
KowerKoint committed Sep 20, 2024
1 parent 7d5773c commit 9f18451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/state/state_vector_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ TEST(StateVectorTest, EntropyCalculation) {
for (std::uint64_t ind = 0; ind < dim; ++ind) {
CComplex z = test_state[ind];
double prob = z.real() * z.real() + z.imag() * z.imag();
if (prob > eps) ent += -prob * log2(prob);
if (prob > eps) ent += -prob * std::log2(prob);
}
ASSERT_NEAR(ent, state.get_entropy(), eps);
}
Expand Down

0 comments on commit 9f18451

Please sign in to comment.