You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix ignore_measurement_results=True for subcircuits (#4760)
Density matrix simulator has a bug that if `ignore_measurement_results` is set, that setting is overlooked within subcircuits.
The reason is that this setting check is done in `SimulatorBase.core_iterator`, but that only iterates the outermost circuit.
The fix is to move the check into `ActOnArgs.measure`, to ensure that any measurement is replaced with a dephase operation.
Surprisingly we did not even have a test for the non-subcircuit case. This PR adds a test for that and the subcircuit case.
0 commit comments