馃 AI text below 馃
Problem statement
resetSimulationState in src/backend/dd/DDSimDebug.cpp rebuilds the quantum state on reset but leaves ddsim->variables (the map of classical bit values) untouched. After a first run followed by reset, reading c[k] returns the value from the previous run rather than the initial false, and the next measure on the same bit looks like a no-op because the bit already holds the value it would receive.
Surfaced during the follow-up work on issue #168 (PR #456) and again during the review of PR #463.
Proposed solution
resetSimulationState should return the classical side to its initial state (all bits to false), the same way the quantum side is rebuilt to zero.
Out of scope
- Persisting classical bit values across code reloads.
- Restoring classical bits when stepping backward past a measurement (tracked in a separate issue).
馃 AI text below 馃
Problem statement
resetSimulationStateinsrc/backend/dd/DDSimDebug.cpprebuilds the quantum state onresetbut leavesddsim->variables(the map of classical bit values) untouched. After a firstrunfollowed byreset, readingc[k]returns the value from the previous run rather than the initialfalse, and the nextmeasureon the same bit looks like a no-op because the bit already holds the value it would receive.Surfaced during the follow-up work on issue #168 (PR #456) and again during the review of PR #463.
Proposed solution
resetSimulationStateshould return the classical side to its initial state (all bits tofalse), the same way the quantum side is rebuilt to zero.Out of scope