Closed NoureldinYosri closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.78%. Comparing base (
f955650
) to head (7856e81
). Report is 1 commits behind head on main.:exclamation: Current head 7856e81 differs from pull request most recent head 9aac89e. Consider uploading reports for the commit 9aac89e to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I considered doing this in the past when the earlier issue came up, but was concerned it was like sweeping dirt under the rug. Does doing this then make other invariants start failing? I think it's worth looking at what other projects do here, and try to follow prior art on the subject.
@daxfohl for state vector there is not an issue
for density matrix it doesn't work (I reverted my changes and restricted this PR to state vector simulation). the invariant of density matrix is that $Tr[\rho^2] \leq 1$ with equality if and only if $\rho$ is pure. I don't think we should implicitly add the computation $Tr[\rho^2]$