pygsti.tools.prep_penalty

pygsti.tools.prep_penalty(rhoVec)
Penalty assigned to a state preparation (rho) vector rhoVec. State
preparation density matrices must be positive semidefinite and trace == 1. A positive return value indicates an these criteria are not met and the rho-vector is invalid.
Parameters:rhoVec (numpy array) – rho vector array of shape (N,1) for some N.
Returns:
Return type:float