pygsti.construction.build_vector¶
-
pygsti.construction.
build_vector
(stateSpaceDims, stateSpaceLabels, vecExpr, basis='gm')¶ Build a rho or E vector from an expression.
Parameters: - stateSpaceDims (list of ints) – Dimenstions specifying the structure of the density-matrix space. Elements correspond to block dimensions of an allowed density matrix in the standard basis, and the density-matrix space is the direct sum of linear spaces of dimension block-dimension^2.
- stateSpaceLabels (a list of tuples) – Each tuple corresponds to a block of a density matrix in the standard basis (and therefore a component of the direct-sum density matrix space). Elements of a tuple are user-defined labels beginning with “L” (single level) or “Q” (two-level; qubit) which interpret the d-dimensional state space corresponding to a d x d block as a tensor product between qubit and single level systems.
- vecExpr (string) – the expression which determines which vector to build. Currenlty, 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. - basis ({‘gm’,’pp’,’std’}, optional) – the basis of the returned vector. ‘std’ == Standard (matrix units) ‘gm’ == Gell-Mann ‘pp’ == Pauli-product
Returns: The vector specified by vecExpr in the desired basis.
Return type: numpy array