@@ -299,7 +299,6 @@ bool QTensorNetwork::ForceM(bitLenInt qubit, bool result, bool doForce, bool doA
299
299
}
300
300
301
301
// 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 };
303
302
304
303
if (!layerId || !nonMeasuredQubits.size ()) {
305
304
bitCapInt perm = 0U ;
@@ -309,15 +308,15 @@ bool QTensorNetwork::ForceM(bitLenInt qubit, bool result, bool doForce, bool doA
309
308
}
310
309
}
311
310
312
- // The simulator is a computational basis eigenstate.
311
+ // The simulator is in a computational basis eigenstate.
313
312
SetPermutation (perm);
314
313
315
314
return toRet;
316
315
}
317
316
317
+ QRACK_CONST complex pauliX[4U ]{ ZERO_CMPLX, ONE_CMPLX, ONE_CMPLX, ZERO_CMPLX };
318
318
const size_t layerIdMin1 = layerId - 1U ;
319
319
std::map<bitLenInt, bool >& mMin1 = measurements[layerIdMin1];
320
-
321
320
for (const auto & b : m) {
322
321
auto it = mMin1 .find (b.first );
323
322
if ((it != mMin1 .end ()) && (b.second != it->second )) {
@@ -327,7 +326,6 @@ bool QTensorNetwork::ForceM(bitLenInt qubit, bool result, bool doForce, bool doA
327
326
// Collapse the measurements into the previous layer.
328
327
it->second = b.second ;
329
328
}
330
-
331
329
// Combine any remaining gates into the previous layer
332
330
circuit[layerIdMin1]->Combine (circuit[layerId]);
333
331
// The circuit layer is effectively empty.
0 commit comments