Skip to content

Commit

Permalink
Optimized quantum_associative_memory example
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathfulSpatula committed Apr 25, 2024
1 parent 662cd9f commit 7451a4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/quantum_associative_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ int main()
for (bitCapInt perm = ZERO_BCI; bi_compare(perm, InputPower) < 0; bi_increment(&perm, 1U)) {
std::cout << "Epoch " << (perm + ONE_BCI) << " out of " << InputPower << std::endl;
const bitCapInt comp = (~perm) + ONE_BCI;
qReg->SetPermutation(perm);
for (bitLenInt i = 0; i < OutputCount; i++) {
qReg->SetPermutation(perm);
outputLayer[i]->LearnPermutation((real1_f)eta, bi_compare_0(comp & pow2(i)) != 0);
}
}
Expand Down

0 comments on commit 7451a4f

Please sign in to comment.