Cirq
Cirq copied to clipboard
Tweak DM normalization after factor
As reported in #5916, when repeatedly factoring and kronning a density matrix during simulation, the rounding error caused by partial_trace can propagate and explode after about 15 repetitions. This PR explicitly re-normalizes the density matrix after factoring.
Fixes #5916