pygsti.models.modelconstruction.create_spam_vector#
- create_spam_vector(vec_expr, state_space, basis)#
Build a rho or E vector from an expression.
- Parameters:
vec_expr (string) – the expression which determines which vector to build. Currently, only integers are allowed, which specify a the vector for the pure state of that index. For example, “1” means return vectorize(
|1><1|). The index labels the absolute index of the state within the entire state space, and is independent of the direct-sum decomposition of density matrix space.state_space (StateSpace) – The state space that the created operation should act upon.
basis (str or Basis) – The basis of the returned vector. Allowed values are Matrix-unit (std), Gell-Mann (gm), Pauli-product (pp), and Qutrit (qt) (or a custom basis object).
- Returns:
The vector specified by vec_expr in the desired basis.
- Return type:
numpy array