diff --git a/src/DDMinimizer.cpp b/src/DDMinimizer.cpp index 249d0c6f..de28d932 100644 --- a/src/DDMinimizer.cpp +++ b/src/DDMinimizer.cpp @@ -9,14 +9,13 @@ #include #include +#include #include #include #include #include #include #include -#include - using namespace qc; using namespace std; @@ -96,10 +95,9 @@ DDMinimizer::createGateBasedPermutation(qc::QuantumComputation& qc) { } else if (mapName[2] == 'l') { const auto column = static_cast(map.first[4] - '0'); it->second[column] = max; - } else if ( max == -1) { + } else if (max == -1) { it->second[0] = 0; - } - else { + } else { it->second[0] = max; } } diff --git a/test/test_reorder_without_reordering.cpp b/test/test_reorder_without_reordering.cpp index 61d075b2..6b0cda3e 100644 --- a/test/test_reorder_without_reordering.cpp +++ b/test/test_reorder_without_reordering.cpp @@ -43,7 +43,7 @@ TEST(ReorderWithoutReorderingTest, xc) { auto qc = QuantumComputation::fromQASM(testfile); DDMinimizer::optimizeInputPermutation(qc); - const std::size_t bits = 4; + const std::size_t bits = 4; std::vector layout = {0, 1, 2, 3}; // Create the expected permutation @@ -59,7 +59,7 @@ TEST(ReorderWithoutReorderingTest, xc) { } TEST(ReorderWithoutReorderingTest, cx) { - const std::string testfile = "OPENQASM 2.0;\n" + const std::string testfile = "OPENQASM 2.0;\n" "include \"qelib1.inc\";\n" "qreg q[4];\n" "creg meas[4];" @@ -80,7 +80,7 @@ TEST(ReorderWithoutReorderingTest, cx) { qc::Permutation perm = DDMinimizer::createGateBasedPermutation(qc); qc.initialLayout = perm; - const std::size_t bits = 4; + const std::size_t bits = 4; std::vector layout = {3, 2, 1, 0}; // Create the expected permutation