Skip to content

Commit df68d61

Browse files
Comment on new ACE
1 parent 1189961 commit df68d61

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/qunit.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3940,6 +3940,9 @@ void QUnit::ApplyBuffer(PhaseShardPtr phaseShard, bitLenInt control, bitLenInt t
39403940
H(target);
39413941

39423942
const real1_f xpt = Prob(target);
3943+
// If the CNOT control is the most polarized,
3944+
// act a phase correction on the less-polarized target state.
3945+
// Otherwise, act the CNOT first if its control is more polarized.
39433946
didNegate = ((pc > pt) && (pc > xpt)) ? (pt >= xpt) : (xpt >= pt);
39443947

39453948
if (didNegate) {

0 commit comments

Comments
 (0)