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 c4fc7cf commit 3479c86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/qunit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4024,10 +4024,10 @@ void QUnit::ApplyBuffer(PhaseShardPtr phaseShard, bitLenInt control, bitLenInt t
throw std::runtime_error("QUnit fidelity is effectively 0!");
}

if (pState) {
Phase(ONE_CMPLX, polarBottom, ptHi ? control : target);
if (pState == ptHi) {
Phase(ONE_CMPLX, polarBottom, control);
} else {
Phase(ONE_CMPLX, polarTop, ptHi ? target : control);
Phase(polarTop, ONE_CMPLX, target);
}

if (phaseShard->isInvert) {
Expand Down

0 comments on commit 3479c86

Please sign in to comment.