Skip to content

Commit

Permalink
Fix of minor typos
Browse files Browse the repository at this point in the history
  • Loading branch information
giangiac committed Jun 24, 2024
1 parent f08dd24 commit dc492ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion unit_test/include/random_number_generator_test.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef RANDOM_NUMBER_GENERATOR_TEST_HPP
#define RANDOM_NUMBER_GENERATOR_TEST_HPP

#include <iomanip>
#include <map>

#include "../../include/qureg.hpp"
Expand Down Expand Up @@ -85,7 +86,7 @@ TEST_F(RandomNumberGeneratorTest, Visualization)
<< "(each * corresponds to 100 draws)\n";
for (auto p : histogram)
{
std::cout << setw(2) << p.first << ' ' << std::string(p.second / 100, '*') << '\n';
std::cout << std::setw(2) << p.first << ' ' << std::string(p.second / 100, '*') << '\n';
}
}

Expand Down
2 changes: 1 addition & 1 deletion unit_test/include/single_qubit_gates_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ TEST_F(SingleQubitGatesTest, CustomGate)
{
psi.Apply1QubitGate(qubit, G_);
}
ASSERT_DOUBLE_EQ( psi.GetProbability(0), psi.GetProbability(2) );
ASSERT_DOUBLE_EQ( psi.GetProbability(4), psi.GetProbability(6) );
// The accepted error is sometimes exceeded when gcc is used.
ASSERT_NEAR( psi.GetProbability(0), psi.GetProbability(2), accepted_error_*10 );
ASSERT_NEAR( psi.GetProbability(5), 1.-psi.GetProbability(8), accepted_error_*10 );
}

Expand Down

0 comments on commit dc492ed

Please sign in to comment.