pygsti.tools.basistools.state_to_stdmx#
- state_to_stdmx(state_vec)#
Convert a state vector into a density matrix.
- Parameters:
state_vec (list or tuple) – State vector in the standard (sigma-z) basis.
- Returns:
A density matrix of shape (d,d), corresponding to the pure state given by the length-d array, state_vec.
- Return type:
numpy.ndarray