project_state_matrix_to_physical¶
-
forest.benchmarking.operator_tools.project_state_matrix.
project_state_matrix_to_physical
(rho: numpy.ndarray) → numpy.ndarray¶ 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.
This comes from the so called “wizard” method. It is described in [MLEWIZ]
[MLEWIZ] Efficient Method for Computing the Maximum-Likelihood Quantum State from Measurements with Additive Gaussian Noise. Smolin et al. Phys. Rev. Lett. 108, 070502 (2012). https://doi.org/10.1103/PhysRevLett.108.070502 https://arxiv.org/abs/1106.5458 Parameters: rho – the density (state) matrix with shape (N, N) Return rho_projected: The closest positive semi-definite trace 1 matrix to rho.