pygsti.tools.optools.state_to_dmvec#
- state_to_dmvec(psi)#
Compute the vectorized density matrix which acts as the state psi.
This is just the outer product map |psi> => |psi><psi| with the output flattened, i.e. dot(psi, conjugate(psi).T).
- Parameters:
psi (numpy array) – The state vector.
- Returns:
The vectorized density matrix.
- Return type:
numpy array