Skip to content

Commit a2c76ba

Browse files
Reorder statements (inconsequential)
1 parent 6dac971 commit a2c76ba

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/qtensornetwork.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ bool QTensorNetwork::ForceM(bitLenInt qubit, bool result, bool doForce, bool doA
299299
}
300300

301301
// If we did not return, this circuit layer is fully collapsed.
302-
QRACK_CONST complex pauliX[4U]{ ZERO_CMPLX, ONE_CMPLX, ONE_CMPLX, ZERO_CMPLX };
303302

304303
if (!layerId || !nonMeasuredQubits.size()) {
305304
bitCapInt perm = 0U;
@@ -309,15 +308,15 @@ bool QTensorNetwork::ForceM(bitLenInt qubit, bool result, bool doForce, bool doA
309308
}
310309
}
311310

312-
// The simulator is a computational basis eigenstate.
311+
// The simulator is in a computational basis eigenstate.
313312
SetPermutation(perm);
314313

315314
return toRet;
316315
}
317316

317+
QRACK_CONST complex pauliX[4U]{ ZERO_CMPLX, ONE_CMPLX, ONE_CMPLX, ZERO_CMPLX };
318318
const size_t layerIdMin1 = layerId - 1U;
319319
std::map<bitLenInt, bool>& mMin1 = measurements[layerIdMin1];
320-
321320
for (const auto& b : m) {
322321
auto it = mMin1.find(b.first);
323322
if ((it != mMin1.end()) && (b.second != it->second)) {
@@ -327,7 +326,6 @@ bool QTensorNetwork::ForceM(bitLenInt qubit, bool result, bool doForce, bool doA
327326
// Collapse the measurements into the previous layer.
328327
it->second = b.second;
329328
}
330-
331329
// Combine any remaining gates into the previous layer
332330
circuit[layerIdMin1]->Combine(circuit[layerId]);
333331
// The circuit layer is effectively empty.

0 commit comments

Comments
 (0)