From a32992bcfc63d70edf714080877aa262b8d79d44 Mon Sep 17 00:00:00 2001 From: WrathfulSpatula Date: Wed, 13 Nov 2024 17:30:15 -0500 Subject: [PATCH] Amend earlier statement :v: --- src/qunit.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qunit.cpp b/src/qunit.cpp index 04ee17790..f1bdbf6a9 100644 --- a/src/qunit.cpp +++ b/src/qunit.cpp @@ -4071,8 +4071,8 @@ void QUnit::ApplyBuffer(PhaseShardPtr phaseShard, bitLenInt control, bitLenInt t } if (pState) { - if (ptHi) { - Phase(ONE_CMPLX, -ONE_CMPLX, ptHi ? control : target); + if (!ptHi) { + Phase(ONE_CMPLX, -ONE_CMPLX, target); } else if (isAnti) { // This makes absolutely no detectable difference, // according to canonical quantum mechanics. @@ -4080,9 +4080,9 @@ void QUnit::ApplyBuffer(PhaseShardPtr phaseShard, bitLenInt control, bitLenInt t // to make that explicitly obvious as part of // the statement of free speech that is Qrack. // (I'm saying, you should've already known.) - Phase(-ONE_CMPLX, ONE_CMPLX, ptHi ? control : target); + Phase(-ONE_CMPLX, ONE_CMPLX, control); } else { - Phase(ONE_CMPLX, -ONE_CMPLX, ptHi ? control : target); + Phase(ONE_CMPLX, -ONE_CMPLX, control); } }