Skip to content

Commit

Permalink
🎨 pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Sep 23, 2024
1 parent 8bc9018 commit 53200c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions src/DDMinimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@

#include <algorithm>
#include <cstddef>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <utility>
#include <vector>
#include <iostream>


using namespace qc;
using namespace std;
Expand Down Expand Up @@ -96,10 +95,9 @@ DDMinimizer::createGateBasedPermutation(qc::QuantumComputation& qc) {
} else if (mapName[2] == 'l') {
const auto column = static_cast<std::size_t>(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;
}
}
Expand Down
6 changes: 3 additions & 3 deletions test/test_reorder_without_reordering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Qubit> layout = {0, 1, 2, 3};

// Create the expected permutation
Expand All @@ -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];"
Expand All @@ -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<Qubit> layout = {3, 2, 1, 0};

// Create the expected permutation
Expand Down

0 comments on commit 53200c5

Please sign in to comment.