Skip to content

Commit

Permalink
style: ♻️ Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
DRovara committed Sep 19, 2024
1 parent d60994a commit b38d998
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions include/backend/dd/DDSimDiagnostics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <map>
#include <memory>
#include <set>
#include <vector>

struct DDSimulationState;

Expand Down
1 change: 0 additions & 1 deletion include/common/parsing/CodePreprocessing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <cstddef>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <utility>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion src/backend/dd/DDSimDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <cstring>
#include <exception>
#include <iostream>
#include <iterator>
#include <memory>
#include <numeric>
#include <random>
Expand Down Expand Up @@ -858,7 +859,6 @@ Result destroyDDSimulationState(DDSimulationState* self) {
std::vector<std::string> getTargetVariables(DDSimulationState* ddsim,
size_t instruction) {
std::vector<std::string> result;
const auto& targets = ddsim->targetQubits[instruction];
size_t parentFunction = -1ULL;
size_t i = instruction;
while (true) {
Expand Down
1 change: 1 addition & 0 deletions src/backend/dd/DDSimDiagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <map>
#include <memory>
#include <set>
Expand Down
5 changes: 1 addition & 4 deletions src/common/parsing/CodePreprocessing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <iterator>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <utility>
#include <vector>
Expand Down Expand Up @@ -117,7 +116,6 @@ std::vector<std::string> parseParameters(const std::string& instruction) {
}

if (isClassicControlledGate(instruction)) {
const auto start = instruction.find('(');
const auto end = instruction.find(')');

return parseParameters(
Expand Down Expand Up @@ -313,8 +311,7 @@ preprocessCode(const std::string& code, size_t startIndex,
if (found != vars.end()) {
const auto newEnd = std::remove(vars.begin(), vars.end(), var);
vars.erase(newEnd, vars.end());
instr.dataDependencies.emplace_back(idx,
static_cast<size_t>(foundIndex));
instr.dataDependencies.emplace_back(idx, foundIndex);
}
foundIndex++;
}
Expand Down
1 change: 0 additions & 1 deletion src/frontend/cli/CliFrontEnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "backend/diagnostics.h"
#include "common.h"

#include <array>
#include <cstddef>
#include <cstdint>
#include <iostream>
Expand Down
1 change: 1 addition & 0 deletions test/test_custom_code.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "backend/dd/DDSimDebug.hpp"
#include "backend/debug.h"
#include "backend/diagnostics.h"
#include "common.h"
#include "utils_test.hpp"

Expand Down
1 change: 1 addition & 0 deletions test/test_diagnostics.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "backend/dd/DDSimDebug.hpp"
#include "backend/debug.h"
#include "backend/diagnostics.h"
#include "common.h"
#include "utils_test.hpp"

#include <array>
Expand Down

0 comments on commit b38d998

Please sign in to comment.