Skip to content

Commit

Permalink
Merge pull request #8 from shivansh511/patch-1
Browse files Browse the repository at this point in the history
Bugfix in qutrit discord...
  • Loading branch information
titaschanda authored Oct 17, 2023
2 parents 47e565c + 87d61a7 commit 65c1fb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/QIClib_bits/internal/discord.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ inline double disc_nlopt3(const std::vector<double>& x,
trait::pT<T1> S_max = 0.0;
if (p1 > _precision::eps<trait::pT<T1> >::value) {
rho_1 /= p1;
S_max += p1 * entropy(TrX(rho_1, {pB->nodal}, pB->nodal));
S_max += p1 * entropy(TrX(rho_1, {pB->nodal}, pB->dim));
}
if (p2 > _precision::eps<trait::pT<T1> >::value) {
rho_2 /= p2;
S_max += p2 * entropy(TrX(rho_2, {pB->nodal}, pB->nodal));
S_max += p2 * entropy(TrX(rho_2, {pB->nodal}, pB->dim));
}
if (p3 > _precision::eps<trait::pT<T1> >::value) {
rho_3 /= p3;
S_max += p3 * entropy(TrX(rho_3, {pB->nodal}, pB->nodal));
S_max += p3 * entropy(TrX(rho_3, {pB->nodal}, pB->dim));
}

return static_cast<double>(S_max);
Expand Down

0 comments on commit 65c1fb8

Please sign in to comment.