diff --git a/src/qunit.cpp b/src/qunit.cpp index eb599297b..6319cc780 100644 --- a/src/qunit.cpp +++ b/src/qunit.cpp @@ -4027,7 +4027,7 @@ void QUnit::ApplyBuffer(PhaseShardPtr phaseShard, bitLenInt control, bitLenInt t if (pState) { Phase(ONE_CMPLX, polarBottom, t); } else { - Phase(ONE_CMPLX, polarTop, t); + Phase(polarTop, ONE_CMPLX, t); } if (phaseShard->isInvert) {