Skip to content

Commit

Permalink
Analagous fix for inversions, as 1e0dfd2 (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathfulSpatula authored May 19, 2020
1 parent c5cefb8 commit 76bce32
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/qunit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,11 @@ void QUnit::ApplySingleInvert(const complex topRight, const complex bottomLeft,
return;
}

shard.CommutePhase(bottomLeft, topRight);
if (shard.IsInvertTarget()) {
TransformBasis1Qb(false, target);
shard.CommutePhase(bottomLeft, topRight);
}

shard.FlipPhaseAnti();

if (!shard.isPlusMinus) {
Expand Down

0 comments on commit 76bce32

Please sign in to comment.