Skip to content

Commit dc492ed

Browse files
committed
Fix of minor typos
1 parent f08dd24 commit dc492ed

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

unit_test/include/random_number_generator_test.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef RANDOM_NUMBER_GENERATOR_TEST_HPP
22
#define RANDOM_NUMBER_GENERATOR_TEST_HPP
33

4+
#include <iomanip>
45
#include <map>
56

67
#include "../../include/qureg.hpp"
@@ -85,7 +86,7 @@ TEST_F(RandomNumberGeneratorTest, Visualization)
8586
<< "(each * corresponds to 100 draws)\n";
8687
for (auto p : histogram)
8788
{
88-
std::cout << setw(2) << p.first << ' ' << std::string(p.second / 100, '*') << '\n';
89+
std::cout << std::setw(2) << p.first << ' ' << std::string(p.second / 100, '*') << '\n';
8990
}
9091
}
9192

unit_test/include/single_qubit_gates_test.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ TEST_F(SingleQubitGatesTest, CustomGate)
113113
{
114114
psi.Apply1QubitGate(qubit, G_);
115115
}
116-
ASSERT_DOUBLE_EQ( psi.GetProbability(0), psi.GetProbability(2) );
117116
ASSERT_DOUBLE_EQ( psi.GetProbability(4), psi.GetProbability(6) );
118117
// The accepted error is sometimes exceeded when gcc is used.
118+
ASSERT_NEAR( psi.GetProbability(0), psi.GetProbability(2), accepted_error_*10 );
119119
ASSERT_NEAR( psi.GetProbability(5), 1.-psi.GetProbability(8), accepted_error_*10 );
120120
}
121121

0 commit comments

Comments
 (0)