Skip to content

Commit f43d24a

Browse files
committed
🚨 fix clang-tidy warnings
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
1 parent 7e00033 commit f43d24a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/exact/ExactMapper.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,8 @@ void ExactMapper::map(const Configuration& settings) {
348348
const auto logical1 = static_cast<qc::Qubit>(qubits.at(q1));
349349
qcMapped.swap(q0, q1);
350350
std::swap(qubits.at(q0), qubits.at(q1));
351-
locations[logical0] = static_cast<std::int16_t>(q1);
352-
locations[logical1] = static_cast<std::int16_t>(q0);
351+
locations.at(logical0) = static_cast<std::int16_t>(q1);
352+
locations.at(logical1) = static_cast<std::int16_t>(q0);
353353

354354
if (settings.verbose) {
355355
std::cout << "Qubits: ";
@@ -372,7 +372,7 @@ void ExactMapper::map(const Configuration& settings) {
372372
// set output permutation
373373
qcMapped.outputPermutation.clear();
374374
for (qc::Qubit logical = 0; logical < qc.getNqubits(); ++logical) {
375-
const auto physical = static_cast<qc::Qubit>(locations[logical]);
375+
const auto physical = static_cast<qc::Qubit>(locations.at(logical));
376376
qcMapped.outputPermutation[physical] = logical;
377377
}
378378

0 commit comments

Comments
 (0)