Skip to content

Commit

Permalink
Debug classical shadows
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathfulSpatula committed Nov 12, 2024
1 parent 5325078 commit 8d023e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qunit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4033,9 +4033,9 @@ void QUnit::ApplyBuffer(PhaseShardPtr phaseShard, bitLenInt control, bitLenInt t
const real1_f angleFidel2 = angleFrac(polarTop);
if (!pState) {
Phase(polarTop, ONE_CMPLX, t);
logFidelity += angleFidel2 * log(ONE_R1_F - pHi);
} else {
logFidelity += angleFidel2 * log(pLo);
} else {
logFidelity += angleFidel2 * log(ONE_R1_F - pHi);
}
if (logFidelity <= FIDELITY_MIN) {
throw std::runtime_error("QUnit fidelity is effectively 0!");
Expand Down

0 comments on commit 8d023e7

Please sign in to comment.