Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libs/qec/lib/decoders/sliding_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ decoder_result sliding_window::decode(const std::vector<float_t> &syndrome) {

std::vector<decoder_result> sliding_window::decode_batch(
const std::vector<std::vector<float_t>> &syndromes) {
if (syndromes.empty()) {
CUDAQ_DBG("Returning empty decoder_result (no syndrome)");
return {};
}
if (syndromes[0].size() == this->syndrome_size) {
CUDAQ_DBG("Decoding whole block");
// Decode the whole thing, iterating over windows manually.
Expand Down
5 changes: 2 additions & 3 deletions libs/solvers/lib/adapt/device/adapt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ adapt_kernel(std::size_t numQubits,
statePrep(q);

auto i = 0;
for (std::size_t j = 0; j < trotterOpList.size();) {
for (std::size_t j = 0; j < trotterOpList.size(); ++j) {
auto index = poolIndices[j];
auto &term = trotterOpList[j];
exp_pauli(thetas[i] * coefficients[j], q, term);
j++;
if (index != poolIndices[j]) {
if (j + 1 < poolIndices.size() && index != poolIndices[j + 1]) {
i++;
}
}
Expand Down
Loading