Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: boschmitt <[email protected]>
  • Loading branch information
boschmitt committed Oct 22, 2024
1 parent 2c3780b commit 7cc06c1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions runtime/cudaq/spin/spin_op.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "common/EigenDense.h"
#include "common/EigenSparse.h"
#include "common/FmtCore.h"
#include <cstdlib>
#include <cudaq/spin_op.h>
#include <stdint.h>
#include <unsupported/Eigen/KroneckerProduct>
Expand Down Expand Up @@ -434,8 +433,8 @@ spin_op &spin_op::operator*=(const spin_op &v) noexcept {
std::vector<term_and_coeff> result(numTerms);
std::size_t min = std::min(num_terms(), v.num_terms());

// Take the `unordered_map` iterators to minimize pointer chasing when doing
// the cartesian product of the terms of these spin operators.
// Put the `unordered_map` iterators into vectors to minimize pointer chasing
// when doing the cartesian product of the spin operators' terms.
using Iter =
std::unordered_map<spin_op_term, std::complex<double>>::const_iterator;
std::vector<Iter> thisTermIt;
Expand Down

0 comments on commit 7cc06c1

Please sign in to comment.