Project State to physicalΒΆ

project_state_matrix_to_physical(rho) Project a possibly unphysical estimated density matrix to the closest (with respect to the 2-norm) positive semi-definite matrix with trace 1, that is a valid quantum state.