Skip to content

Commit

Permalink
Fixed clang build
Browse files Browse the repository at this point in the history
Clang is very strict about not allowing structure-binding vars as lambda captures.

Signed-off-by: Thien Nguyen <[email protected]>
  • Loading branch information
1tnguyen committed Feb 2, 2023
1 parent c7c4c79 commit 8e3b96f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion quantum/plugins/placement/triq/BackendMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ BackendMachine::BackendMachine(const NoiseModel &backendNoiseModel) {
const auto twoQubitFidelityAvg = [&]() {
std::vector<std::pair<size_t, size_t>> processedPairs;
std::vector<std::tuple<size_t, size_t, double>> avgData;
for (const auto &[q1, q2, fidelity] : twoQubitFidelity) {
for (const auto &fidelity_data : twoQubitFidelity) {
const auto q1 = std::get<0>(fidelity_data);
const auto q2 = std::get<1>(fidelity_data);
const auto fidelity = std::get<2>(fidelity_data);
if (!xacc::container::contains(processedPairs, std::make_pair(q1, q2))) {
assert(
!xacc::container::contains(processedPairs, std::make_pair(q2, q1)));
Expand Down

0 comments on commit 8e3b96f

Please sign in to comment.