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 11, 2024
1 parent ad94d06 commit fe1a316
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/qunit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2285,7 +2285,6 @@ void QUnit::Phase(const complex& topLeft, const complex& bottomRight, bitLenInt
}

complex mtrx[4U];
;
TransformPhase(topLeft, bottomRight, mtrx);

if (shard.unit) {
Expand Down Expand Up @@ -4118,23 +4117,24 @@ void QUnit::ApplyBufferMap(bitLenInt bitIndex, ShardToPhaseMap bufferMap, Revert
continue;
}

PhaseShardPtr s = phaseShard->second;
bufferMap.erase(phaseShard);

if (isControl) {
if (isAnti) {
shard.RemoveAntiTarget(partner);
} else {
shard.RemoveTarget(partner);
}
ApplyBuffer(phaseShard->second, bitIndex, partnerIndex, isAnti);
ApplyBuffer(s, bitIndex, partnerIndex, isAnti);
} else {
if (isAnti) {
shard.RemoveAntiControl(partner);
} else {
shard.RemoveControl(partner);
}
ApplyBuffer(phaseShard->second, partnerIndex, bitIndex, isAnti);
ApplyBuffer(s, partnerIndex, bitIndex, isAnti);
}

bufferMap.erase(phaseShard);
}
}

Expand Down

0 comments on commit fe1a316

Please sign in to comment.