Skip to content

Commit 8eb9883

Browse files
Debug
1 parent a18f781 commit 8eb9883

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/qtensornetwork.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ bool QTensorNetwork::ForceM(bitLenInt qubit, bool result, bool doForce, bool doA
275275

276276
// Insert terminal measurement.
277277
measurements[layerId][qubit] = toRet;
278+
279+
if (!layerId) {
280+
return toRet;
281+
}
278282

279283
// If no qubit in this layer is unmeasured, we can completely telescope into classical state preparation.
280284
std::vector<bitLenInt> nonMeasuredQubits;

0 commit comments

Comments
 (0)