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 8d023e7 commit 070dd27
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(pLo);
logFidelity += angleFidel2 * log(ONE_R1_F - pLo);
} else {
logFidelity += angleFidel2 * log(ONE_R1_F - pHi);
logFidelity += angleFidel2 * log(pHi);
}
if (logFidelity <= FIDELITY_MIN) {
throw std::runtime_error("QUnit fidelity is effectively 0!");
Expand Down

0 comments on commit 070dd27

Please sign in to comment.